/*
 * Fooppers Thank You Page — fty-overlay.css
 * Checkout overlay + thank-you celebration banner
 */

/* ── Google Fonts (same pair as main stylesheet) ─────────────────────────
   Declared here so it loads on the checkout page too.                     */

/* ─────────────────────────────────────────────────────────────────────────
   CHECKOUT OVERLAY
   Full-screen, immediately visible on button click — no delay.
   ───────────────────────────────────────────────────────────────────────── */
#fty-co-wrap {
    position: fixed;
    inset: 0;
    z-index: 2147483647;           /* topmost possible layer              */
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 32px 24px;
    text-align: center;
    font-family: inherit;

    /* Hidden state */
    opacity: 0;
    pointer-events: none;
    transform: scale(1.02);
    transition: opacity .18s ease, transform .18s ease;
}

#fty-co-wrap.fty-co-show {
    opacity: 1;
    pointer-events: all;
    transform: scale(1);
}

/* ── Animated rings ────────────────────────────────────────────────────── */
#fty-co-rings {
    position: relative;
    width: 148px;
    height: 148px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 36px;
}

.fty-co-ring {
    position: absolute;
    border-radius: 50%;
    border: 2px solid var(--fty-primary, #ff2d7a);
    opacity: 0;
    animation: fty-ring-pulse 2.8s ease-out infinite;
}
.fty-co-ring:nth-child(1) { width: 148px; height: 148px; animation-delay: 0s;   }
.fty-co-ring:nth-child(2) { width: 116px; height: 116px; animation-delay: .65s; }
.fty-co-ring:nth-child(3) { width: 84px;  height: 84px;  animation-delay: 1.3s; }

@keyframes fty-ring-pulse {
    0%   { opacity: .65; transform: scale(.65); }
    100% { opacity: 0;   transform: scale(1.55); }
}

/* ── Centre icon circle ────────────────────────────────────────────────── */
#fty-co-circle {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--fty-primary, #ff2d7a), #ff6fa3);
    box-shadow: 0 8px 28px rgba(var(--fty-primary-rgb, 255,45,122), .38);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    transition: background .5s ease, box-shadow .5s ease;
}

#fty-co-circle.fty-co-success {
    background: linear-gradient(135deg, #22c55e, #4ade80);
    box-shadow: 0 8px 28px rgba(34,197,94,.42);
    animation: fty-icon-pop .45s cubic-bezier(.34,1.56,.64,1) both;
}

@keyframes fty-icon-pop {
    0%   { transform: scale(.55); }
    100% { transform: scale(1); }
}

/* Emoji */
#fty-co-emoji { font-size: 2rem; line-height: 1; transition: opacity .2s ease; }

/* SVG check (hidden until success) */
#fty-co-check {
    display: none;
    width: 38px;
    height: 38px;
}
#fty-co-check.fty-co-check-show {
    display: block;
    animation: fty-check-appear .4s ease both;
}
@keyframes fty-check-appear {
    from { opacity: 0; transform: scale(.5) rotate(-20deg); }
    to   { opacity: 1; transform: scale(1) rotate(0deg); }
}

/* ── Headline & sub ────────────────────────────────────────────────────── */
#fty-co-title {
    font-family: inherit;
    font-size: clamp(1.4rem, 5vw, 1.75rem);
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 8px;
    transition: opacity .3s ease;
}

#fty-co-sub {
    font-size: .9rem;
    color: #6b7280;
    margin: 0 0 20px;
    line-height: 1.55;
    max-width: 300px;
}

/* ── Dots (processing state) ───────────────────────────────────────────── */
#fty-co-dots {
    display: flex;
    justify-content: center;
    gap: 7px;
}
#fty-co-dots span {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--fty-primary, #ff2d7a);
    animation: fty-dot-bounce 1s ease-in-out infinite;
}
#fty-co-dots span:nth-child(2) { animation-delay: .15s; }
#fty-co-dots span:nth-child(3) { animation-delay: .30s; }

@keyframes fty-dot-bounce {
    0%, 80%, 100% { transform: scale(.55); opacity: .45; }
    40%            { transform: scale(1);   opacity: 1; }
}

/* ── Confetti keyframe ─────────────────────────────────────────────────── */
@keyframes fty-confetti-fall {
    0% {
        opacity: 1;
        transform: translateY(0) rotate(0deg) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(110vh) rotate(900deg) scale(.4);
    }
}

/* ─────────────────────────────────────────────────────────────────────────
   THANK-YOU CELEBRATION BANNER
   Injected by fty-main.js when arriving from checkout.
   ───────────────────────────────────────────────────────────────────────── */
.fty-celebration {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: #fff;
    border-radius: 16px;
    padding: 18px 20px;
    margin-bottom: 20px;
    box-shadow: 0 6px 24px rgba(34,197,94,.32);
    animation: fty-cel-slide .35s cubic-bezier(.34,1.56,.64,1) both;
}

@keyframes fty-cel-slide {
    from { opacity: 0; transform: translateY(-20px) scale(.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.fty-celebration__icon {
    font-size: 2.2rem;
    flex-shrink: 0;
    animation: fty-cel-wiggle .5s ease .25s both;
}

@keyframes fty-cel-wiggle {
    0%, 100% { transform: rotate(0deg) scale(1); }
    25%       { transform: rotate(-14deg) scale(1.1); }
    75%       { transform: rotate(14deg) scale(1.1); }
}

.fty-celebration__text { flex: 1; }
.fty-celebration__text h3 {
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 3px;
}
.fty-celebration__text p {
    font-size: .82rem;
    opacity: .92;
    margin: 0;
    line-height: 1.45;
}

.fty-celebration__close {
    background: rgba(255,255,255,.22);
    border: none;
    color: #fff;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    flex-shrink: 0;
    transition: background .2s ease;
}
.fty-celebration__close:hover { background: rgba(255,255,255,.38); }

/* Fade-out class applied on dismiss */
.fty-celebration.fty-cel-out {
    opacity: 0;
    transform: translateY(-12px) scale(.97);
    transition: opacity .28s ease, transform .28s ease;
    pointer-events: none;
}
