* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
}

body {
    background: #ffffff;
    color: #111111;
    font-family: Arial, Helvetica, sans-serif;
}

.display {
    width: 100%;
    min-height: 100vh;

    display: flex;
    flex-direction: column;

    background: #ffffff;
}

.topbar {
    min-height: 74px;
    padding: 0 28px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    background: #111111;
    color: #ffffff;
}

.titolo {
    display: flex;
    align-items: baseline;
    gap: 8px;

    font-size: 22px;
}

.titolo span {
    font-size: 17px;
    font-weight: 400;
}

.ora {
    font-size: 30px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.colonne {
    min-height: 56px;
    padding: 0 28px;

    display: grid;
    grid-template-columns: 150px 1fr 190px;
    align-items: center;

    border-bottom: 2px solid #111111;
}

.colonne > div {
    display: flex;
    flex-direction: column;
}

.colonne strong {
    font-size: 15px;
    line-height: 1.1;
}

.colonne span {
    margin-top: 2px;

    font-size: 11px;
    line-height: 1;
}

.colonna-tempo {
    text-align: right;
    align-items: flex-end;
}

.lista-arrivi {
    flex: 1;
}

.arrivo {
    min-height: 96px;
    padding: 13px 28px;

    display: grid;
    grid-template-columns: 150px 1fr 190px;
    align-items: center;

    border-bottom: 1px solid #9a9a9a;
}

.linea-box {
    display: flex;
    align-items: center;
}

.linea {
    min-width: 105px;
    min-height: 52px;

    padding: 8px 14px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 4px;

    font-size: 27px;
    line-height: 1;
    font-weight: 800;
}

.direzione {
    padding-right: 20px;

    font-size: 27px;
    line-height: 1.1;
    font-weight: 800;
}

.tempo {
    text-align: right;

    font-size: 32px;
    line-height: 1;
    font-weight: 800;
    white-space: nowrap;

    font-variant-numeric: tabular-nums;
}

.tempo.in-arrivo {
    font-size: 23px;
}

.fermata-box {
    min-height: 105px;
    padding: 18px 28px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;

    border-top: 4px solid #111111;
    background: #f1f1f1;
}

.label-fermata {
    margin-bottom: 5px;

    font-size: 12px;
    font-weight: 700;
}

.nome-fermata {
    font-size: 22px;
    line-height: 1.15;
    font-weight: 700;
}

.codici-fermata {
    flex-shrink: 0;

    display: flex;
    align-items: center;
    gap: 10px;

    font-size: 19px;
    font-weight: 700;
    white-space: nowrap;
}

.separatore {
    font-weight: 400;
}

.messaggio {
    padding: 50px 28px;

    text-align: center;

    font-size: 22px;
}

.errore {
    margin: 15px 28px;
    padding: 15px;

    border: 2px solid #111111;

    font-size: 16px;
    font-weight: 700;
}

.nascosto {
    display: none;
}

@media (max-width: 800px) {

    .topbar {
        min-height: 62px;
        padding: 0 14px;
    }

    .titolo {
        font-size: 17px;
    }

    .titolo span {
        font-size: 12px;
    }

    .ora {
        font-size: 24px;
    }

    .colonne,
    .arrivo {
        grid-template-columns: 105px 1fr 120px;
        padding-left: 14px;
        padding-right: 14px;
    }

    .arrivo {
        min-height: 80px;
    }

    .linea {
        min-width: 78px;
        min-height: 42px;

        font-size: 20px;
    }

    .direzione {
        font-size: 19px;
    }

    .tempo {
        font-size: 23px;
    }

    .tempo.in-arrivo {
        font-size: 17px;
    }

    .fermata-box {
        padding: 14px;
    }

    .nome-fermata {
        font-size: 17px;
    }

    .codici-fermata {
        font-size: 15px;
    }
}


/* =========================================================
   INDICE FERMATE
   ========================================================= */

.pagina-indice {
    min-height: 100vh;
    background: #f4f5f6;
}

.indice-header {
    padding: 28px 32px;

    background: #111111;
    color: #ffffff;
}

.indice-header h1 {
    margin: 0;

    font-size: 32px;
    line-height: 1;
}

.indice-subtitle {
    margin-top: 8px;

    font-size: 16px;
    color: #d7d7d7;
}

.strumenti-indice {
    padding: 22px 32px;

    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 16px;

    background: #ffffff;

    border-bottom: 1px solid #d8dce0;
}

.ricerca-fermata,
.filtro-linea {
    width: 100%;
    min-height: 48px;

    padding: 0 15px;

    border: 1px solid #bfc5ca;
    border-radius: 5px;

    background: #ffffff;
    color: #17202a;

    font-size: 16px;
}

.ricerca-fermata:focus,
.filtro-linea:focus {
    outline: 2px solid #222222;
    outline-offset: 1px;
}

.conteggio-fermate {
    padding: 16px 32px 8px;

    font-size: 14px;
    font-weight: 700;
    color: #68717a;
}

.elenco-fermate {
    padding: 8px 32px 40px;
}

.fermata-card {
    width: 100%;
    min-height: 94px;

    margin-bottom: 10px;
    padding: 18px 20px;

    display: grid;
    grid-template-columns: 1fr auto 34px;
    gap: 20px;
    align-items: center;

    background: #ffffff;

    border: 1px solid #d8dce0;
    border-radius: 6px;

    color: #111111;
    text-decoration: none;

    transition:
        transform 0.12s ease,
        box-shadow 0.12s ease;
}

.fermata-card:hover {
    transform: translateY(-1px);

    box-shadow:
        0 4px 12px
        rgba(0, 0, 0, 0.08);
}

.fermata-card-name {
    font-size: 20px;
    line-height: 1.2;
    font-weight: 700;
}

.fermata-card-codes {
    margin-top: 8px;

    display: flex;
    gap: 8px;

    font-size: 14px;
    font-weight: 700;
    color: #69727b;
}

.punto-codici {
    color: #a5abb0;
}

.fermata-card-linee {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.badge-linea-indice {
    min-width: 62px;

    padding: 7px 10px;

    display: inline-flex;
    justify-content: center;
    align-items: center;

    border-radius: 4px;

    font-size: 15px;
    font-weight: 800;
}

.fermata-card-arrow {
    font-size: 32px;
    line-height: 1;
    color: #7b848c;
}


@media (max-width: 700px) {

    .indice-header {
        padding: 22px 16px;
    }

    .indice-header h1 {
        font-size: 27px;
    }

    .strumenti-indice {
        padding: 16px;

        grid-template-columns: 1fr;
    }

    .conteggio-fermate {
        padding-left: 16px;
        padding-right: 16px;
    }

    .elenco-fermate {
        padding:
            8px 16px 30px;
    }

    .fermata-card {
        padding: 15px;

        grid-template-columns:
            1fr auto;

        gap: 12px;
    }

    .fermata-card-linee {
        grid-column: 1;
        justify-content: flex-start;
    }

    .fermata-card-arrow {
        grid-column: 2;
        grid-row: 1 / span 2;
        align-self: center;
    }

    .fermata-card-name {
        font-size: 18px;
    }
}

.giorno-arrivi {
    padding: 10px 28px;

    background: #e7e7e7;
    border-bottom: 1px solid #999999;

    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.7px;
}

@media (max-width: 800px) {
    .giorno-arrivi {
        padding: 9px 14px;
        font-size: 13px;
    }
}


/* =========================================================
   RESPONSIVE GENERALE - COMPUTER / TABLET / TELEFONO
   ========================================================= */

html {
    font-size: 16px;
}

body {
    overflow-x: hidden;
}


/* =========================================================
   PALINA SINGOLA - DIMENSIONI FLUIDE
   ========================================================= */

.topbar {
    padding-left: clamp(14px, 3vw, 32px);
    padding-right: clamp(14px, 3vw, 32px);
}

.titolo {
    font-size: clamp(16px, 2.2vw, 24px);
}

.titolo span {
    font-size: clamp(11px, 1.6vw, 17px);
}

.ora {
    font-size: clamp(22px, 3vw, 34px);
}

.colonne,
.arrivo {
    grid-template-columns:
        clamp(90px, 15vw, 150px)
        minmax(0, 1fr)
        clamp(105px, 18vw, 190px);

    padding-left: clamp(12px, 3vw, 28px);
    padding-right: clamp(12px, 3vw, 28px);
}

.linea {
    min-width: clamp(72px, 10vw, 105px);
    min-height: clamp(40px, 6vw, 52px);

    font-size: clamp(18px, 2.6vw, 27px);
}

.direzione {
    font-size: clamp(17px, 2.6vw, 27px);
    overflow-wrap: anywhere;
}

.tempo {
    font-size: clamp(21px, 3vw, 32px);
}

.tempo.in-arrivo {
    font-size: clamp(15px, 2.3vw, 23px);
}

.fermata-box {
    padding-left: clamp(14px, 3vw, 28px);
    padding-right: clamp(14px, 3vw, 28px);
}

.nome-fermata {
    font-size: clamp(17px, 2.4vw, 23px);
}

.codici-fermata {
    font-size: clamp(14px, 1.9vw, 19px);
}


/* =========================================================
   INDICE FERMATE - DIMENSIONI FLUIDE
   ========================================================= */

.indice-header {
    padding:
        clamp(20px, 4vw, 32px)
        clamp(16px, 4vw, 40px);
}

.indice-header h1 {
    font-size: clamp(27px, 4vw, 38px);
}

.indice-subtitle {
    font-size: clamp(14px, 2vw, 17px);
}

.strumenti-indice {
    padding-left: clamp(16px, 4vw, 40px);
    padding-right: clamp(16px, 4vw, 40px);
}

.conteggio-fermate {
    padding-left: clamp(16px, 4vw, 40px);
    padding-right: clamp(16px, 4vw, 40px);
}

.elenco-fermate {
    padding-left: clamp(16px, 4vw, 40px);
    padding-right: clamp(16px, 4vw, 40px);

    max-width: 1500px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.fermata-card-name {
    font-size: clamp(17px, 2vw, 21px);
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 900px) {

    .strumenti-indice {
        grid-template-columns: 1fr 180px;
    }

    .arrivo {
        min-height: 82px;
    }

    .fermata-box {
        min-height: 90px;
    }
}


/* =========================================================
   TELEFONO
   ========================================================= */

@media (max-width: 600px) {

    /* -------------------------
       INDICE FERMATE
       ------------------------- */

    .strumenti-indice {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .ricerca-fermata,
    .filtro-linea {
        min-height: 46px;
        font-size: 16px;
    }

    .fermata-card {
        grid-template-columns: 1fr 28px;

        min-height: 0;
        padding: 14px;

        gap: 10px;
    }

    .fermata-card-main {
        min-width: 0;
    }

    .fermata-card-name {
        line-height: 1.25;
    }

    .fermata-card-codes {
        margin-top: 6px;

        flex-wrap: wrap;

        font-size: 13px;
    }

    .fermata-card-linee {
        grid-column: 1;

        justify-content: flex-start;
    }

    .fermata-card-arrow {
        grid-column: 2;
        grid-row: 1 / span 2;
    }


    /* -------------------------
       PALINA SINGOLA
       ------------------------- */

    .topbar {
        min-height: 58px;
    }

    .titolo {
        display: block;
    }

    .titolo span {
        display: block;
        margin-top: 2px;
    }

    .colonne {
        grid-template-columns: 82px minmax(0, 1fr) 92px;
    }

    .arrivo {
        grid-template-columns: 82px minmax(0, 1fr) 92px;

        min-height: 74px;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .linea {
        min-width: 66px;
        min-height: 38px;

        padding: 6px;
    }

    .direzione {
        padding-right: 8px;
    }

    .fermata-box {
        flex-direction: column;
        align-items: flex-start;

        gap: 8px;

        min-height: 0;
    }

    .codici-fermata {
        width: 100%;
        justify-content: flex-start;
    }
}


/* =========================================================
   TELEFONI MOLTO PICCOLI
   ========================================================= */

@media (max-width: 400px) {

    .colonne {
        grid-template-columns: 70px minmax(0, 1fr) 78px;
    }

    .arrivo {
        grid-template-columns: 70px minmax(0, 1fr) 78px;
    }

    .linea {
        min-width: 58px;
        font-size: 16px;
    }

    .direzione {
        font-size: 15px;
    }

    .tempo {
        font-size: 19px;
    }

    .tempo.in-arrivo {
        font-size: 13px;
    }

    .colonne strong {
        font-size: 11px;
    }

    .colonne span {
        font-size: 9px;
    }
}


/* =========================================================
   SCHERMI GRANDI
   ========================================================= */

@media (min-width: 1400px) {

    .display {
        font-size: 18px;
    }

    .arrivo {
        min-height: 108px;
    }

    .elenco-fermate {
        max-width: 1600px;
    }
}


/* =========================================================
   ORIENTAMENTO ORIZZONTALE SU TABLET/TELEFONO
   ========================================================= */

@media (orientation: landscape) and (max-height: 600px) {

    .topbar {
        min-height: 52px;
    }

    .arrivo {
        min-height: 64px;
    }

    .fermata-box {
        min-height: 72px;
        padding-top: 10px;
        padding-bottom: 10px;
    }
}


/* =========================================================
   AVVISI FERMATA TEMPORANEAMENTE NON SERVITA
   ========================================================= */

.avvisi-palina {
    width: 100%;
}

.avviso-sospensione {
    display: grid;
    grid-template-columns: clamp(90px, 15vw, 150px) 1fr;
    align-items: center;
    gap: 18px;

    padding:
        18px
        clamp(14px, 3vw, 28px);

    background: #fff3cd;
    border-bottom: 2px solid #111111;
}

.avviso-linea {
    min-width: 80px;
    min-height: 48px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 8px 12px;

    border-radius: 4px;

    font-size: clamp(18px, 2.5vw, 26px);
    font-weight: 800;
}

.avviso-titolo {
    font-size: clamp(18px, 2.5vw, 27px);
    line-height: 1.15;
    font-weight: 800;
}

.avviso-motivo {
    margin-top: 6px;

    font-size: clamp(14px, 1.8vw, 18px);
    line-height: 1.2;
    font-weight: 600;
}

@media (max-width: 600px) {

    .avviso-sospensione {
        grid-template-columns: 78px 1fr;
        gap: 10px;
        padding: 13px 12px;
    }

    .avviso-linea {
        min-width: 65px;
        min-height: 40px;
    }
}

/* =========================================================
   PULSANTE RITORNO ELENCO FERMATE
   ========================================================= */

.back-fermate {
    flex-shrink: 0;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 42px;
    padding: 9px 14px;

    border: 2px solid #111111;
    border-radius: 4px;

    color: #111111;
    background: #ffffff;

    text-decoration: none;

    font-size: clamp(12px, 1.5vw, 15px);
    font-weight: 800;
    white-space: nowrap;
}

.back-fermate:hover {
    background: #111111;
    color: #ffffff;
}

@media (max-width: 600px) {

    .back-fermate {
        width: 100%;
        order: 3;
    }

}


/* =========================================================
   REALTIME / LIVE
   ========================================================= */

.tempo-realtime {
    color: #15803d;
}

.tempo-realtime .tempo-valore {
    animation: realtimePulse 1.35s ease-in-out infinite;
}

.live-status {
    margin-bottom: 7px;

    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;

    font-size: clamp(10px, 1.3vw, 13px);
    line-height: 1;
    font-weight: 800;
    letter-spacing: 0.5px;

    color: #15803d;
}

.live-dot {
    width: 9px;
    height: 9px;

    display: inline-block;

    border-radius: 50%;
    background: #15803d;

    animation: realtimeDot 1.35s ease-in-out infinite;
}

.live-queue {
    font-weight: 900;
}

@keyframes realtimePulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.38;
    }
}

@keyframes realtimeDot {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.35;
        transform: scale(0.75);
    }
}


/* Accessibilità: niente lampeggio se il dispositivo
   richiede riduzione delle animazioni. */

@media (prefers-reduced-motion: reduce) {

    .tempo-realtime .tempo-valore,
    .live-dot {
        animation: none;
    }
}


@media (max-width: 600px) {

    .live-status {
        margin-bottom: 4px;
        font-size: 9px;
        flex-wrap: wrap;
    }
}


/* =========================================================
   LIVE IN CODA = ARANCIONE
   ========================================================= */

.tempo-realtime:has(.live-queue) {
    color: #ea7a00;
}

.tempo-realtime:has(.live-queue) .live-status {
    color: #ea7a00;
}

.tempo-realtime:has(.live-queue) .live-dot {
    background: #ea7a00;
}

.tempo-realtime:has(.live-queue) .tempo-valore {
    color: #ea7a00;
}



/* =========================================================
   BANNER SCORREVOLE SOSPENSIONI
   ========================================================= */

.avvisi-palina {
    width: 100%;
    overflow: hidden;
    flex-shrink: 0;
}

.avviso-marquee {
    width: 100%;
    overflow: hidden;

    background: #fff3cd;

    border-top: 2px solid #111111;
    border-bottom: 2px solid #111111;

    min-height: 54px;

    display: flex;
    align-items: center;
}

.avviso-marquee-track {
    display: flex;
    align-items: center;

    width: max-content;

    white-space: nowrap;

    will-change: transform;
}

.avviso-marquee-copy {
    flex-shrink: 0;

    display: inline-flex;
    align-items: center;

    padding:
        12px
        70px;

    font-size:
        clamp(
            17px,
            2vw,
            24px
        );

    line-height: 1.2;

    font-weight: 800;

    color: #111111;

    letter-spacing: 0.2px;
}

.avviso-marquee-separatore {
    display: inline-block;
    margin-left: 70px;
    margin-right: 10px;
}

@keyframes scorrimentoAvvisoPalina {

    from {
        transform: translateX(0);
    }

    to {
        transform:
            translateX(
                calc(-1 * var(--marquee-distance))
            );
    }
}

@media (max-width: 600px) {

    .avviso-marquee {
        min-height: 46px;
    }

    .avviso-marquee-copy {
        padding:
            9px
            40px;

        font-size:
            16px;
    }
}



/* =========================================================
   MARQUEE CIRCOLARE MISURATO
   ========================================================= */

.avviso-marquee-track.marquee-running {
    animation-name: scorrimentoAvvisoPalina;
    animation-duration: var(--marquee-duration, 20s);
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

.avviso-marquee-copy {
    box-sizing: border-box;
}



/* =========================================================
   DETTAGLIO PERCORSO CORSA
   ========================================================= */

.direzione-link {
    all: unset;

    display: inline;

    font: inherit;
    font-weight: inherit;
    color: inherit;

    cursor: pointer;
}

/*
 * La destinazione mantiene la grafica normale della palina.
 * L'interazione diventa visibile solo al passaggio del mouse.
 */
@media (hover: hover) {

    .direzione-link:hover {
        text-decoration: underline;
        text-decoration-thickness: 2px;
        text-underline-offset: 4px;
    }
}

.direzione-link:focus-visible {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;

    outline: 2px solid currentColor;
    outline-offset: 3px;
}


body.percorso-aperto {
    overflow: hidden;
}


.percorso-overlay {
    position: fixed;
    inset: 0;

    z-index: 2000;

    background: rgba(0, 0, 0, 0.48);

    opacity: 0;
    visibility: hidden;

    transition:
        opacity 0.28s ease,
        visibility 0.28s ease;
}

.percorso-overlay.aperto {
    opacity: 1;
    visibility: visible;
}


.percorso-drawer {
    --percorso-colore: #5f6b76;

    position: fixed;

    top: 0;
    right: 0;
    bottom: 0;

    z-index: 2001;

    width: min(560px, 44vw);
    max-width: 100%;

    display: flex;
    flex-direction: column;

    background: #ffffff;
    color: #111111;

    box-shadow:
        -12px 0 35px
        rgba(0, 0, 0, 0.24);

    transform: translateX(102%);

    transition:
        transform 0.30s ease;

    visibility: hidden;
}

.percorso-drawer.aperto {
    transform: translateX(0);
    visibility: visible;
}


.percorso-header {
    flex-shrink: 0;

    padding:
        18px
        clamp(18px, 3vw, 30px);

    border-bottom:
        1px solid #d8dde3;

    background: #ffffff;
}


.percorso-back {
    display: inline-flex;
    align-items: center;

    padding: 9px 13px;

    border: 1.5px solid #111111;
    border-radius: 5px;

    background: #ffffff;
    color: #111111;

    font-size: 13px;
    font-weight: 800;

    cursor: pointer;
}

.percorso-back:hover {
    background: #111111;
    color: #ffffff;
}


.percorso-intestazione {
    margin-top: 18px;

    display: flex;
    align-items: center;
    gap: 16px;
}


.percorso-badge-linea {
    min-width: 82px;
    min-height: 54px;

    padding: 8px 13px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 5px;

    font-size: 24px;
    font-weight: 900;
}


.percorso-label {
    margin-bottom: 3px;

    color: #68717c;

    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.8px;
}


.percorso-destinazione {
    font-size:
        clamp(
            20px,
            2.2vw,
            27px
        );

    line-height: 1.12;
    font-weight: 900;
}


.percorso-stato {
    min-height: 42px;

    flex-shrink: 0;

    padding:
        10px
        clamp(18px, 3vw, 30px);

    display: flex;
    align-items: center;

    border-bottom:
        1px solid #e3e6ea;

    background: #f7f8f9;
}


.percorso-live,
.percorso-statico {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0.4px;
}


.percorso-live {
    color: #15803d;
}


.percorso-live-dot {
    width: 8px;
    height: 8px;

    border-radius: 50%;

    background: #15803d;
}


.percorso-statico {
    color: #66717c;
}


.percorso-fermate {
    flex: 1;

    overflow-y: auto;
    overscroll-behavior: contain;

    padding:
        18px
        clamp(16px, 3vw, 28px)
        30px;
}


.percorso-stop {
    position: relative;

    width: 100%;
    min-height: 62px;

    display: grid;
    grid-template-columns:
        28px
        minmax(0, 1fr)
        auto;

    align-items: start;
    column-gap: 12px;

    margin: 0;
    padding: 8px 6px;

    border: 0;
    border-radius: 7px;

    background: transparent;
    color: #111111;

    font-family: inherit;
    text-align: left;

    cursor: pointer;

    transition:
        background 0.18s ease,
        transform 0.18s ease;
}


.percorso-stop:hover {
    background: #f4f5f6;
}


.percorso-stop.percorso-selezionato {
    background: #f1f3f5;
}


.percorso-asse {
    position: relative;

    width: 28px;
    min-height: 48px;

    align-self: stretch;

    display: flex;
    justify-content: center;
}


.percorso-punto {
    position: relative;

    z-index: 2;

    width: 15px;
    height: 15px;

    margin-top: 4px;

    border:
        4px solid
        var(--percorso-colore);

    border-radius: 50%;

    background: #ffffff;

    box-sizing: border-box;

    transition:
        transform 0.18s ease,
        opacity 0.18s ease;
}


.percorso-segmento {
    position: absolute;

    z-index: 1;

    top: 18px;
    bottom: -22px;

    left: 50%;

    width: 4px;

    transform: translateX(-50%);

    background:
        var(--percorso-colore);

    transition:
        opacity 0.18s ease;
}


.percorso-stop-main {
    min-width: 0;

    display: flex;
    flex-direction: column;
    gap: 5px;

    transition:
        opacity 0.18s ease;
}


.percorso-stop-nome {
    font-size: 16px;
    line-height: 1.22;
    font-weight: 650;

    transform-origin: left center;

    transition:
        font-size 0.18s ease,
        font-weight 0.18s ease;
}


.percorso-precedente
.percorso-punto,
.percorso-precedente
.percorso-segmento,
.percorso-precedente
.percorso-stop-main {
    opacity: 0.34;
}


/*
 * La fermata della palina e tutto ciò che segue
 * rimangono sempre a opacità normale.
 */
.percorso-stop-utente
.percorso-punto,
.percorso-stop-utente
.percorso-segmento,
.percorso-stop-utente
.percorso-stop-main {
    opacity: 1;
}


.percorso-stop-utente
.percorso-punto {
    width: 19px;
    height: 19px;

    margin-top: 2px;

    border-width: 5px;
}


.percorso-selezionato
.percorso-stop-nome {
    font-size: 18px;
    font-weight: 900;
}


/*
 * Anche selezionando una fermata precedente,
 * questa continua a rimanere opaca:
 * la selezione non cambia la logica del percorso.
 */
.percorso-precedente.percorso-selezionato
.percorso-stop-main,
.percorso-precedente.percorso-selezionato
.percorso-punto,
.percorso-precedente.percorso-selezionato
.percorso-segmento {
    opacity: 0.34;
}


.percorso-tu-sei-qui {
    font-size: 10px;
    line-height: 1.2;

    font-weight: 850;
    letter-spacing: 0.35px;

    color: #66717c;
}


.percorso-eta {
    min-width: 70px;

    margin-top: 0;

    padding-left: 8px;

    display: flex;
    flex-direction: column;
    align-items: flex-end;

    color: #15803d;

    font-size: 17px;
    line-height: 1.1;
    font-weight: 900;

    white-space: nowrap;
}


.percorso-eta small {
    margin-top: 4px;

    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.3px;
}


.percorso-eta-coda {
    color: #ea7a00;
}


.percorso-passata {
    margin-top: 3px;

    padding: 7px 9px;

    border-left:
        3px solid
        var(--percorso-colore);

    background: rgba(0, 0, 0, 0.045);

    color: #3f4851;

    font-size: 12px;
    line-height: 1.3;
    font-weight: 700;
}


.percorso-caricamento,
.percorso-errore {
    padding: 30px 10px;

    text-align: center;

    font-size: 15px;
    font-weight: 700;

    color: #68717c;
}


@media (max-width: 760px) {

    .percorso-drawer {
        width: 100vw;
    }

    .percorso-header {
        padding: 15px 16px;
    }

    .percorso-intestazione {
        margin-top: 15px;
        gap: 12px;
    }

    .percorso-badge-linea {
        min-width: 70px;
        min-height: 48px;

        font-size: 21px;
    }

    .percorso-destinazione {
        font-size: 21px;
    }

    .percorso-stato {
        padding:
            9px
            16px;
    }

    .percorso-fermate {
        padding:
            12px
            12px
            24px;
    }

    .percorso-stop {
        min-height: 59px;

        grid-template-columns:
            26px
            minmax(0, 1fr)
            auto;

        column-gap: 9px;

        padding:
            7px
            4px;
    }

    .percorso-stop-nome {
        font-size: 15px;
    }

    .percorso-selezionato
    .percorso-stop-nome {
        font-size: 17px;
    }

    .percorso-eta {
        min-width: 57px;

        font-size: 15px;
    }
}


@media (prefers-reduced-motion: reduce) {

    .percorso-overlay,
    .percorso-drawer,
    .percorso-stop,
    .percorso-punto,
    .percorso-stop-nome {
        transition: none;
    }
}


/* =========================================================
   JOURNEY PLANNER
   ========================================================= */

body.journey-aperto {
    overflow: hidden;
}


.journey-open-button {
    padding: 10px 14px;

    border: 1.5px solid #111;
    border-radius: 5px;

    background: #111;
    color: #fff;

    font-family: inherit;
    font-size: 12px;
    font-weight: 850;

    cursor: pointer;
}


.journey-overlay {
    position: fixed;
    inset: 0;

    z-index: 2100;

    background: rgba(0,0,0,.48);

    opacity: 0;
    visibility: hidden;

    transition:
        opacity .28s ease,
        visibility .28s ease;
}


.journey-overlay.aperto {
    opacity: 1;
    visibility: visible;
}


.journey-drawer {
    position: fixed;

    top: 0;
    right: 0;
    bottom: 0;

    z-index: 2101;

    width: min(600px, 48vw);
    max-width: 100%;

    display: flex;
    flex-direction: column;

    background: #fff;
    color: #111;

    box-shadow:
        -12px 0 35px
        rgba(0,0,0,.24);

    transform: translateX(102%);
    visibility: hidden;

    transition:
        transform .30s ease;
}


.journey-drawer.aperto {
    transform: translateX(0);
    visibility: visible;
}


.journey-header {
    flex-shrink: 0;

    padding:
        18px
        clamp(18px,3vw,30px);

    border-bottom:
        1px solid #d8dde3;
}


.journey-back {
    padding: 9px 13px;

    border: 1.5px solid #111;
    border-radius: 5px;

    background: #fff;
    color: #111;

    font-family: inherit;
    font-size: 13px;
    font-weight: 800;

    cursor: pointer;
}


.journey-title {
    margin-top: 20px;

    font-size:
        clamp(24px,3vw,34px);

    font-weight: 900;
}


.journey-subtitle {
    margin-top: 4px;

    color: #68717c;

    font-size: 13px;
}


.journey-form {
    flex-shrink: 0;

    padding:
        20px
        clamp(18px,3vw,30px);

    border-bottom:
        1px solid #e1e5e9;
}


.journey-field {
    margin-bottom: 14px;
}


.journey-field label {
    display: block;

    margin-bottom: 6px;

    font-size: 11px;
    font-weight: 850;

    letter-spacing: .6px;
}


.journey-field select,
.journey-field input[type="time"] {
    width: 100%;
    min-height: 48px;

    box-sizing: border-box;

    padding: 9px 11px;

    border:
        1.5px solid #bcc3ca;

    border-radius: 6px;

    background: #fff;
    color: #111;

    font-family: inherit;
    font-size: 15px;
}


.journey-swap {
    margin:
        -3px 0
        11px;

    padding:
        7px 10px;

    border:
        1px solid #c7ccd1;

    border-radius: 5px;

    background: #f7f8f9;

    font-size: 11px;
    font-weight: 800;

    cursor: pointer;
}


.journey-now-row {
    margin-top: 8px;
}


.journey-now-row label {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    cursor: pointer;
}


.journey-search {
    width: 100%;
    min-height: 48px;

    border: 0;
    border-radius: 6px;

    background: #111;
    color: #fff;

    font-family: inherit;
    font-size: 14px;
    font-weight: 900;

    cursor: pointer;
}


.journey-status {
    flex-shrink: 0;

    padding:
        12px
        clamp(18px,3vw,30px);

    border-bottom:
        1px solid #e3e6ea;

    background: #f7f8f9;

    font-size: 13px;
}


.journey-status span {
    display: block;

    margin-top: 3px;

    color: #68717c;
}


.journey-results {
    flex: 1;

    overflow-y: auto;
    overscroll-behavior: contain;

    padding:
        18px
        clamp(16px,3vw,28px)
        32px;
}


.journey-card {
    margin-bottom: 16px;

    padding: 16px;

    border:
        1px solid #d7dce1;

    border-radius: 9px;

    background: #fff;
}


.journey-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;

    margin-bottom: 10px;
}


.journey-solution-number {
    display: block;

    margin-bottom: 3px;

    color: #68717c;

    font-size: 10px;
    font-weight: 850;
}


.journey-duration {
    font-size: 13px;
    font-weight: 850;

    white-space: nowrap;
}


.journey-main-time {
    display: flex;
    align-items: center;
    gap: 9px;

    margin-bottom: 16px;

    font-size: 22px;
}


.journey-leg {
    padding:
        12px 0;

    border-top:
        1px solid #eceff1;
}


.journey-leg-head {
    display: flex;
    align-items: center;
    gap: 10px;

    margin-bottom: 13px;
}


.journey-line-badge {
    min-width: 54px;

    padding: 6px 10px;

    display: inline-flex;
    justify-content: center;

    border-radius: 5px;

    font-size: 14px;
    font-weight: 900;
}


.journey-point {
    display: grid;

    grid-template-columns:
        58px
        minmax(0,1fr);

    gap: 9px;
}


.journey-point-time {
    font-weight: 900;
}


.journey-leg-line {
    margin:
        4px 0
        4px 21px;

    color: #6b737c;
}


.journey-transfer {
    margin:
        12px 0;

    padding:
        9px 11px;

    border-radius: 5px;

    background: #f1f3f5;

    font-size: 11px;
    font-weight: 900;
}


@media(max-width:800px) {

    .journey-drawer {
        width: 100%;
    }

    .journey-open-button {
        font-size: 10px;
        padding: 8px 9px;
    }
}


/* Cambio effettuato al capolinea */
.journey-transfer-terminal {
    border-left: 4px solid #111;
    font-weight: 900;
}


/* =========================================================
   JOURNEY PLANNER - LINGUETTA LATERALE
   ========================================================= */

.journey-edge-trigger {
    position: fixed;

    right: 0;
    top: 50%;

    transform:
        translateY(-50%);

    z-index: 2050;

    width: 42px;
    height: 88px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: 0;
    border-radius:
        9px 0 0 9px;

    background: #111111;
    color: #ffffff;

    box-shadow:
        -5px 3px 14px
        rgba(0,0,0,.22);

    font-family: inherit;
    font-size: 38px;
    font-weight: 700;
    line-height: 1;

    cursor: pointer;

    transition:
        width .18s ease,
        background .18s ease,
        transform .18s ease;
}


.journey-edge-trigger:hover {
    width: 48px;
}


.journey-edge-trigger:focus-visible {
    outline:
        3px solid #ffffff;

    outline-offset: -5px;
}


/*
 * Quando il drawer è aperto nascondiamo
 * la linguetta esterna.
 */
body.journey-aperto
.journey-edge-trigger {
    opacity: 0;
    pointer-events: none;
}


/* Il vecchio pulsante non viene più usato */
.journey-open-button {
    display: none;
}


@media(max-width:800px) {

    .journey-edge-trigger {
        width: 38px;
        height: 76px;

        font-size: 34px;
    }

    .journey-edge-trigger:hover {
        width: 38px;
    }
}


/* =========================================================
   JOURNEY - LINGUETTA MOBILE COMPATTA
   ========================================================= */

@media(max-width:800px) {

    .journey-edge-trigger {
        top: 62%;

        width: 24px;
        height: 54px;

        border-radius:
            7px 0 0 7px;

        font-size: 24px;
        font-weight: 700;

        box-shadow:
            -3px 2px 9px
            rgba(0,0,0,.18);
    }

    .journey-edge-trigger:hover {
        width: 24px;
    }
}


/* =========================================================
   JOURNEY - OVERRIDE DEFINITIVI
   ========================================================= */


/* ---------------------------------------------------------
   LINGUETTA SEMITRASPARENTE
   --------------------------------------------------------- */

.journey-edge-trigger {
    background:
        rgba(255,255,255,0.34);

    color:
        rgba(17,17,17,0.82);

    border:
        1px solid
        rgba(17,17,17,0.18);

    border-right: 0;

    box-shadow:
        -2px 2px 8px
        rgba(0,0,0,0.10);

    backdrop-filter:
        blur(2px);

    -webkit-backdrop-filter:
        blur(2px);
}


.journey-edge-trigger:hover {
    background:
        rgba(255,255,255,0.52);
}


/* ---------------------------------------------------------
   BILINGUE
   --------------------------------------------------------- */

.journey-title strong,
.journey-title span {
    display: block;
}


.journey-title span {
    margin-top: 2px;

    color: #68717c;

    font-size: 0.52em;
    font-weight: 750;

    line-height: 1.15;
}


.journey-subtitle {
    margin-top: 9px;
}


.journey-subtitle strong,
.journey-subtitle span {
    display: block;
}


.journey-subtitle strong {
    color: #111;
    font-weight: 800;
}


.journey-subtitle span {
    margin-top: 1px;

    color: #68717c;

    font-size: 12px;
}


.journey-field label > span {
    color: #68717c;
    font-weight: 700;
}


/* ---------------------------------------------------------
   MOBILE
   --------------------------------------------------------- */

@media(max-width:800px) {

    /*
     * Linguetta molto discreta.
     */
    .journey-edge-trigger {
        top: 62%;

        width: 20px;
        height: 48px;

        border-radius:
            6px 0 0 6px;

        background:
            rgba(255,255,255,0.25);

        color:
            rgba(17,17,17,0.75);

        font-size: 23px;

        box-shadow:
            -1px 2px 5px
            rgba(0,0,0,0.08);
    }


    .journey-edge-trigger:hover {
        width: 20px;

        background:
            rgba(255,255,255,0.35);
    }


    /*
     * Tutto il drawer usa l'intera altezza
     * ed è l'unico elemento che scorre.
     */
    .journey-drawer {
        width: 100%;

        display: block;

        overflow-y: auto;
        overflow-x: hidden;

        overscroll-behavior-y: contain;

        -webkit-overflow-scrolling:
            touch;
    }


    /*
     * I risultati NON hanno più un loro
     * piccolo riquadro scrollabile.
     */
    .journey-results {
        overflow: visible;

        padding-bottom:
            calc(
                42px +
                env(safe-area-inset-bottom)
            );
    }


    .journey-header,
    .journey-form,
    .journey-status {
        flex-shrink: initial;
    }
}


/* =========================================================
   DEVIAZIONE - FERMATA NON SERVITA
   ========================================================= */

.messaggio-fermata-non-servita {
    min-height: 180px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 10px;

    text-align: center;

    font-size: clamp(22px, 4vw, 38px);
    font-weight: 800;
}

.messaggio-fermata-non-servita strong {
    font-size: 1.15em;
}

.messaggio-fermata-non-servita span {
    font-size: 0.72em;
    font-weight: 700;
}


/* CTB NEXT TRIP FRONTEND V1 */

.tempo-corsa-successiva,
.tempo-corsa-successiva .tempo-valore {
    color: #15803d;
    animation: none;
}

.next-trip-status {
    color: #15803d;
    margin-bottom: 5px;
    font-size: clamp(9px, 1.05vw, 12px);
    line-height: 1.2;
    font-weight: 800;
    text-align: right;
}

@media (max-width: 600px) {
    .next-trip-status {
        font-size: 9px;
    }
}
