/* Стили для элементов подписки */

/* Индикатор статуса подписки */
.subscription-status {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    gap: 6px;
}

.subscription-status.pro {
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #000;
}

.subscription-status.free {
    background: var(--secondary-color, #f0f0f0);
    color: var(--text-color, #333);
}

.status-icon {
    font-size: 16px;
}

.status-text {
    font-weight: 600;
}

/* Информация о лимитах */
.limit-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
}

.limit-info.unlimited {
    background: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
}

.limit-info.available {
    background: rgba(33, 150, 243, 0.1);
    color: #2196F3;
}

.limit-info.exhausted {
    background: rgba(244, 67, 54, 0.1);
    color: #f44336;
}

.limit-text {
    font-weight: 500;
}

/* Кнопка подписки */
.subscription-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--primary-color, #007aff);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    min-width: 140px;
}

.subscription-btn:hover {
    background: var(--primary-hover, #0056b3);
    transform: translateY(-2px);
}

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

.subscription-btn.pro {
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #000;
}

.subscription-btn.pro:hover {
    background: linear-gradient(135deg, #ffed4e, #ff9500);
}

/* Уведомление о лимите */
.limit-notification {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.notification-content {
    background: var(--bg-color, #ffffff);
    border-radius: 16px;
    padding: 24px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.notification-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.notification-text {
    margin-bottom: 24px;
}

.notification-text strong {
    display: block;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-color, #333);
}

.notification-text p {
    color: var(--secondary-text, #666);
    line-height: 1.4;
}

.notification-btn {
    background: var(--primary-color, #007aff);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.notification-btn:hover {
    background: var(--primary-hover, #0056b3);
}

/* Заглушка для анализа */
.analysis-blocked {
    position: relative;
    opacity: 0.5;
    pointer-events: none;
}

.analysis-blocked::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    color: #f44336;
}

/* Промо-баннер */
.subscription-promo {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    text-align: center;
}

.promo-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.promo-text {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 12px;
}

.promo-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.promo-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Мини-индикатор в хедере */
.header-subscription {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.header-subscription .subscription-status {
    font-size: 12px;
    padding: 4px 8px;
}

.header-subscription .limit-info {
    font-size: 12px;
    padding: 4px 8px;
}

/* Карточка планов */
.plan-card {
    background: var(--secondary-bg, #f8f9fa);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.plan-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.plan-card.selected {
    border-color: var(--primary-color, #007aff);
    background: var(--primary-color, #007aff);
    color: white;
}

.plan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.plan-name {
    font-size: 16px;
    font-weight: 600;
}

.plan-price {
    font-size: 18px;
    font-weight: 700;
}

.plan-description {
    font-size: 14px;
    opacity: 0.8;
}

.plan-savings {
    font-size: 12px;
    color: #4CAF50;
    font-weight: 600;
    margin-top: 4px;
}

.plan-card.selected .plan-savings {
    color: rgba(255, 255, 255, 0.9);
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.subscription-content {
    animation: fadeIn 0.3s ease;
}

/* Адаптивность */
@media (max-width: 480px) {
    .header-subscription {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .notification-content {
        padding: 20px;
        margin: 20px;
    }
    
    .subscription-btn {
        width: 100%;
        justify-content: center;
    }
    
    .plan-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

/* Темная тема */
@media (prefers-color-scheme: dark) {
    .subscription-status.free {
        background: rgba(255, 255, 255, 0.1);
        color: rgba(255, 255, 255, 0.9);
    }
    
    .limit-info.unlimited {
        background: rgba(76, 175, 80, 0.2);
        color: #81C784;
    }
    
    .limit-info.available {
        background: rgba(33, 150, 243, 0.2);
        color: #64B5F6;
    }
    
    .limit-info.exhausted {
        background: rgba(244, 67, 54, 0.2);
        color: #EF5350;
    }
    
    .notification-content {
        background: var(--tg-theme-bg-color, #1a1a1a);
        color: var(--tg-theme-text-color, #ffffff);
    }
    
    .plan-card {
        background: rgba(255, 255, 255, 0.05);
        color: var(--tg-theme-text-color, #ffffff);
    }
}