/**
 * ═══════════════════════════════════════════════════════════════════════════
 * Layer 101: Content Paywall & Subscription Core - Styling
 * ═══════════════════════════════════════════════════════════════════════════
 * 
 * Professional paywall modal and subscription UI styling
 * WCAG 2.1 AA Compliant
 */

/* ═══════════════════════════════════════════════════════════════════════════
   PAYWALL MODAL OVERLAY
   ═══════════════════════════════════════════════════════════════════════════ */

.paywall-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PAYWALL MODAL
   ═══════════════════════════════════════════════════════════════════════════ */

.paywall-modal {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transform: scale(0.9);
    animation: modalPop 0.3s ease forwards;
}

@keyframes modalPop {
    to {
        transform: scale(1);
    }
}

.paywall-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.paywall-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.paywall-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 10px 0;
    line-height: 1.2;
}

.paywall-subtitle {
    font-size: 16px;
    opacity: 0.95;
    margin: 0;
    line-height: 1.4;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PAYWALL CONTENT
   ═══════════════════════════════════════════════════════════════════════════ */

.paywall-content {
    padding: 40px 30px;
}

.paywall-message {
    font-size: 18px;
    color: #333;
    margin-bottom: 25px;
    text-align: center;
    line-height: 1.6;
}

.article-count {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 16px;
    margin: 0 4px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SUBSCRIPTION BENEFITS
   ═══════════════════════════════════════════════════════════════════════════ */

.subscription-benefits {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
}

.benefits-title {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin: 0 0 20px 0;
    text-align: center;
}

.benefit-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
}

.benefit-item:last-child {
    border-bottom: none;
}

.benefit-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.benefit-text {
    font-size: 15px;
    color: #555;
    line-height: 1.4;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CALL-TO-ACTION BUTTONS
   ═══════════════════════════════════════════════════════════════════════════ */

.paywall-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.paywall-btn {
    flex: 1;
    padding: 16px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

.paywall-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.paywall-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.paywall-btn-primary:active {
    transform: translateY(0);
}

.paywall-btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.paywall-btn-secondary:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
}

/* ═══════════════════════════════════════════════════════════════════════════
   CLOSE BUTTON
   ═══════════════════════════════════════════════════════════════════════════ */

.paywall-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.paywall-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* ═══════════════════════════════════════════════════════════════════════════
   CONTENT BLUR EFFECT
   ═══════════════════════════════════════════════════════════════════════════ */

.paywall-content-blur {
    filter: blur(5px);
    pointer-events: none;
    user-select: none;
}

.paywall-content-gradient {
    position: relative;
}

.paywall-content-gradient::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(to bottom, transparent 0%, white 100%);
    pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE DESIGN
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .paywall-modal {
        max-width: 100%;
        margin: 0 10px;
    }

    .paywall-header {
        padding: 25px 20px;
    }

    .paywall-title {
        font-size: 24px;
    }

    .paywall-content {
        padding: 30px 20px;
    }

    .paywall-actions {
        flex-direction: column;
    }

    .paywall-btn {
        width: 100%;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ACCESSIBILITY
   ═══════════════════════════════════════════════════════════════════════════ */

/* Focus styles for keyboard navigation */
.paywall-btn:focus,
.paywall-close:focus {
    outline: 3px solid #4facfe;
    outline-offset: 2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {

    .paywall-overlay,
    .paywall-modal,
    .paywall-btn,
    .paywall-close {
        animation: none;
        transition: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .paywall-modal {
        border: 3px solid #000;
    }

    .paywall-btn {
        border: 2px solid currentColor;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .paywall-modal {
        background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    }

    .paywall-message {
        color: #e0e0e0;
    }

    .subscription-benefits {
        background: rgba(255, 255, 255, 0.05);
    }

    .benefits-title {
        color: #e0e0e0;
    }

    .benefit-text {
        color: #b0b0b0;
    }

    .paywall-btn-secondary {
        background: transparent;
        color: #667eea;
    }

    .paywall-content-gradient::after {
        background: linear-gradient(to bottom, transparent 0%, #1a1a2e 100%);
    }
}