/* Pedir cita (sitio/cita.php). Usa los tokens de sitio.css. */
.cw-body { background: var(--bg); }
.cw-main { padding: 32px 0 56px; }
.cw-head { max-width: 640px; margin-bottom: 22px; }
.cw-head h1 { font-size: clamp(30px, 4vw, 42px); margin: 6px 0 8px; }
.cw-head p { margin: 0; color: var(--muted); }

.cw-pasos { display: flex; gap: 8px; margin: 0 0 22px; padding: 0; list-style: none; overflow-x: auto; }
.cw-pasos li { display: flex; align-items: center; gap: 8px; padding: 8px 14px 8px 8px; border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); font-size: 14px; font-weight: 600; white-space: nowrap; }
.cw-pasos li span { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--tint); color: var(--teal-dk); font-weight: 800; font-size: 13px; font-variant-numeric: tabular-nums; }
.cw-pasos li.is-on { color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--teal); }
.cw-pasos li.is-on span, .cw-pasos li.is-hecho span { background: var(--metal-btn); color: #fff; }

.cw-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 22px; align-items: start; }
.cw-panel, .cw-resumen { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--sh); }
.cw-panel { padding: 26px; min-width: 0; }
.cw-resumen { padding: 22px; position: sticky; top: 88px; }
.cw-resumen h2 { font-size: 18px; margin-bottom: 12px; }
.cw-resumen dl { margin: 0; }
.cw-resumen dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.cw-resumen dt { color: var(--muted); }
.cw-resumen dd { margin: 0; font-weight: 700; text-align: right; }
.cw-r-valor dd { color: var(--teal-dk); font-size: 17px; font-variant-numeric: tabular-nums; }

.cw-paso { display: none; }
.cw-paso.is-on { display: block; animation: cwEntra .2s ease-out; }
@keyframes cwEntra { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.cw-paso h2 { font-size: 22px; margin-bottom: 16px; }
.cw-sub { font-size: 15px; margin: 18px 0 10px; color: var(--muted); font-family: 'Manrope', sans-serif; font-weight: 700; }
.cw-nota { margin: -6px 0 14px; color: var(--muted); font-size: 14px; }

.cw-opciones { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cw-opcion { display: grid; gap: 6px; justify-items: start; text-align: left; padding: 18px; border: 0; border-radius: var(--r); background: var(--card); box-shadow: inset 0 0 0 1.5px var(--line); font: inherit; color: var(--ink); cursor: pointer; transition: box-shadow .15s ease-out, transform .15s ease-out; }
.cw-opcion:hover { box-shadow: inset 0 0 0 1.5px var(--teal); }
.cw-opcion:active { transform: scale(.98); }
.cw-opcion[aria-checked="true"] { box-shadow: inset 0 0 0 2px var(--teal), 0 6px 18px rgba(0, 122, 109, .12); background: linear-gradient(180deg, #fff, var(--tint)); }
.cw-opcion b { font-size: 17px; }
.cw-opcion small { color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.cw-opcion-ico { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--tint); color: var(--teal-dk); font-size: 18px; }

.cw-eps { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.cw-campos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; margin-bottom: 14px; }
.cw-campos-3 { grid-template-columns: 1.3fr 1fr 1fr; }
.cw-campo { display: grid; gap: 5px; font-size: 13px; font-weight: 700; color: #33415c; }
.cw-campo small { font-weight: 500; color: var(--muted); }
.cw-campo input, .cw-campo select { width: 100%; min-height: 46px; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: #fff; font: 500 15px 'Manrope', sans-serif; color: var(--ink); }
.cw-campo input:focus, .cw-campo select:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0, 162, 144, .15); }
.cw-campo-codigo { max-width: 240px; }
.cw-campo-codigo input { font: 700 24px 'Space Grotesk', sans-serif; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
.cw-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.cw-check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--teal); }
.cw-acciones { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 20px; }

/* Estado de afiliación */
.cw-afil:empty { display: none; }
.cw-afil { margin-top: 18px; }
.cw-afil-card { border-radius: var(--r); box-shadow: inset 0 0 0 1.5px var(--line); overflow: hidden; }
.cw-afil-top { display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: var(--tint); }
.cw-afil-card.is-mal .cw-afil-top { background: #fdf0ee; }
.cw-afil-card.is-pend .cw-afil-top { background: #fff7e6; }
.cw-afil-ico { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--metal-btn); color: #fff; font-size: 20px; }
.cw-afil-card.is-mal .cw-afil-ico { background: #b4372b; }
.cw-afil-card.is-pend .cw-afil-ico { background: #b26a00; }
.cw-afil-top b { display: block; font-size: 17px; }
.cw-afil-top small { color: var(--muted); }
.cw-afil-sim { margin-left: auto; padding: 4px 10px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.cw-afil dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; margin: 0; padding: 6px 18px 12px; }
.cw-afil dl div { padding: 10px 0; border-bottom: 1px solid var(--line); }
.cw-afil dt { font-size: 12px; color: var(--muted); font-weight: 600; }
.cw-afil dd { margin: 2px 0 0; font-weight: 700; }
.cw-afil-msg { margin: 0; padding: 12px 18px; font-size: 14px; color: var(--muted); }
.cw-afil-acc { display: flex; gap: 10px; flex-wrap: wrap; padding: 4px 18px 18px; }

/* Especialidades */
.cw-esp { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.cw-esp-op { display: grid; gap: 4px; text-align: left; padding: 14px 16px; border: 0; border-radius: var(--r); background: #fff; box-shadow: inset 0 0 0 1.5px var(--line); font: inherit; color: var(--ink); cursor: pointer; transition: box-shadow .15s ease-out; }
.cw-esp-op:hover { box-shadow: inset 0 0 0 1.5px var(--teal); }
.cw-esp-op[aria-checked="true"] { box-shadow: inset 0 0 0 2px var(--teal); background: var(--tint); }
.cw-esp-op b { font-size: 15.5px; }
.cw-esp-op span { font-size: 14px; color: var(--teal-dk); font-weight: 700; font-variant-numeric: tabular-nums; }
.cw-esp-op span.is-eps { color: var(--muted); font-weight: 600; }

/* Fechas y horas */
.cw-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cw-chip { min-width: 74px; min-height: 44px; padding: 8px 14px; border: 0; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line); font: 700 14px 'Manrope', sans-serif; color: var(--ink); cursor: pointer; font-variant-numeric: tabular-nums; }
.cw-chip small { display: block; font-weight: 500; font-size: 12px; color: var(--muted); }
.cw-chip:hover { box-shadow: inset 0 0 0 1.5px var(--teal); }
.cw-chip[aria-pressed="true"] { background: var(--metal-btn); color: #fff; box-shadow: none; }
.cw-chip[aria-pressed="true"] small { color: rgba(255, 255, 255, .85); }
.cw-vacio { margin: 0; color: var(--muted); font-size: 14px; }

.cw-demo { margin: 0 0 14px; padding: 12px 14px; border-radius: var(--r-sm); background: #fff7e6; color: #7a4a00; font-size: 14px; }
.cw-demo b { font: 700 20px 'Space Grotesk', sans-serif; letter-spacing: .2em; }
.cw-error { margin: 16px 0 0; padding: 12px 14px; border-radius: var(--r-sm); background: #fdf0ee; color: #8f2a20; font-size: 14px; font-weight: 600; }

.cw-ok { text-align: center; padding: 10px 0; }
.cw-ok-ico { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--metal-btn); color: #fff; font-size: 28px; margin-bottom: 12px; }
.cw-ok h2 { margin-bottom: 6px; }
.cw-ok > p { color: var(--muted); margin: 0 0 18px; }
.cw-ok dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; max-width: 520px; margin: 0 auto 18px; text-align: left; }
.cw-ok dl div { padding: 10px 0; border-bottom: 1px solid var(--line); }
.cw-ok dt { font-size: 12px; color: var(--muted); font-weight: 600; }
.cw-ok dd { margin: 2px 0 0; font-weight: 700; }
.cw-ok-pago { max-width: 520px; margin: 0 auto 18px; padding: 14px 16px; border-radius: var(--r); background: var(--tint); text-align: left; font-size: 14.5px; }
.cw-ok-pago b { font-size: 20px; color: var(--teal-dk); font-variant-numeric: tabular-nums; }

.cw-pie { padding: 22px 0 30px; color: var(--muted); font-size: 14px; }
.cw-pie a { color: var(--link); }

.cw-cargando { opacity: .6; pointer-events: none; }

@media (max-width: 900px) {
    .cw-layout { grid-template-columns: 1fr; }
    .cw-resumen { position: static; order: -1; padding: 16px 18px; }
    .cw-resumen dl { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
    .cw-resumen dl > div { display: block; }
    .cw-resumen dd { text-align: left; }
}
@media (max-width: 600px) {
    .cw-panel { padding: 18px; }
    .cw-opciones, .cw-campos, .cw-campos-3, .cw-afil dl, .cw-ok dl { grid-template-columns: 1fr; }
    .cw-acciones .st-btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
    .cw-paso.is-on { animation: none; }
}
