/*
 * reserva-pasos.css — reserva en pasos (solo forma; el funcionamiento sigue en reserva.js).
 * Mismo lenguaje del diseño v4: Niebla/Bruma, Bosque/Pino/Musgo, esquinas rectas, títulos en mayúscula.
 * Se carga DESPUÉS de ngen.css.
 */

/* ---------- Portada compacta: el formulario aparece sin tener que bajar ---------- */
.rs-hero { position: relative; }
.rs-hero-img { position: relative; height: clamp(120px, 15vw, 210px); background: var(--ngen-niebla); overflow: hidden; }
.rs-hero-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 33%;
    -webkit-mask-image: linear-gradient(#000 35%, transparent 95%); mask-image: linear-gradient(#000 35%, transparent 95%); }
.rs-hero-text { position: relative; max-width: 1280px; margin: -34px auto 0; padding: 0 clamp(20px, 4vw, 48px); display: flex; flex-direction: column; gap: 10px; }
.rs-crumb { font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--ngen-piedra); display: flex; gap: 10px; }
.rs-crumb a { color: var(--ngen-piedra); }
.rs-crumb span:last-child { color: var(--ngen-bosque); }
.rs-hero h1 { text-transform: uppercase; }
.rs-h1-a { display: block; font-size: clamp(22px, 2.6vw, 34px); line-height: 1.06; font-weight: 600; letter-spacing: .05em; color: var(--ngen-bosque); }
.rs-h1-b { display: block; margin-top: 8px; font-size: clamp(11px, 1.2vw, 15px); font-weight: 300; letter-spacing: .18em; color: var(--ngen-pino); }

section.rs { padding: clamp(24px, 3.4vw, 44px) 0 clamp(56px, 7vw, 96px); }
.rs-wrap { gap: clamp(28px, 4vw, 64px); }
.rs-main { gap: 20px; }
.rs-form { gap: 0; position: relative; }

/* ---------- Progreso ---------- */
.rs-progress { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 0 0 clamp(20px, 3vw, 30px); padding: 0; list-style: none; }
.rs-prog-item { appearance: none; border: 0; background: none; padding: 0; text-align: left; font: inherit; color: var(--ngen-piedra);
    display: flex; flex-direction: column; gap: 9px; cursor: default; min-width: 0; }
.rs-prog-bar { display: block; height: 4px; background: var(--ngen-bruma); position: relative; overflow: hidden; }
.rs-prog-bar::after { content: ""; position: absolute; inset: 0; background: var(--ngen-bosque); transform: scaleX(0); transform-origin: left; transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.rs-prog-item.is-done .rs-prog-bar::after, .rs-prog-item.is-current .rs-prog-bar::after { transform: scaleX(1); }
.rs-prog-item.is-current .rs-prog-bar::after { background: var(--ngen-pino); }
.rs-prog-label { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
.rs-prog-num { flex: 0 0 auto; width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; font-size: 11px;
    background: var(--ngen-bruma); color: var(--ngen-piedra); transition: background .3s, color .3s; }
.rs-prog-item.is-current { color: var(--ngen-pino); }
.rs-prog-item.is-current .rs-prog-num { background: var(--ngen-pino); color: var(--ngen-niebla); }
.rs-prog-item.is-done { color: var(--ngen-bosque); cursor: pointer; }
.rs-prog-item.is-done .rs-prog-num { background: var(--ngen-bosque); color: var(--ngen-niebla); }
.rs-prog-item.is-done:hover .rs-prog-label span:last-child { text-decoration: underline; text-underline-offset: 3px; }
.rs-prog-text { overflow: hidden; text-overflow: ellipsis; }

/* ---------- Paso ---------- */
.rs-step { animation: rsIn .45s cubic-bezier(.2,.7,.2,1) both; scroll-margin-top: 92px; }
@keyframes rsIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.rs-step-head { margin: 0 0 18px; }
.rs-kicker { margin: 0 0 6px; font-size: 11px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--ngen-bosque); }
.rs-step-head h2 { font-size: clamp(22px, 2.4vw, 30px); line-height: 1.12; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--ngen-pino); }
.rs-lead { margin: 10px 0 0; max-width: 60ch; font-size: 15px; color: var(--ngen-piedra); }
.rs-lead b { color: var(--ngen-pino); font-weight: 600; }
.rs-card { background: var(--ngen-bruma); padding: clamp(16px, 2.6vw, 28px); display: flex; flex-direction: column; gap: 14px; }
.rs-card-title { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ngen-pino); }
.rs-small { margin: 0; font-size: 13px; color: var(--ngen-piedra); }
.rs-form .rs-card p { margin: 0; }
.rs .ngr-hint { margin: 0; min-height: 1.5em; }

/* Calendario: celdas más grandes, fáciles de tocar */
.rs .ngr-calendar { padding: 8px clamp(8px, 2vw, 18px) 10px; }
.rs .ngr-cal-day { min-height: 46px; font-size: 15px; }
.rs .ngr-cal-nav { position: absolute; top: 8px; right: 10px; margin: 0; }
.rs .ngr-calendar { position: relative; }
.rs .ngr-cal-head { min-height: 40px; display: flex; align-items: center; padding-left: 4px; }
.rs .ngr-cal-title { font-size: 13px; }
.rs .ngr-cal-arrow { background: var(--ngen-bruma); width: 40px; height: 40px; }
.rs .ngr-cal-arrow:hover:not(:disabled) { background: var(--ngen-bosque); color: var(--ngen-niebla); }
.rs .ngr-cal-arrow:disabled { opacity: .3; }
.rs .ngr-cal-legend { margin-top: 10px; }
.rs .ngr-hint-warning { background: #f0e4e4; padding: 10px 12px; border-left: 3px solid #8a2a2a; }

/* Pasajeros: contador grande + figuras */
.rs .ngr-stepper { margin: 0; align-self: flex-start; }
.rs .ngr-stepper button { width: 56px; height: 56px; font-size: 24px; }
.rs .ngr-stepper-value { height: 56px; min-width: 88px; font-size: 28px; }
.rs-people { display: flex; gap: 6px; min-height: 34px; flex-wrap: wrap; }
.rs-people svg { width: 24px; height: 34px; color: var(--ngen-bosque); animation: rsPop .35s cubic-bezier(.2,.9,.3,1.4) both; }
@keyframes rsPop { from { opacity: 0; transform: scale(.4) translateY(6px); } to { opacity: 1; transform: none; } }

/* Código: plegado hasta que se necesita */
.rs-code { margin-top: 12px; border: 1px solid #d3cfbf; background: var(--ngen-niebla); }
.rs-code summary { cursor: pointer; list-style: none; padding: 14px 16px; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ngen-bosque); display: flex; justify-content: space-between; align-items: center; }
.rs-code summary::-webkit-details-marker { display: none; }
.rs-code summary::after { content: "+"; font-size: 18px; font-weight: 400; }
.rs-code[open] summary::after { content: "\2014"; }
.rs-code-body { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.rs-code .ngr-discount-row { display: flex; }
.rs-code .ngr-discount-row .input-text { flex: 1; min-width: 0; }

/* Fichas de pasajeros como acordeón */
.rs .ngr-pax-card { padding: 0; margin: 0 0 10px; border: 1px solid #d3cfbf; background: var(--ngen-niebla); }
.rs .ngr-pax-card h4 { margin: 0; padding: 0; border: 0; }
.rs-pax-head { appearance: none; width: 100%; border: 0; background: none; font: inherit; text-align: left; cursor: pointer;
    display: flex; align-items: center; gap: 12px; padding: 14px clamp(14px, 2.4vw, 22px); color: var(--ngen-pino); }
.rs-pax-head:hover { background: rgba(228, 225, 214, .45); }
.rs-pax-n { flex: 0 0 auto; width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; background: var(--ngen-bosque); color: var(--ngen-niebla); font-size: 13px; font-weight: 600; }
.rs-pax-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.rs-pax-t b { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ngen-bosque); }
.rs-pax-t span { font-size: 14px; color: var(--ngen-piedra); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rs-pax-st { flex: 0 0 auto; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; padding: 4px 8px; background: var(--ngen-bruma); color: var(--ngen-piedra); }
.ngr-pax-card.is-complete .rs-pax-st { background: var(--ngen-bosque); color: var(--ngen-niebla); }
.rs-pax-chev { flex: 0 0 auto; width: 10px; height: 10px; border-right: 2px solid var(--ngen-bosque); border-bottom: 2px solid var(--ngen-bosque); transform: rotate(45deg); transition: transform .3s; margin: -4px 4px 0 2px; }
.ngr-pax-card.is-open .rs-pax-chev { transform: rotate(-135deg); margin-top: 4px; }
.rs-pax-body { padding: 4px clamp(14px, 2.4vw, 22px) 18px; display: none; }
.ngr-pax-card.is-open .rs-pax-body { display: block; animation: rsIn .35s both; }
.rs-pax-body .row { margin: 0 0 16px !important; }
.rs .ngr-pax-card .input-text { background: #fff; }
.rs-pax-next { margin-top: 4px; }
.rs-form .col-lg-6 > p { margin-bottom: 6px; }
.rs-pax-body .row, .rs-card .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 16px 20px; margin: 0; }
.rs-pax-body .row > div, .rs-card .row > div { min-width: 0; }
.rs-pax-body .row + .row { margin-top: 16px; }
.rs-pax-solo .rs-pax-head { cursor: default; }
.rs-pax-solo .rs-pax-chev { display: none; }

/* Resumen previo al envío */
/* Resumen: celdas con borde propio (sin fondo que se vea si queda una celda suelta) */
.rs-review { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0; background: var(--ngen-niebla); border-top: 1px solid #d3cfbf; border-left: 1px solid #d3cfbf; margin: 0 0 14px; }
.rs-review div { background: var(--ngen-niebla); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; border-right: 1px solid #d3cfbf; border-bottom: 1px solid #d3cfbf; }
/* Alerta de plazo (pago completo / recargo urgente) en cuanto se elige la fecha */
.rs-alert { margin-top: 12px; padding: 14px 16px; font-size: 14px; line-height: 1.55; color: var(--ngen-pino); background: var(--ngen-niebla); border: 1px solid #d3cfbf; border-left: 4px solid var(--ngen-musgo); animation: rsIn .35s both; }
.rs-alert b { font-weight: 600; }
.rs-review dt, .rs-review .k { font-size: 10px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ngen-piedra); }
.rs-review .v { font-size: 15px; font-weight: 500; color: var(--ngen-pino); }
.rs-review .v.big { font-size: 20px; font-weight: 300; }
.rs-review button { appearance: none; border: 0; background: none; padding: 0; margin-top: 4px; text-align: left; font: inherit; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ngen-bosque); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
/* Aviso del abono: solo en el último paso, en tono tranquilo; el detalle de plazos queda plegado */
.rs-pay { margin: 16px 0 14px; padding: 16px 18px; background: var(--ngen-niebla); border: 1px solid #d3cfbf; border-left: 4px solid var(--ngen-musgo); display: flex; flex-direction: column; gap: 10px; }
.rs-form .rs-pay-main { margin: 0; font-size: 15px; line-height: 1.55; color: var(--ngen-pino); }
.rs-pay-main b { font-weight: 600; }
.rs-pay-more summary { cursor: pointer; list-style: none; font-size: 11px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ngen-bosque); text-decoration: underline; text-underline-offset: 3px; }
.rs-pay-more summary::-webkit-details-marker { display: none; }
.rs-form .rs-pay-more .ngr-deposit-reminder { margin: 10px 0 0; padding: 0; background: none; border: 0; font-size: 13px; line-height: 1.6; color: var(--ngen-piedra); }
.rs-pay-more .ngr-deposit-reminder b { color: var(--ngen-pino); }
/* La cotización no habla de abono ni saldo hasta el último paso */
body[data-rs-step="1"] .rs-quote .ngr-quote-deposit, body[data-rs-step="2"] .rs-quote .ngr-quote-deposit, body[data-rs-step="3"] .rs-quote .ngr-quote-deposit,
body[data-rs-step="1"] .rs-quote .ngr-quote-note, body[data-rs-step="2"] .rs-quote .ngr-quote-note, body[data-rs-step="3"] .rs-quote .ngr-quote-note { display: none; }
.rs-checks { display: flex; flex-direction: column; gap: 8px; }
.rs-form .rs-checks .form-checkbox { padding: 14px; }
.rs-form .form-checkbox label { line-height: 1.5; }
.rs-form .error-box { margin-top: 14px; }

/* Mensaje por paso */
.rs-stepmsg { margin: 14px 0 0; padding: 12px 14px; background: #f0e4e4; border-left: 3px solid #8a2a2a; color: #5a1a1a !important; font-size: 14px !important; }
.rs .input-text.ngr-invalid { background: #fbf3f3 !important; }

/* ---------- Navegación (escritorio: bajo el paso) ---------- */
.rs-nav { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 22px; }
.rs-chip { display: none; }
.rs-back { appearance: none; background: none; border: 1px solid var(--ngen-bosque); color: var(--ngen-bosque); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .12em; padding: 16px 24px; cursor: pointer; transition: background .3s, color .3s; margin-right: auto; }
.rs-back:hover { background: var(--ngen-bosque); color: var(--ngen-niebla); }
.rs .rs-nav .btn { padding: 18px 32px; min-width: 200px; }
.rs .rs-nav #ngr-submit { width: auto; padding: 18px 28px; }
.rs-nav .btn.is-ready { animation: rsNudge 1.6s ease-in-out 1; }
@keyframes rsNudge { 0%, 100% { box-shadow: 0 0 0 0 rgba(59,90,71,0); } 30% { box-shadow: 0 0 0 6px rgba(59,90,71,.25); } }
.rs-nav .btn:disabled { opacity: .45; }

/* ---------- Cotización lateral (escritorio) ---------- */
.rs-aside { gap: 0; top: 96px; }
.rs-quote-head { display: flex; justify-content: space-between; align-items: center; }
.rs-quote-close { display: none; }
.rs-quote .ngr-quote { transition: opacity .3s; }
.rs-quote.is-flash .ngr-quote-total span:last-child { animation: rsFlash .9s ease; }
@keyframes rsFlash { 0% { color: var(--ngen-musgo); transform: translateY(-3px); } 100% { color: var(--ngen-niebla); transform: none; } }

/* ---------- Condiciones plegables ---------- */
.rs-cond { margin-top: 28px; border-top: 2px solid var(--ngen-musgo); }
.rs-cond summary { cursor: pointer; list-style: none; display: flex; flex-direction: column; gap: 4px; padding: 18px 0; position: relative; }
.rs-cond summary::-webkit-details-marker { display: none; }
.rs-cond summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 22px; color: var(--ngen-bosque); }
.rs-cond[open] summary::after { content: "\2014"; }
.rs-cond-k { font-size: 11px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--ngen-piedra); }
.rs-cond-t { font-size: 17px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--ngen-bosque); }
.rs-cond-list { margin: 0; border-bottom: 1px solid var(--ngen-bruma); }
.rs-cond-list > div { display: grid; grid-template-columns: minmax(0, 150px) minmax(0, 1fr); gap: 16px; padding: 14px 0; border-top: 1px solid var(--ngen-bruma); }
.rs-cond-list dt { font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--ngen-bosque); padding-top: 3px; }
.rs-cond-list dd { margin: 0; font-size: 14px; line-height: 1.6; color: var(--ngen-piedra); }
.rs-cond .rs-small { margin-top: 14px; }

.rs-scrim { position: fixed; inset: 0; z-index: 58; background: rgba(31, 48, 39, .45); animation: rsFade .25s both; }
@keyframes rsFade { from { opacity: 0; } to { opacity: 1; } }

/* ======================= Móvil y tablet ======================= */
@media (max-width: 1079px) {
    .rs-aside { display: contents; }
    /* La cotización pasa a ser una hoja que sube desde la barra inferior */
    .rs-quote { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; max-height: 82vh; overflow-y: auto;
        padding: 20px 20px calc(96px + env(safe-area-inset-bottom)); transform: translateY(105%); visibility: hidden;
        transition: transform .38s cubic-bezier(.2,.7,.2,1), visibility 0s .38s; box-shadow: 0 -12px 40px rgba(31,48,39,.25); }
    .rs-quote.is-open { transform: none; visibility: visible; transition: transform .38s cubic-bezier(.2,.7,.2,1), visibility 0s; }
    .rs-quote-close { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin: -8px -8px -8px 0;
        background: none; border: 0; color: var(--ngen-niebla); font-size: 28px; line-height: 1; cursor: pointer; }

    /* Barra fija: total + atrás + continuar */
    .rs-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; margin: 0; gap: 8px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
        background: rgba(244, 242, 236, .97); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-top: 1px solid var(--ngen-bruma);
        box-shadow: 0 -6px 24px rgba(31,48,39,.08); }
    .rs-chip { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; flex: 1 1 0; min-width: 0; appearance: none; border: 0; background: none;
        font: inherit; text-align: left; padding: 2px 4px; cursor: pointer; color: var(--ngen-pino); line-height: 1.2; }
    .rs-chip-k { font-size: 10px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ngen-piedra); display: flex; align-items: center; gap: 6px; }
    .rs-chip-k::after { content: ""; width: 7px; height: 7px; border-left: 2px solid var(--ngen-bosque); border-top: 2px solid var(--ngen-bosque); transform: rotate(45deg); margin-top: 3px; transition: transform .3s; }
    .rs-chip[aria-expanded="true"] .rs-chip-k::after { transform: rotate(225deg); margin-top: 0; }
    .rs-chip-v { font-size: 18px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
    .rs-chip-v.is-empty { font-size: 14px; font-weight: 400; color: var(--ngen-piedra); }
    .rs-chip-s { font-size: 11px; line-height: 1.25; color: var(--ngen-piedra); max-width: 100%; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    .rs-chip-s:empty { display: none; }
    .rs-back { margin: 0; flex: 0 0 auto; width: 52px; padding: 0; height: 52px; font-size: 0; position: relative; }
    .rs-back::before { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translate(-30%, -50%) rotate(45deg); }
    .rs .rs-nav .btn, .rs .rs-nav #ngr-submit { flex: 0 0 auto; min-width: 0; width: auto; padding: 0 22px; height: 52px; font-size: 12px; }
    .rs .rs-nav #ngr-submit { max-width: 52vw; line-height: 1.2; padding: 0 14px; }
    section.rs { padding-bottom: 56px; }
    /* La barra fija no debe tapar el pie (enlaces legales y cookies) al llegar al final de la página */
    body[data-page="reserva"] footer { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
    /* Último paso: el botón de enviar es largo; la barra deja solo el total (el abono ya está explicado arriba) */
    body[data-rs-step="4"] .rs-chip-s { display: none; }
    body[data-rs-step="4"] .rs-chip-k { white-space: nowrap; letter-spacing: .08em; font-size: 9px; }
    body[data-rs-step="4"] .rs .rs-nav #ngr-submit { max-width: 160px; padding: 0 10px; font-size: 11px; letter-spacing: .06em; }
}

@media (max-width: 640px) {
    .rs-prog-label .rs-prog-text { display: none; }   /* el nombre del paso ya lo dice el título: "Paso 2 de 4" */
}

@media (max-width: 640px) {
    .rs-hero-img { height: 110px; }
    .rs-hero-text { margin-top: -26px; }
    .rs-h1-b { letter-spacing: .12em; }
    .rs-cond-list > div { grid-template-columns: 1fr; gap: 4px; }
    .rs-step-head { margin-bottom: 14px; }
    .rs-lead { font-size: 14px; }
    .rs .ngr-cal-day { min-height: 44px; }
    .rs-review { grid-template-columns: 1fr 1fr; }
    .rs-review .wide { grid-column: 1 / -1; }
}

/* El aviso de cookies no debe tapar la barra de pasos en móvil */
@media (max-width: 1079px) { body[data-page="reserva"] #ngen-notice { bottom: calc(76px + env(safe-area-inset-bottom)) !important; } }

@media (min-width: 1080px) { .rs-scrim { display: none !important; } .rs .ngr-cal-day { min-height: 40px; } }
/* El aviso de validación flota sobre la barra inferior: así se ve aunque la ficha sea larga */
@media (max-width: 1079px) {
    .rs-stepmsg { position: fixed; left: 14px; right: 14px; bottom: calc(80px + env(safe-area-inset-bottom)); z-index: 71; margin: 0; box-shadow: 0 8px 24px rgba(31,48,39,.22); animation: rsIn .3s both; }
}

@media (prefers-reduced-motion: reduce) {
    .rs-step, .rs-people svg, .ngr-pax-card.is-open .rs-pax-body, .rs-scrim { animation: none; }
    .rs-prog-bar::after, .rs-quote, .rs-pax-chev { transition: none; }
}
