/* ============================================================
   TARIFFS.CSS — Страница тарифов
   ============================================================ */

.tariffs-page {
    background: #f8fafc;
    padding: 100px 0 60px; /* Отступ сверху под фиксированный хедер */
    font-family: 'Open Sans', system-ui, sans-serif;
    min-height: 100vh;
}

.tariffs-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Заголовок */
.tariffs-header {
    text-align: center;
    margin-bottom: 40px;
}

.tariffs-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 10px 0;
}

.tariffs-subtitle {
    font-size: 16px;
    color: #6b7280;
    margin: 0;
}

.tariffs-test-banner {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 16px;
    background: #fef3c7;
    color: #92400e;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid #f59e0b;
}

/* Переключатель Спец / Компания / ТПП */
.tariffs-switcher {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
    background: #fff;
    padding: 8px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
    border: 1px solid #e5e7eb;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.tariffs-switch-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
}

.tariffs-switch-btn .om-icon { stroke: #6b7280; }
.tariffs-switch-btn:hover { background: #f3f4f6; color: #3ca5a9; }
.tariffs-switch-btn:hover .om-icon { stroke: #3ca5a9; }

.tariffs-switch-btn.is-active {
    background: linear-gradient(135deg, #67c9cc, #3ca5a9);
    color: #fff;
    box-shadow: 0 4px 12px rgba(60,165,169,0.3);
}
.tariffs-switch-btn.is-active .om-icon { stroke: #fff; }

/* Блоки (вкладки) */
.tariffs-block {
    display: none;
    animation: fadeIn 0.3s ease;
}
.tariffs-block.is-active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Сетка карточек */
.tariffs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 30px;
    align-items: start;
}

/* Карточка тарифа */
.tariff-card {
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 32px 24px;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
}

.tariff-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.08);
    border-color: #cbd5e1;
}

/* Популярный тариф (выделенный) */
.tariff-card--popular {
    border-color: #3ca5a9;
    box-shadow: 0 8px 24px rgba(60,165,169,0.15);
}

.tariff-card__badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #67c9cc, #3ca5a9);
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 16px;
    border-radius: 20px;
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(60,165,169,0.3);
}

.tariff-card__title {
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 12px;
    text-align: center;
}

.tariff-card__price {
    font-family: 'Montserrat', sans-serif;
    font-size: 36px;
    font-weight: 800;
    color: #1f2937;
    text-align: center;
    line-height: 1;
    margin-bottom: 8px;
}
.tariff-card__price span {
    font-size: 16px;
    font-weight: 500;
    color: #6b7280;
}

.tariff-card__save {
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #10b981;
    margin-bottom: 24px;
    min-height: 18px; /* Чтобы выровнять карточки */
}

/* Список преимуществ */
.tariff-card__features {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
    flex: 1; /* Растягиваем, чтобы кнопка была внизу */
}

.tariff-card__features li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: #4b5563;
    margin-bottom: 12px;
    line-height: 1.4;
}

.tariff-card__features .om-icon {
    flex-shrink: 0;
    margin-top: 2px;
}

/* Тумблер автопродления */
.tariff-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 16px;
    cursor: pointer;
    border: 1px solid #e5e7eb;
    transition: border-color 0.2s;
}

.tariff-toggle:hover {
    border-color: #3ca5a9;
}

.tariff-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #3ca5a9;
    cursor: pointer;
    margin: 0;
}

.tariff-toggle span {
    font-size: 13px;
    font-weight: 600;
    color: #4b5563;
    user-select: none;
}

/* Кнопки */
.tariff-btn {
    display: block;
    width: 100%;
    padding: 16px;
    border-radius: 10px;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
    box-sizing: border-box;
}

.tariff-btn--primary {
    background: linear-gradient(135deg, #67c9cc, #3ca5a9);
    color: #fff;
    box-shadow: 0 4px 14px rgba(60,165,169,0.25);
}
.tariff-btn--primary:hover {
    background: linear-gradient(135deg, #3ca5a9, #2b5876);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(60,165,169,0.35);
}
.tariff-btn--primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.tariff-btn--outline {
    background: #fff;
    color: #3ca5a9;
    border-color: #3ca5a9;
}
.tariff-btn--outline:hover {
    background: #3ca5a9;
    color: #fff;
}

/* Правовой блок */
.tariffs-legal {
    text-align: center;
    font-size: 12px;
    color: #9ca3af;
    margin-top: 20px;
    line-height: 1.5;
}
.tariffs-legal a {
    color: #3ca5a9;
    text-decoration: underline;
}
.tariffs-legal a:hover {
    color: #2b5876;
}

/* Модалка для неавторизованных */
.tariffs-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.tariffs-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
}
.tariffs-modal__content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    z-index: 2;
}
.tariffs-modal__close {
    position: absolute;
    top: 16px; right: 16px;
    width: 32px; height: 32px;
    border-radius: 50%;
    background: rgba(0,0,0,0.05);
    border: none;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tariffs-modal__content h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 22px;
    color: #1f2937;
    margin: 0 0 12px 0;
}
.tariffs-modal__content p {
    color: #6b7280;
    margin: 0 0 24px 0;
    font-size: 14px;
    line-height: 1.5;
}
.tariffs-modal__actions {
    display: flex;
    gap: 12px;
}
.tariffs-modal__actions .tariff-btn {
    padding: 12px;
    font-size: 14px;
}

/* Адаптив */
@media (max-width: 768px) {
    .tariffs-page { padding-top: 80px; }
    .tariffs-title { font-size: 24px; }
    .tariffs-switcher { flex-direction: column; width: 100%; }
    .tariffs-switch-btn { justify-content: center; width: 100%; }
    .tariffs-grid { grid-template-columns: 1fr; }
    .tariff-card--popular { transform: none; }
    .tariff-card--popular:hover { transform: translateY(-4px); }
    .tariffs-modal__actions { flex-direction: column; }
}