@import url("tokens.css");

#reserva-app, .cq-app, .espacio-app {
    background: var(--papel); color: var(--tinta); border-radius: 32px; padding: clamp(18px, 3vw, 36px);
}
.rs-paso { font-family: var(--fuente-serif); font-size: 28px; margin-bottom: 18px; }
.rs-paso span { color: var(--hoja); }
.rs-paso em { font-style: italic; color: var(--tinta-suave); font-size: 18px; }
.rs-modalidad { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.rs-modalidad button {
    text-align: left; border: 1px solid var(--linea); background: var(--cream); border-radius: 22px; padding: 18px; cursor: pointer; font-family: var(--fuente-serif); font-size: 26px;
}
.rs-modalidad button[aria-selected="true"] { background: var(--sage-deep); color: var(--cream); border-color: var(--sage-deep); }
.rs-servicios { display: grid; gap: 12px; }
.rs-servicio {
    display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center;
    border: 1px solid var(--linea); border-radius: 22px; padding: 16px 16px 16px 18px; background: var(--cream);
}
.rs-servicio h3 { font-size: 26px; }
.rs-servicio p { color: var(--tinta-suave); }
.rs-servicio-meta { display: grid; justify-items: end; gap: 6px; }
.rs-servicio-meta strong { font-family: var(--fuente-serif); font-size: 24px; }
.rs-nota, .rs-ayuda { color: var(--tinta-suave); margin: 8px 0; }
.rs-error, .cq-error { color: #8d3d32; margin: 8px 0; }
.rs-volver { background: none; border: 0; color: var(--hoja); cursor: pointer; margin-bottom: 8px; font-weight: 700; }
.rs-cal-cabeza { display: flex; align-items: center; justify-content: space-between; margin: 12px 0; }
.rs-cal-cabeza h3, .rs-subtitulo { font-size: 28px; }
.rs-cal-cabeza button, .ag-nav button { border: 1px solid var(--linea); background: var(--cream); border-radius: 999px; width: 40px; height: 40px; cursor: pointer; }
.rs-semana, .rs-mes { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; text-align: center; justify-items: center; }
.rs-semana { color: var(--tinta-suave); font-size: 13px; margin-bottom: 6px; }
.rs-dia {
    border: 0; background: transparent; border-radius: 10px; width: 40px; height: 40px;
    cursor: default; color: #a9a49a; font-weight: 650; font-size: 15px;
    transition: background 0.15s ease, color 0.15s ease;
}
.rs-dia.libre { background: transparent; color: var(--sage-deep); font-weight: 700; cursor: pointer; }
.rs-dia.libre:hover,
.rs-dia.libre:focus-visible { background: var(--oliva-suave); outline: 2px solid var(--sage-deep); outline-offset: 1px; }
.rs-dia.elegido,
.rs-dia.elegido:hover,
.rs-dia.elegido:focus-visible { background: var(--sage-deep); color: var(--cream); outline: 2px solid var(--sage-deep); outline-offset: 2px; }
.rs-dia.hoy:not(.elegido) { box-shadow: inset 0 0 0 1.5px var(--oliva); }
.rs-dia-vacio { visibility: hidden; }
.rs-horas { display: flex; flex-wrap: wrap; gap: 8px; }
.rs-hora { border: 1px solid var(--linea); background: white; border-radius: 999px; padding: 10px 14px; cursor: pointer; }
.rs-hora.activo { background: var(--sage-deep); color: var(--cream); }
.rs-grilla, .rs-resumen, .espacio-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rs-ancho, .rs-check, .rs-metodos, .rs-cupon, .rs-banco { grid-column: 1 / -1; }
.rs-campo { display: grid; gap: 6px; font-weight: 650; }
.rs-campo input, .rs-campo textarea, .rs-campo select, .rs-cupon input, .cq-pregunta input, .cq-pregunta textarea, .espacio-form input {
    width: 100%; border: 1px solid var(--linea); border-radius: 14px; padding: 12px; background: white;
}
.rs-check { display: flex; gap: 8px; align-items: flex-start; font-weight: 500; }
.rs-resumen, .rs-banco, .rs-despues { background: var(--cream); border-radius: 18px; padding: 14px; margin: 12px 0; }
.rs-resumen p, .rs-total { display: flex; justify-content: space-between; gap: 12px; margin: 6px 0; }
.rs-metodo { display: flex; gap: 10px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--linea); }
.rs-metodo-principal { margin-top: 8px; padding: 14px; border: 2px solid var(--hoja); border-radius: 16px; background: var(--oliva-suave); }
.rs-metodo input:disabled + span { opacity: 0.55; }
.rs-metodo small, .rs-ejemplo { display: block; color: var(--tinta-suave); font-weight: 450; }
.rs-ejemplo { color: #8d3d32; }
.rs-cuenta-caja { background: #f6e3c2; border-radius: 16px; padding: 14px; font-size: 18px; }
#rs-cuenta { font-variant-numeric: tabular-nums; font-size: 32px; }
.rs-listo h3 { font-size: 40px; line-height: 1.05; }
.rs-codigo { font-size: 28px; font-family: var(--fuente-serif); margin: 8px 0; }
.rs-despues { display: grid; gap: 10px; }
.rs-despues .boton, .rs-despues .boton-linea { justify-self: start; }

.cq-app, .espacio-app { min-height: 60vh; }
.cq-kicker { letter-spacing: 0.14em; text-transform: uppercase; font-size: 12px; color: var(--hoja); font-weight: 700; }
.cq-app h1, .espacio-app h1 { font-size: clamp(36px, 5vw, 56px); line-height: 1.02; margin: 6px 0 12px; }
.cq-barra { height: 8px; background: var(--cream-2); border-radius: 99px; overflow: hidden; margin-bottom: 12px; }
.cq-barra span { display: block; height: 100%; background: var(--hoja); }
.cq-pregunta { border: 0; margin: 14px 0; }
.cq-pregunta legend { font-weight: 700; margin-bottom: 8px; }
.cq-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.cq-chip { border: 1px solid var(--linea); background: white; border-radius: 999px; padding: 10px 14px; cursor: pointer; }
.cq-chip.activo { background: var(--sage-deep); color: var(--cream); border-color: var(--sage-deep); }
.cq-numero { display: flex; align-items: center; gap: 8px; }
.cq-numero button { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--linea); background: var(--cream); cursor: pointer; }
.cq-numero input { max-width: 120px; }
.cq-acciones { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.cq-consent, .cq-demo { background: var(--oliva-suave); border-radius: 16px; padding: 14px; margin: 12px 0; }
.cq-check { display: flex; gap: 8px; align-items: flex-start; margin: 12px 0; }
.espacio-hora { border-top: 1px solid var(--linea); padding: 16px 0; display: grid; gap: 6px; }
.pagina-suave { background: var(--cream); min-height: 100vh; }
.pagina-suave .cabecera { margin-bottom: 18px; }

@media (prefers-reduced-motion: reduce) {
    .rs-dia { transition: none; }
}
@media (max-width: 720px) {
    .rs-modalidad, .rs-servicio, .rs-grilla { grid-template-columns: 1fr; }
    .rs-servicio-meta { justify-items: start; }
}

/* Pago de reservas con Mercado Pago (solo visible con pagos_reserva_mp_activo) */
.rs-mp-acciones { display: grid; gap: 10px; margin: 14px 0; }
.rs-mp-acciones .boton, .rs-mp-acciones .boton-secundario { width: 100%; }

/* Planes con todas sus fechas (solo visible con planes_compra_activo) */
.rs-nota-control { margin: 8px 0 0; font-weight: 600; color: var(--sage-deep, #4f5b45); }
.rs-plan-sesiones, .rs-plan-lista { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 8px; }
.rs-plan-sesiones li, .rs-plan-lista li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; padding: 10px 12px; border-radius: 12px; background: rgba(0,0,0,0.035); }
.rs-plan-sesiones li.actual { outline: 2px solid var(--sage, #8a9a7b); background: transparent; }
.rs-plan-sesiones li span { flex: 1 1 100%; font-weight: 600; }
.rs-plan-sesiones li em { color: var(--tinta-suave, #666); font-style: normal; font-size: 0.92em; }
.rs-enlace { background: none; border: 0; padding: 0; color: var(--sage-deep, #4f5b45); text-decoration: underline; cursor: pointer; font: inherit; }
.rs-resumen-plan { display: block; }
.rs-resumen-plan p strong { text-align: right; }


/* ===== Selector de día y hora (rediseño 2026-11-21) ===== */
.rs-cal {
    background: var(--cream); border: 1px solid var(--linea); border-radius: 24px;
    padding: 14px 10px 12px; margin: 14px 0 6px;
}
.rs-cal-cabeza { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 2px 10px; }
.rs-cal-cabeza h3 { font-family: var(--fuente-serif); font-size: 20px; line-height: 1.2; margin: 0; text-align: center; color: var(--tinta); }
.rs-cal-cabeza button {
    width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--hoja); background: var(--papel); color: var(--hoja);
    display: grid; place-items: center; cursor: pointer; flex: 0 0 auto;
}
.rs-cal-cabeza button:hover { background: var(--oliva-suave); }
.rs-semana, .rs-mes { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; justify-items: stretch; text-align: center; }
.rs-semana { font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--tinta-suave); margin-bottom: 4px; }
.rs-dia {
    position: relative; width: 100%; height: 44px; min-width: 0; border: 0; border-radius: 50%;
    background: transparent; color: #a19c92; font-size: 15px; font-weight: 500; cursor: default; padding: 0;
    font-variant-numeric: tabular-nums;
}
.rs-dia:disabled { text-decoration: line-through; text-decoration-color: rgba(161, 156, 146, 0.55); }
.rs-dia.libre {
    color: #2f5640; font-weight: 700; cursor: pointer; text-decoration: none;
    background: radial-gradient(circle closest-side, var(--oliva-suave) 0 92%, transparent 94%);
}
.rs-dia.libre::before {
    content: ""; position: absolute; inset: 50% auto auto 50%; width: 40px; height: 40px; transform: translate(-50%, -50%);
    border-radius: 50%; border: 1.5px solid #8fb07a; pointer-events: none;
}
.rs-dia.libre:hover::before, .rs-dia.libre:focus-visible::before { border: 2px solid var(--hoja); }
.rs-dia.libre:focus-visible { outline: none; }
.rs-dia.elegido, .rs-dia.elegido:hover, .rs-dia.elegido:focus-visible {
    color: #ffffff; outline: none;
    background: radial-gradient(circle closest-side, var(--hoja) 0 92%, transparent 94%);
}
.rs-dia.elegido::before { border-color: var(--hoja); }
.rs-dia.hoy:not(.elegido) { box-shadow: none; }
.rs-dia.hoy::after {
    content: ""; position: absolute; left: 50%; bottom: 3px; width: 5px; height: 5px; margin-left: -2.5px;
    border-radius: 50%; background: #c0662f;
}
.rs-dia.elegido.hoy::after { background: #ffffff; }
.rs-dia-vacio { visibility: hidden; }
.rs-leyenda { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; margin: 10px 0 0; padding: 8px 0 0; border-top: 1px solid var(--linea); font-size: 13px; color: var(--tinta-suave); }
.rs-leyenda li { display: inline-flex; align-items: center; gap: 6px; }
.rs-leyenda i { width: 14px; height: 14px; border-radius: 50%; display: inline-block; }
.rs-leyenda .l-libre { background: var(--oliva-suave); box-shadow: inset 0 0 0 1.5px #8fb07a; }
.rs-leyenda .l-elegido { background: var(--hoja); }
.rs-leyenda .l-hoy { width: 6px; height: 6px; background: #c0662f; margin: 0 4px; }
.rs-leyenda .l-no { background: transparent; box-shadow: inset 0 0 0 1px #c9c4ba; position: relative; }
.rs-leyenda .l-no::after { content: ""; position: absolute; left: 1px; right: 1px; top: 6.5px; height: 1px; background: #a19c92; transform: rotate(-35deg); }

.rs-horas-bloque { scroll-margin-top: 90px; margin: 18px 0 6px; }
.rs-horas-titulo { font-family: var(--fuente-sans); font-size: 17px; font-weight: 700; margin: 0 0 10px; color: var(--tinta); }
.rs-horas-grupo + .rs-horas-grupo { margin-top: 14px; }
.rs-horas-etiqueta { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--hoja); margin: 0 0 8px; }
.rs-horas-etiqueta span { color: var(--tinta-suave); font-weight: 500; letter-spacing: 0; text-transform: none; }
.rs-horas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rs-hora {
    min-height: 48px; border: 1.5px solid #8fb07a; background: var(--papel); color: #2f5640; border-radius: 999px;
    font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; cursor: pointer; padding: 0 8px;
}
.rs-hora:hover { background: var(--oliva-suave); }
.rs-hora.activo, .rs-hora.activo:hover { background: var(--hoja); border-color: var(--hoja); color: #ffffff; }
.rs-vacio {
    display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 18px;
    background: var(--cream); border: 1.5px dashed #c9cfbd; color: var(--hoja);
}
.rs-vacio p { margin: 0; display: grid; gap: 2px; color: var(--tinta); }
.rs-vacio span { color: var(--tinta-suave); font-size: 15px; }

.rs-eleccion, .rs-plan-elegidas li {
    display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px;
    background: var(--oliva-suave); border: 1.5px solid #b9cc8a; margin: 14px 0 4px;
}
.rs-eleccion small, .rs-plan-elegidas small { display: block; font-size: 13px; color: var(--tinta-suave); font-weight: 600; }
.rs-eleccion strong, .rs-plan-elegidas strong { font-size: 17px; color: #2f5640; }
.rs-eleccion-ico {
    flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
    background: var(--hoja); color: #ffffff; font-weight: 700; font-size: 15px;
}
.rs-plan-elegidas { margin: 10px 0; display: grid; gap: 6px; }
.rs-plan-sesiones.rs-plan-elegidas li { margin: 0; padding: 8px 12px; background: var(--cream); border-color: var(--linea); flex-wrap: nowrap; }
.rs-plan-elegidas li > span:nth-child(2) { flex: 1 1 auto; font-weight: 400; }
.rs-plan-elegidas strong { font-size: 15px; }
.rs-plan-elegidas .rs-eleccion-ico { width: 24px; height: 24px; font-size: 13px; background: #8fb07a; }
.rs-plan-elegidas .rs-enlace { min-height: 44px; padding: 0 4px; font-weight: 700; color: var(--hoja); }

.rs-progreso { margin: 14px 0 4px; }
.rs-puntos { list-style: none; display: flex; align-items: center; gap: 0; margin: 0 0 10px; padding: 0; }
.rs-puntos li {
    width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; font-weight: 700;
    background: var(--papel); color: var(--tinta-suave); border: 1.5px solid #c9cfbd; flex: 0 0 auto;
}
.rs-puntos li + li::before { content: ""; display: block; }
.rs-puntos li + li { margin-left: 22px; position: relative; }
.rs-puntos li + li::after { content: ""; position: absolute; right: 100%; top: 50%; width: 22px; height: 2px; background: #c9cfbd; }
.rs-puntos li.hecho { background: #8fb07a; border-color: #8fb07a; color: #ffffff; }
.rs-puntos li.hecho + li::after, .rs-puntos li.hecho + li.hecho::after { background: #8fb07a; }
.rs-puntos li.actual { background: var(--hoja); border-color: var(--hoja); color: #ffffff; box-shadow: 0 0 0 4px var(--oliva-suave); }
.rs-progreso-titulo { margin: 0; font-size: 17px; }
.rs-progreso-titulo strong { color: var(--tinta); }
.rs-regla { margin: 4px 0 0; font-size: 15px; font-weight: 600; color: var(--hoja); }

.rs-cta {
    position: sticky; bottom: 0; z-index: 20; margin: 14px -4px 0; padding: 12px 4px calc(12px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(to bottom, rgba(255, 253, 248, 0), var(--papel) 28%);
}
.rs-cta .boton { width: 100%; min-height: 52px; font-size: 17px; justify-content: center; text-align: center; }
.rs-cta .boton.rs-cta-inactivo { background: #c9cdc2; color: #3f4639; }

@media (max-width: 420px) {
    .rs-cal { margin-left: -10px; margin-right: -10px; padding-left: 6px; padding-right: 6px; }
    .rs-semana, .rs-mes { gap: 2px; }
    .rs-dia.libre::before { width: 38px; height: 38px; }
}
@media (max-width: 340px) {
    .rs-horas { grid-template-columns: repeat(2, 1fr); }
}
.rs-plan-sesiones.rs-plan-elegidas li { align-items: center; flex-wrap: nowrap; gap: 10px; }
.rs-plan-sesiones.rs-plan-elegidas li > span.rs-eleccion-ico { flex: 0 0 24px; }
.rs-plan-sesiones.rs-plan-elegidas li > span:nth-child(2) { flex: 1 1 auto; min-width: 0; font-weight: 400; }
.rs-plan-elegidas strong { display: block; }
.rs-plan-elegidas .rs-enlace { flex: 0 0 auto; }
@media (max-width: 420px) {
    .rs-cal { margin-left: -12px; margin-right: -12px; padding-left: 5px; padding-right: 5px; }
}
