/* =====================================================
   frontend/src/styles/subscriptions.css - Стили подписок
   ===================================================== */

.subscriptions-page {
    flex: 1;
    overflow-y: auto;
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.subscriptions-header {
    text-align: center;
    margin-bottom: 48px;
}

.subscriptions-header h1 {
    font-size: 36px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.subscriptions-header p {
    font-size: 18px;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* =====================================================
   СЕТКА ТАРИФОВ
   ===================================================== */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
    align-items: stretch;
}

/* =====================================================
   КАРТОЧКА ТАРИФА (ОБЩАЯ)
   ===================================================== */
.plan-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 32px 28px 28px;
    text-align: left;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
}

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

/* =====================================================
   БАЗОВЫЙ ТАРИФ
   ===================================================== */
.plan-card.basic {
    background: #fafafa;
}

.plan-card.basic .plan-name {
    color: #4b5563;
}

.plan-card.basic .plan-price {
    color: #1a1a2e;
    font-size: 28px;
    font-weight: 700;
}

.plan-card.basic .plan-price-period {
    color: #6b7280;
    font-size: 14px;
}

/* =====================================================
   ПОПУЛЯРНЫЙ ТАРИФ
   ===================================================== */
.plan-card.popular {
    border-color: #2563eb;
    border-width: 2px;
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(37,99,235,0.08);
}

.plan-card.popular:hover {
    box-shadow: 0 12px 48px rgba(37,99,235,0.15);
}

.plan-card.popular .popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #2563eb;
    color: #fff;
    padding: 4px 20px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.plan-card.popular .plan-price {
    color: #2563eb;
    font-size: 32px;
    font-weight: 800;
}

.plan-card.popular .plan-price-period {
    color: #6b7280;
    font-size: 14px;
}

/* =====================================================
   PRO ТАРИФ
   ===================================================== */
.plan-card.pro {
    border-color: #8b5cf6;
    border-width: 2px;
    background: #ffffff;
}

.plan-card.pro .pro-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #8b5cf6;
    color: #fff;
    padding: 4px 20px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.plan-card.pro .plan-price {
    color: #8b5cf6;
    font-size: 32px;
    font-weight: 800;
}

.plan-card.pro .plan-price-period {
    color: #6b7280;
    font-size: 14px;
}

/* =====================================================
   НАЗВАНИЕ И ОПИСАНИЕ
   ===================================================== */
.plan-card .plan-name {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 4px;
}

.plan-card .plan-description {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 20px;
    line-height: 1.5;
    min-height: 42px;
}

/* =====================================================
   ЦЕНА
   ===================================================== */
.plan-card .plan-price {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 4px;
}

.plan-card .plan-price-period {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 20px;
}

.plan-card.basic .plan-price {
    font-size: 24px;
    font-weight: 600;
}

/* =====================================================
   ОСОБЕННОСТИ
   ===================================================== */
.plan-card .plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 28px;
    flex: 1;
}

.plan-card .plan-features li {
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #4b5563;
    border-bottom: 1px solid #f9fafb;
}

.plan-card .plan-features li:last-child {
    border-bottom: none;
}

.plan-card .plan-features li::before {
    content: '✓';
    font-weight: 700;
    font-size: 16px;
    width: 20px;
    flex-shrink: 0;
}

.plan-card.basic .plan-features li::before {
    color: #22c55e;
}

.plan-card.popular .plan-features li::before {
    color: #2563eb;
}

.plan-card.pro .plan-features li::before {
    color: #8b5cf6;
}

/* =====================================================
   КНОПКА
   ===================================================== */
.plan-card .btn {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: auto;
    text-align: center;
}

.plan-card .btn-primary {
    background: #2563eb;
    color: #fff;
}

.plan-card .btn-primary:hover:not(:disabled) {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37,99,235,0.3);
}

.plan-card.pro .btn-primary {
    background: #8b5cf6;
}

.plan-card.pro .btn-primary:hover:not(:disabled) {
    background: #7c3aed;
    box-shadow: 0 4px 12px rgba(139,92,246,0.3);
}

.plan-card .btn-secondary {
    background: #f3f4f6;
    color: #1a1a2e;
}

.plan-card .btn-secondary:hover:not(:disabled) {
    background: #e5e7eb;
}

.plan-card .btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* =====================================================
   МОЯ ПОДПИСКА
   ===================================================== */
.my-subscription {
    margin-top: 20px;
}

.my-subscription .card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 24px 28px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.my-subscription .card h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 12px;
}

.my-subscription .subscription-status {
    display: inline-block;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.my-subscription .subscription-status.active {
    background: #dcfce7;
    color: #166534;
}

.my-subscription .subscription-status.expired {
    background: #fee2e2;
    color: #991b1b;
}

.my-subscription .subscription-status.cancelled {
    background: #fef3c7;
    color: #92400e;
}

.my-subscription .subscription-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 32px;
    margin-top: 12px;
}

.my-subscription .subscription-info .label {
    color: #9ca3af;
    font-size: 13px;
}

.my-subscription .subscription-info .value {
    font-weight: 600;
    color: #1a1a2e;
    font-size: 15px;
}

/* =====================================================
   АДАПТИВНОСТЬ
   ===================================================== */
@media (max-width: 1024px) {
    .plans-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .plan-card.popular {
        order: -1;
    }
}

@media (max-width: 700px) {
    .plans-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .subscriptions-page {
        padding: 20px 16px;
    }
    
    .subscriptions-header h1 {
        font-size: 28px;
    }
    
    .subscriptions-header p {
        font-size: 16px;
    }
    
    .my-subscription .subscription-info {
        grid-template-columns: 1fr;
        gap: 2px;
    }
    
    .plan-card.popular .popular-badge,
    .plan-card.pro .pro-badge {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        display: inline-block;
        margin-bottom: 12px;
    }
}
