/*
 * EUROSPACE — price tabs compact white v2
 * Только публичный прайс.
 *
 * Цель:
 * - все переключатели прайса визуально как белые карточки категорий;
 * - активный пункт без коричневой заливки, но с заметной рамкой;
 * - минимальные вертикальные интервалы между уровнями навигации и таблицей.
 */

#prices {
    --price-tab-bg: #ffffff;
    --price-tab-border: #e7d8cf;
    --price-tab-text: #5e2d1f;
    --price-tab-active-border: #6b3221;
}

/* Весь навигационный блок прайса делаем плотным. */
#prices .legacy-price-nav,
#prices .legacy-price-main-tabs,
#prices .legacy-price-subtabs,
#prices .legacy-price-language-tabs,
#prices .legacy-price-tabs,
#prices [class*="legacy-price"][class*="tabs"] {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/*
 * Между строками переключателей оставляем только технический зазор,
 * чтобы кнопки не слипались.
 */
#prices .legacy-price-main-tabs,
#prices .legacy-price-subtabs,
#prices .legacy-price-language-tabs {
    gap: 8px !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: 8px !important;
}

/* Все варианты табов/кнопок — белые, как карточки «Наши услуги». */
#prices .legacy-price-main-tab,
#prices .legacy-price-subtab,
#prices .legacy-price-language-tab,
#prices .legacy-price-tab,
#prices [class*="legacy-price"][class*="tab"] {
    min-height: 0 !important;
    margin: 0 !important;
    padding: 10px 18px !important;
    border: 1px solid var(--price-tab-border) !important;
    border-radius: 10px !important;
    background: var(--price-tab-bg) !important;
    color: var(--price-tab-text) !important;
    box-shadow: none !important;
    font-size: 15px !important;
    font-weight: 600 !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"] {
    border-color: var(--price-tab-active-border) !important;
    box-shadow: inset 0 0 0 1px var(--price-tab-active-border) !important;
    background: #ffffff !important;
    color: var(--price-tab-text) !important;
}

/* Hover тоже без коричневой плашки. */
#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 {
    border-color: #b88f7f !important;
    background: #ffffff !important;
}

/* Максимально сокращаем воздух перед таблицей. */
#prices .legacy-price-content {
    margin-top: 8px !important;
    padding-top: 0 !important;
}

#prices .legacy-price-group {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

#prices .legacy-price-group + .legacy-price-group {
    margin-top: 10px !important;
}

#prices .legacy-price-group__title {
    margin-top: 0 !important;
    margin-bottom: 5px !important;
}

/* Таблица сразу после последней строки кнопок. */
#prices .legacy-price-language-tabs + .legacy-price-content,
#prices .legacy-price-subtabs + .legacy-price-content,
#prices .legacy-price-main-tabs + .legacy-price-content,
#prices [class*="legacy-price"][class*="tabs"]
    + .legacy-price-content {
    margin-top: 8px !important;
}

/* Немного уменьшаем вертикальную высоту строк таблицы. */
#prices .legacy-price-header {
    min-height: 54px !important;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
}

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

/* Mobile: те же белые кнопки, меньше отступов и высоты. */
@media (max-width: 680px) {
    #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-main-tab,
    #prices .legacy-price-subtab,
    #prices .legacy-price-language-tab,
    #prices .legacy-price-tab,
    #prices [class*="legacy-price"][class*="tab"] {
        padding: 8px 10px !important;
        border-radius: 8px !important;
        font-size: 13px !important;
        line-height: 1.12 !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;
    }

    #prices .legacy-price-group + .legacy-price-group {
        margin-top: 8px !important;
    }

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

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