/* Store pickup + shipping methods layout — standalone (not in webpack bundle) */

.woocommerce-checkout .baristo-checkout-shipping-block {
  margin-bottom: 40px;
  position: relative;
  overflow: visible;
}

.woocommerce-checkout .baristo-pickup-offices.baristo-pickup-visible,
.woocommerce-checkout .selects-pickup.baristo-pickup-visible {
  overflow: visible;
}

.woocommerce-checkout .baristo-checkout-shipping-block .delivery-methods {
  margin-bottom: 0;
}

/* Shipping methods: stacked, full width — label text on one line (override .flex-row + fixed 56px label) */
.woocommerce-checkout .baristo-checkout-shipping-block #shipping_method.woocommerce-shipping-methods,
.woocommerce-checkout .baristo-checkout-shipping-block .woocommerce-shipping-methods.flex-row,
.woocommerce-checkout .delivery-methods #shipping_method.woocommerce-shipping-methods,
.woocommerce-checkout .delivery-methods .woocommerce-shipping-methods.flex-row,
.woocommerce-cart .cart_totals #shipping_method.woocommerce-shipping-methods,
.woocommerce-cart .cart_totals .woocommerce-shipping-methods.flex-row,
.woocommerce-cart .woocommerce-shipping-totals #shipping_method.woocommerce-shipping-methods {
  display: flex !important;
  flex-direction: column !important;
  flex-wrap: nowrap !important;
  align-items: stretch !important;
  margin-left: -10px;
  margin-right: -10px;
}

.woocommerce-checkout .baristo-checkout-shipping-block #shipping_method .form-group,
.woocommerce-checkout .baristo-checkout-shipping-block .woocommerce-shipping-methods .form-group,
.woocommerce-checkout .delivery-methods #shipping_method .form-group,
.woocommerce-checkout .delivery-methods .woocommerce-shipping-methods .form-group,
.woocommerce-cart .cart_totals #shipping_method .form-group,
.woocommerce-cart .cart_totals .woocommerce-shipping-methods .form-group,
.woocommerce-cart .woocommerce-shipping-totals #shipping_method .form-group {
  width: 100% !important;
  max-width: 100% !important;
  flex: 0 0 auto !important;
  float: none !important;
  padding: 0 10px;
  margin: 0 0 10px !important;
  box-sizing: border-box;
}

.woocommerce-checkout .baristo-checkout-shipping-block #shipping_method .radio-group label,
.woocommerce-checkout .baristo-checkout-shipping-block .woocommerce-shipping-methods .radio-group label,
.woocommerce-checkout .delivery-methods #shipping_method .radio-group label,
.woocommerce-cart .cart_totals #shipping_method .radio-group label,
.woocommerce-cart .cart_totals .woocommerce-shipping-methods .radio-group label,
.woocommerce-cart .woocommerce-shipping-totals #shipping_method .radio-group label {
  display: flex !important;
  align-items: center;
  width: 100%;
  height: auto !important;
  min-height: 56px;
  line-height: 1.35 !important;
  padding: 14px 10px 14px 20px;
  white-space: nowrap;
  box-sizing: border-box;
}

@media screen and (max-width: 480px) {
  .woocommerce-cart .cart_totals #shipping_method .radio-group label,
  .woocommerce-cart .cart_totals .woocommerce-shipping-methods .radio-group label,
  .woocommerce-checkout .delivery-methods #shipping_method .radio-group label {
    white-space: normal;
  }
}

/* Pickup store select — directly under delivery methods */
.woocommerce-checkout .baristo-pickup-offices,
.woocommerce-checkout .selects-pickup {
  display: none !important;
  visibility: hidden !important;
  width: 100%;
  max-height: 0;
  overflow: hidden;
  margin: 0;
  padding: 0 10px;
  box-sizing: border-box;
  opacity: 0;
  pointer-events: none;
}

.woocommerce-checkout .baristo-pickup-offices .baristo-pickup-label-row {
  width: 100%;
  margin: 0 0 8px;
  padding: 0;
}

.woocommerce-checkout .baristo-pickup-offices .baristo-pickup-label-row label {
  font-weight: 500;
  margin: 0;
}

.woocommerce-checkout .baristo-pickup-offices:not(.baristo-pickup-visible) .select2-container,
.woocommerce-checkout .selects-pickup:not(.baristo-pickup-visible) .select2-container {
  display: none !important;
}

/* Native store select (no Select2) */
.woocommerce-checkout .baristo-pickup-office-select {
  width: 100%;
  max-width: 100%;
  height: 45px;
  line-height: 45px;
  padding: 0 22px;
  font-size: 14px;
  letter-spacing: 0.02em;
  color: #333;
  background: #f5f4f2;
  border: 1px solid transparent;
  border-radius: 4px;
  box-sizing: border-box;
}

/* Kill stray Select2 nodes (legacy bundle / old init) — prevents scroll jump on keypress */
.select2-container[id*='baristo_pickup_office'].select2-container--open,
body > .select2-container[id*='baristo_pickup_office'] {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.woocommerce-checkout .baristo-pickup-offices.baristo-pickup-visible,
.woocommerce-checkout .selects-pickup.baristo-pickup-visible {
  display: block !important;
  visibility: visible !important;
  max-height: none;
  overflow: visible;
  margin: 10px 0 24px;
  padding: 0 10px;
  opacity: 1;
  pointer-events: auto;
}

.woocommerce-checkout .baristo-pickup-offices .pickup-office-row,
.woocommerce-checkout .selects-pickup .pickup-office-row {
  width: 100%;
  margin: 0;
  padding: 0;
}

.woocommerce-checkout .baristo-pickup-offices .select2-container,
.woocommerce-checkout .selects-pickup .select2-container {
  width: 100% !important;
}

.woocommerce-checkout #billing_pickup_office_field {
  display: none !important;
}
