/*
 * EUROSPACE — price typography + active tabs v3
 * Финальный override для публичного прайса.
 *
 * 1. Уменьшает размер и жирность шрифта таблицы.
 * 2. Активные кнопки всех уровней прайса получают лёгкую бежевую заливку.
 * 3. Сохраняет компактные вертикальные интервалы.
 */

#prices {
    --price-active-bg: #f2e9e4;
    --price-active-border: #b88f7f;
    --price-text: #5e2d1f;
}

/* -----------------------------
   КНОПКИ / КАТЕГОРИИ ПРАЙСА
   ----------------------------- */

#prices .legacy-price-main-tab,
#prices .legacy-price-subtab,
#prices .legacy-price-language-tab,
#prices .legacy-price-tab,
#prices [class*="legacy-price"][class*="tab"] {
    background: #ffffff !important;
    color: var(--price-text) !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1.15 !important;
}

/* Активные: слегка заполненные, но не тёмные. */
#prices .legacy-price-main-tab.is-active,
#prices .legacy-price-subtab.is-active,
#prices .legacy-price-language-tab.is-active,
#prices .legacy-price-tab.is-active,
#prices [class*="legacy-price"][class*="tab"].is-active,
#prices .legacy-price-main-tab[aria-selected="true"],
#prices .legacy-price-subtab[aria-selected="true"],
#prices .legacy-price-language-tab[aria-selected="true"],
#prices .legacy-price-tab[aria-selected="true"],
#prices [class*="legacy-price"][class*="tab"][aria-selected="true"] {
    background: var(--price-active-bg) !important;
    border-color: var(--price-active-border) !important;
    color: var(--price-text) !important;
    box-shadow: inset 0 0 0 1px rgba(94, 45, 31, 0.08) !important;
    font-weight: 600 !important;
}

/* Hover очень лёгкий, чтобы не спорил с active. */
#prices .legacy-price-main-tab:hover,
#prices .legacy-price-subtab:hover,
#prices .legacy-price-language-tab:hover,
#prices .legacy-price-tab:hover,
#prices [class*="legacy-price"][class*="tab"]:hover {
    background: #f8f4f1 !important;
}

/* -----------------------------
   ТАБЛИЦА
   ----------------------------- */

/* Шапка заметно меньше и легче. */
#prices .legacy-price-header,
#prices .legacy-price-header * {
    font-size: 16px !important;
    font-weight: 600 !important;
    line-height: 1.15 !important;
}

#prices .legacy-price-header {
    min-height: 48px !important;
    padding-top: 7px !important;
    padding-bottom: 7px !important;
}

/* Название услуги/документа. */
#prices .legacy-price-name,
#prices .legacy-price-name__title,
#prices .legacy-price-row--language .legacy-price-name {
    font-size: 15px !important;
    font-weight: 500 !important;
    line-height: 1.18 !important;
}

/* Цена немного плотнее названия, но без тяжёлого bold. */
#prices .legacy-price-value,
#prices .legacy-price-value--stacked,
#prices .legacy-price-row--language .legacy-price-value {
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.18 !important;
}

/* Дополнительные подписи/описания. */
#prices .legacy-price-lines,
#prices .legacy-price-lines * {
    font-size: 12px !important;
    font-weight: 400 !important;
    line-height: 1.15 !important;
}

/* Заказать легче и меньше. */
#prices .legacy-price-order {
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1.1 !important;
}

#prices .legacy-price-order b {
    font-size: 20px !important;
    font-weight: 500 !important;
}

/* Ещё сокращаем вертикаль строк. */
#prices .legacy-price-row,
#prices .legacy-price-row--language,
#prices .legacy-price-row--stacked {
    min-height: 44px !important;
    padding-top: 6px !important;
    padding-bottom: 6px !important;
}

/* Расстояние между уровнями навигации и таблицей — минимальное. */
#prices .legacy-price-main-tabs,
#prices .legacy-price-subtabs,
#prices .legacy-price-language-tabs {
    gap: 6px !important;
}

#prices .legacy-price-main-tabs + .legacy-price-subtabs,
#prices .legacy-price-subtabs + .legacy-price-language-tabs,
#prices .legacy-price-main-tabs + .legacy-price-language-tabs,
#prices [class*="legacy-price"][class*="tabs"]
    + [class*="legacy-price"][class*="tabs"] {
    margin-top: 6px !important;
}

#prices .legacy-price-content,
#prices .legacy-price-language-tabs + .legacy-price-content,
#prices .legacy-price-subtabs + .legacy-price-content,
#prices .legacy-price-main-tabs + .legacy-price-content {
    margin-top: 6px !important;
}

/* -----------------------------
   MOBILE
   ----------------------------- */

@media (max-width: 680px) {
    #prices .legacy-price-main-tab,
    #prices .legacy-price-subtab,
    #prices .legacy-price-language-tab,
    #prices .legacy-price-tab,
    #prices [class*="legacy-price"][class*="tab"] {
        padding: 7px 9px !important;
        font-size: 12.5px !important;
        font-weight: 500 !important;
    }

    #prices .legacy-price-main-tab.is-active,
    #prices .legacy-price-subtab.is-active,
    #prices .legacy-price-language-tab.is-active,
    #prices .legacy-price-tab.is-active,
    #prices [class*="legacy-price"][class*="tab"].is-active,
    #prices .legacy-price-main-tab[aria-selected="true"],
    #prices .legacy-price-subtab[aria-selected="true"],
    #prices .legacy-price-language-tab[aria-selected="true"],
    #prices .legacy-price-tab[aria-selected="true"] {
        background: var(--price-active-bg) !important;
        font-weight: 600 !important;
    }

    #prices .legacy-price-header,
    #prices .legacy-price-header * {
        font-size: 12px !important;
        font-weight: 600 !important;
    }

    #prices .legacy-price-header {
        min-height: 42px !important;
        padding-top: 6px !important;
        padding-bottom: 6px !important;
    }

    #prices .legacy-price-name,
    #prices .legacy-price-name__title,
    #prices .legacy-price-row--language .legacy-price-name {
        font-size: 12px !important;
        font-weight: 500 !important;
    }

    #prices .legacy-price-value,
    #prices .legacy-price-value--stacked,
    #prices .legacy-price-row--language .legacy-price-value {
        font-size: 12px !important;
        font-weight: 600 !important;
    }

    #prices .legacy-price-order {
        font-size: 12px !important;
        font-weight: 500 !important;
    }

    #prices .legacy-price-order b {
        font-size: 18px !important;
    }

    #prices .legacy-price-lines,
    #prices .legacy-price-lines * {
        font-size: 10px !important;
    }

    #prices .legacy-price-row,
    #prices .legacy-price-row--language,
    #prices .legacy-price-row--stacked {
        min-height: 40px !important;
        padding-top: 5px !important;
        padding-bottom: 5px !important;
    }

    #prices .legacy-price-main-tabs,
    #prices .legacy-price-subtabs,
    #prices .legacy-price-language-tabs {
        gap: 5px !important;
    }

    #prices .legacy-price-main-tabs + .legacy-price-subtabs,
    #prices .legacy-price-subtabs + .legacy-price-language-tabs,
    #prices .legacy-price-main-tabs + .legacy-price-language-tabs,
    #prices [class*="legacy-price"][class*="tabs"]
        + [class*="legacy-price"][class*="tabs"],
    #prices .legacy-price-content,
    #prices .legacy-price-language-tabs + .legacy-price-content,
    #prices .legacy-price-subtabs + .legacy-price-content,
    #prices .legacy-price-main-tabs + .legacy-price-content {
        margin-top: 5px !important;
    }
}
