/**
 * Единый цвет primary-кнопок (бренд #006AB5).
 * Подключается в конце CSS — перекрывает legacy жёлтые/зелёные/бирюзовые.
 * Не трогаем текстовые callback в шапке/бургере и иконки tabbar.
 */
:root {
  --sp-btn: #006ab5;
  --sp-btn-hover: #005a9a;
  --sp-btn-active: #004e86;
  --sp-btn-text: #ffffff;
}

/* --- Базовые CTA / попапы / формы --- */
.button-popup:not(.sp-header__callback):not(.sp-header__drawer-callback):not(.sp-tabbar__btn):not(.sp-banner__btn):not(.sp-banner__btn--light):not(.sp-full-cycle__btn),
a.button-popup:not(.sp-header__callback):not(.sp-header__drawer-callback):not(.sp-tabbar__btn):not(.sp-banner__btn):not(.sp-banner__btn--light):not(.sp-full-cycle__btn),
.button-popup-header,
a.button-popup-header,
.footer__button,
.have-questions__button input[type="submit"],
.faq_itb .have-questions__button input[type="submit"]:not(.form-faq input[type="submit"]),
.flex-fields .btn_submit,
.request-offer__footer [type="submit"],
.sp-callback__btn,
input.sp-callback__btn,
.sp-cta-form button[type="submit"],
.sp-cta-form input[type="submit"],
.custom-mold-cta button[type="submit"],
.custom-mold-cta input[type="submit"],
.cookie-popup button.cookie-popup__accept,
.cookie-popup .cookie-popup__accept,
.itb-cookie-noties__btn,
.itb-cookie-noties button[type="button"]:first-of-type,
.blowing-equipment__button:hover,
.blowing-equipment__button_filled,
.newslistitem .newslisttxt .newslistlink,
.about-company__show-more,
button.about-company__show-more {
  background: var(--sp-btn) !important;
  background-color: var(--sp-btn) !important;
  background-image: none !important;
  color: var(--sp-btn-text) !important;
  border-color: var(--sp-btn) !important;
}

.button-popup:not(.sp-header__callback):not(.sp-header__drawer-callback):not(.sp-tabbar__btn):not(.sp-banner__btn):not(.sp-banner__btn--light):not(.sp-full-cycle__btn):hover,
a.button-popup:not(.sp-header__callback):not(.sp-header__drawer-callback):not(.sp-tabbar__btn):not(.sp-banner__btn):not(.sp-banner__btn--light):not(.sp-full-cycle__btn):hover,
.button-popup-header:hover,
.footer__button:hover,
.have-questions__button input[type="submit"]:hover,
.flex-fields .btn_submit:hover,
.request-offer__footer [type="submit"]:hover,
.sp-callback__btn:hover,
input.sp-callback__btn:hover,
.sp-cta-form button[type="submit"]:hover,
.sp-cta-form input[type="submit"]:hover,
.sp-cta-form__submit:hover,
.custom-mold-cta button[type="submit"]:hover,
.custom-mold-cta input[type="submit"]:hover,
.blowing-equipment__button_filled:hover,
.newslistitem .newslisttxt .newslistlink:hover,
button.about-company__show-more:hover {
  background: var(--sp-btn-hover) !important;
  background-color: var(--sp-btn-hover) !important;
  background-image: none !important;
  color: var(--sp-btn-text) !important;
}

/* --- Корзина: «В корзину» / «Оформить» (были зелёные/жёлтые) --- */
.profl.profbas,
.profl.proforder,
.bx_ordercart_order_pay_center a,
.bx_ordercart_order_pay_center a.checkout,
.bx_ordercart .bx_ordercart_order_pay_center .checkout,
.basket .ContBas .bx_button_container .profl,
.bx_button_container .profl {
  background: var(--sp-btn) !important;
  background-color: var(--sp-btn) !important;
  background-image: none !important;
  color: var(--sp-btn-text) !important;
  border-color: var(--sp-btn) !important;
  text-shadow: none !important;
}

.profl.profbas:hover,
.profl.proforder:hover,
.bx_ordercart_order_pay_center a:hover,
.bx_ordercart_order_pay_center a.checkout:hover,
.bx_ordercart .bx_ordercart_order_pay_center .checkout:hover {
  background: var(--sp-btn-hover) !important;
  background-color: var(--sp-btn-hover) !important;
  color: var(--sp-btn-text) !important;
}

/* --- Legacy «В корзину» в каталоге (градиент) --- */
.selectform button:not(.custom-btn):not(.sp-product-card__cart):not(.sp-product-card__compare):not(.sp-product-card__qty-minus):not(.sp-product-card__qty-plus),
.index-popular-catalog .butarr button,
.detail .item_info_section.detail_add_to_cart .selectform button,
.set-products .contentcatalog .catalog_item .selectform button {
  background: var(--sp-btn) !important;
  background-color: var(--sp-btn) !important;
  background-image: none !important;
  color: var(--sp-btn-text) !important;
  border: 0 !important;
}

.selectform button:not(.custom-btn):not(.sp-product-card__cart):not(.sp-product-card__compare):not(.sp-product-card__qty-minus):not(.sp-product-card__qty-plus):hover,
.index-popular-catalog .butarr button:hover,
.detail .item_info_section.detail_add_to_cart .selectform button:hover,
.set-products .contentcatalog .catalog_item .selectform button:hover {
  background: var(--sp-btn-hover) !important;
  background-color: var(--sp-btn-hover) !important;
  background-image: none !important;
  color: var(--sp-btn-text) !important;
}

/* --- Bitrix yellow/green theme buttons (если подключены) --- */
.bx_bt_button,
.bx_catalog_list_home .bx_bt_button,
.bx_catalog_tile_home_type_2 .bx_bt_button,
.bx_catalog_top_home .bx_bt_button,
.bx_slider_section .bx_bt_button,
.bx_item_detail .bx_bt_button {
  background: var(--sp-btn) !important;
  background-color: var(--sp-btn) !important;
  background-image: none !important;
  color: var(--sp-btn-text) !important;
  border-color: var(--sp-btn) !important;
  filter: none !important;
}

.bx_bt_button:hover,
.bx_catalog_list_home .bx_bt_button:hover,
.bx_catalog_tile_home_type_2 .bx_bt_button:hover,
.bx_catalog_top_home .bx_bt_button:hover,
.bx_slider_section .bx_bt_button:hover,
.bx_item_detail .bx_bt_button:hover {
  background: var(--sp-btn-hover) !important;
  background-color: var(--sp-btn-hover) !important;
  background-image: none !important;
  color: var(--sp-btn-text) !important;
}

/* --- Full-cycle / footer form (заполненные CTA) --- */
.sp-footer__form button[type="submit"],
.sp-footer__form input[type="submit"] {
  background: var(--sp-btn) !important;
  background-color: var(--sp-btn) !important;
  color: var(--sp-btn-text) !important;
}

/* --- Шапка / бургер / tabbar: без заливки (текстовые / иконки) --- */
.sp-header a.sp-header__callback,
.sp-header a.sp-header__callback.button-popup,
a.sp-header__callback.button-popup {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  color: #006ab5 !important;
  border: none !important;
  box-shadow: none !important;
}

.sp-header a.sp-header__callback:hover,
.sp-header a.sp-header__callback.button-popup:hover,
a.sp-header__callback.button-popup:hover {
  background: transparent !important;
  background-color: transparent !important;
  color: var(--Text-Color-text-links-hover, #003F6B) !important;
}

.sp-header__drawer-callback,
.sp-header__drawer-callback.button-popup,
a.sp-header__drawer-callback.button-popup {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  color: #127be9 !important;
  border: none !important;
  box-shadow: none !important;
}

.sp-header__drawer-callback:hover,
.sp-header__drawer-callback.button-popup:hover,
a.sp-header__drawer-callback.button-popup:hover {
  background: transparent !important;
  background-color: transparent !important;
  color: #127be9 !important;
}

.sp-tabbar__btn.button-popup,
a.sp-tabbar__btn.button-popup,
.sp-tabbar .button-popup {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  color: #6d717f !important;
  border: 0 !important;
  box-shadow: none !important;
}

.sp-tabbar__btn.button-popup:hover,
.sp-tabbar__btn.button-popup:active,
a.sp-tabbar__btn.button-popup:hover,
a.sp-tabbar__btn.button-popup:active {
  background: #f5f6f8 !important;
  background-color: #f5f6f8 !important;
  color: #6d717f !important;
}

/* Disabled — не перекрашиваем в бренд */
.button-popup:disabled,
.bx_ordercart_order_pay_center a#ORDER_CONFIRM_BUTTON.button-disabled,
.flex-fields .btn_submit.disabled,
.flex-fields .btn_submit.disabled:hover {
  background: #c5c9d1 !important;
  background-color: #c5c9d1 !important;
  color: #fff !important;
  cursor: not-allowed;
}
