/* ============================================
   Fuel Guard Popup — popup.css
   Colors are injected via CSS custom properties
   set inline in the footer HTML output.
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Hind+Siliguri:wght@400;600;700&family=Syne:wght@700;800&display=swap');

/* ---------- Overlay ---------- */
.fgp-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 5, 30, 0.68);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.fgp-overlay.fgp-show {
    opacity: 1;
    pointer-events: all;
}

/* ---------- Popup card ---------- */
.fgp-popup {
    position: relative;
    background: linear-gradient(135deg, var(--fgp-from, #9b6af1) 0%, color-mix(in srgb, var(--fgp-from, #9b6af1) 50%, var(--fgp-to, #e65fae) 50%) 50%, var(--fgp-to, #e65fae) 100%);
    border-radius: 26px;
    padding: 42px 32px 36px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    overflow: hidden;
    box-shadow:
        0 32px 80px rgba(155, 106, 241, 0.48),
        0 0 0 1px rgba(255, 255, 255, 0.14);
    transform: scale(0.88) translateY(28px);
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-family: 'Hind Siliguri', sans-serif;
}

.fgp-overlay.fgp-show .fgp-popup {
    transform: scale(1) translateY(0);
}

/* ---------- Animated blobs ---------- */
.fgp-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(44px);
    opacity: 0.28;
    pointer-events: none;
}

.fgp-blob-1 {
    width: 200px;
    height: 200px;
    background: #ffffff;
    top: -60px;
    right: -60px;
    animation: fgpBlob 6s ease-in-out infinite alternate;
}

.fgp-blob-2 {
    width: 160px;
    height: 160px;
    background: var(--fgp-to, #e65fae);
    bottom: -50px;
    left: -50px;
    animation: fgpBlob 8s ease-in-out infinite alternate-reverse;
}

@keyframes fgpBlob {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(18px, -18px) scale(1.18); }
}

/* ---------- Close button ---------- */
.fgp-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.15s;
    z-index: 10;
}

.fgp-close:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.1);
}

/* ---------- Icon ---------- */
.fgp-icon-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 14px;
    position: relative;
    z-index: 1;
}

.fgp-icon-wrap svg {
    filter: drop-shadow(0 4px 18px rgba(0, 0, 0, 0.22));
}

/* ---------- Badge ---------- */
.fgp-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.36);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 4px 14px;
    border-radius: 999px;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

/* ---------- Title & Subtitle ---------- */
.fgp-title {
    font-family: 'Syne', sans-serif;
    font-size: 2.1rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 3px;
    letter-spacing: -0.01em;
    text-shadow: 0 2px 22px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
}

.fgp-subtitle {
    font-size: 0.84rem;
    color: rgba(255, 255, 255, 0.76);
    margin: 0 0 18px;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

/* ---------- Body ---------- */
.fgp-body {
    font-size: 0.93rem;
    color: rgba(255, 255, 255, 0.92);
    line-height: 1.68;
    margin: 0 0 22px;
    position: relative;
    z-index: 1;
}

/* ---------- CTA Button ---------- */
.fgp-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    color: var(--fgp-from, #9b6af1);
    font-family: 'Hind Siliguri', sans-serif;
    font-size: 0.98rem;
    font-weight: 700;
    padding: 14px 28px;
    border-radius: 14px;
    text-decoration: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s, box-shadow 0.2s, color 0.2s;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.fgp-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.28);
    color: var(--fgp-to, #e65fae);
}

/* ---------- Divider ---------- */
.fgp-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.78rem;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.fgp-divider::before,
.fgp-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.24);
}

/* ---------- URL row ---------- */
.fgp-link-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 18px;
    position: relative;
    z-index: 1;
}

.fgp-url {
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: opacity 0.2s;
}

.fgp-url:hover {
    opacity: 0.78;
}

/* ---------- QR Code ---------- */
.fgp-qr-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
}

.fgp-qr-frame {
    background: #ffffff;
    border-radius: 14px;
    padding: 10px;
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.2);
    display: inline-block;
}

.fgp-qr-img {
    display: block;
    border-radius: 6px;
}

.fgp-qr-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.82rem;
    font-weight: 600;
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

/* Large Mobile / Tablet */
@media screen and (max-width: 480px) {
    .fgp-popup {
        padding: 34px 20px 28px;
        border-radius: 20px;
    }
    .fgp-title {
        font-size: 1.7rem;
    }
    .fgp-btn {
        padding: 13px 22px;
        font-size: 0.92rem;
    }
}

/* Small Mobile */
@media screen and (max-width: 360px) {
    .fgp-popup {
        padding: 28px 14px 24px;
        border-radius: 18px;
    }
    .fgp-title {
        font-size: 1.5rem;
    }
    .fgp-btn {
        width: 100%;
        justify-content: center;
    }
    .fgp-qr-img {
        width: 95px;
        height: 95px;
    }
}

/* Very small screens */
@media screen and (max-width: 320px) {
    .fgp-overlay {
        padding: 10px;
    }
    .fgp-popup {
        padding: 24px 12px 20px;
    }
}

/* Landscape on small phones */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .fgp-overlay {
        align-items: flex-start;
        overflow-y: auto;
        padding: 10px;
    }
    .fgp-popup {
        padding: 24px 20px 20px;
        max-width: 420px;
        margin: auto;
    }
    .fgp-qr-wrap {
        display: none;
    }
}

/* Tablet & above */
@media screen and (min-width: 768px) {
    .fgp-popup {
        max-width: 420px;
    }
}
