/* backend/static/css/modules/billing.css */

/* --- Paywall & Billing Container (Layout) --- */
.hard-paywall-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(var(--color-background-rgb), 0.95); /* Deep frost */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    /* CRITICAL FIX: Ensure scrollability on small screens */
    overflow-y: auto;
    padding: 2rem 1rem;
    animation: fadeInOverlay 0.3s ease-out;
}

@keyframes fadeInOverlay {
    from { opacity: 0; }
    to { opacity: 1; }
}

.paywall-container {
    width: 100%;
    max-width: 500px;
    margin: auto;
    animation: slideUpModal 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUpModal {
    from { opacity: 0; transform: translateY(20px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* --- Billing Card (The Core Component) --- */
.billing-card {
    background: rgba(var(--color-surface-rgb), 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 3rem 2.5rem;
    border-radius: 32px;
    border: 1px solid rgba(var(--color-border-rgb), 0.8);
    text-align: center;
    max-width: 440px;
    margin: 0 auto;
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255,255,255,0.2);
    position: relative;
    overflow: hidden;
}

/* Subtle glow behind the card content */
.billing-card::before {
    content: '';
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(var(--color-primary-rgb), 0.15) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
}

.billing-card > * {
    position: relative;
    z-index: 1;
}

.card-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--color-text);
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.card-subtitle {
    color: var(--color-text-muted);
    font-size: 1.05rem;
    margin-bottom: 2rem;
}

/* --- Pricing Display (Optimized for Psychology) --- */
.pricing-display {
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Align to top so the $ sits high */
    margin-bottom: 2.5rem;
    gap: 2px;
}

.currency {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text-muted);
    margin-top: 0.5rem; /* Push down slightly */
}

.amount {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 0.9;
    color: var(--color-text);
    letter-spacing: -0.04em;
}

.period {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-muted);
    align-self: flex-end; /* Align to bottom of the number */
    margin-bottom: 0.5rem;
    margin-left: 0.25rem;
}

/* --- Benefits List --- */
.upgrade-benefits {
    text-align: left;
    margin-bottom: 2.5rem;
    background: rgba(var(--color-background-rgb), 0.5);
    padding: 1.5rem;
    border-radius: 20px;
    border: 1px solid var(--color-border);
}

.benefits-label {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.upgrade-benefits ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.upgrade-benefits li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: var(--color-text);
    font-weight: 500;
    line-height: 1.4;
}

.upgrade-benefits li:last-child {
    margin-bottom: 0;
}

.upgrade-benefits li svg {
    width: 20px;
    height: 20px;
    color: var(--color-primary);
    flex-shrink: 0;
    margin-top: 2px;
}

/* --- Status/Success Indicators --- */
.status-icon {
    width: 80px; 
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.5);
}

.status-icon.success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.05));
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
    box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.2);
}

.status-icon svg {
    width: 36px;
    height: 36px;
}

.guarantee-text {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-top: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Paywall overrides for Layout */
@media (max-width: 768px) {
    .hard-paywall-overlay ~ .sidebar { display: none !important; }
    .hard-paywall-overlay ~ .mobile-header { display: none !important; }
    .hard-paywall-overlay ~ .tab-bar { display: none !important; } 
    
    .hard-paywall-overlay {
        align-items: flex-start; /* If it's too tall, let it scroll from top */
        padding-top: 2rem;
        padding-bottom: calc(2rem + env(safe-area-inset-bottom));
    }

    .billing-card {
        padding: 2.5rem 1.5rem;
        border-radius: 24px;
        margin: auto; /* Keep it centered if it fits */
    }
    
    .amount { font-size: 4rem; }
}

@media (min-width: 769px) {
    .hard-paywall-overlay {
        left: 240px; /* Match --sidebar-width from base_app.css */
        width: calc(100% - 240px);
    }
}
