/* Shared controls for the Severmax storefront and standalone pages. */
:root {
  --smx-button-color: var(--smx-red, #ef2024);
  --smx-button-hover: #d8171b;
  --smx-button-active: #b91318;
  --smx-button-radius: 8px;
}

#main.site_s1 :where(
  .wrapper1, footer, #footer, .inline-search-block, .title-search-result,
  .jqmWindow, .basket_fly, .popup-window, .fancybox-container
) :is(
  button, input:is([type="submit"], [type="reset"], [type="button"]),
  [role="button"], .btn, .smx-call, .smx-category-card__action,
  .smx-product-card__details, .sort_display .sort_btn, .ajax_load_btn,
  .counter_block :is(.minus, .plus), .basket-coupon-block-coupon-btn,
  [data-entity="basket-item-quantity-minus"],
  [data-entity="basket-item-quantity-plus"], [data-entity="basket-item-delete"]
):not(:where(
  .btn-link, [role="option"], [role="tab"], ymaps,
  #bx-panel *, .bx-core-adm-dialog *, .bx-admin-prefix *
)),
#main.site_s1 > #scrollToTop,
.smx-standalone-page .download-button {
  --smx-button-fill: var(--smx-button-color);
  background-color: var(--smx-button-fill) !important;
  border-color: var(--smx-button-fill) !important;
  border-radius: var(--smx-button-radius) !important;
  color: #fff !important;

  @media (hover: hover) {
    &:hover:not(:where(:disabled, [aria-disabled="true"], .disabled)) {
      --smx-button-fill: var(--smx-button-hover);
    }
  }

  &:active:not(:where(:disabled, [aria-disabled="true"], .disabled)) {
    --smx-button-fill: var(--smx-button-active);
  }

  &:focus-visible {
    outline: 2px solid var(--smx-button-active) !important;
    outline-offset: 2px;
  }

  &:where(:disabled, [aria-disabled="true"], .disabled) {
    opacity: .55;
    cursor: not-allowed;
  }
}

/* Open and selected controls keep a visible state within the same palette. */
#main.site_s1 .sort_display .sort_btn.current,
#main.site_s1 #severmax-ozon-checkout button[aria-pressed="true"],
#main.site_s1 .smx-select.is-open .smx-select__toggle {
  box-shadow: inset 0 0 0 2px #fff, 0 0 0 1px var(--smx-button-active);
}

#main.site_s1 .smx-select.is-invalid .smx-select__toggle {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--smx-button-active);
}

#main.site_s1 .smx-select__toggle::after {
  border-color: #fff;
}

#main.site_s1 .sort_display .sort_btn i {
  filter: brightness(0) invert(1);
}

#main.site_s1 .ajax_load_btn .more_text_ajax,
#main.site_s1 .smx-category-card__action > span,
#main.site_s1 .smx-product-card__details > span {
  color: inherit;
}

#main.site_s1 .ajax_load_btn .more_text_ajax::before,
#main.site_s1 .ajax_load_btn .more_text_ajax::after,
#main.site_s1 .basket-item-amount-btn-minus::after,
#main.site_s1 .basket-item-amount-btn-plus::before,
#main.site_s1 .basket-item-amount-btn-plus::after,
#main.site_s1 .basket-item-actions-remove::before,
#main.site_s1 .basket-item-actions-remove::after {
  background-color: #fff;
}

#main.site_s1 .smx-category-card__action,
#main.site_s1 .smx-product-card__details {
  min-height: 40px;
  padding: 9px 12px;
  text-decoration: none;
}

#main.site_s1 .sm-quote-help .sm-quote-action {
  padding: 4px 8px;
  text-decoration: none;
}

#main.site_s1 #mobileheader .top-btn.inline-search-show {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}

#main.site_s1 .top-btn.inline-search-show svg {
  filter: brightness(0) invert(1);
}

#main.site_s1 .subscribe-form input.send_btn {
  background-image:
    linear-gradient(45deg, transparent 42%, #fff 43% 57%, transparent 58%),
    linear-gradient(135deg, transparent 42%, #fff 43% 57%, transparent 58%);
  background-position: center calc(50% - 3px), center calc(50% + 3px);
  background-size: 7px 7px;
  background-repeat: no-repeat;
  opacity: 1;
}
