/* Escalas y trasbordos en /ferris (Javier, 15/11/2026): «1 escala ⌄» debajo de la duración, tramos y aviso de trasbordo */
.v52-compra .routes__item .stopovers.v52-stopovers-moved { display: none !important; }

/* Centrado bajo la duración, como .rate_duration (Javier, 15/11/2026) */
.v52-legs { margin: -6px 0 12px; text-align: center; }
.v52-legs-toggle {
    display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border: 1px solid #d6e3f2; border-radius: 999px;
    background: #eef4fb; color: var(--v52-navy, #163a5e); font: inherit; font-size: 13px; font-weight: 700; line-height: 1.4; cursor: pointer;
}
.v52-legs-toggle:hover { border-color: var(--v52-navy, #163a5e); }
.v52-legs-chev { transition: transform .15s; }
.v52-legs-toggle.is-open .v52-legs-chev { transform: rotate(180deg); }

.v52-legs-panel { text-align: left; margin-top: 10px; padding: 12px 14px; border: 1px solid var(--v52-line, #e3e8ef); border-radius: 12px; background: #f7f9fc; }
.v52-legs-panel[hidden] { display: none; }
.v52-legs-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
/* Una línea por tramo: «Tramo 1 · 17:00 Denia · 19:15 Ibiza ....... 2h 15 min · Eleanor Roosevelt» (Javier, 15/11/2026) */
.v52-legs-leg {
    display: grid; grid-template-columns: 64px minmax(120px, max-content) minmax(120px, max-content) minmax(0, 1fr); column-gap: 18px; row-gap: 2px;
    align-items: baseline; font-size: 14px; color: var(--v52-ink, #1a202c);
}
.v52-legs-n { font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--v52-muted, #5a6678); }
.v52-legs-end strong { font-size: 15px; font-weight: 800; margin-right: 4px; font-variant-numeric: tabular-nums; }
.v52-legs-mid { font-size: 13px; color: var(--v52-muted, #5a6678); text-align: right; }
.v52-legs-mid a { color: var(--v52-link, #1667c2); font-weight: 600; text-decoration: underline; }
.v52-legs-portchange {
    align-self: center; padding: 4px 10px; background: #fff7e0; border: 1px solid #f5d98b; border-radius: 8px; font-size: 13px; color: #6b4e00;
}
.v52-legs-leg.is-nohours { grid-template-columns: 64px minmax(0, 1fr); }
.v52-legs-path { margin: 0; font-weight: 700; color: var(--v52-ink, #1a202c); }
.v52-legs-note { margin: 4px 0 0; font-size: 13px; color: var(--v52-muted, #5a6678); }

/* Ordenador, con la salida en una línea (ilf-v52-compra.css): el botón debajo de la duración y los tramos a todo el ancho */
@media (min-width: 992px) {
    .v52-compra .routes__item.v52-grouped .v52-legs { display: contents; }
    .v52-compra .routes__item.v52-grouped .v52-legs-toggle { grid-column: 2; grid-row: 5; justify-self: center; margin-top: -2px; }
    .v52-compra .routes__item.v52-grouped .v52-legs-panel { grid-column: 1 / -1; grid-row: 6; margin-top: 6px; }
    .v52-compra .routes__item.v52-grouped .v52-opts { grid-row: 7; }
    /* Aviso del descuento del buscador (Javier, 15/11/2026): debajo de la naviera y el barco */
    .v52-compra .routes__item.v52-grouped .v52-disc-note { grid-column: 1; grid-row: 4; margin: 0 !important; text-align: left !important; }
}

/* Móvil, y siempre en el aviso «Importante»: dos líneas por tramo (salida y llegada; debajo, duración y barco) */
@media (max-width: 767px) {
    .v52-legs-leg { grid-template-columns: 58px minmax(0, 1fr) minmax(0, 1fr); column-gap: 10px; }
    .v52-legs-mid { grid-column: 2 / -1; grid-row: 2; text-align: left; }
    .v52-legs-leg.is-nohours { grid-template-columns: 58px minmax(0, 1fr); }
}
.v52-legs-modal-body .v52-legs-leg { grid-template-columns: 64px max-content minmax(0, 1fr); column-gap: 14px; }
.v52-legs-modal-body .v52-legs-mid { grid-column: 2 / -1; grid-row: 2; text-align: left; }
.v52-legs-modal-body .v52-legs-leg.is-nohours { grid-template-columns: 64px minmax(0, 1fr); }
@media (max-width: 767px) {
    .v52-legs-modal-body .v52-legs-leg { grid-template-columns: 58px max-content minmax(0, 1fr); column-gap: 10px; }
}

/* Hueco entre los resultados y «Detalles de tu viaje»: app.css daba 780 px de alto mínimo a los resultados (Javier, 15/11/2026) */
.v52-compra .routes-container { min-height: 0; padding-bottom: 8px; }

/* «¿Eres residente?» con 3 opciones: en móvil, la pregunta encima y las 3 opciones en una fila de 3 casillas iguales (Javier, 15/11/2026) */
@media (max-width: 767px) {
    .v52-compra .v52-res { display: flex; flex-direction: column; align-items: stretch; width: 100%; gap: 8px; }
    .v52-compra .v52-res-q { text-align: center; font-size: 16px; }
    .v52-compra .v52-res-pills { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; border-radius: 14px; width: 100%; }
    .v52-compra .v52-res-pill { padding: 8px 6px; font-size: 13px; line-height: 1.25; border-radius: 10px; white-space: normal; text-align: center; min-height: 44px; }
}

/* Aviso «Importante» al elegir la acomodación de un viaje con trasbordo */
.v52-legs-modal {
    position: fixed; inset: 0; z-index: 1080; background: rgba(10, 30, 60, .55); display: flex; align-items: center; justify-content: center;
    padding: 16px; font-family: Inter, system-ui, sans-serif;
}
.v52-legs-modal-box {
    position: relative; background: #fff; border-radius: 16px; width: 100%; max-width: 560px; max-height: calc(100vh - 32px); overflow: auto;
    padding: 28px 28px 22px; color: #1a202c; box-shadow: 0 20px 50px rgba(10, 30, 60, .35);
}
.v52-legs-modal-x { position: absolute; top: 8px; right: 12px; background: none; border: 0; font-size: 28px; line-height: 1; cursor: pointer; color: #1a202c; padding: 4px 6px; }
.v52-legs-modal-title { font-size: 20px; font-weight: 800; margin: 0 28px 6px 0; color: var(--v52-navy, #163a5e); }
.v52-legs-modal-route { font-size: 14px; color: var(--v52-muted, #5a6678); margin: 0 0 14px; }
.v52-legs-modal-body p { font-size: 15px; line-height: 1.5; margin: 12px 0 0; }
.v52-legs-modal-body .v52-legs-list, .v52-legs-modal-body .v52-legs-path { padding: 12px 14px; background: #f7f9fc; border: 1px solid var(--v52-line, #e3e8ef); border-radius: 12px; }
.v52-legs-modal-ok {
    display: block; width: 100%; min-height: 48px; margin-top: 20px; border-radius: 999px; border: 1px solid #faaf05; background: #faaf05;
    color: #111; font: inherit; font-size: 16px; font-weight: 700; cursor: pointer;
}
.v52-legs-modal-ok:hover { background: #e9a000; border-color: #e9a000; }
@media (max-width: 767px) {
    .v52-legs-modal-box { padding: 24px 18px 18px; }
}
