/**
 * Payment handoff popup (Checkout\PayHandoff). iDEAN tokens (DESIGN.md):
 * Ink 900 scrim, white card at 16px radius with the one deep shadow, Navy 700
 * lock, Gold 400 ring, OK green ticks, one easing curve.
 *
 * Every text element sets its own colour: the theme's bare `p { color }` rule
 * beats inherited colour (see AGENTS.md gotcha), so `.fex-pay .fex-pay__x`
 * (two classes) is used for every p/span that carries text.
 *
 * z-index 1000000: above FluentCart's modal checkout (999999).
 */
.fex-pay {
    --fex-pay-ease: cubic-bezier(.22, .61, .36, 1);
    position: fixed;
    inset: 0;
    z-index: 1000000;
    display: grid;
    place-items: center;
    padding: 16px;
    background: rgba(8, 11, 65, .62);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .24s var(--fex-pay-ease), visibility 0s linear .24s;
    font-family: Poppins, "Hind Siliguri", "Segoe UI", system-ui, sans-serif;
}

.fex-pay.is-open {
    opacity: 1;
    visibility: visible;
    transition: opacity .24s var(--fex-pay-ease);
}

.fex-pay .fex-pay__card {
    width: 100%;
    max-width: 400px;
    background: #fff;
    border-radius: 16px;
    padding: 32px 24px 24px;
    text-align: center;
    box-shadow: 0 12px 32px rgba(0, 3, 28, .45);
    transform: translateY(12px) scale(.98);
    transition: transform .32s var(--fex-pay-ease);
}

.fex-pay.is-open .fex-pay__card { transform: none; }

.fex-pay .fex-pay__mark { position: relative; width: 88px; height: 88px; margin: 0 auto 20px; }
.fex-pay .fex-pay__ring { position: absolute; inset: 0; width: 88px; height: 88px; animation: fex-pay-spin 1.1s linear infinite; }
.fex-pay .fex-pay__ring circle { fill: none; stroke-width: 5; stroke-linecap: round; }
.fex-pay .fex-pay__track { stroke: #F2F3FF; }
.fex-pay .fex-pay__arc { stroke: #FED044; stroke-dasharray: 70 207; }
.fex-pay .fex-pay__lock {
    position: absolute;
    inset: 22px;
    border-radius: 50%;
    background: #273272;
    display: grid;
    place-items: center;
    animation: fex-pay-pulse 1.8s var(--fex-pay-ease) infinite;
}
.fex-pay .fex-pay__lock svg { width: 20px; height: 20px; }

@keyframes fex-pay-spin { to { transform: rotate(360deg); } }
@keyframes fex-pay-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }

.fex-pay .fex-pay__title { margin: 0 0 4px; font-size: 20px; line-height: 1.35; font-weight: 600; color: #171A26; }
.fex-pay .fex-pay__sub { margin: 0 0 20px; font-size: 14px; line-height: 1.5; color: #7B8095; }

.fex-pay .fex-pay__steps { list-style: none; margin: 0 0 20px; padding: 0; text-align: left; display: grid; gap: 10px; }
.fex-pay .fex-pay__step {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
    color: #7B8095;
    opacity: .45;
    transition: opacity .3s var(--fex-pay-ease), color .3s var(--fex-pay-ease);
}
.fex-pay .fex-pay__dot {
    flex: 0 0 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #E3E5F0;
    display: grid;
    place-items: center;
    transition: background .3s var(--fex-pay-ease), border-color .3s var(--fex-pay-ease);
}
.fex-pay .fex-pay__dot svg { width: 11px; height: 11px; opacity: 0; transform: scale(.4); transition: opacity .25s var(--fex-pay-ease), transform .25s var(--fex-pay-ease); }
.fex-pay .fex-pay__step.is-active { opacity: 1; color: #171A26; }
.fex-pay .fex-pay__step.is-active .fex-pay__dot { border-color: #FED044; border-top-color: transparent; animation: fex-pay-spin .8s linear infinite; }
.fex-pay .fex-pay__step.is-done { opacity: 1; color: #4A5064; }
.fex-pay .fex-pay__step.is-done .fex-pay__dot { background: #1F8A54; border-color: #1F8A54; animation: none; }
.fex-pay .fex-pay__step.is-done .fex-pay__dot svg { opacity: 1; transform: none; }

.fex-pay .fex-pay__mail { border-radius: 10px; background: #F2F3FF; padding: 12px 16px; text-align: left; }
.fex-pay .fex-pay__mail-k { display: block; font-size: 12px; line-height: 1.5; color: #7B8095; margin-bottom: 2px; }
.fex-pay .fex-pay__mail-v { display: block; font-size: 16px; line-height: 1.4; font-weight: 600; color: #273272; word-break: break-all; }

/* Collapsed until shown, so the hidden line leaves no empty band in the card. */
.fex-pay .fex-pay__slow { margin: 0; max-height: 0; overflow: hidden; font-size: 14px; line-height: 1.5; color: #7B8095; opacity: 0; transition: opacity .3s var(--fex-pay-ease); }
.fex-pay .fex-pay__slow.is-shown { opacity: 1; max-height: 6em; margin-top: 16px; }

@media (prefers-reduced-motion: reduce) {
    .fex-pay .fex-pay__ring,
    .fex-pay .fex-pay__lock,
    .fex-pay .fex-pay__step.is-active .fex-pay__dot { animation: none; }
    .fex-pay .fex-pay__card { transition: none; }
}
