/* First-visit popup — light mode, soft backdrop, flip card */
.etihad-fvp {
    --fvp-gold: #c89b3c;
    --fvp-gold-dark: #a67c2a;
    --fvp-ink: #1a2332;
    --fvp-muted: #5c6b7a;
    --fvp-surface: #ffffff;
    --fvp-surface-soft: #f7f5f1;
    position: fixed;
    inset: 0;
    z-index: 10060;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: 'Poppins', system-ui, sans-serif;
}

.etihad-fvp[hidden] {
    display: none !important;
}

.etihad-fvp.is-open {
    display: flex;
}

.etihad-fvp__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.28);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    animation: etihad-fvp-fade 0.28s ease;
}

.etihad-fvp__stage {
    position: relative;
    z-index: 1;
    width: min(100%, 460px);
    perspective: 1400px;
    transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.etihad-fvp.is-flipped .etihad-fvp__stage {
    width: min(100%, 540px);
}

.etihad-fvp__card {
    position: relative;
    width: 100%;
    min-height: 460px;
    transform-style: preserve-3d;
    transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    animation: etihad-fvp-in 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.etihad-fvp.is-flipped .etihad-fvp__card {
    transform: rotateY(180deg);
}

.etihad-fvp__close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 5;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid rgba(26, 35, 50, 0.12);
    background: rgba(255, 255, 255, 0.92);
    color: #334155;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.etihad-fvp__close:hover {
    background: #fff;
    border-color: rgba(200, 155, 60, 0.55);
    color: var(--fvp-gold-dark);
}

.etihad-fvp.is-flipped .etihad-fvp__close {
    transform: rotateY(180deg);
}

.etihad-fvp__face {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid rgba(200, 155, 60, 0.28);
    box-shadow:
        0 24px 60px rgba(15, 23, 42, 0.16),
        0 0 0 1px rgba(255, 255, 255, 0.6) inset;
}

.etihad-fvp__face--front {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--fvp-ink);
    background:
        radial-gradient(ellipse 90% 60% at 50% -10%, rgba(200, 155, 60, 0.16), transparent 55%),
        linear-gradient(165deg, #ffffff 0%, #fbf8f3 48%, #f3eee6 100%);
}

.etihad-fvp__card.has-bg .etihad-fvp__face--front {
    background-image:
        linear-gradient(180deg, rgba(255, 255, 255, 0.88) 0%, rgba(247, 245, 241, 0.92) 100%),
        var(--fvp-bg);
    background-size: cover;
    background-position: center;
}

.etihad-fvp__front-inner {
    width: 100%;
    padding: 42px 36px 36px;
}

.etihad-fvp__logo {
    display: block;
    margin: 0 auto 22px;
    max-width: 148px;
    height: auto;
}

.etihad-fvp__logo--sm {
    max-width: 112px;
    margin-bottom: 16px;
}

.etihad-fvp__eyebrow {
    margin: 0 0 14px;
    color: var(--fvp-gold-dark);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.etihad-fvp__sub {
    margin: 0 0 14px;
    color: var(--fvp-muted);
    font-size: 0.9rem;
    line-height: 1.55;
}

.etihad-fvp__title {
    margin: 0 0 14px;
    color: var(--fvp-ink);
    font-size: clamp(1.2rem, 3.4vw, 1.5rem);
    font-weight: 700;
    line-height: 1.35;
}

.etihad-fvp__body {
    margin: 0 0 28px;
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.6;
}

.etihad-fvp__cta,
.etihad-fvp__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0 32px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #d4a84b 0%, #c89b3c 50%, #a67c2a 100%);
    color: #1a1508;
    font-size: 0.94rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(200, 155, 60, 0.28);
    transition: transform 0.2s ease, filter 0.2s ease;
}

.etihad-fvp__cta:hover,
.etihad-fvp__submit:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
}

.etihad-fvp__cta:disabled,
.etihad-fvp__submit:disabled {
    opacity: 0.7;
    cursor: wait;
    transform: none;
}

.etihad-fvp__face--back {
    transform: rotateY(180deg);
    color: var(--fvp-ink);
    background:
        radial-gradient(ellipse 80% 50% at 100% 0%, rgba(200, 155, 60, 0.12), transparent 50%),
        linear-gradient(165deg, #ffffff 0%, #fbf8f3 55%, #f3eee6 100%);
}

.etihad-fvp__back-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 42px 36px 32px;
    text-align: center;
}

.etihad-fvp__form-title {
    margin: 0 0 8px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--fvp-ink);
}

.etihad-fvp__form-lead {
    margin: 0 0 20px;
    color: var(--fvp-muted);
    font-size: 0.88rem;
    line-height: 1.5;
}

.etihad-fvp__form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
}

.etihad-fvp__form input {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid rgba(26, 35, 50, 0.12);
    background: #fff;
    color: var(--fvp-ink);
    font-size: 0.92rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.etihad-fvp__form input::placeholder {
    color: #94a3b8;
}

.etihad-fvp__form input:focus {
    border-color: rgba(200, 155, 60, 0.7);
    box-shadow: 0 0 0 3px rgba(200, 155, 60, 0.16);
}

.etihad-fvp__msg {
    min-height: 1.1em;
    font-size: 0.82rem;
    color: var(--fvp-muted);
    text-align: center;
}

.etihad-fvp__msg.is-success {
    color: #059669;
}

.etihad-fvp__msg.is-error {
    color: #e11d48;
}

.etihad-fvp__submit {
    width: 100%;
    border-radius: 12px;
    margin-top: 4px;
}

.etihad-fvp__back-btn {
    background: transparent;
    border: 0;
    color: #64748b;
    font-size: 0.82rem;
    cursor: pointer;
    padding: 8px;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.etihad-fvp__back-btn:hover {
    color: var(--fvp-gold-dark);
}

html.etihad-fvp-open,
html.etihad-fvp-open body {
    overflow: hidden;
}

@keyframes etihad-fvp-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes etihad-fvp-in {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 560px) {
    .etihad-fvp {
        padding: 14px;
        align-items: center;
    }

    .etihad-fvp__stage,
    .etihad-fvp.is-flipped .etihad-fvp__stage {
        width: 100%;
    }

    .etihad-fvp__card {
        min-height: 420px;
    }

    .etihad-fvp__front-inner,
    .etihad-fvp__back-inner {
        padding: 36px 22px 28px;
    }

    .etihad-fvp__title {
        font-size: 1.15rem;
    }

    .etihad-fvp__body {
        margin-bottom: 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .etihad-fvp__card,
    .etihad-fvp__stage,
    .etihad-fvp__backdrop {
        animation: none !important;
        transition-duration: 0.01ms !important;
    }
}
