/* ==========================================================================
   Skin viaggiarealverde.it: sostituisce assets/css/style.css quando SITE_CODE=VAV.
   Restyla e basta: nessuna classe o ID rinominato, cosi' il JS resta quello comune.
   Le classi .vv-* servono a skin-dates.js.
   ========================================================================== */

/* ============================================
   VARIABLES
   ============================================ */
:root {
    /* Brand: verde "al verde" */
    --brand: #0FA15A;
    --brand-2: #1DB96D;          /* alto del gradiente CTA */
    --brand-3: #0A8E4E;          /* basso del gradiente CTA */
    --brand-ink: #087241;        /* testo su fondi chiari */
    --brand-tint: #ECF8F1;       /* pannello search */
    --brand-tint-2: #D3EFDF;
    --brand-glow: rgba(15, 161, 90, 0.38);
    --field-shadow: 0 1px 2px rgba(20, 19, 26, 0.06), 0 2px 6px -2px rgba(15, 161, 90, 0.16);

    /* Neutri */
    --ink: #14131A;
    --muted: #767384;
    --muted-2: #A3A1AE;
    --line: #ECEBF1;
    --pop-shadow: 0 16px 40px -12px rgba(20, 19, 26, 0.28), 0 4px 12px -4px rgba(20, 19, 26, 0.10);

    /* Immagini hero (solo desktop >= 1180px) */
    --hero-img-1: url('hero/hero-center.jpg');
    --hero-img-2: url('hero/hero-left.jpg');
    --hero-img-3: url('hero/hero-right.jpg');

    /* Alias delle variabili originali: le usano cmp, cookie page e qualunque
       stile inline del gestionale. Non toglierle. */
    --primary: var(--brand);
    --primary-grad: linear-gradient(180deg, var(--brand-2) 0%, var(--brand) 55%, var(--brand-3) 100%);
    --primary-shadow: var(--brand-glow);
    --primary-focus: var(--brand-glow);
    --primary-ink: var(--brand-ink);
    --dark: var(--ink);
    --text: #3D3B47;
    --text-light: var(--muted);
    --bg-input: #FFFFFF;
    --border-input: 1px solid transparent;
    --white: #ffffff;
    --glass: var(--brand-tint);
    --radius-sm: 14px;
    --radius-lg: 22px;
    --shadow-soft: 0 10px 30px -12px rgba(20, 19, 26, 0.25);
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   BASE / RESET
   ============================================ */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    background-color: #FFFFFF;
    color: var(--text);
    padding-bottom: 0;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   LAYOUT
   ============================================ */
.container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 16px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0 4px;
    margin-bottom: 0;
}

/* --- HERO BACKGROUND ---
   Qui diventa il "ventaglio"
   di foto a destra (solo desktop largo, vedi media query in fondo). */
.hero-bg {
    display: none;
}

.hero-bg::after {
    content: none;
}

/* --- LOGO --- */
.logo {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -0.04em;
    line-height: 1;
    text-shadow: none;
    margin-bottom: 0;
}

.logo span {
    color: var(--brand);
}

/* --- DYNAMIC HEADINGS --- */
.dynamic-headings {
    text-align: left;
    color: var(--ink);
    margin: 26px 0 18px;
    padding: 0;
}

.heading-group {
    display: none;
    animation: fadeIn 0.4s ease;
}

.heading-group.active {
    display: block;
}

.hero-title {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.035em;
    color: var(--ink);
    margin: 0;
    max-width: none;
    text-shadow: none;
    text-wrap: balance;
}

.hero-subtitle {
    font-size: 0.98rem;
    font-weight: 500;
    color: var(--muted);
    margin: 10px 0 0;
    line-height: 1.45;
    max-width: 520px;
}

.hero-subtitle:empty {
    display: none;
}

/* ============================================
   OVERLAY
   ============================================ */
#focus-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(20, 19, 26, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 900;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

#focus-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* ============================================
   SEARCH CARD — pannello tinta brand con righe bianche
   NB: niente z-index/transform qui: .input-group.z-active (1001) deve
   poter salire sopra #focus-overlay (900).
   ============================================ */
.search-card {
    background: var(--brand-tint);
    border-radius: var(--radius-lg);
    padding: 10px;
    box-shadow: 0 26px 50px -30px var(--brand-glow), inset 0 1px 0 rgba(255, 255, 255, 0.7);
    border: 0;
    margin-top: 0;
    position: relative;
}

.search-card.allow-popout {
    background: var(--brand-tint);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transform: none;
}

/* ============================================
   TABS
   ============================================ */
.tabs-scroll-container {
    text-align: left;
    margin-bottom: 8px;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
}

.tabs-scroll-container::-webkit-scrollbar {
    display: none;
}

.tabs-wrapper {
    background: rgba(255, 255, 255, 0.55);
    padding: 4px;
    border-radius: 14px;
    display: flex;
    gap: 4px;
    white-space: nowrap;
    border: 0;
}

.tab-btn {
    flex: 1 1 0;
    justify-content: center;
    border: none;
    background: transparent;
    padding: 10px 12px;
    border-radius: 10px;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--muted);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 7px;
}

.tab-btn:hover {
    color: var(--ink);
}

.tab-btn.active {
    background: var(--white);
    color: var(--brand-ink);
    box-shadow: var(--field-shadow);
}

.tab-btn svg {
    width: 17px;
    height: 17px;
    fill: currentColor;
}

@media (max-width: 420px) {
    .tabs-wrapper {
        gap: 2px;
        padding: 3px;
    }

    .tab-btn {
        padding: 9px 8px;
        font-size: 0.85rem;
        gap: 5px;
    }

    .tab-btn svg {
        width: 15px;
        height: 15px;
    }
}

@media (max-width: 380px) {
    .tab-btn {
        font-size: 0.8rem;
    }

    .tab-btn svg {
        display: none;
    }
}

/* ============================================
   FORM ELEMENTS
   ============================================ */
.form-section {
    display: none;
    animation: fadeIn 0.25s ease;
}

.form-section.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.col-span-12 {
    grid-column: span 2;
}

.col-span-6 {
    grid-column: span 1;
}

.input-group {
    position: relative;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    padding: 16px;
    transition: var(--transition);
    border: var(--border-input);
    box-shadow: var(--field-shadow);
    cursor: text;
}

.input-group:hover {
    border-color: var(--brand-tint-2);
}

.input-group.z-active {
    z-index: 1001;
    position: relative;
    background: var(--white);
    border-color: var(--brand);
    box-shadow: 0 0 0 4px var(--brand-tint-2), 0 24px 48px -12px rgba(20, 19, 26, 0.45);
}

/* Validation error state */
.input-group.error {
    border-color: #E5484D;
    box-shadow: 0 0 0 3px rgba(229, 72, 77, 0.15);
    animation: shake 0.4s ease;
}

.input-group.error .helper-error {
    display: block;
}

.helper-error {
    display: none;
    font-size: 0.72rem;
    color: #D93036;
    margin-top: 6px;
    font-weight: 600;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-4px); }
    40%, 80% { transform: translateX(4px); }
}


.input-group label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    font-weight: 700;
    margin-bottom: 6px;
    cursor: pointer;
}

/* Campi testo (destinazione, ospiti, ritiro, da/a): niente etichetta visibile,
   solo icona + placeholder. La nascondiamo SOLO visivamente:
   resta nel DOM per screen reader e per il gestionale. */
.input-group:not(.date-range-input):not(.time-picker-group) > label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.input-with-icon {
    display: flex;
    align-items: center;
    gap: 12px;
}

.input-icon {
    color: var(--brand);
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

input,
select {
    width: 100%;
    border: none;
    background: transparent;
    font-size: 16px;
    font-weight: 600;
    color: var(--ink);
    padding: 0;
    outline: none;
    font-family: inherit;
    height: 24px;
}

input::placeholder {
    color: var(--muted);
    font-weight: 500;
    opacity: 1;
}

/* Ospiti: chevron a destra come "1 camera, 2 ospiti  >" */
.input-group:has(#guest-input) {
    cursor: pointer;
}

.input-group:has(#guest-input) .input-with-icon::after {
    content: "";
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    background: var(--muted);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 6 6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 6 6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
    transition: transform 0.2s;
}

.input-group.z-active:has(#guest-input) .input-with-icon::after {
    transform: rotate(90deg);
}

/* ============================================
   DATE RANGE INPUT — "CHECK-IN 28 mer/ott  →2 notti  CHECK-OUT 30 ven/ott"
   ============================================ */
.date-range-input {
    cursor: pointer;
    padding: 14px 16px;
}

/* Le etichette "Check-in — Check-out" / "Ritiro — Riconsegna" ora stanno
   dentro le due meta' (skin-dates.js): qui restano solo per accessibilita'. */
.date-range-input > label,
.date-label-row label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* L'icona calendario serve solo quando le date sono vuote */
.date-range-input .input-with-icon > .input-icon {
    display: none;
}

.date-range-input .input-with-icon:has(.date-range-display.placeholder) > .input-icon {
    display: block;
}

.date-range-display {
    flex: 1;
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--ink);
    min-height: 24px;
}

.date-range-display.placeholder {
    display: flex;
    font-size: 16px;
    font-weight: 500;
    color: var(--muted);
}

/* --- Fallback: markup originale di datepicker.js (senza skin-dates.js) ---
   <span class="date-value"><b>ven</b> 30 ott</span> → <span class="date-value">… */
.date-range-display .date-value {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    white-space: nowrap;
}

/* v1.46.0: giorno della settimana ("Ven", "Fri") */
.date-range-display .date-value b {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.date-range-display .date-value:last-child:not(:first-child) {
    align-items: flex-end;
    text-align: right;
}

.date-range-display .date-separator {
    color: var(--brand);
    font-size: 20px;
    font-weight: 700;
    text-align: center;
}

/* --- Markup skin-dates.js (classi .vv-*) --- */
.date-range-display .vv-lbl {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 4px;
}

.date-range-display .vv-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.date-range-display .vv-day {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
    color: var(--ink);
}

.date-range-display .vv-wm {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    letter-spacing: 0;
}

.date-range-display .vv-wm b {
    font-size: 13px;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0;
    color: var(--ink);
}

.date-range-display .vv-mon {
    font-size: 12px;
    font-weight: 500;
    color: var(--muted);
}

.date-range-display .date-value.vv-end {
    align-items: flex-end;
}

.date-range-display .vv-end .vv-row {
    justify-content: flex-end;
}

.date-range-display .date-separator:has(.vv-arrow) {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding-top: 12px;
}

.date-range-display .vv-arrow svg {
    display: block;
    width: 30px;
    height: 14px;
}

.date-range-display .vv-nights {
    font-size: 11px;
    font-weight: 700;
    color: var(--brand-ink);
    letter-spacing: 0;
    white-space: nowrap;
}

@media (max-width: 360px) {
    .date-range-display .vv-day {
        font-size: 30px;
    }
}

/* Nota sulle date proposte. Deve leggersi come una didascalia, non come un errore. */
.date-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding-top: 9px;
    border-top: 1px dashed var(--line);
    font-size: 0.76rem;
    line-height: 1.3;
    color: var(--muted);
    font-weight: 500;
}

.date-hint svg {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    color: var(--brand);
}

/* display:flex qui sopra batte la regola UA [hidden]: senza questa riga
   main.js alza l'attributo e non succede niente. */
.date-hint[hidden] {
    display: none;
}

/* v1.46.0: etichetta della proposta date ("Questo weekend · 2 notti") */
.date-label-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    column-gap: 8px;
    row-gap: 2px;
    margin-bottom: 0;
}

.date-label-row label {
    margin-bottom: 0;
}

.date-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    max-width: 100%;
    margin-bottom: 10px;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--brand-tint);
    color: var(--brand-ink);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.5;
    white-space: nowrap;
    pointer-events: none;
}

.date-badge svg {
    flex-shrink: 0;
    width: 12px;
    height: 12px;
}

.date-badge-text {
    overflow: hidden;
    text-overflow: ellipsis;
}

.date-badge[hidden] {
    display: none;
}

/* ============================================
   TIMEPICKER
   ============================================ */
.time-picker-group {
    cursor: pointer;
    position: relative;
    padding: 12px 16px;
}

.time-picker-group .input-with-icon {
    justify-content: space-between;
}

/* "Ora della riconsegna" non deve andare a capo: i due box restano allineati */
.time-picker-group > label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.time-display {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--ink);
    flex: 1;
}

.chevron-icon {
    width: 20px;
    height: 20px;
    color: var(--muted);
    transition: transform 0.2s;
}

.time-picker-group.open .chevron-icon {
    transform: rotate(180deg);
}

.time-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 100%;
    max-height: 220px;
    overflow-y: auto;
    background: var(--white);
    border-radius: var(--radius-sm);
    box-shadow: var(--pop-shadow);
    border: 1px solid var(--line);
    z-index: 1100;
    display: none;
    -webkit-overflow-scrolling: touch;
}

.time-dropdown.show {
    display: block;
}

.time-dropdown::-webkit-scrollbar {
    width: 6px;
}

.time-dropdown::-webkit-scrollbar-track {
    background: #F6F6F9;
    border-radius: 3px;
}

.time-dropdown::-webkit-scrollbar-thumb {
    background: #D6D5DD;
    border-radius: 3px;
}

.time-option {
    display: block;
    padding: 11px 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    cursor: pointer;
    transition: background 0.15s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
}

.time-option:hover {
    background: #F6F6F9;
}

.time-option.selected {
    background: var(--brand-tint);
    color: var(--brand-ink);
    font-weight: 800;
}

/* ============================================
   SCARCITY / LIVE COUNTER
   ============================================ */
.scarcity-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 12px;
    padding: 10px 16px;
    background: #FFF6E5;
    border-radius: 12px;
    font-size: 0.86rem;
    color: #8A5300;
    font-weight: 600;
    animation: fadeIn 1s ease;
}

.live-dot {
    width: 8px;
    height: 8px;
    background-color: #E5484D;
    border-radius: 50%;
    box-shadow: 0 0 0 rgba(229, 72, 77, 0.4);
    animation: pulse-red 2s infinite;
    flex-shrink: 0;
}

@keyframes pulse-red {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(229, 72, 77, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(229, 72, 77, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(229, 72, 77, 0); }
}


.btn-search {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--primary-grad);
    color: var(--white);
    border: none;
    padding: 18px;
    font-family: inherit;
    font-size: 1.02rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    border-radius: var(--radius-sm);
    margin-top: 8px;
    cursor: pointer;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.24),
        inset 0 -2px 0 rgba(20, 19, 26, 0.14),
        0 1px 2px rgba(20, 19, 26, 0.16),
        0 14px 26px -12px var(--brand-glow);
    position: relative;
    overflow: hidden;
    transition: transform 0.15s ease, filter 0.15s ease;
}

/* Lente di ricerca */
.btn-search::before {
    content: "";
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Riflesso che attraversa il bottone (ciclo 4s, come la CTA originale) */
.btn-search::after {
    content: "";
    position: absolute;
    top: -50%;
    left: 0;
    width: 32%;
    height: 200%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.22) 50%, rgba(255, 255, 255, 0) 100%);
    transform: translateX(-160%) rotate(20deg);
    animation: cta-shine-1 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes cta-shine-1 {
    0% { transform: translateX(-160%) rotate(20deg); }
    49.25% { transform: translateX(420%) rotate(20deg); }
    100% { transform: translateX(420%) rotate(20deg); }
}

@keyframes cta-shine-2 {
    0% { opacity: 0; }
    100% { opacity: 0; }
}

.btn-search:hover {
    filter: brightness(1.05);
}

.btn-search:active {
    transform: scale(0.985);
}

@media (prefers-reduced-motion: reduce) {
    .btn-search::before,
    .btn-search::after {
        animation: none;
    }

    .btn-search::after {
        display: none;
    }
}

/* ============================================
   CHIP DURATA SOGGIORNO (hotel) — riga bianca come le altre del pannello
   ============================================ */
.nights-chips {
    margin-top: 8px;
    padding: 12px 12px 10px;
    background: var(--white);
    border-radius: var(--radius-sm);
    box-shadow: var(--field-shadow);
}

.nights-chips-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 8px;
}

.nights-chips-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
}

.nights-chip {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    border: 1px solid var(--line);
    background: var(--white);
    padding: 8px 2px;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--ink);
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.nights-chip .nc-n,
.nights-chip .nc-until {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nights-chip .nc-unit {
    font-size: 0.76em;
    font-weight: 600;
    color: var(--muted);
}

.nights-chip .nc-until {
    font-size: 0.66rem;
    font-weight: 600;
    color: var(--muted);
}

.nights-chip .nc-until:empty {
    display: none;
}

/* Spunta sul chip attivo: segnala la durata proposta senza diventare una CTA */
.nights-chip.active::after {
    content: "";
    position: absolute;
    top: -6px;
    right: -5px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 10px no-repeat;
}

.nights-chip.active .nc-until,
.nights-chip.active .nc-unit {
    color: var(--brand-ink);
}

.nights-chip:hover {
    border-color: var(--brand-tint-2);
    background: var(--brand-tint);
}

.nights-chip.active {
    background: var(--brand-tint);
    color: var(--brand-ink);
    border-color: var(--brand);
    box-shadow: none;
}

.nights-chip:active {
    transform: scale(0.96);
}

@media (max-width: 380px) {
    .nights-chips .nights-chips-row {
        gap: 4px;
    }

    .nights-chips-row .nights-chip {
        font-size: 0.8rem;
    }

    .nights-chips-row .nights-chip .nc-until {
        font-size: 0.6rem;
    }
}

/* ============================================
   TRUST & REDIRECT
   ============================================ */
.redirect-notice {
    font-size: 0.72rem;
    color: var(--muted);
    text-align: center;
    margin: 18px 0 10px;
    line-height: 1.35;
}

.trust-badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ink);
    text-align: center;
    margin-top: 6px;
}

.trust-badges span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

/* ============================================
   TOGGLE SWITCH
   ============================================ */
.toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    cursor: pointer;
    padding: 8px 6px;
}

.toggle-switch {
    position: relative;
    width: 40px;
    height: 24px;
    background: #D9D8E0;
    border-radius: 50px;
    transition: 0.25s;
    flex-shrink: 0;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: 0.25s;
    box-shadow: 0 1px 3px rgba(20, 19, 26, 0.25);
}

input[type="checkbox"]:checked+.toggle-switch {
    background: var(--brand);
}

input[type="checkbox"]:checked+.toggle-switch::after {
    transform: translateX(16px);
}

/* Nasconde la checkbox nativa SOLO dove e' rimpiazzata dal toggle grafico
   (vedi v1.35.0: mai una regola globale, spegnerebbe le checkbox del CMP). */
.toggle-wrapper input[type="checkbox"] {
    display: none;
}

.toggle-label {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--ink);
}

/* ============================================
   GUESTS DROPDOWN
   ============================================ */
.guest-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 100%;
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--pop-shadow);
    padding: 4px 16px;
    z-index: 1100;
    display: none;
    border: 1px solid var(--line);
    cursor: default;
}

.guest-dropdown.show {
    display: block;
}

.guest-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
}

.guest-row:last-child {
    margin-bottom: 0;
    border: none;
    padding-bottom: 12px;
}

.counter-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--brand-tint-2);
    background: var(--brand-tint);
    color: var(--brand-ink);
    font-family: inherit;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: var(--transition);
}

.counter-btn:hover {
    background: var(--brand);
    border-color: var(--brand);
    color: var(--white);
}

/* ============================================
   DATEPICKER MODAL (fullscreen su mobile, card su desktop)
   ============================================ */
.datepicker-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(20, 19, 26, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 2000;
    display: none;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.datepicker-modal.active {
    display: flex;
    flex-direction: column;
    opacity: 1;
}

/* Header */
.dp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    flex-shrink: 0;
}

.dp-close {
    width: 40px;
    height: 40px;
    border: none;
    background: #F4F4F7;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--muted);
    transition: all 0.2s;
}

.dp-close:hover {
    background: #E9E8EE;
    color: var(--ink);
}

.dp-title {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--ink);
}

.dp-clear {
    font-family: inherit;
    font-size: 0.88rem;
    color: var(--brand-ink);
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 700;
    padding: 8px 10px;
}

.dp-clear:hover {
    text-decoration: underline;
}

/* Selection Summary — due "righe bianche" sul pannello tinta, come la search */
.dp-selection-bar {
    display: flex;
    gap: 8px;
    padding: 10px;
    background: var(--brand-tint);
    border-bottom: 0;
    flex-shrink: 0;
}

.dp-selection-item {
    flex: 1;
    padding: 10px 14px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--white);
    border-radius: var(--radius-sm);
    border: 2px solid transparent;
    border-bottom: 2px solid transparent;
    box-shadow: var(--field-shadow);
}

.dp-selection-item:last-child {
    text-align: right;
}

.dp-selection-item.active {
    background: var(--white);
    border-color: var(--brand);
}

.dp-selection-item.selected {
    background: var(--white);
}

.dp-selection-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    font-weight: 700;
    margin-bottom: 3px;
}

.dp-selection-value {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--ink);
}

.dp-selection-value.placeholder {
    color: var(--muted-2);
    font-weight: 600;
}

/* Nights Counter */
.dp-nights-counter {
    text-align: center;
    padding: 0 10px 10px;
    background: var(--brand-tint);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--brand-ink);
    flex-shrink: 0;
    display: none;
}

.dp-nights-counter.show {
    display: block;
}

/* Calendar Container */
.dp-calendar-container {
    flex: 1;
    overflow-y: auto;
    background: var(--white);
    -webkit-overflow-scrolling: touch;
}

/* Month */
.dp-month {
    padding: 18px 16px;
}

.dp-month:not(:last-child) {
    border-bottom: 1px solid var(--line);
}

.dp-month-header {
    text-align: left;
    padding-left: 6px;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin-bottom: 12px;
    text-transform: capitalize;
}

/* Weekdays */
.dp-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: 6px;
}

.dp-weekday {
    text-align: center;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--muted-2);
    padding: 6px 0;
    text-transform: uppercase;
}

/* Days Grid */
.dp-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px 0;
}

.dp-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--ink);
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.15s;
    position: relative;
    background: transparent;
    border: none;
    font-family: inherit;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

@media (hover: hover) {
    .dp-day:hover:not(.disabled):not(.empty) {
        background: var(--brand-tint);
    }
}

.dp-day.empty {
    cursor: default;
}

.dp-day.disabled {
    color: #CFCED6;
    cursor: not-allowed;
}

.dp-day.today {
    font-weight: 800;
    color: var(--brand-ink);
}

.dp-day.today::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--brand);
    border-radius: 50%;
}

/* Selected States */
.dp-day.start-date,
.dp-day.end-date {
    background: var(--brand);
    color: var(--white);
    font-weight: 800;
}

.dp-day.start-date.today::after,
.dp-day.end-date.today::after {
    background: var(--white);
}

.dp-day.start-date {
    border-radius: 12px 0 0 12px;
}

.dp-day.end-date {
    border-radius: 0 12px 12px 0;
}

.dp-day.start-date.end-date {
    border-radius: 12px;
}

/* Single mode (volo solo andata) */
.datepicker-modal.dp-single .dp-day.start-date {
    border-radius: 12px;
}

.dp-day.in-range {
    background: var(--brand-tint);
    color: var(--brand-ink);
    border-radius: 0;
}

/* Hover range preview */
.dp-day.hover-range {
    background: var(--brand-tint);
}

/* Footer */
.dp-footer {
    padding: 14px 16px;
    background: var(--white);
    border-top: 1px solid var(--line);
    flex-shrink: 0;
}

.dp-apply-btn {
    width: 100%;
    padding: 17px;
    background: var(--primary-grad);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.24),
        inset 0 -2px 0 rgba(20, 19, 26, 0.14),
        0 12px 24px -12px var(--brand-glow);
}

.dp-apply-btn:disabled {
    background: #E3E2E8;
    color: var(--muted-2);
    box-shadow: none;
    cursor: not-allowed;
}

.dp-apply-btn:not(:disabled):hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
}

/* ============================================
   COMPARE SECTION — "Prezzi confrontati da [loghi]"
   ============================================ */
.compare-section {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 0;
    margin-top: 36px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    overflow: hidden;
}

.compare-section__title,
.section-title.compare-section__title {
    flex: 0 0 auto;
    max-width: 118px;
    margin: 0;
    padding: 0;
    text-align: left;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.3;
    color: var(--muted);
}

.compare-marquee-wrap {
    flex: 1;
    min-width: 0;
    width: 100%;
    overflow: hidden;
    mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

.compare-marquee {
    display: flex;
    align-items: center;
    animation: marquee 30s linear infinite;
    width: max-content;
}

.compare-logo-img {
    height: 40px;
    width: 150px;
    flex-shrink: 0;
    padding: 0 18px;
    object-fit: contain;
    mix-blend-mode: multiply; /* i loghi sono jpg su bianco */
}

/* ============================================
   FEATURES — lista numerata 01/02/03 (blocco "Come ... trova un prezzo")
   ============================================ */
.features {
    margin-top: 48px;
}

.section-title {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.1;
    color: var(--ink);
    margin-bottom: 18px;
    text-wrap: balance;
}

.feature-group {
    display: none;
    counter-reset: vvfeat;
}

.feature-group.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

.feature-card {
    background: transparent;
    padding: 18px 0;
    border-radius: 0;
    box-shadow: none;
    border: 0;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: flex-start;
    gap: 14px;
    counter-increment: vvfeat;
}

.feature-card:first-child {
    border-top: 1px solid var(--line);
}

.feature-card::before {
    content: counter(vvfeat, decimal-leading-zero);
    min-width: 22px;
    padding-top: 3px;
    font-size: 12px;
    font-weight: 800;
    color: var(--brand);
    font-variant-numeric: tabular-nums;
}


.feature-icon-box {
    display: none;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
}

.f-blue,
.f-purple,
.f-green,
.f-rose,
.f-orange {
    background: var(--brand-tint);
    color: var(--brand-ink);
}

.feature-content {
    flex: 1;
}

.feature-title {
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: -0.015em;
    margin-bottom: 4px;
    color: var(--ink);
}

.feature-text {
    font-size: 0.9rem;
    color: var(--muted);
    line-height: 1.55;
}

.hidden {
    display: none;
}

.visible {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ============================================
   FOOTER
   Ordine visivo: © (testo) ... lingua | link | dati societari
   ============================================ */
footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px 24px;
    text-align: left;
    padding: 28px 0 28px;
    margin-top: 64px;
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
    border-top: 1px solid var(--line);
}

footer > br {
    display: none;
}

.kayak-ref {
    display: inline-block;
    margin-top: 5px;
    font-weight: 700;
    color: var(--ink);
}

/* Legal footer */
.footer-legal-links {
    order: 2;
    width: 100%;
    margin-top: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 18px;
}

.footer-legal-links a {
    color: var(--ink);
    font-weight: 600;
    text-decoration: none;
}

.footer-legal-links a:hover {
    color: var(--brand-ink);
}

.footer-legal-links span {
    display: none;
}

.footer-legal-info {
    order: 3;
    width: 100%;
    margin-top: 0;
    font-size: 11.5px;
    line-height: 1.55;
    color: var(--muted-2);
}

/* Language selector */
.language-selector-wrapper {
    order: 1;
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    padding: 0;
    border-radius: 0;
}

.language-selector-wrapper label {
    font-size: 12px;
    color: var(--muted);
    font-weight: 600;
}

#language-selector {
    height: auto;
    min-height: 36px;
    width: auto;
    padding: 6px 30px 6px 12px;
    border-radius: 10px;
    border: 1px solid var(--line);
    font-size: 13px;
    font-family: inherit;
    font-weight: 600;
    background: var(--white);
    color: var(--ink);
    cursor: pointer;
    outline: none;
    transition: var(--transition);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='%23767384'%3E%3Cpath d='M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

#language-selector:hover {
    border-color: var(--brand);
}

#language-selector:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-tint-2);
}

/* ============================================
   CMP — CONSENT BANNER (v1.35.0)
   "Rifiuta" e "Accetta" hanno lo stesso peso grafico: e' un requisito
   (CNIL 2021, EDPB 03/2022), non toccarlo. Cambiano solo colori e font.
   ============================================ */
.cmp {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    transform: translateY(110%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0 8px 8px;
}

.cmp--visible {
    transform: translateY(0);
}

.cmp__panel {
    max-width: 1000px;
    margin: 0 auto;
    background: var(--white);
    color: var(--text);
    border-radius: var(--radius-lg);
    box-shadow: 0 -8px 40px -8px rgba(20, 19, 26, 0.25);
    border: 1px solid var(--line);
    padding: 16px;
    max-height: 80vh;
    overflow-y: auto;
}

.cmp__main {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cmp__main[hidden],
.cmp__prefs[hidden] {
    display: none;
}

.cmp__title {
    display: block;
    color: var(--ink);
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 4px;
}

.cmp__body {
    font-size: 13px;
    line-height: 1.5;
}

.cmp__link {
    color: var(--brand-ink);
    text-decoration: underline;
}

.cmp__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.cmp__btn {
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    padding: 11px 14px;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid var(--brand);
}

.cmp__btn--equal {
    background: var(--brand);
    color: var(--white);
}

.cmp__btn--equal:hover {
    filter: brightness(1.08);
}

.cmp__btn--outline {
    background: transparent;
    color: var(--brand-ink);
    border-color: var(--brand);
}

.cmp__btn--outline:hover {
    background: var(--brand);
    color: var(--white);
}

.cmp__btn--ghost {
    background: transparent;
    color: var(--muted);
    border-color: transparent;
    text-decoration: underline;
    grid-column: 1 / -1;
    order: 3;
    padding: 6px;
}

.cmp__btn:focus-visible {
    outline: 3px solid var(--primary-focus);
    outline-offset: 2px;
}

/* --- Pannello preferenze --- */
.cmp__prefs-title {
    margin-bottom: 2px;
}

.cmp__cat {
    padding: 12px 0;
    border-top: 1px solid var(--line);
}

.cmp__cat-head {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 700;
    color: var(--ink);
    font-size: 14px;
}

/* Specificita' alta di proposito: nessuna regola generica sulle checkbox
   deve poter spegnere i controlli del consenso. */
.cmp .cmp__cat-head input[type="checkbox"] {
    display: inline-block;
    width: 18px;
    height: 18px;
    accent-color: var(--brand);
    cursor: pointer;
    flex-shrink: 0;
    margin: 0;
}

.cmp__cat-head input:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.cmp__cat-always {
    margin-left: auto;
    font-size: 11px;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cmp__cat-desc {
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--muted);
    margin-top: 6px;
    padding-left: 28px;
}

.cmp__prefs-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
    padding-top: 14px;
}

.cmp__prefs-actions .cmp__btn--ghost {
    grid-column: auto;
    order: 0;
}

/* --- Variante modale (opzionale da pannello admin) --- */
.cmp--modal {
    top: 0;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(20, 19, 26, 0.55);
    transform: none;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.cmp--modal.cmp--visible {
    opacity: 1;
    pointer-events: auto;
}

.cmp--modal .cmp__panel {
    max-width: 560px;
    padding: 24px;
}

.cmp--modal .cmp__main {
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
}

.cmp--modal .cmp__actions {
    grid-template-columns: 1fr 1fr;
}

.cmp--modal .cmp__actions .cmp__btn--ghost {
    grid-column: 1 / -1;
    order: 3;
    padding: 6px;
}

.cmp--modal .cmp__btn--equal,
.cmp--modal .cmp__btn--outline {
    min-width: 0;
}

@media (min-width: 700px) {
    .cmp__main {
        flex-direction: row;
        align-items: center;
        gap: 20px;
    }

    .cmp__text {
        flex: 1;
    }

    .cmp__actions {
        grid-template-columns: auto auto auto;
        flex-shrink: 0;
    }

    .cmp__btn--ghost {
        grid-column: auto;
        order: 0;
        padding: 11px 10px;
    }

    .cmp__btn--equal,
    .cmp__btn--outline {
        min-width: 130px;
    }
}

/* Footer: link gestione consenso */
.footer-consent-link {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    font-weight: 600;
    color: var(--ink);
    text-decoration: none;
    cursor: pointer;
}

.footer-consent-link:hover {
    color: var(--brand-ink);
}

/* Disclosure affiliazione sotto il form di ricerca: dev'essere visibile al
   punto del click, non solo nei Termini. */
.affiliate-disclosure {
    max-width: 1000px;
    margin: 12px 0 0;
    padding: 0 4px;
    font-size: 11.5px;
    line-height: 1.5;
    color: var(--muted);
    text-align: left;
}

/* ============================================
   COOKIE POLICY PAGE (e pagine legali)
   ============================================ */
.cookie-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.cookie-page h1 {
    color: var(--ink);
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
}

.cookie-page .last-update {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 30px;
}

.cookie-page .intro {
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 30px;
    color: var(--text);
}

.cookie-page h2 {
    color: var(--ink);
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 30px 0 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
}

.cookie-page h3 {
    color: var(--brand-ink);
    font-size: 1.1rem;
    margin: 20px 0 10px;
}

.cookie-page p {
    line-height: 1.7;
    margin-bottom: 15px;
    color: var(--text);
}

.cookie-page ul {
    margin: 15px 0;
    padding-left: 25px;
}

.cookie-page li {
    line-height: 1.7;
    margin-bottom: 8px;
    color: var(--text);
}

.cookie-page .back-link {
    display: inline-block;
    margin-top: 40px;
    color: var(--brand-ink);
    text-decoration: none;
    font-weight: 700;
}

.cookie-page .back-link:hover {
    text-decoration: underline;
}

.cookie-page .contact-email {
    color: var(--brand-ink);
    font-weight: 600;
}

.cookie-page a {
    color: var(--brand-ink);
}

/* --- Tabelle documenti legali (basi giuridiche, elenco cookie) --- */
.legal-table-wrap {
    overflow-x: auto;
    margin: 16px 0;
    -webkit-overflow-scrolling: touch;
}

.legal-table {
    width: 100%;
    min-width: 560px;
    border-collapse: collapse;
    font-size: 13px;
    line-height: 1.5;
    margin: 16px 0;
}

.legal-table th,
.legal-table td {
    border: 1px solid var(--line);
    padding: 9px 11px;
    text-align: left;
    vertical-align: top;
}

.legal-table th {
    background: #F7F7FA;
    color: var(--ink);
    font-weight: 700;
}

.legal-table code {
    font-size: 12px;
    word-break: break-word;
}

.cookie-cat {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.cookie-cat--necessary {
    background: #DCFCE7;
    color: #166534;
}

.cookie-cat--analytics {
    background: #DBEAFE;
    color: #1E40AF;
}

.cookie-cat--marketing {
    background: #FEE2E2;
    color: #991B1B;
}

.legal-footer-nav {
    margin-top: 36px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    font-size: 13px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

/* ============================================
   AUTOCOMPLETE DROPDOWN
   ============================================ */
.ac-dropdown {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    margin-top: 6px;
    background: var(--white);
    border-radius: 16px;
    border: 1px solid var(--line);
    box-shadow: var(--pop-shadow);
    z-index: 1100;
    max-height: 300px;
    overflow-y: auto;
    scrollbar-width: thin;
    padding: 4px;
}

.ac-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    cursor: pointer;
    border-radius: 12px;
    transition: background 0.15s ease;
}

.ac-item:hover,
.ac-item.ac-active {
    background: var(--brand-tint);
}

.ac-item:first-child {
    border-radius: 12px;
}

.ac-item:last-child {
    border-radius: 12px;
}

/* Flight trip toggle (andata-ritorno / solo andata) */
.flight-trip-toggle {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: rgba(255, 255, 255, 0.55);
    border: 0;
    border-radius: var(--radius-sm);
    margin-bottom: 0;
}

.flight-trip-toggle .trip-opt {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--muted);
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
}

.flight-trip-toggle .trip-opt.active {
    background: var(--white);
    color: var(--brand-ink);
    box-shadow: var(--field-shadow);
}

.ac-item+.ac-item {
    border-top: 0;
}

.ac-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: #F4F4F7;
    color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ac-icon svg {
    width: 18px;
    height: 18px;
    display: block;
}

.ac-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.ac-main {
    font-size: 14px;
    font-weight: 700;
    color: var(--ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ac-sub {
    font-size: 12px;
    font-weight: 500;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ac-iata {
    flex-shrink: 0;
    background: var(--brand-tint);
    color: var(--brand-ink);
    font-size: 11px;
    font-weight: 800;
    padding: 3px 7px;
    border-radius: 6px;
    letter-spacing: 0.04em;
}

.ac-type {
    flex-shrink: 0;
    font-size: 10px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 700;
}

.ac-no-results,
.ac-loading {
    padding: 14px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
}

.ac-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.ac-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid var(--brand-tint-2);
    border-top-color: var(--brand);
    border-radius: 50%;
    animation: ac-spin 0.6s linear infinite;
}

@keyframes ac-spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   TABLET / DESKTOP
   ============================================ */
@media (min-width: 768px) {
    .container {
        padding: 0 24px;
    }

    header {
        padding: 24px 0 6px;
    }

    .logo {
        font-size: 1.45rem;
    }

    .dynamic-headings,
    .search-card,
    .affiliate-disclosure {
        max-width: 620px;
        margin-left: auto;
        margin-right: auto;
    }

    .dynamic-headings {
        margin-top: 44px;
        margin-bottom: 22px;
    }

    .hero-title {
        font-size: 2.6rem;
        letter-spacing: -0.03em;
    }

    .hero-subtitle {
        font-size: 1.05rem;
    }

    .search-card {
        padding: 10px;
    }

    .grid-container {
        grid-template-columns: repeat(12, 1fr);
        gap: 8px;
    }

    .col-span-12 {
        grid-column: span 12;
    }

    .col-span-6 {
        grid-column: span 6;
    }

    .compare-section {
        margin-top: 56px;
        padding: 20px 0;
    }

    .compare-section__title,
    .section-title.compare-section__title {
        max-width: 170px;
    }

    .features {
        margin-top: 64px;
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
        gap: 56px;
        align-items: start;
    }

    .features > .section-title {
        font-size: 2.1rem;
    }

    .feature-group.active {
        display: block;
    }

    /* Datepicker Desktop */
    .datepicker-modal {
        align-items: center;
        justify-content: center;
        padding: 20px;
    }

    .dp-container {
        width: 100%;
        max-width: 820px;
        max-height: 90vh;
        background: var(--white);
        border-radius: var(--radius-lg);
        box-shadow: 0 30px 60px -20px rgba(20, 19, 26, 0.45);
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .dp-calendar-container {
        display: flex;
        flex-wrap: wrap;
    }

    .dp-month {
        width: 50%;
        border-bottom: none !important;
    }

    .dp-month:nth-child(odd) {
        border-right: 1px solid var(--line);
    }
}

/* Due colonne: form a sinistra, ventaglio di foto a destra.
   Le foto sono 3 box decorativi senza markup nuovo: .hero-bg::before/::after
   (laterali) e header::before (centrale). Solo in home (:has(.search-card)). */
@media (min-width: 1180px) {
    .dynamic-headings,
    .search-card,
    .affiliate-disclosure {
        max-width: 568px;
        margin-left: 0;
        margin-right: 0;
    }

    .dynamic-headings {
        margin-top: 64px;
        margin-bottom: 24px;
    }

    .hero-title {
        font-size: 46px;
        letter-spacing: -1.4px;
    }

    body:has(.search-card) .hero-bg {
        display: block;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 640px;
        background: transparent;
        z-index: -1;
        pointer-events: none;
    }

    body:has(.search-card) .hero-bg::before,
    body:has(.search-card) .hero-bg::after {
        content: "";
        position: absolute;
        width: 200px;
        height: 290px;
        border-radius: 20px;
        background-color: #EDEDF1;
        background-size: cover;
        background-position: center;
        box-shadow: 0 24px 50px -24px rgba(20, 19, 26, 0.45), 0 0 0 5px #fff;
    }

    body:has(.search-card) .hero-bg::before {
        top: 172px;
        left: calc(50% + 40px);
        transform: rotate(-7deg);
        background-image: var(--hero-img-2);
    }

    body:has(.search-card) .hero-bg::after {
        top: 160px;
        left: calc(50% + 340px);
        transform: rotate(6deg);
        background-image: var(--hero-img-3);
    }

    body:has(.search-card) header::before {
        content: "";
        position: absolute;
        z-index: -1;
        top: 128px;
        left: calc(50% + 172px);
        width: 236px;
        height: 352px;
        border-radius: 22px;
        background: #EDEDF1 var(--hero-img-1) center / cover no-repeat;
        box-shadow: 0 34px 60px -24px rgba(20, 19, 26, 0.5), 0 0 0 6px #fff;
        pointer-events: none;
    }

    .compare-section {
        margin-top: 80px;
    }
}

@media (max-width: 767px) {
    .grid-container {
        gap: 8px;
    }

    .input-group {
        padding: 15px 14px;
    }

    .date-range-input {
        padding: 13px 14px;
    }

    .nights-chips {
        margin-top: 8px;
    }

    .nights-chips-label {
        margin-bottom: 7px;
    }

    .nights-chip {
        padding: 7px 0;
        font-size: 0.84rem;
    }

    .nights-chip .nc-until {
        font-size: 0.62rem;
    }

    .compare-section__title,
    .section-title.compare-section__title {
        max-width: 124px;
        font-size: 12px;
    }

    .compare-logo-img {
        height: 34px;
        width: 128px;
        padding: 0 14px;
    }

    footer {
        margin-top: 48px;
    }
}

@media (max-width: 767px) {
    .dp-container {
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        background: var(--white);
    }
}
