/* paywall.css — Paywall overlay + Trial banner (Phase 15.1) */

/* ===== Trial Banner ===== */
.trial-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #fff3cd, #ffeeba);
    color: #856404;
    font-size: 14px;
    font-weight: 500;
    border-bottom: 1px solid #ffc107;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.trial-banner strong {
    font-weight: 700;
}

.trial-banner .trial-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #ffc107;
    color: #533f03;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.trial-banner .trial-details-btn {
    background: transparent;
    border: 1px solid #856404;
    color: #856404;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.trial-banner .trial-details-btn:hover {
    background: #856404;
    color: #fff;
}

/* ===== Paywall Overlay ===== */
.paywall-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.paywall-card {
    background: #fff;
    border-radius: 20px;
    padding: 40px 32px;
    max-width: 480px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: paywallSlideUp 0.4s ease;
}

@keyframes paywallSlideUp {
    from { transform: translateY(40px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.paywall-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.paywall-card h2 {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px;
}

.paywall-card .paywall-subtitle {
    font-size: 15px;
    color: #666;
    margin: 0 0 24px;
    line-height: 1.5;
}

/* Pricing block */
.paywall-pricing {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.paywall-price-option {
    flex: 1;
    border: 2px solid #e8e8e8;
    border-radius: 14px;
    padding: 16px 12px;
    text-align: center;
    transition: border-color 0.2s;
}

.paywall-price-option.recommended {
    border-color: #007aff;
    position: relative;
}

.paywall-price-option.recommended::before {
    content: 'Выгодно';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: #007aff;
    color: #fff;
    padding: 2px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
}

.paywall-price-option .price-period {
    font-size: 13px;
    color: #888;
    margin-bottom: 4px;
}

.paywall-price-option .price-amount {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
}

.paywall-price-option .price-amount small {
    font-size: 13px;
    font-weight: 400;
    color: #888;
}

.paywall-price-option .price-save {
    font-size: 12px;
    color: #34c759;
    font-weight: 600;
    margin-top: 4px;
}

/* CTA */
.paywall-cta {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.paywall-cta .btn-primary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    background: #007aff;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
}

.paywall-cta .btn-primary:hover {
    background: #005ec4;
}

.paywall-cta .btn-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: #f5f5f5;
    color: #333;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
}

.paywall-cta .btn-secondary:hover {
    background: #e8e8e8;
}

.paywall-footer {
    font-size: 13px;
    color: #999;
    line-height: 1.5;
}

/* ===== Promo Code Section ===== */
.paywall-promo-section {
    margin-bottom: 16px;
}

.paywall-promo-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.paywall-promo-row input {
    flex: 1;
    padding: 10px 14px;
    border: 1.5px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    letter-spacing: 0.05em;
    transition: border-color 0.2s;
    outline: none;
}

.paywall-promo-row input:focus {
    border-color: #007aff;
}

.paywall-promo-row button {
    padding: 10px 16px;
    background: #f0f0f0;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.paywall-promo-row button:hover {
    background: #e0e0e0;
}

#paywall-promo-result {
    margin-top: 6px;
    min-height: 18px;
    text-align: left;
}

/* Secondary outline button */
.paywall-cta .btn-secondary-outline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: transparent;
    color: #007aff;
    border: 1.5px solid #007aff;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.paywall-cta .btn-secondary-outline:hover {
    background: #007aff;
    color: #fff;
}

/* ===== Welcome Modal ===== */
.welcome-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.welcome-card {
    background: #fff;
    border-radius: 20px;
    padding: 36px 28px;
    max-width: 520px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    animation: paywallSlideUp 0.4s ease;
}

.welcome-card h2 {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px;
}

.welcome-card .welcome-subtitle {
    font-size: 15px;
    color: #666;
    margin: 0 0 24px;
}

.welcome-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
    text-align: left;
}

.welcome-feature {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 12px;
}

.welcome-feature .feature-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.welcome-feature .feature-text {
    font-size: 13px;
    color: #333;
    line-height: 1.4;
}

.welcome-feature .feature-text strong {
    display: block;
    font-size: 14px;
    margin-bottom: 2px;
}

.welcome-trial-info {
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #2e7d32;
    font-weight: 500;
}

.welcome-card .btn-start {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: #007aff;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.welcome-card .btn-start:hover {
    background: #005ec4;
}

/* ===== Subscription Tab ===== */
.subscription-status-card {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    margin-bottom: 16px;
}

.subscription-status-card .status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
}

.status-badge.trial { background: #fff3cd; color: #856404; }
.status-badge.pilot { background: #d4edda; color: #155724; }
.status-badge.paid { background: #cce5ff; color: #004085; }
.status-badge.expired { background: #f8d7da; color: #721c24; }

.subscription-timer {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 8px 0 4px;
}

.subscription-timer-label {
    font-size: 14px;
    color: #888;
    margin-bottom: 16px;
}

.subscription-pricing-info {
    border-top: 1px solid #eee;
    padding-top: 16px;
}

.subscription-pricing-info h4 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px;
    color: #333;
}

.pricing-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.pricing-row .pricing-label {
    font-size: 14px;
    color: #666;
}

.pricing-row .pricing-value {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
}

.subscription-contact {
    margin-top: 16px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 12px;
    text-align: center;
}

.subscription-contact p {
    font-size: 14px;
    color: #666;
    margin: 0 0 12px;
}

.subscription-contact .contact-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.subscription-contact .contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    border: none;
    transition: opacity 0.2s;
}

.subscription-contact .contact-btn:hover { opacity: 0.85; }

.contact-btn.telegram {
    background: #0088cc;
    color: #fff;
}

.contact-btn.email {
    background: #e8e8e8;
    color: #333;
}

/* ===== Mobile ===== */
@media (max-width: 480px) {
    .paywall-card { padding: 28px 20px; }
    .paywall-pricing { flex-direction: column; }
    .welcome-features { grid-template-columns: 1fr; }
    .welcome-card { padding: 28px 20px; }
    .subscription-contact .contact-buttons { flex-direction: column; }
}
