/* Skladex theme overrides */

/* Closed burger-menu must not peek under the header (margin-top + translateY(-100%) leak). */
body:not(.nav-is-toggled) .mobile_menu {
  visibility: hidden !important;
  pointer-events: none !important;
}

.nav-is-toggled .mobile_menu {
  visibility: visible !important;
  pointer-events: auto !important;
}

/* Floating labels: Chrome autofill fills without focus/blur events */
@keyframes sx-on-autofill-start {
  from { opacity: 1; }
  to { opacity: 1; }
}

.form__placeholder--focus:-webkit-autofill {
  animation-name: sx-on-autofill-start;
  animation-duration: 0.01s;
}

.form__placeholder--focus:-webkit-autofill + .form__placeholder,
.form__placeholder--focus:autofill + .form__placeholder,
.form__group:has(.form__placeholder--focus:-webkit-autofill) .form__placeholder,
.form__group:has(.form__placeholder--focus:autofill) .form__placeholder,
.form__group.filled .form__placeholder {
  font-size: 11px;
  font-weight: 400;
  font-style: normal;
  background: #fff;
  padding: 0 5px;
  top: -5px;
  cursor: default;
  color: #939393;
}

/* Cabinet shell: no store footer / breadcrumbs chrome */
body.sx-cabinet-shell .footer,
body.sx-cabinet-shell .modile_breadcrumb,
body.sx-cabinet-shell .breadcrumbs {
  display: none !important;
}

body.sx-cabinet-shell .main {
  flex: 1 0 auto;
}

/* Кабинеты: витринные кнопки шапки / кабинетная кнопка не нужны внутри shell */
body.sx-cabinet-shell .fn_search_toggle,
body.sx-cabinet-shell #fn_search,
body.sx-cabinet-shell #wishlist,
body.sx-cabinet-shell #comparison,
body.sx-cabinet-shell #cart_informer,
body.sx-cabinet-shell .header-contact,
body.sx-cabinet-shell .sx-header-login,
body.sx-supplier-shell .fn_search_toggle,
body.sx-supplier-shell #fn_search,
body.sx-supplier-shell #wishlist,
body.sx-supplier-shell #comparison,
body.sx-supplier-shell #cart_informer,
body.sx-supplier-shell .header-contact,
body.sx-supplier-shell .sx-header-login {
  display: none !important;
}

/* Сравнение товаров временно скрыто по всему магазину */
#comparison,
.fn_comparison,
.comparison_button,
.details_boxed__comparison,
.product_page__compare,
.details_boxed__other.compare,
#fn_compare_confirm {
  display: none !important;
}

/* Кнопка входа / кабинета в шапке (мобилка) */
.sx-header-login {
  display: none;
  flex: 0 0 auto;
  min-width: auto !important;
  height: 36px;
  padding: 0 12px !important;
  margin: 0 6px 0 0 !important;
  border-radius: 8px;
  background: #111827;
  color: #fff !important;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none !important;
  white-space: nowrap;
}

.sx-header-login:hover,
.sx-header-login:focus {
  background: #1f2937;
  color: #fff !important;
  text-decoration: none !important;
}

@media (max-width: 991px) {
  .sx-header-login {
    display: inline-flex;
  }

  /* дубль «Войти» из user_informer в header__top */
  .header__top #account {
    display: none !important;
  }

  .header__center .f_row {
    align-items: center !important;
  }

  .sx-header-login.sx-header-cabinet {
    height: 34px;
    padding: 0 10px !important;
    margin: 0 4px 0 0 !important;
    font-size: 12px;
    max-width: 42vw;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (max-width: 420px) {
  .sx-header-login.sx-header-cabinet span {
    font-size: 0;
  }
  .sx-header-login.sx-header-cabinet span::after {
    content: 'Кабінет';
    font-size: 12px;
    font-weight: 600;
  }
}

/* Thank-you page CTA */
.sx-order-success-actions {
  margin: 14px 0 0;
}
.sx-order-open-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 8px;
  background: #111827;
  color: #fff !important;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none !important;
}
.sx-order-open-btn:hover,
.sx-order-open-btn:focus {
  background: #1f2937;
  color: #fff !important;
  text-decoration: none !important;
}

@media (max-width: 991px) {
  /* Header: burger was flex 100px and left a dead gap on the right */
  .header,
  .header__center,
  .header__top,
  .header__bottom {
    width: 100% !important;
    max-width: 100% !important;
  }

  .header__center .container,
  .header__top .container {
    width: 100%;
    max-width: 100%;
    padding-left: 12px;
    padding-right: 10px;
  }

  .header__center .f_row {
    width: 100%;
  }

  .header_informers {
    flex: 0 0 auto;
    margin-left: auto;
    gap: 0;
  }

  .header_informers__item {
    margin: 0 4px !important;
    min-width: 28px;
  }

  .header_informers__item:last-child,
  #fn_mobile_menu.menu_switcher {
    margin-right: 0 !important;
  }

  #fn_mobile_menu.menu_switcher {
    flex: 0 0 auto !important;
    max-width: none !important;
    width: auto !important;
    margin: 0 !important;
  }

  #fn_mobile_menu .burder_button {
    --burder-button-size: 40px;
    width: 40px;
    height: 40px;
    background: linear-gradient(#111827, #111827) center / 20px 2px no-repeat;
    overflow: visible;
  }

  #fn_mobile_menu .burder_button:before,
  #fn_mobile_menu .burder_button:after {
    left: 50%;
    top: 50%;
    width: 20px;
    height: 2px;
    transform-origin: center;
    background: #111827;
  }

  #fn_mobile_menu .burder_button:before {
    transform: translate(-50%, -7px);
  }

  #fn_mobile_menu .burder_button:after {
    transform: translate(-50%, 7px);
  }

  .nav-is-toggled #fn_mobile_menu .burder_button,
  #fn_mobile_menu .burder_button.is-open {
    background-size: 0 2px;
  }

  .nav-is-toggled #fn_mobile_menu .burder_button:before,
  #fn_mobile_menu .burder_button.is-open:before {
    transform: translate(-50%, -50%) rotate(45deg);
  }

  .nav-is-toggled #fn_mobile_menu .burder_button:after,
  #fn_mobile_menu .burder_button.is-open:after {
    transform: translate(-50%, -50%) rotate(-45deg);
  }

  body.sx-cabinet-shell .main > .container {
    padding-left: 12px;
    padding-right: 12px;
    max-width: 100%;
  }

  body.sx-cabinet-shell .page_information:has(.sx-panel) .block,
  body.sx-cabinet-shell .page_information.supplyex-cabinet .block {
    margin-left: 0;
    margin-right: 0;
  }
}
