/* ═══════════════════════════════════════════════════════════
   Villa Megna — Conversione
   Sticky bar, CTA hero, banner "Book Direct & Save"
   ═══════════════════════════════════════════════════════════ */

/* ── Sticky booking bar ─────────────────────────────────── */

.vm-sticky-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--vm-sticky-bar-h);
    background: var(--vm-navy);
    color: var(--vm-white);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--vm-space-6);
    z-index: var(--vm-z-sticky);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, .25);
    transform: translateY(100%);
    transition: transform var(--vm-transition-base);
}

.vm-sticky-bar.is-visible {
    transform: translateY(0);
}

.vm-sticky-bar__text {
    font-family: var(--vm-font-ui);
    font-size: var(--vm-text-sm);
    opacity: .85;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 40%;
}

.vm-sticky-bar__cta {
    display: flex;
    gap: var(--vm-space-3);
    align-items: center;
    flex-shrink: 0;
}

/* ── Blocco prezzo nella sticky bar ─────────────────────── */

.vm-price-badge {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.2;
}

.vm-price-badge__label {
    font-size: var(--vm-text-xs);
    opacity: .65;
    font-family: var(--vm-font-ui);
    letter-spacing: .04em;
}

.vm-price-badge__amount {
    font-size: var(--vm-text-xl);
    font-weight: 700;
    color: var(--vm-gold);
    font-family: var(--vm-font-heading);
}

/* ── Banner Book Direct & Save ──────────────────────────── */

.vm-direct-banner {
    background: linear-gradient(135deg, var(--vm-navy) 0%, var(--vm-navy-light) 100%);
    color: var(--vm-white);
    padding: var(--vm-space-16) var(--vm-space-6);
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Pattern decorativo subtle */
.vm-direct-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23C9A84C' fill-opacity='0.06'%3E%3Cpath d='M20 20.5V18H0v5h5v5H0v5h20v-9.5zm-2 6.5h-1v-6h2v6h-1zm-4 0h-1v-6h2v6h-1zm8 0h-1v-6h2v6h-1zM0 13h20v2H0v-2zm0-4h3v3H0V9zm0-4h3v3H0V5zm20 8h-3V9h3v4zM0 1h3v3H0V1zm20 0h-3v3h3V1z'/%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.vm-direct-banner__eyebrow {
    display: block;
    font-family: var(--vm-font-ui);
    font-size: var(--vm-text-xs);
    font-weight: 700;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--vm-gold);
    margin-bottom: var(--vm-space-3);
    position: relative;
}

.vm-direct-banner__title {
    font-family: var(--vm-font-heading);
    font-size: var(--vm-text-3xl);
    color: var(--vm-white);
    margin-bottom: var(--vm-space-6);
    position: relative;
}

.vm-direct-banner__perks {
    display: flex;
    justify-content: center;
    gap: var(--vm-space-8);
    flex-wrap: wrap;
    margin-bottom: var(--vm-space-8);
    position: relative;
}

.vm-direct-banner__perk {
    display: flex;
    align-items: center;
    gap: var(--vm-space-2);
    font-size: var(--vm-text-sm);
    opacity: .9;
    font-family: var(--vm-font-ui);
}

.vm-direct-banner__perk-icon {
    color: var(--vm-gold);
    font-size: 1.1em;
}

.vm-direct-banner__cta {
    position: relative;
}

/* ── Mobile ─────────────────────────────────────────────── */

@media (max-width: 600px) {
    .vm-sticky-bar__text {
        display: none;
    }
    .vm-sticky-bar {
        justify-content: center;
        gap: var(--vm-space-3);
    }
    .vm-price-badge {
        display: none;
    }
    .vm-direct-banner__perks {
        gap: var(--vm-space-4);
    }
}

@media (max-width: 400px) {
    .vm-sticky-bar__cta {
        gap: var(--vm-space-2);
    }
    .vm-sticky-bar__cta .vm-btn {
        padding: var(--vm-space-2) var(--vm-space-3);
        font-size: var(--vm-text-xs);
    }
}

/* ── Exit intent overlay ────────────────────────────────── */

.vm-exit-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--vm-z-modal);
    background: rgba(26, 39, 68, 0.78);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--vm-space-4);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--vm-transition-slow);
}

.vm-exit-overlay.is-open {
    opacity: 1;
    pointer-events: all;
}

.vm-exit-modal {
    background: var(--vm-white);
    border-radius: var(--vm-radius-xl);
    padding: var(--vm-space-6);
    max-width: 460px;
    max-height: 90svh;
    overflow-y: auto;
    width: 100%;
    text-align: center;
    box-shadow: var(--vm-shadow-xl);
    position: relative;
    transform: translateY(24px) scale(0.96);
    transition: transform var(--vm-transition-slow) var(--vm-ease);
}

.vm-exit-overlay.is-open .vm-exit-modal {
    transform: translateY(0) scale(1);
}

.vm-exit-modal__close {
    position: absolute;
    top: var(--vm-space-3);
    right: var(--vm-space-3);
    background: var(--vm-cream);
    border: none;
    border-radius: var(--vm-radius-full);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--vm-text-muted);
    font-size: 1.1rem;
    line-height: 1;
    transition:
        background-color var(--vm-transition-fast),
        color var(--vm-transition-fast);
}

.vm-exit-modal__close:hover {
    background: var(--vm-cream-dark);
    color: var(--vm-text-primary);
}

.vm-exit-modal__icon {
    font-size: 3rem;
    margin-bottom: var(--vm-space-3);
    color: var(--vm-gold);
}

.vm-exit-modal__title {
    font-family: var(--vm-font-heading);
    font-size: var(--vm-text-2xl);
    color: var(--vm-text-primary);
    margin-bottom: var(--vm-space-2);
    line-height: 1.3;
}

.vm-exit-modal p {
    color: var(--vm-text-muted);
    font-size: var(--vm-text-sm);
    line-height: 1.6;
    margin-bottom: 0;
}

.vm-exit-modal__offer {
    background: var(--vm-cream);
    border-radius: var(--vm-radius-lg);
    padding: var(--vm-space-4);
    margin: var(--vm-space-4) 0;
}

.vm-exit-modal__discount {
    font-family: var(--vm-font-heading);
    font-size: var(--vm-text-5xl);
    font-weight: 300;
    color: var(--vm-gold-dark);
    line-height: 1;
    display: block;
}

.vm-exit-modal__discount-label {
    font-size: var(--vm-text-sm);
    color: var(--vm-text-muted);
    display: block;
    margin-top: var(--vm-space-1);
}

.vm-exit-modal__actions {
    display: flex;
    flex-direction: column;
    gap: var(--vm-space-2);
    margin-top: var(--vm-space-4);
}

.vm-exit-modal__decline {
    font-size: var(--vm-text-xs);
    color: var(--vm-text-muted);
    text-decoration: underline;
    cursor: pointer;
    background: none;
    border: none;
    font-family: var(--vm-font-body);
    padding: var(--vm-space-1) 0;
}

.vm-exit-modal__decline:hover {
    color: var(--vm-text-primary);
}

@media (max-width: 768px) {
    .vm-exit-overlay {
        padding: 0.75rem;
    }

    .vm-exit-modal {
        padding: 1.25rem 1rem;
        max-height: 88svh;
        border-radius: 16px;
    }

    .vm-exit-modal__close {
        top: 0.6rem;
        right: 0.6rem;
        width: 28px;
        height: 28px;
        font-size: 1rem;
    }

    .vm-exit-modal__icon {
        font-size: 1.4rem;
        margin-bottom: 0.4rem;
    }

    .vm-exit-modal__title {
        font-size: 1.2rem !important;
        margin-bottom: 0.4rem;
        line-height: 1.25;
    }

    .vm-exit-modal p {
        font-size: 0.85rem;
        line-height: 1.45;
    }

    .vm-exit-modal__offer {
        padding: 0.75rem;
        margin: 0.6rem 0;
        border-radius: 10px;
    }

    .vm-exit-modal__discount {
        font-size: 1.5rem !important;
        line-height: 1.15;
    }

    .vm-exit-modal__discount-label {
        font-size: 0.78rem;
    }

    .vm-exit-modal__actions {
        margin-top: 0.75rem;
        gap: 0.5rem;
    }

    .vm-exit-modal__actions .vm-btn-primary {
        padding: 0.8rem 1rem;
        font-size: 0.7rem;
        letter-spacing: 0.10em;
        white-space: normal;
        text-align: center;
        line-height: 1.3;
    }

    .vm-exit-modal__decline {
        font-size: 0.75rem;
        padding: 0.25rem;
        display: block;
    }
}
