/* =====================================================================
   Portal de traslados del cliente — MÓVIL PRIMERO · lo propio del portal
   Ref: docs/design/trasladosPublic/plan-rediseno-ds-adh.md (fases F0–F6)
        docs/design/trasladosPublic/mockups-ds-adh/README.md (§3–§6)
        docs/design/transpo/portal-cliente-modulo.md (modelo y reglas)

   Va DESPUÉS de public/assets/css/ds-adh.css (fuentes, tokens, temas por
   hotel y componentes del ADH Design System); las dos las enlaza
   app/Views/Transpo/portal/_head.php. Aquí sólo hay lo del portal, con
   prefijo `tp-`, y usa los tokens del DS: ningún color nuevo vive aquí.

   1. Tipografía del DS acotada al contenedor de las pantallas (`.tp-main`).
   2. Encabezado, pie y contenedor (`tp-top`, `tp-foot`, `tp-main`) y una
      sección por pantalla (entrada, reserva, solicitar, cambio).
   ===================================================================== */

/* ---------- 1 · Tipografía del DS dentro de `.tp-main` ---------- */
.tp-main { font-size: 1rem; line-height: 1.5rem; color: var(--color-text); }
.tp-main h1, .tp-main h2, .tp-main h3, .tp-main h4, .tp-main h5 { margin: 0 0 var(--space-2); font-weight: 500; line-height: 1.2; color: var(--color-text); }
.tp-main h1 { font-size: calc(1.375rem + 1.5vw); }
.tp-main h2 { font-size: calc(1.325rem + .9vw); }
.tp-main h3 { font-size: 1.35rem; }
.tp-main h4 { font-size: 1.15rem; }
.tp-main h5 { font-size: 1rem; }
@media (min-width: 1200px) {
    .tp-main h1 { font-size: 2.5rem; }
    .tp-main h2 { font-size: 2rem; }
}
.tp-main p { margin: 0 0 var(--space-3); }
/* Enlaces de texto; un enlace con forma de botón o chip conserva el color de su componente
   (si no, en Óleo el texto del botón queda del color de su fondo). */
.tp-main a:where(:not(.button, .chip)) { color: var(--theme-color-text-accent); text-decoration-color: var(--theme-color-primary); text-underline-offset: 3px; }
.tp-main a:where(:not(.button, .chip)):hover { text-decoration-thickness: 2px; }
.tp-main del { color: var(--color-text-muted); }

/* =====================================================================
   2 · Portal: encabezado, pie y contenedor (mockups 01, 06, 12)
   ===================================================================== */
/* Página en columna: el pie queda abajo (fondo, color y fuente los pone ds-adh.css). */
body { min-height: 100vh; display: flex; flex-direction: column; }
.tp-skip {
    position: absolute; left: -999px; top: 8px; z-index: 10; padding: .5rem 1rem;
    background: var(--white); color: var(--color-text); border: 2px solid var(--theme-focus); border-radius: var(--shape-sm);
}
.tp-skip:focus { left: 8px; }

/* Encabezado: logo (o el nombre del hotel) y ES | EN */
.tp-top { background: var(--color-surface); border-bottom: 1px solid var(--color-border); }
.tp-top__in {
    max-width: 1152px; margin: 0 auto; padding: 0 var(--space-3);
    min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
}
.tp-brand {
    display: inline-flex; flex-direction: column; gap: 2px; min-width: 0; min-height: 44px; justify-content: center;
    color: var(--color-text); text-decoration: none;
}
.tp-brand__word { font-size: 1.05rem; font-weight: 500; letter-spacing: .32em; line-height: 1.2; }
.tp-brand__sub { display: flex; align-items: center; gap: .5rem; font-size: .75rem; line-height: 1rem; letter-spacing: .06em; color: var(--gray-700); }
.tp-brand__sub::before { content: ""; width: 16px; height: 2px; background: var(--theme-color-primary); }
.tp-brand__txt { display: inline-flex; flex-direction: column; gap: 2px; }
/* Logos (public/assets/img/transpo-portal). El de la cadena es horizontal;
   el del hotel lleva el emblema arriba. */
.tp-logo { display: block; width: auto; max-width: 100%; }
.tp-logo--grupo { height: 22px; }
.tp-logo--hotel { height: 52px; }
@media (min-width: 768px) { .tp-logo--grupo { height: 26px; } .tp-logo--hotel { height: 60px; } }
.tp-lang { flex: none; display: flex; align-items: center; gap: 2px; font-size: .875rem; color: var(--gray-500); }
.tp-lang a, .tp-lang__on {
    min-width: 44px; min-height: 44px; display: grid; place-items: center; border-radius: var(--shape-sm);
    color: var(--gray-700); font-weight: 500; text-decoration: none;
}
.tp-lang a:hover { color: var(--gray-900); }
.tp-lang [aria-current] {
    color: var(--gray-900); text-decoration: underline; text-decoration-color: var(--theme-color-primary);
    text-decoration-thickness: 2px; text-underline-offset: 6px;
}

/* Contenedor nuevo (lo adoptan las pantallas de F2–F5) */
.tp-main { flex: 1 0 auto; width: 100%; max-width: 584px; margin: 0 auto; padding: var(--space-4) var(--space-3) var(--space-5); }
@media (min-width: 992px) {
    .tp-main--ancho { max-width: 1004px; padding-top: var(--space-5); }
}
.tp-stack > * + * { margin-top: var(--space-3); }
.tp-section { margin-top: var(--space-5); }
.tp-grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 var(--space-3); }
.tp-grid-lada { display: grid; grid-template-columns: minmax(0, 8rem) minmax(0, 1fr); gap: 0 var(--space-3); }
.tp-grid-2 input, .tp-grid-lada input, .tp-grid-lada select { min-width: 0; }
@media (min-width: 992px) {
    .tp-layout { display: grid; gap: var(--space-5); align-items: start; }
    .tp-layout--aside-izq { grid-template-columns: 340px minmax(0, 1fr); }
    .tp-layout--aside-der { grid-template-columns: minmax(0, 1fr) 380px; }
    .tp-aside { position: sticky; top: var(--space-4); }
}
@media (max-width: 991.98px) {
    .tp-layout > * + * { margin-top: var(--space-4); }
}

/* =====================================================================
   2 · Entrada (F2, mockups 01–05)
   ---------------------------------------------------------------------
   Teléfono: introducción arriba y el formulario en una tarjeta debajo.
   Escritorio (≥ 992): panel de marca a la izquierda y el formulario a la
   derecha (460 px). El canal cambia los campos con :has(), sin JS.
   Las reglas de texto van bajo `.tp-main` para ganarle a la tipografía
   base del contenedor (`.tp-main h1`, `.tp-main p`).
   ===================================================================== */
.tp-main .tp-eyebrow {
    display: flex; align-items: center; gap: .5rem; margin: 0 0 .5rem;
    font-size: .75rem; line-height: 1rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--gray-700);
}
.tp-main .tp-eyebrow::before { content: ""; flex: none; width: 24px; height: 2px; background: var(--theme-color-primary); }
.tp-main .tp-title { margin-bottom: var(--space-2); }
.tp-main .tp-lead { margin: 0 0 var(--space-4); font-size: 1rem; line-height: 1.5rem; color: var(--gray-700); }

.tp-garantias { margin: 0 0 var(--space-4); }
.tp-garantias li { display: flex; align-items: center; gap: .75rem; padding: .375rem 0; font-size: .95rem; }
.tp-garantias .icon-ui { color: var(--theme-color-primary); }

.tp-buscar__in { padding: var(--space-4) var(--space-3); }
.tp-legend { padding: 0; margin: 0 0 .75rem; font-size: 1rem; font-weight: 500; }
.tp-buscar .tp-canal { border: 0; padding: 0; margin: 0 0 var(--space-4); display: grid; gap: .75rem; }
/* Un navegador sin :has() enseña los dos caminos (nunca esconde el que falta). */
@supports selector(:has(*)) {
    .tp-campos--agencia { display: none; }
    .tp-buscar:has(input[name="canal"][value="agencia"]:checked) .tp-campos--directo { display: none; }
    .tp-buscar:has(input[name="canal"][value="agencia"]:checked) .tp-campos--agencia { display: block; }
}
.tp-main .tp-ayuda { margin: var(--space-3) 0 0; text-align: center; color: var(--gray-700); }

@media (min-width: 992px) {
    .tp-entrada { display: grid; grid-template-columns: minmax(0, 1fr) 460px; gap: var(--space-5); align-items: start; }
    .tp-hero {
        min-height: 100%; padding: var(--space-5);
        background: var(--color-surface-subtle); border: 1px solid var(--color-border); border-radius: var(--theme-global-shape);
    }
    .tp-hero .tp-garantias { margin: var(--space-5) 0 0; }
    .tp-buscar__in { padding: var(--space-4); }
}

/* =====================================================================
   2 · Reserva (F3, mockups 06–08, 11 y 13)
   ---------------------------------------------------------------------
   Teléfono: una columna (estancia, traslados, otro traslado).
   Escritorio (≥ 992): la estancia fija en la columna izquierda.
   Bajo `.tp-main` para ganarle a la tipografía base del contenedor.
   ===================================================================== */
.tp-main .tp-h2 { margin: 0 0 var(--space-3); font-size: 1.35rem; line-height: 1.2; font-family: inherit; }
.tp-main .tp-h3 { margin: 0; font-size: 1.15rem; }
.tp-main .tp-k { margin: 0 0 2px; font-size: .75rem; line-height: 1rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--gray-700); }
.tp-main .tp-v { margin: 0; font-size: 1.15rem; font-weight: 500; overflow-wrap: anywhere; }
.tp-main .tp-sub { margin: 0; font-size: .85rem; line-height: 1.3rem; color: var(--gray-700); }
.tp-main .alert { margin-bottom: var(--space-4); }
.tp-main .tp-sin-margen { margin: 0; }

/* Habitaciones de la confirmación */
.tp-folios { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0 0 var(--space-4); }
.tp-main .tp-folios__t { width: 100%; margin: 0 0 var(--space-1); font-size: .85rem; color: var(--gray-700); }

/* Estancia: días grandes en Heebo 300 */
.tp-fechas { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: var(--space-3); }
.tp-fechas__flecha { color: var(--theme-color-primary); }
.tp-main .tp-dia { margin: 0; font-size: 2.25rem; line-height: 1; font-weight: 300; }

/* Un traslado: tarjeta con un renglón por tramo */
.tp-traslado + .tp-traslado { margin-top: var(--space-3); }
.tp-traslado .card__header { flex-wrap: wrap; }
.tp-traslado .card__header > div { min-width: 0; }
.tp-legs { padding: 0 1rem .25rem; }
.tp-leg { display: flex; gap: .75rem; padding: .75rem 0; border-top: 1px solid var(--color-border); }
.tp-leg > div { min-width: 0; }
.tp-leg__icon {
    flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
    background: var(--gray-100); color: var(--gray-700);
}
.tp-leg__icon .icon-ui { width: 18px; height: 18px; }
.tp-main .tp-leg__t { margin: 0; font-weight: 500; font-size: .95rem; line-height: 1.4rem; }
.tp-main .tp-leg__m { margin: 0; font-size: .85rem; line-height: 1.3rem; color: var(--gray-700); }
.tp-main .tp-leg__m strong { color: var(--gray-900); font-weight: 500; }
.tp-leg--falta .tp-leg__icon { background: var(--yellow-100); color: var(--yellow-900); }
.tp-leg--off .tp-leg__icon { background: var(--white); border: 1.5px dashed var(--gray-500); color: var(--gray-600); }
.tp-main .tp-leg--cancelado .tp-leg__t, .tp-main .tp-leg--cancelado .tp-leg__m { color: var(--gray-600); }
.tp-main .tp-traslado__nota { margin: 0; font-size: .85rem; line-height: 1.3rem; color: var(--gray-700); }

/* Precios por camioneta (y el resumen del acuse) */
.tp-precio { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); }
.tp-precio > div { min-width: 0; }
.tp-main .tp-precio__t { margin: 0; font-weight: 500; }
.tp-main .tp-precio__v { margin: 0; flex: none; text-align: right; white-space: nowrap; }
.tp-precio__v strong { font-size: 1.25rem; font-weight: 500; }
.tp-precio__v strong.tp-precio__txt { font-size: 1rem; }
.tp-precio__v del { display: block; font-size: .85rem; line-height: 1rem; }
.tp-moneda { font-size: .75rem; color: var(--gray-700); }
.tp-main .tp-descuento { display: flex; gap: .5rem; align-items: flex-start; margin: 0; font-size: .85rem; line-height: 1.3rem; font-weight: 500; color: var(--green-900); }
.tp-descuento .icon-ui { flex: none; width: 1rem; height: 1rem; margin-top: 2px; }
.badge .icon-ui { width: .875rem; height: .875rem; }

/* Acuse */
.tp-hecho { text-align: center; margin-bottom: var(--space-4); }
.tp-medalla {
    width: 64px; height: 64px; margin: 0 auto var(--space-3); border-radius: 50%; display: grid; place-items: center;
    background: var(--green-100); color: var(--green-700); border: 2px solid var(--green-300);
}
.tp-medalla .icon-ui { width: 30px; height: 30px; stroke-width: 2.2; }
.tp-main .tp-hecho .tp-lead { margin-bottom: 0; overflow-wrap: anywhere; }
.tp-main > .button--fullwidth { margin-top: var(--space-4); }

/* =====================================================================
   2 · Solicitar (F4, mockups 09, 10a y 10b)
   ---------------------------------------------------------------------
   Teléfono: tres bloques numerados y la cotización debajo, con el botón.
   Escritorio (≥ 992): la cotización en una columna fija a la derecha
   (`.tp-layout--aside-der`). La única `.card.elevation-8` es la cotización.
   ===================================================================== */
.tp-main .tp-back { margin: 0 0 var(--space-3) -.5rem; padding-left: .5rem; padding-right: .5rem; }
.tp-main .tp-paso { display: flex; align-items: center; gap: .75rem; margin: 0 0 var(--space-3); font-size: 1.15rem; line-height: 1.3; }
.tp-paso__n {
    flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
    border: 2px solid var(--theme-color-secondary); font-size: .9rem; font-weight: 500; color: var(--gray-900);
}
.tp-bloque { padding: var(--space-4) 0; border-top: 1px solid var(--color-border); }
.tp-bloque:first-of-type { border-top: 0; padding-top: var(--space-3); }
.tp-opciones { display: grid; gap: .75rem; min-width: 0; border: 0; margin: 0 0 var(--space-4); padding: 0; }
.tp-opciones--2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.tp-opciones--2 > .tp-legend, .tp-opciones--2 > .form-text-field-notes { grid-column: 1 / -1; }
.tp-opciones .form-radio--outlined { margin: 0; }
.form-radio--outlined:has(input:disabled) { cursor: not-allowed; background: var(--gray-100); }
.form-radio--outlined:has(input:disabled) .form-radio__label { color: var(--gray-700); }
.tp-opcion__precio { display: block; margin-top: .25rem; font-size: .95rem; font-weight: 500; color: var(--gray-900); }
.form-radio__label > .tp-opcion__precio { font-size: .95rem; color: var(--gray-900); }
.tp-opcion__precio del { font-weight: 400; margin-right: .25rem; color: var(--gray-700); }
.tp-opciones.is--danger .form-radio--outlined { border-color: var(--red-700); }
.tp-opciones .tp-nota-error, .tp-pax .tp-nota-error { margin-top: 0; }
.tp-nota-error { font-weight: 500; }
/* Un navegador sin :has() enseña el trayecto también en redondo (el servidor lo ignora). */
@supports selector(:has(*)) {
    .tp-solicitar:has(input[name="tipo"][value="1"]:checked) .tp-ruta { display: none; }
}

.tp-pax { margin-bottom: 0; }
.tp-pax .stepper-group { flex-wrap: wrap; }
.tp-pax.is--danger .stepper-control { border-color: var(--red-700); }
.stepper-control:focus-within { border-color: var(--theme-focus); box-shadow: 0 0 0 1px var(--theme-focus); }
.stepper-counter:focus { outline: none; }
.tp-main .tp-camionetas { display: flex; align-items: center; gap: .5rem; margin: .75rem 0 0; font-size: .9rem; line-height: 1.3rem; color: var(--gray-900); }
.tp-camionetas .icon-ui { flex: none; color: var(--theme-color-primary); }

.tp-tramo {
    min-width: 0; margin: 0 0 var(--space-3); padding: var(--space-3) var(--space-3) .25rem;
    border: 1px solid var(--color-border); border-radius: var(--theme-global-shape);
}
.tp-tramo legend { display: flex; align-items: center; gap: .5rem; padding: 0 .375rem; margin-left: -.375rem; font-weight: 500; }
.tp-tramo legend .icon-ui { flex: none; color: var(--theme-color-primary); }
.tp-tramo > .tp-grid-2 { margin-top: .5rem; }
/* Aerolínea «Otra…»: el campo libre va dentro del mismo marco, debajo del select. */
.form-text-field--outlined input.tp-otra { margin-top: .75rem; }
.form-text-field--select.tp-aero::after { top: 28px; }

.tp-main .tp-contacto-pie { margin-top: -.5rem; }
/* El marco contorneado sube su etiqueta sobre el borde: aire bajo el título del paso. */
.tp-paso + .form-group, .tp-paso + .tp-grid-2, .tp-paso + .tp-grid-lada { margin-top: var(--space-4); }

.tp-quote .card__header { padding-bottom: 0; }
.tp-quote__row { display: flex; justify-content: space-between; gap: var(--space-3); padding: .5rem 1rem; font-size: .95rem; }
.tp-quote__row span:last-child { text-align: right; white-space: nowrap; }
.tp-quote__row .tp-descuento { flex: 1; }
.tp-quote__total {
    display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3);
    margin: .5rem 1rem 0; padding: .875rem 0 0; border-top: 1px solid var(--color-border);
}
.tp-quote__total > span { font-weight: 500; }
.tp-quote__total strong { font-size: 1.6rem; font-weight: 500; line-height: 1.1; text-align: right; white-space: nowrap; }
.tp-quote__total strong.tp-quote__txt { font-size: 1.15rem; white-space: normal; }
.tp-main .tp-quote__nota { margin: .75rem 1rem 0; font-size: .85rem; line-height: 1.3rem; color: var(--gray-700); }
.tp-quote .card__footer { margin-top: 1rem; }
.tp-main .tp-quote__aviso { margin: .75rem 0 0; text-align: center; font-size: .75rem; line-height: 1.1rem; color: var(--gray-700); }

.tp-errores ul { margin: .25rem 0 0; padding-left: 1.1rem; }
.tp-errores li + li { margin-top: .25rem; }
.tp-errores a { color: var(--red-900); }
.tp-errores:focus { outline: 2px solid var(--theme-focus); outline-offset: 2px; }

@media (max-width: 359.98px) {
    .tp-opciones--2 { grid-template-columns: minmax(0, 1fr); }
    .tp-tramo { padding-left: .75rem; padding-right: .75rem; }
}

/* =====================================================================
   2 · Cambio (F5, mockup 12)
   ---------------------------------------------------------------------
   Teléfono: las fechas y el traslado de hoy arriba; la decisión y los
   vuelos debajo. Escritorio (≥ 992): las fechas en la columna izquierda
   (`.tp-layout--aside-izq`). Reusa los componentes de Solicitar (F4).
   ===================================================================== */
.tp-antes-ahora { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: var(--space-3); align-items: center; }
.tp-antes-ahora del { color: var(--gray-700); }
.tp-antes-ahora > .icon-ui { color: var(--theme-color-primary); }
.tp-main .tp-antes-ahora__v { font-size: 1rem; }
.tp-main .card__row > .alert { margin-bottom: 0; }
.tp-cambio__datos { padding-top: var(--space-2); }
.tp-cambio .tp-pax { margin-bottom: var(--space-4); }
.tp-cambio .tp-tramo + .form-group, .tp-cambio__datos + .form-group { margin-top: var(--space-4); }
/* Sin JS, «Ya no lo necesito» también esconde los vuelos (el servidor los ignora). */
@supports selector(:has(*)) {
    .tp-cambio:has(input[name="decision"][value="cancelar"]:checked) :is([data-tm="datos"], [data-tm="aviso72"]) { display: none; }
}

/* Pie: buzón del hotel, Salir, legales y la marca de la cadena */
.tp-foot { margin-top: auto; background: var(--color-surface-subtle); border-top: 1px solid var(--color-border); }
.tp-foot__in {
    max-width: 1152px; margin: 0 auto; padding: var(--space-4) var(--space-3);
    font-size: .85rem; line-height: 1.4rem; color: var(--gray-700); overflow-wrap: anywhere;
}
.tp-foot__in p { margin: 0 0 var(--space-2); }
.tp-foot a { color: var(--gray-900); text-decoration-color: var(--theme-color-primary); text-underline-offset: 3px; }
.tp-foot a:hover { text-decoration-thickness: 2px; }
.tp-foot__legal a { display: inline-flex; align-items: center; min-height: 44px; }
.tp-foot__brand { margin: var(--space-3) 0 0 !important; }
.tp-foot__brand img { display: block; height: 18px; width: auto; }
@media (min-width: 768px) {
    .tp-foot__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 var(--space-4); }
    .tp-foot__in p:first-child { flex: 1 1 100%; }
}
