/**
 * Value Proposition Popup — Dark Premium Design
 * Trust badges popup: quality, URLs, manual collection
 *
 * Aesthetic: dark editorial with oversized stat numbers,
 * gradient accents, grain texture, staggered reveals.
 */

/* ─── Overlay ───────────────────────────────── */
.value-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s ease;
    backdrop-filter: blur(0px);
}

.value-popup-overlay.active {
    opacity: 1;
    visibility: visible;
    background-color: rgba(4, 8, 20, 0.75);
    backdrop-filter: blur(8px);
}

/* ─── Container ─────────────────────────────── */
.value-popup-container {
    background: linear-gradient(165deg, #111827 0%, #0c1222 40%, #0f172a 100%);
    border-radius: 24px;
    box-shadow:
        0 32px 100px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
    max-width: 580px;
    width: 100%;
    position: relative;
    transform: translateY(40px) scale(0.92);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.value-popup-overlay.active .value-popup-container {
    transform: translateY(0) scale(1);
}

/* Subtle grain texture */
.value-popup-container::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
    opacity: 0.4;
    pointer-events: none;
    mix-blend-mode: overlay;
}

/* ─── Gradient accent bar ───────────────────── */
.value-popup-accent-bar {
    height: 4px;
    background: linear-gradient(90deg, #fbbf24 0%, #f43f5e 50%, #34d399 100%);
    border-radius: 24px 24px 0 0;
}

/* ─── Close button ──────────────────────────── */
.value-popup-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: #64748b;
    transition: all 0.2s ease;
    z-index: 2;
}

.value-popup-close:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
    color: #e2e8f0;
    transform: scale(1.08);
}

/* ─── Header ────────────────────────────────── */
.value-popup-header {
    text-align: center;
    padding: 2.25rem 2rem 0.75rem;
    position: relative;
    z-index: 1;
}

.value-popup-label {
    display: inline-block;
    padding: 0.3rem 1rem;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.12), rgba(244, 63, 94, 0.1));
    border: 1px solid rgba(251, 191, 36, 0.18);
    border-radius: 50px;
    font-family: 'Sora', system-ui, sans-serif;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #fbbf24;
    margin-bottom: 0.85rem;
}

.value-popup-header h3 {
    font-family: 'Sora', system-ui, sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    color: #f1f5f9;
    margin: 0;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

/* ─── Sections container ────────────────────── */
.value-popup-sections {
    padding: 1rem 1.5rem 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: relative;
    z-index: 1;
}

/* ─── Individual section card ───────────────── */
.value-popup-section {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    transition: all 0.3s ease;
    /* Stagger entrance — hidden by default */
    opacity: 0;
    transform: translateY(18px);
}

.value-popup-section:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.09);
    transform: translateY(-2px);
}

/* Staggered reveal when active */
.value-popup-overlay.active .value-popup-section {
    animation: vpSectionReveal 0.55s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.value-popup-overlay.active .value-popup-section:nth-child(1) {
    animation-delay: 0.15s;
}

.value-popup-overlay.active .value-popup-section:nth-child(2) {
    animation-delay: 0.28s;
}

.value-popup-overlay.active .value-popup-section:nth-child(3) {
    animation-delay: 0.41s;
}

@keyframes vpSectionReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─── Stat number container ─────────────────── */
.value-popup-stat {
    flex-shrink: 0;
    width: 88px;
    height: 88px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    position: relative;
}

.value-popup-number {
    font-family: 'Sora', system-ui, sans-serif;
    font-weight: 800;
    font-size: 1.65rem;
    line-height: 1;
    letter-spacing: -0.03em;
    position: relative;
    z-index: 1;
}

/* Gold stat */
.value-popup-section--gold .value-popup-stat {
    background: linear-gradient(145deg, rgba(251, 191, 36, 0.14), rgba(245, 158, 11, 0.06));
    border: 1px solid rgba(251, 191, 36, 0.12);
}

.value-popup-section--gold .value-popup-number {
    color: #fbbf24;
}

/* Rose stat */
.value-popup-section--rose .value-popup-stat {
    background: linear-gradient(145deg, rgba(244, 63, 94, 0.14), rgba(239, 68, 68, 0.06));
    border: 1px solid rgba(244, 63, 94, 0.12);
}

.value-popup-section--rose .value-popup-number {
    color: #fb7185;
}

/* Green stat */
.value-popup-section--green .value-popup-stat {
    background: linear-gradient(145deg, rgba(52, 211, 153, 0.14), rgba(16, 185, 129, 0.06));
    border: 1px solid rgba(52, 211, 153, 0.12);
}

.value-popup-section--green .value-popup-number {
    color: #34d399;
}

/* ─── Section text info ─────────────────────── */
.value-popup-info {
    flex: 1;
    min-width: 0;
}

.value-popup-info h4 {
    font-family: 'Sora', system-ui, sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: #e2e8f0;
    margin: 0 0 0.35rem;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.value-popup-info p {
    font-family: 'Sora', system-ui, sans-serif;
    font-size: 0.82rem;
    font-weight: 400;
    color: #94a3b8;
    margin: 0;
    line-height: 1.55;
}

/* ─── Footer ────────────────────────────────── */
.value-popup-footer {
    padding: 1rem 1.5rem 1.75rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

.value-popup-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
    margin-bottom: 1.25rem;
}

.value-popup-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2.25rem;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #422006;
    border: none;
    border-radius: 12px;
    font-family: 'Sora', system-ui, sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow:
        0 4px 20px rgba(251, 191, 36, 0.2),
        0 1px 3px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.01em;
    position: relative;
    z-index: 1;
}

.value-popup-cta:hover {
    transform: translateY(-2px);
    box-shadow:
        0 8px 30px rgba(251, 191, 36, 0.3),
        0 2px 6px rgba(0, 0, 0, 0.3);
    filter: brightness(1.05);
}

.value-popup-cta:active {
    transform: translateY(0);
    box-shadow:
        0 2px 10px rgba(251, 191, 36, 0.2),
        0 1px 2px rgba(0, 0, 0, 0.2);
}

/* ─── Mobile responsive ─────────────────────── */
@media (max-width: 575.98px) {
    .value-popup-overlay {
        padding: 12px;
        align-items: flex-end;
    }

    .value-popup-container {
        border-radius: 20px 20px 0 0;
        max-height: 85vh;
    }

    .value-popup-accent-bar {
        border-radius: 20px 20px 0 0;
    }

    .value-popup-header {
        padding: 1.75rem 1.25rem 0.5rem;
    }

    .value-popup-header h3 {
        font-size: 1.3rem;
    }

    .value-popup-label {
        font-size: 0.6rem;
    }

    .value-popup-sections {
        padding: 0.75rem 1rem 0.5rem;
        gap: 0.6rem;
    }

    .value-popup-section {
        padding: 1rem;
        gap: 1rem;
    }

    .value-popup-stat {
        width: 68px;
        height: 68px;
        border-radius: 14px;
    }

    .value-popup-number {
        font-size: 1.35rem;
    }

    .value-popup-info h4 {
        font-size: 0.85rem;
    }

    .value-popup-info p {
        font-size: 0.78rem;
    }

    .value-popup-footer {
        padding: 0.75rem 1rem 1.5rem;
    }

    .value-popup-cta {
        width: 100%;
        justify-content: center;
        padding: 0.85rem 2rem;
    }

    .value-popup-close {
        top: 14px;
        right: 14px;
        width: 32px;
        height: 32px;
    }
}

/* ─── Tablet ────────────────────────────────── */
@media (min-width: 576px) and (max-width: 767.98px) {
    .value-popup-stat {
        width: 78px;
        height: 78px;
    }

    .value-popup-number {
        font-size: 1.5rem;
    }
}

/* ─── Badge clickability hint ───────────────── */
.premium-quality-badge[role="button"],
.url-guaranteed-badge[role="button"],
.manual-collection-badge[role="button"] {
    cursor: pointer;
}

/* ─── Custom scrollbar for dark container ───── */
.value-popup-container::-webkit-scrollbar {
    width: 6px;
}

.value-popup-container::-webkit-scrollbar-track {
    background: transparent;
}

.value-popup-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.value-popup-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}
