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

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

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

/* Blurred locked content */
.paywall-blur {
    position: relative;
    filter: blur(8px);
    -webkit-filter: blur(8px);
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    overflow: hidden;
    max-height: 400px;
}

/* Gradient fade at bottom of blur */
.paywall-blur::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 150px;
    background: linear-gradient(to bottom, transparent, var(--bg-primary, #0d1117));
    pointer-events: none;
}

/* CTA overlay on top of blur */
.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.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    max-width: 400px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

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

.paywall-cta-title {
    font-size: 1.5rem;
    font-weight: 700;
    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: 700;
    color: var(--success, #3fb950);
}

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

/* Spots remaining badge */
.paywall-spots {
    display: inline-block;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4a 100%);
    color: #1a1a1a;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.paywall-spots.sold-out {
    background: var(--bg-tertiary, #21262d);
    color: var(--text-secondary, #8b949e);
}

/* 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: 8px;
    font-size: 1rem;
    font-weight: 600;
    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 20px rgba(102, 126, 234, 0.4);
}

.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;
}

/* Features list */
.paywall-features {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
    text-align: left;
}

.paywall-features li {
    padding: 0.4rem 0;
    color: var(--text-secondary, #8b949e);
    font-size: 0.9rem;
}

.paywall-features li::before {
    content: '✓';
    color: var(--success, #3fb950);
    margin-right: 0.5rem;
    font-weight: bold;
}

/* Inline paywall (for smaller sections) */
.paywall-inline {
    background: var(--bg-secondary, #161b22);
    border: 1px solid var(--border-color, #30363d);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    margin: 1rem 0;
}

.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: 250px;
    }
}

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

.paywall-cta {
    animation: paywall-fade-in 0.3s ease-out;
}

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