/* ============================================================
   pricing.css — стили страницы тарифов
   ============================================================ */

/* ---- Глобальный переключатель период ---- */
.billing-toggle-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

/* ---- Сетка тарифных карточек (3×3) ---- */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-bottom: 3rem;
}

/* Тарифная карточка */
.plan-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 1.25rem 1.5rem;
}

/* Акцентная карточка (Subscription) */
.plan-card--featured {
    border-color: var(--accent-purple);
}

.plan-card--featured::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    background: radial-gradient(ellipse at top, rgba(102, 126, 234, 0.06) 0%, transparent 60%);
    pointer-events: none;
}

/* Шапка карточки */
.plan-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.875rem;
}

.plan-card__name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Цена */
.plan-card__price-wrap {
    margin-bottom: 0.375rem;
}

.plan-card__price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.plan-card__price.text-gradient {
    font-size: 2.5rem;
}

.plan-card__period {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-left: 0.375rem;
}

/* Строка под ценой (период / единица для доп. принтеров) */
.plan-card__period-line {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.plan-card__desc {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    max-width: none;
}

/* Список функций тарифа */
.plan-card__features {
    flex: 1;
    margin-bottom: 0.875rem;
}

/* Уменьшенный отступ и шрифт для списка в карточках тарифов */
.plan-card__features .feature-list {
    gap: 0.15rem;
    font-size: 0.9rem;
}

/* Кнопки оплаты */
.plan-card__actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Кнопка с иконкой платёжной системы */
.payment-btn-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
}

/* Tooltip для кнопок-заглушек */
.payment-tooltip {
    position: fixed;
    z-index: 1000;
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.875rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    pointer-events: none;
    white-space: nowrap;
    box-shadow: var(--shadow-card);
}

/* Промокод */
.promo-section {
    margin-bottom: 1.25rem;
}

.promo-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

/* Информация о лицензии */
.license-info-block {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

/* Карточка над переключателем периода — полная ширина сетки */
.license-info-block--top {
    padding: 0.75rem 1.5rem;
    margin-bottom: 1.5rem;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    text-align: center;
}

.license-info-block--top .license-info-block__text {
    margin: 0;
    white-space: nowrap;
}

.license-info-block--top .license-info-block__text--tax {
    margin-top: 0;
}

.license-info-block__title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.375rem;
}

.license-info-block__text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    max-width: none;
}

.license-info-block__text--tax {
    margin-top: 0.625rem;
    color: var(--text-muted);
    font-size: 0.8125rem;
}

/* Секция уведомления */
.notify-section {
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
}

.notify-inner {
    text-align: center;
    max-width: 560px;
    margin-inline: auto;
}

.notify-inner h2 {
    margin-bottom: 0.75rem;
}

.notify-inner .section-description {
    margin-bottom: 1.75rem;
}

.notify-form-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

/* ============================================================
   Переключатель период (Ежемесячно / Ежегодно)
   ============================================================ */
.billing-toggle {
    display: inline-flex;
    gap: 0.25rem;
    background: var(--color-surface-2);
    border-radius: var(--radius-sm);
    padding: 0.25rem;
}

.billing-btn {
    flex: 1;
    padding: 0.4rem 0.75rem;
    border: none;
    border-radius: calc(var(--radius-sm) - 2px);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.billing-btn--active {
    background: var(--color-surface);
    color: var(--text-primary);
    font-weight: 600;
    box-shadow: var(--shadow-card);
}

/* ============================================================
   Выбор количества
   ============================================================ */
.qty-block {
    margin-bottom: 0.625rem;
}

.qty-block__label {
    display: block;
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

/* Строка: qty-selector слева, price-calc справа */
.qty-selector-row {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    flex-wrap: wrap;
}

.qty-selector {
    display: inline-flex;
    align-items: stretch;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.qty-btn {
    width: 2.25rem;
    background: var(--color-surface-2);
    border: none;
    color: var(--text-primary);
    font-size: 1.125rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.qty-btn:hover:not(:disabled) {
    background: rgba(102, 126, 234, 0.12);
}

.qty-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.qty-input {
    width: 3.75rem;
    height: 2.25rem;
    border: none;
    border-left: 1px solid var(--color-border);
    border-right: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--text-primary);
    text-align: center;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: inherit;
    -moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

/* ============================================================
   Расчёт цены
   ============================================================ */
.price-calc {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-height: 1.25rem;
}

/* Внутри .qty-selector-row calc идёт справа — высота совпадает с полем ввода */
.qty-selector-row .price-calc {
    margin-top: 0;
    height: 2.25rem;
    justify-content: center;
    gap: 0.05rem;
    min-height: unset;
}

.qty-selector-row .price-calc__extra {
    font-size: 0.7rem;
    line-height: 1.2;
}

.qty-selector-row .price-calc__total {
    font-size: 0.9375rem;
    line-height: 1.2;
    margin-top: 0;
}

.price-calc__base,
.price-calc__extra {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.price-calc__total {
    font-size: 1.0625rem;
    color: var(--text-primary);
    font-weight: 700;
    margin-top: 0.2rem;
}

/* ============================================================
   Информационный блок
   ============================================================ */
.pricing-info-box {
    background: rgba(102, 126, 234, 0.05);
    border: 1px solid rgba(102, 126, 234, 0.12);
    border-radius: var(--radius-sm);
    padding: 0.625rem 0.875rem;
    margin-bottom: 0.625rem;
}

.pricing-info-box p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

.pricing-info-box p + p {
    margin-top: 0.25rem;
}

.pricing-info-box__example {
    color: var(--text-muted) !important;
    font-size: 0.775rem !important;
}

.pricing-info-box__note {
    color: var(--text-muted) !important;
    font-size: 0.775rem !important;
    margin-top: 0.375rem !important;
    font-style: italic;
}

/* ============================================================
   Заметка об email
   ============================================================ */
.pricing-email-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 1rem;
}

/* ============================================================
   Адаптивность
   ============================================================ */
/* Стили тегов типов карточек */
.tag--free {
    background: rgba(16, 185, 129, 0.12);
    color: var(--accent-green);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.tag--onetime {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

/* Анимация задержки для 5 и 6 карточек */
.delay-5 { animation-delay: 0.4s; }
.delay-6 { animation-delay: 0.5s; }

@media (max-width: 900px) {
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 580px) {
    .pricing-grid {
        grid-template-columns: 1fr;
    }
}
