/* ============================================================
   GlassFlow Popups — Frontend Styles
   Glassmorphism light theme with elegant animations
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&display=swap');

/* ── Overlay ──────────────────────────────────────────────── */
.gfp-overlay {
    position: fixed;
    inset: 0;
    z-index: 999990;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    pointer-events: none;
}

.gfp-overlay.gfp-overlay-active {
    pointer-events: all;
}

/* The blurred backdrop */
.gfp-overlay::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(15, 20, 50, 0.32);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.35s ease;
    z-index: -1;
}

.gfp-overlay.gfp-overlay-active::before {
    opacity: 1;
}

/* ── Modal Card ───────────────────────────────────────────── */
.gfp-modal {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    border: 1.5px solid rgba(255, 255, 255, 0.92);
    border-radius: 20px;
    padding: 36px 32px 32px;
    max-width: 460px;
    width: 100%;
    position: relative;
    box-shadow:
        0 24px 64px rgba(0, 0, 0, 0.14),
        0 8px 24px rgba(102, 126, 234, 0.12),
        0 0 0 1px rgba(255,255,255,0.5) inset;

    /* Entry animation initial state */
    opacity: 0;
    transform: scale(0.88) translateY(20px);
    transition:
        opacity 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
        transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);

    will-change: opacity, transform;
}

/* Subtle grain texture overlay */
.gfp-modal::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
    border-radius: inherit;
    overflow: hidden;
}

/* Glowing edge highlight */
.gfp-modal::after {
    content: '';
    position: absolute;
    top: 0; left: 10%; right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.9), transparent);
    border-radius: 100%;
    z-index: 1;
}

.gfp-modal > * { position: relative; z-index: 2; }

/* Active / visible state */
.gfp-modal.gfp-modal-visible {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* Close animation */
.gfp-modal.gfp-modal-closing {
    opacity: 0;
    transform: scale(0.92) translateY(-12px);
    transition:
        opacity 0.25s ease,
        transform 0.25s ease;
}

/* ── Close Button ─────────────────────────────────────────── */
.gfp-close-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: rgba(100, 116, 139, 0.1);
    border: 1px solid rgba(100, 116, 139, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #64748b;
    transition: all 0.18s ease;
    padding: 0;
    z-index: 10;
}

.gfp-close-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.2);
    transform: rotate(90deg);
}

.gfp-close-btn:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* ── Type Pill ────────────────────────────────────────────── */
.gfp-type-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 8px;
    font-family: 'Outfit', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    margin-bottom: 16px;
    text-transform: uppercase;
}

.gfp-type-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
    animation: gfp-pulse 2s ease infinite;
}

@keyframes gfp-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.5; transform: scale(0.8); }
}

/* ── Type Colors ──────────────────────────────────────────── */
.gfp-type-info    { background: rgba(219, 234, 254, 0.8); color: #1d4ed8; }
.gfp-type-update  { background: rgba(220, 252, 231, 0.8); color: #15803d; }
.gfp-type-alert   { background: rgba(254, 226, 226, 0.8); color: #dc2626; }
.gfp-type-promo   { background: rgba(254, 243, 199, 0.8); color: #b45309; }
.gfp-type-notice  { background: rgba(243, 244, 246, 0.8); color: #374151; }
.gfp-type-success { background: rgba(209, 250, 229, 0.8); color: #065f46; }
.gfp-type-warning { background: rgba(255, 237, 213, 0.8); color: #c2410c; }

/* ── Modal Title ──────────────────────────────────────────── */
.gfp-modal-title {
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 12px;
    line-height: 1.3;
    padding-right: 24px; /* avoid close btn */
    letter-spacing: -0.02em;
}

/* ── Modal Description ────────────────────────────────────── */
.gfp-modal-desc {
    font-family: 'Outfit', sans-serif;
    font-size: 15px;
    line-height: 1.7;
    color: #475569;
    margin: 0;
}

/* ── Decorative Gradient Blob ─────────────────────────────── */
.gfp-modal-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(30px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.35;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 520px) {
    .gfp-modal {
        padding: 28px 22px 24px;
        border-radius: 16px;
        max-width: 100%;
    }
    .gfp-modal-title { font-size: 18px; }
}
