#div_Motivazionale {
    background: linear-gradient( 180deg, #FFFFFF 0%, #F5F9FE 100% ) !important;
    box-shadow: inset 0 5px 0 #266e9e;

}
.title-line {
    width: 46px;
    height: 3px;
    border-radius: 10px;
    background: #266e9e;
}
/*#div_Motivazionale {

    background: linear-gradient( 180deg, #FFFFFF 0%, #F5F9FE 100% ) !important;
    border-top: 6px solid #266e9e;
}*/

.merci-engine {
    position: relative;
    z-index: 2;
    width: min(440px, 100%);
    overflow: hidden;
    color: #071a36;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 18px 48px rgba(0, 25, 55, .24);
}

.merci-engine-embed {
    display: grid;
    min-height: 100vh;
    padding: 20px;
    place-items: start center;
    background: #eef5fc;
}

.merci-engine-embed .merci-engine {
    margin: 0 auto;
}

.merci-engine__loading {
    position: absolute;
    z-index: 30;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .78);
    backdrop-filter: blur(2px);
    cursor: wait;
}

.merci-engine__loading-spinner {
    width: 46px;
    height: 46px;
    border: 4px solid #dbe9f7;
    border-top-color: #266e9e;
    border-right-color: #0570e4;
    border-radius: 50%;
    box-shadow: 0 5px 18px rgba(23, 60, 98, .16);
    animation: merci-loading-spin .75s linear infinite;
}

@keyframes merci-loading-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .merci-engine__loading-spinner {
        animation-duration: 1.5s;
    }
}

.merci-hero {
    min-height: 740px;
}

.merci-engine__header {
    display: flex;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 10px;
    color: #fff;
    background: #266e9e;
}

.merci-engine__header h4 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
}

/* Motore neutro: il badge compare solo dopo la scelta della destinazione. */
.merci-engine__destination[hidden] {
    display: none;
}

.merci-engine__destination {
    display: inline-flex;
    flex: 0 0 auto;
    gap: 6px;
    align-items: center;
    max-width: 140px;
    padding: 6px 9px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.merci-engine__eyebrow {
    font-size: .73rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    opacity: .84;
}

#merci-engine-form {
    padding: 14px 20px 20px;
}

.merci-engine__trip-type {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 0 0 20px;
    padding: 4px;
    border: 0;
    border-radius: 10px;
    background: #edf4fc;
}

.merci-engine__trip-type label {
    position: relative;
    margin: 0;
    cursor: pointer;
}

.merci-engine__trip-type input {
    position: absolute;
    opacity: 0;
}

.merci-engine__trip-type span {
    display: block;
    padding: 8px 6px;
    border-radius: 7px;
    color: #31506f;
    font-size: .93rem;
    font-weight: 700;
    text-align: center;
}

.merci-engine__trip-type input:checked + span {
    color: #076fd4;
    background: #fff;
    box-shadow: 0 2px 7px rgba(18, 57, 94, .12);
}

.merci-engine__status {
    min-height: 20px;
    margin-bottom: 0px;
    color: #526b83;
    font-size: .82rem;
}

.merci-engine__status[hidden] {
    display: none;
}

.merci-engine__status.is-error {
    color: #bd2525;
}

.merci-engine__status.is-success {
    color: #087b68;
}

.merci-engine__section + .merci-engine__section {
    margin-top: 6px;
    padding-top: 18px;
    border-top: 1px solid #dce6f0;
}

.merci-engine__section h3 {
    margin: 0 0 12px;
    color: #0570e4;
    font-size: .95rem;
    font-weight: 800;
}

.merci-engine__field {
    min-width: 0;
    margin-bottom: 14px;
}

.merci-engine__field label {
    display: block;
    margin-bottom: 6px;
    color: #354d65;
    font-size: .8rem;
    font-weight: 700;
}

.merci-engine__field label span {
    color: #73879a;
    font-weight: 500;
}

.merci-engine__field input,
.merci-engine__field select {
    width: 100%;
    height: 42px;
    padding: 7px 10px;
    color: #071a36;
    background-color: #fff;
    border: 1px solid #b9c8d7;
    border-radius: 8px;
    font-size: .93rem;
}

.merci-engine__field input:focus,
.merci-engine__field select:focus {
    border-color: #0570e4;
    box-shadow: 0 0 0 3px rgba(5, 112, 228, .14);
    outline: 0;
}

.merci-engine__field input:disabled,
.merci-engine__field select:disabled {
    color: #7c8b99;
    background-color: #eef2f6;
}

.merci-engine__destination-field {
    margin-bottom: 14px;
}

.merci-engine__destination-control {
    position: relative;
}

.merci-engine__destination-control select {
    color: #333;
    background-color: #f8fbff;
    border-color: #9eb9d3;
}

/* Freccia delle select disegnata da noi, staccata dal bordo destro. */
.merci-engine select {
    -webkit-appearance: none;
    appearance: none;
    /* Senza aspetto nativo il testo della select resta in alto: lo si centra in verticale
       come quello degli input. */
    padding-top: 10px;
    padding-bottom: 4px;
    padding-right: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%23266e9e' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 12px 8px;
}

/* Tratte e date compatte come nel vecchio motore merci:
   un titolo per gruppo, tratte una sotto l'altra, date affiancate. */
.merci-engine__step-label {
    margin: 2px 0 8px;
    color: #173c62;
    font-size: .95rem;
    font-weight: 700;
}

.merci-engine__field--compact {
    margin-bottom: 10px;
}

/* !important: deve vincere sugli stili dei campi della home merci (merci-lines.css). */
.merci-engine__field input.is-invalid,
.merci-engine__field input.is-invalid:focus,
.merci-engine__field select.is-invalid,
.merci-engine__field select.is-invalid:focus {
    border-color: #d6332a !important;
    box-shadow: 0 0 0 3px rgba(214, 51, 42, .14) !important;
}

.merci-engine__field-error {
    display: block;
    margin-top: 5px;
    color: #d6332a;
    font-size: .78rem;
    font-weight: 600;
    line-height: 1.25;
}

.merci-engine__dates {
    margin-bottom: 4px;
}

/* Solo andata: la data di andata prende tutta la riga. */
.merci-engine__dates:has(#merci-return-date-field[hidden]) {
    grid-template-columns: 1fr;
}

/* Segnaposto in grigio; le opzioni restano leggibili. */
.merci-engine__field--compact select:invalid {
    color: #999;
}

.merci-engine__field--compact select option {
    color: #266e9e;
}

/* Campi non ancora attivi (es. ritorno prima della tratta di andata):
   restano bianchi come gli altri, senza l'aspetto "spento". */
.merci-engine .merci-engine__field--compact :is(input, select):disabled {
    color: #999;
    background-color: #fff;
    cursor: default;
}

.merci-engine__date-control {
    position: relative;
}

.merci-engine__date-control input {
    cursor: pointer;
    user-select: none;
}

.merci-engine__date-control input::-webkit-datetime-edit {
    pointer-events: none;
    user-select: none;
}

.merci-engine__date-control button {
    position: absolute;
    top: 1px;
    right: 1px;
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    color: #0570e4;
    background: transparent;
    border: 0;
    border-radius: 0 8px 8px 0;
}

.merci-engine__date-control button:hover {
    background: #edf5fd;
}

.merci-engine__date-control input.is-populated {
    color: #333;
}

.flatpickr-calendar.merci-calendar {
    overflow: hidden;
    border: 0;
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(7, 26, 54, .24);
    font-family: inherit;
    z-index: 99999;
}

.merci-calendar .flatpickr-months {
    padding: 7px 5px 5px;
    color: #fff;
    background: #0570e4;
}

.merci-calendar .flatpickr-month,
.merci-calendar .flatpickr-current-month,
.merci-calendar .flatpickr-current-month .cur-month,
.merci-calendar .flatpickr-current-month input.cur-year {
    color: #fff;
}

.merci-calendar .flatpickr-current-month {
    padding-top: 4px;
    font-size: 1rem;
    font-weight: 800;
}

.merci-calendar .flatpickr-prev-month,
.merci-calendar .flatpickr-next-month {
    top: 5px;
    padding: 8px 12px;
}

.merci-calendar .flatpickr-prev-month svg,
.merci-calendar .flatpickr-next-month svg {
    fill: #fff;
}

.merci-calendar .flatpickr-weekdays {
    height: 34px;
    background: #edf5fd;
}

.merci-calendar span.flatpickr-weekday {
    color: #31506f;
    background: transparent;
    font-size: .72rem;
    font-weight: 800;
}

.merci-calendar .flatpickr-day {
    color: #173c62;
    border-radius: 8px;
    font-weight: 600;
}

.merci-calendar .flatpickr-day:hover,
.merci-calendar .flatpickr-day:focus {
    background: #e4f0fc;
    border-color: #e4f0fc;
}

.merci-calendar .flatpickr-day.today {
    color: #0570e4;
    border-color: #0570e4;
}

.merci-calendar .flatpickr-day.selected,
.merci-calendar .flatpickr-day.selected:hover,
.merci-calendar .flatpickr-day.selected:focus {
    color: #fff;
    background: #266e9e;
    border-color: #266e9e;
}

.merci-calendar .flatpickr-day.flatpickr-disabled,
.merci-calendar .flatpickr-day.prevMonthDay,
.merci-calendar .flatpickr-day.nextMonthDay {
    color: #a9b6c2;
}

#div_Motivazionale {
    border-bottom: 1px solid #e7edf3;
}

#div_Motivazionale .container {
    color: #173c62 !important;
}

#div_Motivazionale .perch351usaretraghet {
    position: relative;
    padding-bottom: 13px;
    margin-top: 5px;
    color: #173c62;
    font-weight: 700;
}

#div_Motivazionale .perch351usaretraghet::after {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 54px;
    height: 4px;
    border-radius: 999px;
    background: #266e9e;
    content: "";
}

#div_Motivazionale .motiv-item {
    color: #173c62;
}

#div_Motivazionale .motiv-item p {
    color: #173c62;
}

#div_Motivazionale .rating-label,
#div_Motivazionale .rating-score,
#div_Motivazionale .rating-reviews {
    color: #173c62;
}

#div_Motivazionale .rating-label,
#div_Motivazionale .rating-reviews {
    text-decoration-color: rgba(23, 60, 98, .45);
}

.merci-content-section {
    width: 100%;
    margin: 0;
    padding: 48px 1rem 70px;
    background: #fff;
    border-radius: 0;
}

.merci-content-shell {
    max-width: 1366px;
}

.merci-content-row {
    margin-top: 0;
    align-items: flex-start;
}

.merci-content-copy {
    color: #173c62;
    line-height: 1.65;
}

.merci-content-copy > :first-child {
    margin-top: 0;
}

.merci-content-aside {
    padding-top: 2px;
}

.merci-related-links {
    margin: 0 0 36px;
}

.merci-related-card {
    position: relative;
    display: flex;
    min-height: 152px;
    height: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 18px 12px 16px;
    overflow: hidden;
    color: #173c62;
    background: linear-gradient(180deg, #f8fbff 0%, #e9f2fb 100%);
    border: 1px solid #d7e4f0;
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(23, 60, 98, .08);
    text-align: center;
    text-decoration: none;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.merci-related-card::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 4px;
    background: #266e9e;
    content: "";
}

.merci-related-card:hover,
.merci-related-card:focus-visible {
    color: #0b559d;
    border-color: #a9c8e6;
    box-shadow: 0 12px 26px rgba(23, 60, 98, .14);
    outline: 0;
    transform: translateY(-3px);
}

.merci-related-card__label {
    margin-bottom: 2px;
    color: #5f7690;
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.merci-related-card strong {
    min-height: 44px;
    font-size: 1rem;
    line-height: 1.3;
}

.merci-related-card__icon {
    display: grid;
    width: 62px;
    height: 44px;
    margin-top: 10px;
    place-items: center;
}

.merci-related-card__icon img {
    width: 58px;
    max-height: 38px;
    object-fit: contain;
}

.merci-engine__row,
.merci-engine__dimensions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

/* Allineati in basso: se un'etichetta va a capo (es. "Número de conductores"),
   select e stepper restano sulla stessa linea. */
.merci-engine__row--vehicle {
    grid-template-columns: minmax(0, 2fr) minmax(145px, 1fr);
    align-items: end;
}

.merci-engine__stepper {
    display: grid;
    grid-template-columns: 38px 1fr 38px;
}

.merci-engine__stepper button,
.merci-engine__stepper input {
    height: 42px;
    border: 1px solid #b9c8d7;
    border-radius: 0;
    text-align: center;
}

.merci-engine__stepper button {
    color: #0570e4;
    background: #eef5fc;
    font-size: 1.25rem;
    font-weight: 800;
}

.merci-engine__stepper button:disabled {
    color: #8da0b3;
    cursor: not-allowed;
    opacity: .65;
}

.merci-engine__stepper button:first-child {
    border-radius: 8px 0 0 8px;
}

.merci-engine__stepper button:last-child {
    border-radius: 0 8px 8px 0;
}

.merci-engine__cargo-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 4px 0 18px;
}

.merci-engine__cargo-title {
    grid-column: 1 / -1;
    margin-bottom: 1px;
    color: #173c62;
    font-size: .82rem;
    font-weight: 700;
}

/* I due box restano della stessa altezza anche quando una domanda va a capo:
   la legenda è portata dentro il box e i pulsanti sono allineati in basso. */
.merci-engine__cargo-question {
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100%;
    padding: 10px;
    margin: 0;
    background: #f5f8fb;
    border: 1px solid #d5e0eb;
    border-radius: 8px;
}

.merci-engine__cargo-question[hidden] {
    display: none;
}

.merci-engine__cargo-question legend {
    float: left;
    width: 100%;
    padding: 0;
    margin: 0 0 8px;
    color: #354d65;
    font-size: .86rem;
    font-weight: 700;
}

.merci-engine__yes-no {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
    margin-top: auto;
}

.merci-engine__yes-no label {
    margin: 0;
    cursor: pointer;
}

.merci-engine__yes-no input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.merci-engine__yes-no span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    color: #35516e;
    background: #fff;
    border: 1px solid #c6d4e1;
    border-radius: 7px;
    font-size: .84rem;
    font-weight: 800;
}

.merci-engine__yes-no input:checked + span {
    color: #fff;
    background: #0570e4;
    border-color: #0570e4;
}

.merci-engine__yes-no input:focus-visible + span {
    outline: 3px solid rgba(5, 112, 228, .25);
    outline-offset: 1px;
}

.merci-engine__submit {
    width: 100%;
    padding: 13px 15px;
    color: #fff;
    background: #266e9e;
    border: 0;
    border-radius: 10px;
    font-size: 22px;
    font-weight: 800;
    text-transform: uppercase;
}

    .merci-engine__submit:hover {
        background: #266e9e;
    }

    .merci-engine__submit i {
        margin-left: 10px;
        font-size: .8em;
    }

.merci-engine [hidden] {
    display: none !important;
}

@media (max-width: 991.98px) {
    .merci-hero {
        height: auto !important;
        min-height: 0 !important;
        padding-bottom: 30px !important;
    }

    .merci-hero .section-booking {
        height: auto !important;
        min-height: 0 !important;
    }

    #div_Motivazionale {
        margin-top: 0 !important;
    }

    #div_Motivazionale .row-mobile {
        margin-top: 0 !important;
    }

    .merci-engine {
        margin: 0 auto;
    }

    .merci-content-section {
        padding-top: 36px;
    }

    .merci-content-aside {
        padding-top: 0;
    }
}

@media (max-width: 480px) {
    .merci-content-section {
        padding: 30px .75rem 50px;
    }

    .merci-related-card {
        min-height: 142px;
        padding-right: 8px;
        padding-left: 8px;
    }

    /* Le due domande sulla merce restano affiancate anche su mobile. */
    .merci-engine__cargo-question {
        padding: 8px;
    }

    .merci-engine__header {
        align-items: flex-start;
    }

    .merci-engine__destination {
        max-width: 105px;
    }
}
