.bf-shipping-location {
  clear: both;
  margin: .85rem 0 .25rem;
  padding: 1rem;
  border: 1px solid #e1e1e1;
  border-radius: 4px;
  background: #fff;
}

.bf-shipping-location-row > td {
  padding: 0 !important;
  border-top: 0 !important;
}

.bf-shipping-location-row[hidden] {
  display: none !important;
}

/* Office and locker deliveries use the BalkanFulfill selectors immediately
   below the courier methods. Keep the native fields in the form for order
   submission, but do not show duplicate address inputs to the customer. */
.bf-native-address-hidden {
  display: none !important;
}

/* The checkout is BG-only. Country and province stay in the form for zone and
   order data, but are populated automatically instead of shown as duplicate
   native dropdowns beside the BalkanFulfill city search. */
#billing_country_field,
#shipping_country_field,
#billing_state_field,
#shipping_state_field {
  display: none !important;
}

/* Flatsome uses floating labels that overlap SelectWoo's rendered city value.
   The search placeholder already explains the field, so hide only that label
   and make the enhanced control match the surrounding checkout inputs. */
#billing_city_field label[for="billing_city"],
#shipping_city_field label[for="shipping_city"] {
  display: none !important;
}

#billing_city_field .woocommerce-input-wrapper,
#shipping_city_field .woocommerce-input-wrapper,
#billing_city_field .select2-container,
#shipping_city_field .select2-container {
  display: block !important;
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
}

#billing_city_field .select2-selection--single,
#shipping_city_field .select2-selection--single {
  box-sizing: border-box !important;
  height: 38px !important;
  min-height: 38px !important;
  border: 1px solid #ddd !important;
  border-radius: 0 !important;
  background: #fff !important;
}

#billing_city_field .select2-selection--single .select2-selection__rendered,
#shipping_city_field .select2-selection--single .select2-selection__rendered {
  box-sizing: border-box !important;
  height: 36px !important;
  padding: 0 34px 0 10px !important;
  line-height: 36px !important;
  text-align: left !important;
}

#billing_city_field .select2-selection--single .select2-selection__arrow,
#shipping_city_field .select2-selection--single .select2-selection__arrow {
  height: 36px !important;
}

/* Editable cart items inside the classic WooCommerce checkout. The product
   cell becomes a two-column mini card: a large image on the left, while the
   product name and quantity controls stay together on the right. */
.woocommerce-checkout-review-order-table
  tbody
  tr.cart_item
  > td.product-name:has(.bf-checkout-product) {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-items: center;
}

.bf-checkout-product {
  display: contents;
}

.bf-checkout-product-thumbnail {
  box-sizing: border-box;
  display: inline-flex;
  grid-column: 1;
  grid-row: 1 / span 2;
  width: 84px;
  height: 84px;
  overflow: hidden;
  align-items: center;
  justify-content: center;
  border: 1px solid #e1e5e2;
  border-radius: 7px;
  background: #fff;
}

.bf-checkout-product-image {
  display: block !important;
  width: 84px !important;
  height: 84px !important;
  max-width: none !important;
  margin: 0 !important;
  object-fit: contain;
}

.bf-checkout-product-name {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  line-height: 1.35;
}

/*
 * The theme leaves more empty space below the checkout product than above it.
 * Move the complete product block down without changing the table-row height,
 * so the image, name and controls sit visually midway between both separators.
 */
.bf-checkout-product-thumbnail,
.bf-checkout-product-name,
.bf-checkout-item-actions {
  transform: translateY(8px);
}

.bf-checkout-item-actions {
  display: inline-flex;
  grid-column: 2;
  grid-row: 2;
  justify-self: start;
  align-items: center;
  gap: 3px;
  margin: 7px 0 0;
  vertical-align: middle;
}

@media (max-width: 480px) {
  .woocommerce-checkout-review-order-table
    tbody
    tr.cart_item
    > td.product-name:has(.bf-checkout-product) {
    grid-template-columns: 68px minmax(0, 1fr);
    column-gap: 9px;
  }

  .bf-checkout-product-thumbnail {
    width: 68px;
    height: 68px;
  }

  .bf-checkout-product-image {
    width: 68px !important;
    height: 68px !important;
  }

  .bf-checkout-product-thumbnail,
  .bf-checkout-product-name,
  .bf-checkout-item-actions {
    transform: translateY(6px);
  }
}

.bf-checkout-item-actions .bf-qty-button,
.bf-checkout-item-actions .bf-remove-item {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  width: 28px;
  height: 28px;
  min-height: 28px;
  margin: 0;
  padding: 0;
  border: 1px solid #d6dadd;
  border-radius: 5px;
  background: #fff;
  color: #252525;
  font: 700 17px/1 sans-serif;
  cursor: pointer;
}

.bf-checkout-item-actions .bf-qty-button:hover {
  border-color: #31924a;
  color: #237a38;
}

.bf-checkout-item-actions .bf-qty-button:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.bf-checkout-item-actions .bf-qty-value {
  box-sizing: border-box;
  min-width: 30px;
  padding: 0 4px;
  color: #252525;
  font-size: 14px;
  font-weight: 700;
  line-height: 28px;
  text-align: center;
}

.bf-checkout-item-actions .bf-remove-item {
  margin-left: 5px;
  border-color: #ead2d2;
  color: #a52626;
  font-size: 18px;
}

.bf-checkout-item-actions .bf-remove-item:hover {
  border-color: #c84040;
  background: #fff7f7;
}

.bf-cart-is-updating {
  position: relative;
  opacity: .62;
  pointer-events: none;
}

.bf-cart-update-error {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-left: 3px solid #b81c23;
  background: #fff2f2;
  color: #8c1b20;
  font-size: 13px;
}

.bf-continue-shopping-row td {
  padding-top: 12px !important;
  text-align: left !important;
}

.bf-continue-shopping {
  display: inline-block !important;
  width: auto !important;
  margin: 0 !important;
  padding: 9px 13px !important;
  border-radius: 5px !important;
  font-size: 13px !important;
  line-height: 1.2 !important;
  text-decoration: none !important;
}

/* BalkanFulfill shipping rates */
.woocommerce-checkout-review-order-table {
  width: 100% !important;
  max-width: 100% !important;
  table-layout: fixed !important;
}

/*
 * Keep product prices and order totals against the right edge. The amounts
 * stay plain text; only the delivery chooser uses a visual panel.
 */
#order_review .woocommerce-checkout-review-order-table th.product-total,
#order_review .woocommerce-checkout-review-order-table td.product-total {
  box-sizing: border-box;
  width: 112px !important;
  text-align: right !important;
}

#order_review .woocommerce-checkout-review-order-table tbody td.product-total,
#order_review .woocommerce-checkout-review-order-table tfoot tr.cart-subtotal > td,
#order_review .woocommerce-checkout-review-order-table tfoot tr.order-total > td {
  text-align: right !important;
  vertical-align: middle !important;
}

#order_review .woocommerce-checkout-review-order-table tfoot tr.cart-subtotal > th,
#order_review .woocommerce-checkout-review-order-table tfoot tr.order-total > th {
  width: auto !important;
}

#order_review .woocommerce-checkout-review-order-table tfoot tr.cart-subtotal > td,
#order_review .woocommerce-checkout-review-order-table tfoot tr.order-total > td {
  width: 112px !important;
}

#order_review .woocommerce-checkout-review-order-table tfoot tr.cart-subtotal > th,
#order_review .woocommerce-checkout-review-order-table tfoot tr.cart-subtotal > td,
#order_review .woocommerce-checkout-review-order-table tfoot tr.order-total > th,
#order_review .woocommerce-checkout-review-order-table tfoot tr.order-total > td {
  box-sizing: border-box !important;
  height: 42px !important;
  padding-top: 10px !important;
  padding-bottom: 10px !important;
  vertical-align: middle !important;
  line-height: 1.35 !important;
}

#order_review .woocommerce-checkout-review-order-table tbody td.product-total .woocommerce-Price-amount,
#order_review .woocommerce-checkout-review-order-table tfoot tr.cart-subtotal > td .woocommerce-Price-amount,
#order_review .woocommerce-checkout-review-order-table tfoot tr.order-total > td .woocommerce-Price-amount {
  display: inline !important;
  min-width: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  white-space: nowrap;
}

.woocommerce-checkout-review-order-table tr.bf-shipping-table-row {
  box-sizing: border-box;
  display: table-row !important;
}

tr.bf-shipping-table-row > th {
  display: none !important;
}

tr.bf-shipping-table-row > td {
  box-sizing: border-box;
  display: table-cell !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  overflow: hidden;
  padding: 0 !important;
  text-align: left !important;
}

.bf-shipping-menu-box {
  box-sizing: border-box;
  width: 100%;
  margin: 6px 0 10px;
  padding: 12px;
  border: 1px solid #dfe4e0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(33, 50, 39, .08);
  overflow: hidden;
}

.bf-shipping-row-title {
  box-sizing: border-box;
  width: 100%;
  margin: 0 0 12px;
  padding: 11px 0;
  border-bottom: 1px solid #e2e6e8;
  color: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  text-align: left;
}

.bf-shipping-menu-box > .bf-shipping-row-title {
  margin-top: -2px;
}

tr.bf-shipping-table-row ul#shipping_method,
tr.bf-shipping-table-row ul.woocommerce-shipping-methods {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.bf-service-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  width: 100%;
  margin: 0 0 9px;
}

.bf-service-tab {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 5px 7px;
  border: 1px solid #c7cec8;
  border-radius: 7px;
  background: #f6f8f6;
  color: #202520;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.bf-service-tab-label {
  display: block;
  max-width: 100%;
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bf-service-tab-range {
  display: block;
  max-width: 100%;
  color: #657068;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bf-service-tab:hover,
.bf-service-tab:focus {
  border-color: #8eaa94;
  outline: none;
}

.bf-service-tab.is-active {
  border-color: #278a43;
  background: #278a43;
  color: #fff;
  box-shadow: 0 0 0 1px #278a43;
}

.bf-service-tab.is-active .bf-service-tab-range {
  color: rgba(255, 255, 255, .9);
}

.bf-tabbed-shipping-methods .bf-rate-card {
  grid-template-columns: 74px minmax(62px, 1fr) auto;
}

.bf-tabbed-shipping-methods .bf-rate-logo {
  width: 74px;
  height: 32px;
}

.bf-tabbed-shipping-methods .bf-rate-logo img {
  width: 72px !important;
  height: 31px !important;
  max-width: 72px !important;
  max-height: 31px !important;
}

.bf-partner-strip {
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
  margin: 14px 0 0;
  padding: 11px 1px 2px;
  border-top: 1px solid #e0e5e1;
}

.bf-partner-label {
  display: block;
  flex: 0 0 auto;
  color: #354039;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.bf-partner-logos {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: nowrap;
  gap: 8px;
  min-width: 0;
}

.bf-partner-logo {
  position: relative;
  display: block;
  flex: 0 0 auto;
  min-width: 0;
  overflow: hidden;
  cursor: default;
}

.bf-partner-logo img {
  position: absolute;
  display: block;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  border: 0 !important;
  object-fit: fill;
  opacity: 1;
  filter: none;
  mix-blend-mode: normal;
}

.bf-partner-logo[data-provider="econt"] {
  width: 47px;
  height: 19px;
}

.bf-partner-logo[data-provider="econt"] img {
  left: -3px;
  top: -2px;
  width: 53px !important;
  height: 22px !important;
}

.bf-partner-logo[data-provider="speedy"] {
  width: 65px;
  height: 17px;
}

.bf-partner-logo[data-provider="speedy"] img {
  left: -1px;
  top: -4px;
  width: 67px !important;
  height: 25px !important;
}

.bf-partner-logo[data-provider="sameday"] {
  width: 29px;
  height: 25px;
}

.bf-partner-logo[data-provider="sameday"] img {
  left: -23px;
  top: -2px;
  width: 75px !important;
  height: 30px !important;
}

.bf-partner-logo[data-provider="pigeon"] {
  width: 56px;
  height: 20px;
}

.bf-partner-logo[data-provider="pigeon"] img {
  left: -4px;
  top: -3px;
  width: 64px !important;
  height: 25px !important;
}

#shipping_method li.bf-rate-row,
.woocommerce-shipping-methods li.bf-rate-row {
  box-sizing: border-box;
  display: grid !important;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  width: 100% !important;
  max-width: none !important;
  margin: 0 0 7px !important;
  padding: 6px 10px !important;
  border: 1px solid #dedede;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}

/* The cards use display:grid !important above so checkout themes cannot break
   their layout. Explicitly restore the native hidden behaviour used by the
   Office / Locker / Address tabs. */
#shipping_method li.bf-rate-row[hidden],
.woocommerce-shipping-methods li.bf-rate-row[hidden] {
  display: none !important;
}

#shipping_method li.bf-rate-row:last-child,
.woocommerce-shipping-methods li.bf-rate-row:last-child {
  margin-bottom: 0 !important;
}

#shipping_method li.bf-rate-row:hover,
.woocommerce-shipping-methods li.bf-rate-row:hover {
  border-color: #9ebda3;
}

#shipping_method li.bf-rate-row.bf-rate-row-selected,
.woocommerce-shipping-methods li.bf-rate-row.bf-rate-row-selected {
  border-color: #31924a;
  background: #f3fbf5;
  box-shadow: 0 0 0 1px rgba(49, 146, 74, .08);
}

#shipping_method li.bf-rate-row > input[type="radio"],
.woocommerce-shipping-methods li.bf-rate-row > input[type="radio"] {
  grid-column: 1;
  align-self: center;
  width: 16px;
  height: 16px;
  margin: 0 !important;
  cursor: pointer;
}

#shipping_method li.bf-rate-row > label,
.woocommerce-shipping-methods li.bf-rate-row > label {
  grid-column: 2;
  display: block !important;
  width: 100%;
  margin: 0 !important;
  padding: 0 !important;
  cursor: pointer;
}

.bf-rate-card {
  display: grid;
  grid-template-columns: 62px minmax(62px, 1fr) auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  min-width: 0;
}

.bf-rate-logo {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 62px;
  height: 28px;
}

.bf-rate-logo img {
  display: block;
  width: 60px !important;
  height: 27px !important;
  max-width: 60px !important;
  max-height: 27px !important;
  margin: 0 !important;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.bf-rate-service {
  min-width: 0;
  color: #252525;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  text-align: left;
}

.bf-rate-price {
  justify-self: end;
  color: #202020;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  text-align: right;
  white-space: nowrap;
}

.bf-rate-price .bf-free-delivery {
  color: #23843b;
  font-size: 12px;
  font-weight: 700;
}

.bf-rate-price small.tax_label {
  display: block;
  font-size: 10px;
  font-weight: 400;
}

.bf-free-shipping-notice {
  grid-column: 2;
  display: none;
  width: 100%;
  margin: 2px 0 1px;
  padding: 7px 9px;
  border-radius: 6px;
  background: #f5f7f5;
  color: #4b554d;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
}

#shipping_method li.bf-rate-row-selected > .bf-free-shipping-notice,
.woocommerce-shipping-methods li.bf-rate-row-selected > .bf-free-shipping-notice {
  display: block;
}

.bf-free-shipping-notice .woocommerce-Price-amount {
  font-weight: 700;
  white-space: nowrap;
}

.bf-free-shipping-notice.bf-free-shipping-reached {
  background: #e9f7ed;
  color: #237a38;
  font-weight: 700;
}

@media (max-width: 420px) {
  #order_review .woocommerce-checkout-review-order-table th.product-total,
  #order_review .woocommerce-checkout-review-order-table td.product-total,
  #order_review .woocommerce-checkout-review-order-table tfoot tr.cart-subtotal > td,
  #order_review .woocommerce-checkout-review-order-table tfoot tr.order-total > td {
    width: 100px !important;
  }

  .bf-shipping-menu-box {
    margin-top: 4px;
    padding: 10px;
    border-radius: 9px;
  }

  .bf-service-tabs {
    gap: 4px;
  }

  .bf-service-tab {
    min-height: 45px;
    padding: 4px 3px;
    font-size: 12px;
  }

  .bf-service-tab-label {
    font-size: 11.5px;
  }

  .bf-service-tab-range {
    font-size: 9.5px;
  }

  #shipping_method li.bf-rate-row,
  .woocommerce-shipping-methods li.bf-rate-row {
    padding: 6px 8px !important;
  }

  .bf-rate-card {
    grid-template-columns: 56px minmax(54px, 1fr) auto;
    gap: 6px;
  }

  .bf-rate-logo {
    width: 56px;
  }

  .bf-rate-logo img {
    width: 54px !important;
    max-width: 54px !important;
  }

  .bf-tabbed-shipping-methods .bf-rate-card {
    grid-template-columns: 64px minmax(54px, 1fr) auto;
  }

  .bf-tabbed-shipping-methods .bf-rate-logo {
    width: 64px;
    height: 28px;
  }

  .bf-tabbed-shipping-methods .bf-rate-logo img {
    width: 62px !important;
    height: 27px !important;
    max-width: 62px !important;
    max-height: 27px !important;
  }

  .bf-partner-strip {
    gap: 6px;
    margin-top: 12px;
    padding: 10px 0 1px;
  }

  .bf-partner-label {
    font-size: 10.5px;
  }

  .bf-partner-logos {
    gap: 5px;
  }

  .bf-partner-logo[data-provider="econt"] {
    width: 39px;
    height: 16px;
  }

  .bf-partner-logo[data-provider="econt"] img {
    left: -2px;
    top: -1px;
    width: 44px !important;
    height: 18px !important;
  }

  .bf-partner-logo[data-provider="speedy"] {
    width: 54px;
    height: 14px;
  }

  .bf-partner-logo[data-provider="speedy"] img {
    left: -1px;
    top: -3px;
    width: 56px !important;
    height: 21px !important;
  }

  .bf-partner-logo[data-provider="sameday"] {
    width: 24px;
    height: 21px;
  }

  .bf-partner-logo[data-provider="sameday"] img {
    left: -19px;
    top: -2px;
    width: 63px !important;
    height: 25px !important;
  }

  .bf-partner-logo[data-provider="pigeon"] {
    width: 47px;
    height: 17px;
  }

  .bf-partner-logo[data-provider="pigeon"] img {
    left: -3px;
    top: -2px;
    width: 54px !important;
    height: 21px !important;
  }

  .bf-rate-service,
  .bf-rate-price {
    font-size: 13px;
  }

  .bf-rate-price .bf-free-delivery {
    display: inline-block;
    max-width: 86px;
    white-space: normal;
  }

  .bf-free-shipping-notice {
    padding: 6px 8px;
    font-size: 11px;
  }

  .bf-checkout-item-actions {
    display: flex;
    width: max-content;
    margin-left: 0;
  }
}

/* The cart totals column is narrower than the checkout review table. Keep
   courier cards compact instead of allowing themes to stack every word. */
.woocommerce-cart .cart_totals table.shop_table tr.bf-cart-shipping-table-row {
  display: table-row !important;
}

.woocommerce-cart .cart_totals table.shop_table tr.bf-cart-shipping-table-row > th {
  display: none !important;
}

.woocommerce-cart .cart_totals table.shop_table tr.bf-cart-shipping-table-row > td {
  box-sizing: border-box;
  display: table-cell !important;
  width: 100% !important;
  max-width: none !important;
  padding: 12px 0 !important;
  text-align: left !important;
}

.woocommerce-cart .cart_totals tr.bf-cart-shipping-table-row ul#shipping_method,
.woocommerce-cart .cart_totals tr.bf-cart-shipping-table-row ul.woocommerce-shipping-methods {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  text-align: left !important;
}

.woocommerce-cart .bf-cart-shipping-table-row .bf-shipping-row-title {
  margin-bottom: 10px;
}

.woocommerce-cart .bf-cart-rate-row {
  grid-template-columns: 20px minmax(0, 1fr) !important;
  width: 100% !important;
  max-width: none !important;
  padding: 7px 8px !important;
}

.woocommerce-cart .bf-cart-rate-row .bf-rate-card {
  grid-template-columns: 54px minmax(56px, 1fr) auto;
  gap: 6px;
}

.woocommerce-cart .bf-cart-rate-row .bf-rate-logo {
  width: 54px;
  height: 26px;
}

.woocommerce-cart .bf-cart-rate-row .bf-rate-logo img {
  width: 52px !important;
  height: 25px !important;
  max-width: 52px !important;
  max-height: 25px !important;
}

.woocommerce-cart .bf-cart-rate-row .bf-rate-service,
.woocommerce-cart .bf-cart-rate-row .bf-rate-price {
  font-size: 12px;
}

.woocommerce-cart .bf-cart-rate-row .bf-rate-price .bf-free-delivery {
  display: inline-block;
  max-width: 82px;
  white-space: normal;
}

.bf-shipping-location[hidden] {
  display: none !important;
}

.bf-shipping-location h3 {
  margin: 0 0 1rem;
  display: flex;
  align-items: center;
  gap: .75rem;
}

.bf-shipping-location h3 img {
  display: block;
  width: auto;
  max-width: 100px;
  max-height: 46px;
  object-fit: contain;
}

.bf-shipping-location h3 img[hidden] {
  display: none !important;
}

.bf-shipping-message {
  margin-bottom: .75rem;
  color: #555;
}

.bf-shipping-message:empty {
  display: none;
}

.bf-shipping-message.bf-error {
  color: #b81c23;
}

.bf-weight-limit-notice {
  grid-column: 1 / -1;
  display: block;
  width: 100%;
  margin: 8px 0 2px;
  padding: 9px 11px;
  box-sizing: border-box;
  border: 1px solid #f0d58a;
  border-radius: 6px;
  background: #fff8e5;
  color: #6f5200;
  font-size: 13px;
  line-height: 1.4;
}

.bf-shipping-location select {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
}

.bf-shipping-location .bf-location-field {
  box-sizing: border-box;
  width: 100%;
  margin: 0 0 12px;
}

.bf-shipping-location select.bf-location-select {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: 38px;
  min-height: 38px;
  margin: 0;
  padding: 0 34px 0 10px;
  border: 1px solid #ddd;
  border-radius: 0;
  background-color: #fff;
  color: #333;
  font-size: 14px;
  line-height: 36px;
}

.bf-shipping-location .select2-container {
  box-sizing: border-box;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
}

.bf-shipping-location .form-row,
.bf-shipping-location .woocommerce-input-wrapper,
.bf-shipping-location .select2-selection {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.bf-shipping-location .select2-selection--single {
  height: 38px !important;
  min-height: 38px !important;
  border: 1px solid #ddd !important;
  border-radius: 0 !important;
  background: #fff !important;
}

.bf-shipping-location .select2-selection--single .select2-selection__rendered {
  height: 36px !important;
  padding: 0 34px 0 10px !important;
  color: #333 !important;
  font-size: 14px !important;
  line-height: 36px !important;
  text-align: left !important;
}

.bf-shipping-location .select2-selection--single .select2-selection__arrow {
  height: 36px !important;
}

/* Long office addresses must never determine the width of the checkout table.
   Keep the full text in the option list and order data, but shorten only the
   closed Select2/SelectWoo field visually. */
.bf-shipping-location .select2-selection__rendered {
  display: block !important;
  max-width: 100% !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

/* Keep the search box visible even when a checkout theme applies generic
   input styles to Select2/SelectWoo dropdowns. */
.select2-container--open .select2-search--dropdown {
  display: block !important;
  padding: 6px !important;
  background: #fff !important;
}

.select2-container--open .select2-search--dropdown .select2-search__field {
  display: block !important;
  box-sizing: border-box !important;
  width: 100% !important;
  height: 38px !important;
  min-height: 38px !important;
  margin: 0 !important;
  padding: 6px 10px !important;
  border: 1px solid #aaa !important;
  border-radius: 3px !important;
  background: #fff !important;
  color: #222 !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.bf-pricing-pending-notice {
  margin: 0 0 12px;
  padding: 10px 12px;
  color: #39434d;
  background: #f3f8fc;
  border: 1px solid #d8e7f2;
  border-left: 4px solid #2f86b7;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.45;
}

.bf-rate-price.bf-rate-price-pending {
  color: #66727d;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}


.bf-partner-logo[data-provider="boxnow"] {
  min-width: 74px;
}
.bf-partner-logo[data-provider="boxnow"] img {
  width: 68px;
  height: 42px;
  object-fit: contain;
}

/* BOX NOW: square artwork needs its own sizing instead of the wide courier-logo crop. */
.bf-rate-card[data-bf-carrier="boxnow"] .bf-rate-logo {
  width: 74px;
  height: 34px;
  justify-content: flex-start;
  overflow: visible;
}

.bf-rate-card[data-bf-carrier="boxnow"] .bf-rate-logo img {
  width: 32px !important;
  height: 32px !important;
  max-width: 32px !important;
  max-height: 32px !important;
  object-fit: contain !important;
  mix-blend-mode: normal;
}

.bf-partner-logo[data-provider="boxnow"] {
  position: relative;
  display: block;
  flex: 0 0 26px;
  width: 26px;
  min-width: 26px;
  height: 26px;
  overflow: hidden;
}

.bf-partner-logo[data-provider="boxnow"] img {
  position: absolute;
  left: 0;
  top: 0;
  width: 26px !important;
  height: 26px !important;
  max-width: 26px !important;
  max-height: 26px !important;
  object-fit: contain !important;
  mix-blend-mode: normal;
}

#bf-shipping-heading {
  display: flex;
  align-items: center;
  gap: 10px;
}

#bf-shipping-logo {
  display: block;
  width: 42px;
  height: 32px;
  max-width: 42px;
  max-height: 32px;
  object-fit: contain;
}

#bf-shipping-logo[alt="boxnow"] {
  width: 32px;
  height: 32px;
  max-width: 32px;
  max-height: 32px;
}


/* 37.13.4 — normalize courier logos and spread partner logos across the full row. */
.bf-tabbed-shipping-methods .bf-rate-card {
  grid-template-columns: 88px minmax(62px, 1fr) auto;
}

.bf-tabbed-shipping-methods .bf-rate-logo {
  width: 88px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: visible;
}

.bf-tabbed-shipping-methods .bf-rate-logo img,
.bf-rate-card[data-bf-carrier="boxnow"] .bf-rate-logo img {
  width: 84px !important;
  height: 36px !important;
  max-width: 84px !important;
  max-height: 36px !important;
  object-fit: contain !important;
}

.bf-partner-strip {
  gap: 14px;
  padding-top: 13px;
  padding-bottom: 6px;
}

.bf-partner-logos {
  justify-content: space-between;
  gap: 14px;
  width: 100%;
}

.bf-partner-logo,
.bf-partner-logo[data-provider="boxnow"],
.bf-partner-logo[data-provider="econt"],
.bf-partner-logo[data-provider="speedy"],
.bf-partner-logo[data-provider="sameday"],
.bf-partner-logo[data-provider="pigeon"] {
  position: relative;
  flex: 1 1 0;
  width: auto;
  min-width: 54px;
  max-width: 86px;
  height: 30px;
  overflow: visible;
}

.bf-partner-logo img,
.bf-partner-logo[data-provider="boxnow"] img,
.bf-partner-logo[data-provider="econt"] img,
.bf-partner-logo[data-provider="speedy"] img,
.bf-partner-logo[data-provider="sameday"] img,
.bf-partner-logo[data-provider="pigeon"] img {
  position: static;
  display: block;
  width: 100% !important;
  height: 30px !important;
  max-width: 100% !important;
  max-height: 30px !important;
  object-fit: contain !important;
  margin: 0 auto !important;
}

@media (max-width: 520px) {
  .bf-tabbed-shipping-methods .bf-rate-card {
    grid-template-columns: 82px minmax(58px, 1fr) auto;
  }

  .bf-tabbed-shipping-methods .bf-rate-logo {
    width: 82px;
  }

  .bf-tabbed-shipping-methods .bf-rate-logo img,
  .bf-rate-card[data-bf-carrier="boxnow"] .bf-rate-logo img {
    width: 78px !important;
    max-width: 78px !important;
  }

  .bf-partner-strip {
    align-items: flex-start;
    gap: 10px;
  }

  .bf-partner-logos {
    gap: 9px;
  }

  .bf-partner-logo,
  .bf-partner-logo[data-provider="boxnow"],
  .bf-partner-logo[data-provider="econt"],
  .bf-partner-logo[data-provider="speedy"],
  .bf-partner-logo[data-provider="sameday"],
  .bf-partner-logo[data-provider="pigeon"] {
    min-width: 44px;
    max-width: 72px;
    height: 28px;
  }

  .bf-partner-logo img,
  .bf-partner-logo[data-provider="boxnow"] img,
  .bf-partner-logo[data-provider="econt"] img,
  .bf-partner-logo[data-provider="speedy"] img,
  .bf-partner-logo[data-provider="sameday"] img,
  .bf-partner-logo[data-provider="pigeon"] img {
    height: 28px !important;
    max-height: 28px !important;
  }
}


/* 37.13.7 — final courier logo balancing. */
.bf-tabbed-shipping-methods .bf-rate-card {
  grid-template-columns: 96px minmax(62px, 1fr) auto;
}

.bf-tabbed-shipping-methods .bf-rate-logo {
  width: 96px;
  height: 42px;
}

.bf-tabbed-shipping-methods .bf-rate-logo img,
.bf-rate-card[data-bf-carrier="boxnow"] .bf-rate-logo img {
  width: 92px !important;
  height: 40px !important;
  max-width: 92px !important;
  max-height: 40px !important;
  object-fit: contain !important;
}

.bf-partner-strip {
  gap: 16px;
}

.bf-partner-logos {
  gap: 16px;
}

.bf-partner-logo,
.bf-partner-logo[data-provider="boxnow"],
.bf-partner-logo[data-provider="econt"],
.bf-partner-logo[data-provider="speedy"],
.bf-partner-logo[data-provider="sameday"],
.bf-partner-logo[data-provider="pigeon"] {
  min-width: 58px;
  max-width: 96px;
  height: 34px;
}

.bf-partner-logo img,
.bf-partner-logo[data-provider="boxnow"] img,
.bf-partner-logo[data-provider="econt"] img,
.bf-partner-logo[data-provider="speedy"] img,
.bf-partner-logo[data-provider="sameday"] img,
.bf-partner-logo[data-provider="pigeon"] img {
  height: 34px !important;
  max-height: 34px !important;
}

@media (max-width: 520px) {
  .bf-tabbed-shipping-methods .bf-rate-card {
    grid-template-columns: 90px minmax(58px, 1fr) auto;
  }

  .bf-tabbed-shipping-methods .bf-rate-logo {
    width: 90px;
    height: 40px;
  }

  .bf-tabbed-shipping-methods .bf-rate-logo img,
  .bf-rate-card[data-bf-carrier="boxnow"] .bf-rate-logo img {
    width: 86px !important;
    height: 38px !important;
    max-width: 86px !important;
    max-height: 38px !important;
  }

  .bf-partner-logos {
    gap: 11px;
  }

  .bf-partner-logo,
  .bf-partner-logo[data-provider="boxnow"],
  .bf-partner-logo[data-provider="econt"],
  .bf-partner-logo[data-provider="speedy"],
  .bf-partner-logo[data-provider="sameday"],
  .bf-partner-logo[data-provider="pigeon"] {
    min-width: 48px;
    max-width: 78px;
    height: 31px;
  }

  .bf-partner-logo img,
  .bf-partner-logo[data-provider="boxnow"] img,
  .bf-partner-logo[data-provider="econt"] img,
  .bf-partner-logo[data-provider="speedy"] img,
  .bf-partner-logo[data-provider="sameday"] img,
  .bf-partner-logo[data-provider="pigeon"] img {
    height: 31px !important;
    max-height: 31px !important;
  }
}


/* 37.13.8 header logo size */
.bf-location-title,
.bf-office-title,
.bf-selector-title{
 display:flex;
 align-items:center;
 gap:8px;
}
.bf-location-title img,
.bf-office-title img,
.bf-selector-title img{
 height:48px !important;
 width:auto !important;
 max-height:48px !important;
 flex:0 0 auto;
 vertical-align:middle;
}


/* 37.13.9 — exact selector from the live checkout DOM. */
#bf-shipping-heading {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
}

#bf-shipping-heading #bf-shipping-logo {
  display: block !important;
  width: auto !important;
  height: 32px !important;
  max-width: 120px !important;
  max-height: 32px !important;
  object-fit: contain !important;
  flex: 0 0 auto !important;
  margin: 0 !important;
}


/* 37.13.10 — final heading-logo alignment. */
#bf-shipping-heading #bf-shipping-logo {
  transform: translateY(1px);
}
