.attipasb2b-consent-error {
  margin-top: 0.75rem;
}

html.attipasb2b-customer [aria-busy="true"] {
  cursor: wait !important;
}

/*
 * B2B checkout presentation.
 * These rules are active only when the server confirmed a B2B customer and
 * the dedicated checkout presentation option is enabled. They never alter
 * cart values; they only expose the net/gross values already supplied by
 * PrestaShop and The Checkout.
 */
html.attipasb2b-customer.attipasb2b-checkout-display .attipasb2b-tax-marker {
  font-size: 0.72em;
  font-weight: 600;
  margin-left: 0.2em;
  opacity: 0.78;
  white-space: nowrap;
}

html.attipasb2b-customer.attipasb2b-checkout-display .cart-total-tax-excluded,
html.attipasb2b-customer.attipasb2b-checkout-display .cart-total-tax,
html.attipasb2b-customer.attipasb2b-checkout-display .cart-total-tax-included {
  align-items: baseline;
}

html.attipasb2b-customer.attipasb2b-checkout-display .cart-total-tax-excluded > .label,
html.attipasb2b-customer.attipasb2b-checkout-display .cart-total-tax-included > .label {
  font-weight: 700;
}

html.attipasb2b-customer.attipasb2b-checkout-display .cart-total-tax-included {
  border-top: 1px solid rgba(0, 0, 0, 0.12);
  margin-top: 0.45rem;
  padding-top: 0.55rem;
}

html.attipasb2b-customer.attipasb2b-checkout-display .delivery-option-price > .carrier-price,
html.attipasb2b-customer.attipasb2b-checkout-display .delivery-option-price > .carrier-price-with-tax-formatted,
html.attipasb2b-customer.attipasb2b-checkout-display .delivery-option-price > .carrier-price-without-tax-formatted {
  display: none !important;
}

html.attipasb2b-customer.attipasb2b-checkout-display .attipasb2b-carrier-price {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  white-space: nowrap;
}

html.attipasb2b-customer.attipasb2b-checkout-display .attipasb2b-carrier-price-net {
  font-weight: 600;
}

html.attipasb2b-customer.attipasb2b-checkout-display .attipasb2b-carrier-price-gross {
  display: block;
  font-size: 0.72em;
  font-weight: 400;
  margin-top: 0.18rem;
  opacity: 0.72;
}

@media (max-width: 767px) {
  html.attipasb2b-customer.attipasb2b-checkout-display .attipasb2b-carrier-price {
    white-space: normal;
  }
}


/*
 * Optional B2B visibility controls introduced in 0.2.4.
 * The classes are added only after the server confirms the configured B2B
 * group and, in test mode, the configured test account.
 */
html.attipasb2b-customer.attipasb2b-hide-checkout-html-box-1 .tc-block-placeholder.thecheckout-html-box-1,
html.attipasb2b-customer.attipasb2b-hide-checkout-html-box-1 #thecheckout-html-box-1 {
  display: none !important;
}

html.attipasb2b-customer.attipasb2b-hide-promo-code #thecheckout-cart-summary .cart-voucher > p,
html.attipasb2b-customer.attipasb2b-hide-promo-code #thecheckout-cart-summary .cart-voucher > .promo-code {
  display: none !important;
}

html.attipasb2b-customer.attipasb2b-hide-promo-code #thecheckout-cart-summary .card-block.block-promo.attipasb2b-empty-promo-block {
  display: none !important;
}

html.attipasb2b-customer.attipasb2b-hide-product-delivery-info body#product .delivery-info,
html.attipasb2b-customer.attipasb2b-hide-product-delivery-info body.page-product .delivery-info {
  display: none !important;
}

/*
 * Promotion master switch and PrestaPros Top Banner control introduced in 0.2.5.
 * An equivalent server-rendered inline rule is emitted in displayHeader to
 * prevent a flash of retail-only content before the bottom JavaScript loads.
 */
html.attipasb2b-customer.attipasb2b-hide-top-banner #header .header-banner,
html.attipasb2b-customer.attipasb2b-hide-top-banner #header .header-banner-container,
html.attipasb2b-customer.attipasb2b-hide-top-banner .header-banner-container,
html.attipasb2b-customer.attipasb2b-hide-top-banner .header-banner-bottom,
.attipasb2b-hidden-top-banner-wrapper,
.attipasb2b-hidden-top-banner {
  display: none !important;
}

/*
 * CMS audience controls introduced in 0.2.6.
 * Direct URL access is enforced server-side. These classes only remove menu
 * and footer links after the audience-specific configuration is confirmed.
 */
.attipasb2b-cms-link-hidden,
li.attipasb2b-cms-link-hidden {
  display: none !important;
}

.attipasb2b-b2b-terms-item {
  list-style: none;
}


/*
 * Retail discount badges for B2B — 0.2.8.
 * Server-side presenter sanitization is primary; these selectors are a
 * Warehouse-compatible visual fallback. Non-price flags such as "Nowy" are
 * intentionally not hidden.
 */
html.attipasb2b-customer.attipasb2b-hide-retail-discount-flags .product-flags .product-flag.on-sale,
html.attipasb2b-customer.attipasb2b-hide-retail-discount-flags .product-flags .product-flag.on_sale,
html.attipasb2b-customer.attipasb2b-hide-retail-discount-flags .product-flags .product-flag.sale,
html.attipasb2b-customer.attipasb2b-hide-retail-discount-flags .product-flags .product-flag.discount,
html.attipasb2b-customer.attipasb2b-hide-retail-discount-flags .product-flags .product-flag.discount-percentage,
html.attipasb2b-customer.attipasb2b-hide-retail-discount-flags .product-flags .product-flag.discount-amount,
html.attipasb2b-customer.attipasb2b-hide-retail-discount-flags .product-miniature .product-flag.on-sale,
html.attipasb2b-customer.attipasb2b-hide-retail-discount-flags .product-miniature .product-flag.discount {
  display: none !important;
}

/*
 * Optional visual identity for the wholesale area — 0.2.8.
 * Colors are supplied as CSS variables by displayHeader only for a server-
 * confirmed B2B customer. Theme files are not modified.
 */
html.attipasb2b-customer.attipasb2b-visual-enabled #header .header-nav {
  background-color: var(--attipasb2b-top-color) !important;
}

html.attipasb2b-customer.attipasb2b-visual-enabled #footer .footer-container,
html.attipasb2b-customer.attipasb2b-visual-enabled footer .footer-container {
  background-color: var(--attipasb2b-footer-color) !important;
}

/*
 * Warehouse visual integration hotfix — 0.2.8.1.
 * The production Warehouse header uses background-1.png on
 * #desktop-header .header-top::before for the upper wave. front.js captures
 * that computed image before enabling the B2B visual class and exposes it as
 * --attipasb2b-wave-mask. This recolors the wave without editing theme files.
 */
html.attipasb2b-customer.attipasb2b-visual-enabled
#desktop-header .header-top.attipasb2b-wave-mask-ready::before {
  background-color: var(--attipasb2b-top-color) !important;
  background-image: none !important;
  -webkit-mask-image: var(--attipasb2b-wave-mask);
  mask-image: var(--attipasb2b-wave-mask);
  -webkit-mask-position: 0 0;
  mask-position: 0 0;
  -webkit-mask-repeat: repeat;
  mask-repeat: repeat;
  -webkit-mask-size: auto;
  mask-size: auto;
}

/* Desktop Warehouse style 2: place STREFA B2B immediately after the account. */
#desktop-header .attipasb2b-user-host {
  position: relative !important;
}

#desktop-header .attipasb2b-zone-label-desktop {
  left: calc(100% + 8px);
  margin-left: 0;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
}

/* Mobile Warehouse style 1: compact B2B badge on the account icon. */
#mobile-header .col-mobile-btn-account {
  position: relative !important;
}

#mobile-header .attipasb2b-zone-label-mobile {
  font-size: 9px;
  margin-left: 0;
  min-height: 0;
  padding: 4px 6px;
  position: absolute;
  right: -3px;
  top: -3px;
  z-index: 50;
}


.attipasb2b-zone-label {
  align-items: center;
  background: var(--attipasb2b-footer-color, #176B87);
  border-radius: 999px;
  box-sizing: border-box;
  color: #fff;
  display: inline-flex;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1;
  margin-left: 10px;
  min-height: 24px;
  padding: 6px 10px;
  text-transform: uppercase;
  vertical-align: middle;
  white-space: nowrap;
}

.attipasb2b-zone-label-short {
  display: none;
}

@media (max-width: 767px) {
  .attipasb2b-zone-label {
    font-size: 10px;
    margin-left: 5px;
    min-height: 20px;
    padding: 5px 7px;
  }

  .attipasb2b-zone-label-full {
    display: none;
  }

  .attipasb2b-zone-label-short {
    display: inline;
  }
}

/*
 * B2B visual polish and account simplification — 0.2.8.2.
 * The original Warehouse profile icon background SVG is recolored by front.js
 * so the white foreground glyph remains perfectly aligned. Counters use the
 * same configured top color. Hidden account links affect B2B UI only.
 */
html.attipasb2b-customer .attipasb2b-account-link-hidden {
  display: none !important;
}

html.attipasb2b-customer.attipasb2b-visual-enabled #header .iqitwishlist-nb,
html.attipasb2b-customer.attipasb2b-visual-enabled #header .cart-products-count,
html.attipasb2b-customer.attipasb2b-visual-enabled #header .cart-products-count-btn,
html.attipasb2b-customer.attipasb2b-visual-enabled #header #mobile-cart-products-count {
  background-color: var(--attipasb2b-top-color, #D8EEF1) !important;
  color: #fff !important;
}


/* Bestseller B2C — 0.3.0. Visible only in the active B2B visual context. */
html.attipasb2b-customer .product-flags .bestseller-b2c,
html.attipasb2b-customer .product-flag.bestseller-b2c,
html.attipasb2b-customer .product-flags [class~="bestseller-b2c"] {
  background-color: var(--attipasb2b-footer-color, #017E7E) !important;
  color: #fff !important;
}

/*
 * B2B cart composition summary — 0.3.1.
 * Injected only for a server-confirmed B2B customer on The Checkout when the
 * dedicated feature is enabled. The block is display-only and never changes
 * cart quantities or prices.
 */
html.attipasb2b-customer #attipasb2b-cart-composition.attipasb2b-cart-composition {
  background: rgba(12, 167, 166, 0.06);
  border: 1px solid rgba(12, 167, 166, 0.28);
  border-radius: 6px;
  margin: 0.75rem 0;
  padding: 0.75rem 0.9rem;
}

html.attipasb2b-customer .attipasb2b-cart-composition-title {
  color: var(--attipasb2b-footer-color, #017E7E);
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 0.45rem;
}

html.attipasb2b-customer .attipasb2b-cart-composition-row {
  align-items: flex-start;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  padding: 0.22rem 0;
}

html.attipasb2b-customer .attipasb2b-cart-composition-label {
  font-weight: 500;
}

html.attipasb2b-customer .attipasb2b-cart-composition-values {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  text-align: right;
}

html.attipasb2b-customer .attipasb2b-cart-composition-total {
  font-weight: 700;
  white-space: nowrap;
}

html.attipasb2b-customer .attipasb2b-cart-composition-split {
  font-size: 0.72rem;
  margin-top: 0.12rem;
  opacity: 0.72;
  white-space: nowrap;
}

@media (max-width: 767px) {
  html.attipasb2b-customer #attipasb2b-cart-composition.attipasb2b-cart-composition {
    margin: 0.65rem 0;
    padding: 0.7rem 0.8rem;
  }

  html.attipasb2b-customer .attipasb2b-cart-composition-row {
    gap: 0.5rem;
  }
}

/*
 * B2B clear-cart action — 0.3.5.
 * Independent from the optional composition counter so it remains available
 * during performance A/B tests with the counter disabled.
 */
html.attipasb2b-customer #attipasb2b-clear-cart-action.attipasb2b-clear-cart-action {
  display: flex;
  justify-content: flex-end;
  margin: 0.25rem 0 0.8rem;
}

html.attipasb2b-customer .attipasb2b-clear-cart-button {
  background: transparent;
  border: 1px solid #dc5b66;
  border-radius: 4px;
  color: #b83d49;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
  min-height: 34px;
  padding: 0.45rem 0.75rem;
}

html.attipasb2b-customer .attipasb2b-clear-cart-button:hover,
html.attipasb2b-customer .attipasb2b-clear-cart-button:focus {
  background: rgba(220, 91, 102, 0.08);
  color: #9f2e39;
  outline: none;
}

html.attipasb2b-customer .attipasb2b-clear-cart-button:disabled,
html.attipasb2b-customer .attipasb2b-clear-cart-button.is-loading {
  cursor: wait;
  opacity: 0.58;
}

@media (max-width: 767px) {
  html.attipasb2b-customer #attipasb2b-clear-cart-action.attipasb2b-clear-cart-action {
    justify-content: stretch;
  }

  html.attipasb2b-customer .attipasb2b-clear-cart-button {
    min-height: 44px;
    width: 100%;
  }
}

/*
 * Dedicated B2B navigation — 0.3.6.
 * front-036.js marks the retail E-sklep top-level tab only after the server
 * confirmed the configured B2B customer. The eight custom B2B submenu links
 * are marked explicitly, so typography does not depend on IQIT DOM classes.
 */
html.attipasb2b-customer .attipasb2b-retail-menu-hidden {
  display: none !important;
}

html.attipasb2b-customer .attipasb2b-b2b-menu-link {
  display: block !important;
  font-size: 16px !important;
  line-height: 1.35 !important;
  padding-top: 7px !important;
  padding-bottom: 7px !important;
}

/* 0.3.7 — B2B discount + suggested retail price reference */
/* 0.3.12 — explicit net marker beside B2B purchase prices only. */
.attipasb2b-customer .attipasb2b-net-label {
  display: inline-block;
  font-size: .82em;
  font-weight: 500;
  margin-left: .24em;
  vertical-align: baseline;
  white-space: nowrap;
  text-transform: lowercase;
}

.attipasb2b-customer .attipasb2b-product-price-info {
  margin-top: 5px;
  color: #333;
  font-size: 12.5px;
  line-height: 1.38;
}

.attipasb2b-customer .attipasb2b-product-price-info > div + div {
  margin-top: 2px;
}

.attipasb2b-customer .attipasb2b-product-price-info strong {
  font-weight: 700;
}


.attipasb2b-customer .product-miniature .attipasb2b-product-price-info {
  min-height: 38px;
}


/* 0.3.11 — legacy selector retained harmlessly; JS no longer marks product-page price nodes. */
html.attipasb2b-customer [data-attipasb2b-hidden-omnibus="1"] {
  display: none !important;
}
