/* Woocommerce checkout country and zipcode correct size */
@media (min-width: 768px) {
  #billing_country_field,
  #billing_postcode_field {
    -ms-flex: 0 0 50% !important;
    flex: 0 0 50% !important;
    max-width: 50% !important;
  }

  #billing_state_field {
    -ms-flex: 0 0 100% !important;
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }
}

/* Botiga header search icon visually align with other icons */
.bhfb-main_header_row .bhfb-component-search {
  margin-bottom: 3px;
}

/* Woocommerce archive description read more & read less styles */
.subz-woo-term-description {
  position: relative;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.subz-woo-term-description.expanded
  .subz-woo-term-description-content
  p:last-child {
  margin-bottom: 0px !important;
}

.subz-woo-term-description.collapsed {
  max-height: 105px;
}

.subz-woo-term-description.expanded {
  max-height: 40000px;
}

.subz-woo-term-description-content {
  margin: 0;
  padding: 0;
}

.subz-woo-term-description.collapsed::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50px;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0),
    var(--wp--preset--color--color-5)
  );
  pointer-events: none;
}

.subz-toggle-read-more-button {
  background: none;
  border: none;
  padding: 0;
  margin-top: 10px;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
  color: var(--bt-color-link-default) !important;
}

.subz-toggle-read-more-button:hover {
  color: var(--bt-color-link-hover) !important;
}

.subz-woo-term-description.collapsed
  + .subz-toggle-read-more-button
  .subz-toggle-read-less-text,
.subz-woo-term-description.expanded
  + .subz-toggle-read-more-button
  .subz-toggle-read-more-text {
  display: none;
}

@media (max-width: 990px) {
  .subz-toggle-read-more-button {
    margin-bottom: 36px;
  }
}

/* Botiga filter titles smaller and less margin */
.btsf-filter-wrapper .btsf-filter h4 {
  font-size: var(--bt-font-size-h5, 18px) !important;
  margin-bottom: 0px !important;
}

/* Botiga filter mobile style */
@media (max-width: 990px) {
  /* 1. The container positions the element, but has NO size/style itself */
  .botiga-sorting-left-inner {
    position: fixed !important;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
    width: max-content;
    max-width: 90%;
  }

  /* 2. The clickable link now gets all the visual styling and size */
  .botiga-sorting-left-inner .sidebar-open {
    display: flex;
    /* Keeps icon and text aligned */
    align-items: center;
    justify-content: center;
    background-color: var(--wp--preset--color--color-5);
    border: 1px solid #919191;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    border-radius: 4px;
    padding: 12px 30px;
    text-decoration: none;
    color: inherit;
    width: 100%;
  }

  .botiga-sorting-left-inner .sidebar-open:focus:not(:focus-visible) {
    outline: none;
  }
}

/* Woocommerce product archive, product card padding */
ul.wc-block-grid__products li.wc-block-grid__product,
ul.wc-block-grid__products li.product,
ul.products li.wc-block-grid__product,
ul.products li.product {
  padding: 12px !important;
}

/* Woocommerce cart hide update cart button */
.woocommerce-cart .woocommerce-cart-form .actions .button {
  display: none !important;
}

/* Woocommerce cart hide coupon code input */
.woocommerce-cart-form__contents .actions .coupon {
  display: none !important;
}

/* Woocommerce cart hide shipping calculations */
.woocommerce-cart .cart_totals .woocommerce-shipping-destination {
  display: none !important;
}

/* Woocommerce cart hide shipping methods */
.woocommerce-cart .cart_totals .woocommerce-shipping-methods {
  text-align: right !important;
  margin-bottom: 0px !important;
}

/** Search in header container **/
.bhfb-main_header_row
  .header-search-form-always-visible
  .bhfb-component-search {
  margin-bottom: 0px !important;
  width: 100% !important;
}

/** Search in header element **/
.header-search-form .header-search-form-always-visible {
  width: 100% !important;
}

/** Menu main row shift grid on small devices so logo doesn't get squashed **/
/* @media (max-width: 500px) {
    .bhfb-row.bhfb-cols-layout-equal-tablet.bhfb-cols-3 {
        grid-template-columns: 1fr 2fr 2fr;
    }
} */

/** Off canvas menu on mobile set the correct styles **/
@media (max-width: 1024px) {
  .bhfb.bhfb-mobile_offcanvas .main-navigation a.botiga-dropdown-link {
    color: var(--wp--preset--color--color-3) !important;
  }

  .bhfb.bhfb-mobile_offcanvas .main-navigation a.botiga-dropdown-link:hover {
    color: var(--wp--preset--color--color-1) !important;
  }

  .bhfb .main-navigation a.botiga-dropdown-link + .dropdown-symbol svg {
    fill: var(--wp--preset--color--color-3) !important;
  }

  .bhfb .sub-menu.botiga-dropdown-ul,
  .bhfb .sub-menu.botiga-dropdown-ul li.botiga-dropdown-li {
    background-color: var(--wp--preset--color--color-4) !important;
  }
}

/** Single product page add to art wrapper fix way to much space  **/
@media (max-width: 1024px) {
  .product-gallery-summary .botiga-single-addtocart-wrapper {
    gap: 12px !important;
  }

  .product-gallery-summary .botiga-single-addtocart-wrapper .quantity {
    margin-bottom: 0px !important;
  }
}

/** Menu main row logo center on mobile  **/
@media (max-width: 1024px) {
  .custom-logo-link {
    display: block !important;
  }
}

/** Menu main row search results center **/
.botiga-ajax-search .botiga-ajax-search__wrapper {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  border-radius: 4px;
}

/** Woocommerce account tabs logout link color change **/
.woocommerce-account.logged-in
  .entry-content
  > .woocommerce
  .woocommerce-MyAccount-navigation
  ul
  li:last-child
  a {
  color: #dc2626;
}

.woocommerce-account.logged-in
  .entry-content
  > .woocommerce
  .woocommerce-MyAccount-navigation
  ul
  li:last-child
  a:hover {
  color: #f87171;
}

/** Woocommerce account order tab fixed button layout for empty state **/
.woocommerce-MyAccount-content .woocommerce-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

@media (max-width: 991px) {
  .woocommerce-MyAccount-content .woocommerce-info {
    flex-direction: column;
    align-items: start;
  }
}

.woocommerce-MyAccount-content .woocommerce-info .woocommerce-Button {
  margin-inline-start: 0px;
}

/** Woocommerce mobile sidebar filter overlay always full width **/
@media (max-width: 990px) {
  .sidebar-slide + .widget-area {
    width: 100% !important;
    max-width: 100% !important;
  }

  .sidebar-slide + .widget-area .widget {
    padding-top: 10px !important;
    padding-bottom: 105px !important;
  }
}

/** Woocommerce sidebar hide filter "view product" button **/
@media (min-width: 991px) {
  .botiga-sorting-left-inner {
    display: none;
  }
}

/** Fluentforms success message styling **/
.fluentform .ff-message-success {
  box-shadow: none !important;
  border-radius: 4px;
  margin-top: 0px !important;
}

.fluentform .ff-message-success p {
  margin-bottom: 0px !important;
}

/** Fluentforms form focus border color **/
.fluentform .ff-btn-submit {
  border-width: 0 !important;
}

.fluentfor .ff-default .ff-el-form-control:focus,
.ff-default .ff-el-form-control:focus-visible {
  border-color: var(--bt-color-link-default) !important;
}

/** Hide block on lost-password page **/
.woocommerce-lost-password .only-show-on-my-account-parent {
  display: none;
}

/** Lost password make fields full width **/
.woocommerce-lost-password input[type="text"],
.woocommerce-account .password-input .woocommerce-Input {
  width: 100% !important;
}

/** Lost password - layout and spacing **/
.woocommerce-lost-password .woocommerce-message,
.woocommerce-lost-password p {
  margin-left: auto !important;
  margin-right: auto !important;
  margin-bottom: 24px !important;
  max-width: 100% !important;
  text-align: left !important;
}

.woocommerce-lost-password .woocommerce-ResetPassword {
  text-align: left !important;
}

/** Lost password spacing - exclude button row **/
.woocommerce-ResetPassword .woocommerce-form-row--first,
.woocommerce-ResetPassword .woocommerce-form-row--last {
  margin-bottom: 24px !important;
}

/* Remove bottom margin from button row */
.woocommerce-ResetPassword p.woocommerce-form-row:last-of-type {
  margin-bottom: 0 !important;
}

/* Add turnstile bottom margin */
.woocommerce-ResetPassword .cf-turnstile {
  margin-bottom: 16px !important;
}

/** Lost password hide turnstile br **/
.woocommerce-lost-password .cf-turnstile-br {
  display: none !important;
}

/** Login page remove margin from last p **/
.woocommerce-form-login p:last-child {
  margin-bottom: 0px !important;
}

/** Account and reset password forms styling **/
.woocommerce-account .woocommerce-form-login,
.woocommerce-account .woocommerce-form-register,
.woocommerce-ResetPassword {
  border: 1px solid #ebebeb !important;
  padding: 32px !important;
  border-radius: 4px !important;
}

/** Edit account - Password change fieldset padding **/
.woocommerce-EditAccountForm fieldset legend {
  padding: 0px 12px;
  margin-left: -12px;
}

/* Woocommerce tabs additional information remove extra padding */
#tab-additional_information
  tr:first-child
  .woocommerce-product-attributes-item__label,
#tab-additional_information
  tr:first-child
  .woocommerce-product-attributes-item__value {
  padding-top: 0 !important;
}

#tab-additional_information
  .shop_attributes
  .woocommerce-product-attributes-item__label {
  padding-left: 0 !important;
}

/* Woocommerce tabs remove different background color */
table.woocommerce-product-attributes tr:nth-child(2n) {
  background-color: transparent !important;
}

/* Botiga checkout header (Distraction Free Checkout) correct padding and size */
@media (max-width: 991px) {
  .woocommerce-checkout .bhfb-header .bhfb-component-logo {
    min-height: 50px;
    padding: 0px 0px !important;
    margin: 0px 0px !important;
  }
}

@media (min-width: 992px) {
  .woocommerce-checkout .bhfb-header .bhfb-component-logo {
    min-height: 60px;
    padding: 0px 0px !important;
    margin: 0.5px 0 0px 0px !important;
  }
}

/* Apply border radius to all Botiga & WooCommerce stuff */
.woocommerce table,
.woocommerce form,
.woocommerce .cart_totals,
.woocommerce #order_review,
.woocommerce #payment,
.woocommerce-page table,
.woocommerce-page form,
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    border-radius: 5px;
}
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="range"],
input[type="date"],
input[type="month"],
input[type="week"],
input[type="time"],
input[type="datetime"],
input[type="datetime-local"],
input[type="color"],
textarea,
select,
.wp-block-search .wp-block-search__input,
.wc-block-product-search .wc-block-product-search__field,
.woocommerce .select2-container .select2-selection--single,
.woocommerce-page .select2-container .select2-selection--single {
  border-radius: 5px !important;
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="range"]:focus,
input[type="date"]:focus,
input[type="month"]:focus,
input[type="week"]:focus,
input[type="time"]:focus,
input[type="datetime"]:focus,
input[type="datetime-local"]:focus,
input[type="color"]:focus,
textarea:focus,
select:focus,
.wp-block-search .wp-block-search__input:focus,
.wc-block-product-search .wc-block-product-search__field:focus,
.woocommerce .select2-container .select2-selection--single:focus,
.woocommerce-page .select2-container .select2-selection--single:focus {
  -webkit-box-shadow: 0 0 0 0px !important;
  box-shadow: 0 0 0 0px !important;
}

/* Bortiga Breadcrumbs wrap to next line when too long */
.botiga-sc-breadcrumbs ul {
  display: flex;
  flex-wrap: wrap;
}

.botiga-sc-breadcrumbs li {
  white-space: normal;
  word-wrap: break-word;
}

/* Cart totals move tax info to next line */
.cart_totals .order-total td small.includes_tax {
  display: block;
  font-size: 0.8em;
}
.cart_totals .order-total td small.includes_tax .woocommerce-Price-amount {
  font-size: 1em;
  font-weight: bold;
}

/* Woocommerce notice stack text and button on mobile */
@media (max-width: 767px) {
    .woocommerce-message {
        display: block !important;
    }
    
    .woocommerce-message a.button {
        display: block !important;
        float: none !important;
        margin: 10px 0 0 0 !important;
        width: auto;
    }
}

/* Woocommerce notice change focus color */
.woocommerce-message:focus {
    outline: 0px solid var(--wp--preset--color--color-1);
    outline-offset: 0px !important;
}

/* Woocommerce page header remove padding bottom */
.woocommerce-page-header {
  padding-bottom: 24px !important;
}

.woocommerce-breadcrumb {
  display: none;
}