/**
 * Paywall Blur Overlay Component
 * Shows teaser content, blurs the rest, displays upgrade CTA
 */

/* Container for paywalled content */
.paywall-container,
.paywall-overlay-wrapper {
    position: relative;
}

/* Visible teaser content (not blurred) */
.paywall-teaser {
    /* No special styling - shows normally */
}

/* Global (single) paywall notice (dashboard) */
.paywall-notice {
    margin: 1rem 0 1.25rem 0;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(13, 17, 23, 0.55);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.paywall-notice__inner {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.paywall-notice__icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.10);
}

.paywall-notice__text {
    color: var(--text-secondary, #8b949e);
    font-size: 0.95rem;
    line-height: 1.3;
}

.paywall-notice__text strong {
    color: var(--text-primary, #fff);
    font-weight: 700;
    margin-right: 0.35rem;
}

.paywall-notice__link {
    color: var(--accent, #667eea);
    font-weight: 700;
    text-decoration: none;
    margin-left: 0.25rem;
}

.paywall-notice__link:hover {
    text-decoration: underline;
}

/* Blurred locked content (premium “frosted” look) */
.paywall-blur {
    position: relative;
    filter: blur(10px) saturate(0.85) contrast(0.9);
    -webkit-filter: blur(10px) saturate(0.85) contrast(0.9);
    opacity: 0.65;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    overflow: hidden;
    max-height: 420px;
}

/* Gradient fade at bottom of blur */
.paywall-blur::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 220px;
    background: linear-gradient(
        to bottom,
        rgba(13, 17, 23, 0),
        rgba(13, 17, 23, 0.85),
        rgba(13, 17, 23, 1)
    );
    pointer-events: none;
}

/* CTA overlay on top of blur (FULL) */
.paywall-ui-full .paywall-cta,
.paywall-cta {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    text-align: center;
    padding: 2rem;
    background: rgba(13, 17, 23, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    max-width: 420px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}

/* Quiet UI: small pill instead of a large centered CTA */
.paywall-ui-quiet .paywall-cta {
    top: 12px;
    left: auto;
    bottom: auto;
    right: 12px;
    transform: none;
    padding: 0;
    width: auto;
    max-width: none;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.paywall-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.22) 0%, rgba(118, 75, 162, 0.16) 100%), rgba(13, 17, 23, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: var(--text-primary, #fff);
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.paywall-pill:hover {
    background: rgba(13, 17, 23, 0.75);
    border-color: rgba(255, 255, 255, 0.18);
}

.paywall-pill i {
    opacity: 0.95;
}

.paywall-pill__label {
    opacity: 0.88;
    font-weight: 650;
}

.paywall-pill__action {
    font-weight: 850;
}

.paywall-cta-icon {
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

.paywall-cta-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary, #fff);
    margin: 0 0 0.5rem 0;
}

.paywall-cta-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary, #8b949e);
    margin: 0 0 1.5rem 0;
}

/* Pricing display */
.paywall-pricing {
    margin-bottom: 1.5rem;
}

.paywall-price-strike {
    text-decoration: line-through;
    color: var(--text-muted, #6e7681);
    font-size: 1.1rem;
    margin-right: 0.5rem;
}

.paywall-price-current {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--success, #3fb950);
}

.paywall-price-period {
    font-size: 0.9rem;
    color: var(--text-secondary, #8b949e);
}

/* Spots remaining badge */
.paywall-spots {
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.18) 0%, rgba(255, 237, 74, 0.10) 100%);
    color: #ffe082;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 215, 0, 0.28);
}

.paywall-spots.sold-out {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-secondary, #8b949e);
    border: 1px solid rgba(255, 255, 255, 0.10);
}

/* CTA button */
.paywall-btn {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    width: 100%;
    max-width: 280px;
}

.paywall-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 24px rgba(102, 126, 234, 0.45);
}

.paywall-btn:active {
    transform: translateY(0);
}

/* Trial badge */
.paywall-trial-badge {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary, #8b949e);
    margin-top: 0.75rem;
}

/* Inline paywall (for smaller sections) */
.paywall-inline {
    background: rgba(13, 17, 23, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 14px;
    padding: 2rem;
    text-align: center;
    margin: 1rem 0;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.paywall-inline .paywall-cta-icon {
    font-size: 2rem;
}

.paywall-inline .paywall-cta-title {
    font-size: 1.25rem;
}

/* Blog post specific */
.blog-post-content.paywalled .paywall-blur {
    max-height: 300px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .paywall-cta {
        padding: 1.5rem;
        width: 95%;
    }

    .paywall-cta-title {
        font-size: 1.25rem;
    }

    .paywall-price-current {
        font-size: 1.25rem;
    }

    .paywall-blur {
        max-height: 260px;
    }

    .paywall-ui-quiet .paywall-cta {
        left: 50%;
        right: auto;
        bottom: 12px;
        transform: translateX(-50%);
    }
}

/* Animation for CTA appearance */
@keyframes paywall-fade-in {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.paywall-ui-full .paywall-cta {
    animation: paywall-fade-in 0.25s ease-out;
}

/* Founding member highlight */
.paywall-founding-highlight {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.08) 0%, rgba(255, 237, 74, 0.04) 100%);
    border: 1px solid rgba(255, 215, 0, 0.25);
}
