/* Bluejuice B2B frontend tweaks */
.vat-switch{position:relative;display:inline-block;width:64px;height:32px;vertical-align:middle}
.vat-switch input{display:none}
.vat-switch .vat-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background:#ddd;border-radius:32px;transition:.2s ease}
.vat-switch .vat-slider:before{content:"";position:absolute;height:26px;width:26px;left:3px;top:3px;background:var(--et_main-color,#e83e8c);border-radius:50%;transition:.2s ease}
.vat-switch input:checked + .vat-slider{background:#f3cfe0}
.vat-switch input:checked + .vat-slider:before{transform:translateX(32px)}
/* Orders table actions width */
.b2b-orders table th:last-child,.b2b-orders table td:last-child{width:180px;white-space:nowrap}
/* Invoices table actions width to match */
.b2b-invoices table th:last-child,.b2b-invoices table td:last-child{width:180px;white-space:nowrap}
/* Normalize Orders endpoint actions column width without wrapper */
.woocommerce-MyAccount-content .account-orders-table th:last-child,
.woocommerce-MyAccount-content .account-orders-table td:last-child{width:180px}

/* VAT switch checked state via wrapper toggle */
.vat-switch.is-checked .vat-slider{background:#f3cfe0}
.vat-switch.is-checked .vat-slider:before{transform:translateX(32px)}

/* Orders actions: prevent overflow and keep inline buttons tidy */
.woocommerce-MyAccount-content .account-orders-table td:last-child .button{
  display:inline-block;
  margin:2px 4px 2px 0;
  padding:6px 10px;
  font-size:12px;
  white-space:nowrap;
  max-width:100%;
}

/* Admin offers Select2 widths (if admin styles not present) */
.select2-container{min-width:240px}

/* Orders actions cell wrapping and compact buttons */
.woocommerce-MyAccount-content .account-orders-table td.order-actions,
.woocommerce-account .woocommerce-MyAccount-content table.shop_table_responsive tr td.order-actions {
  white-space: normal;
  width: 1%;
}
.woocommerce-MyAccount-content .account-orders-table td.order-actions .button,
.woocommerce-account .woocommerce-MyAccount-content table.shop_table_responsive tr td.order-actions .button {
  display: inline-block;
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1.2;
  margin: 2px 2px 0 0;
  white-space: nowrap;
}
.woocommerce-orders-table__cell-order-actions .button {
  display: inline-block;
  margin: 3px 0;
  white-space: normal;
}
.woocommerce-orders-table__cell-order-actions .button + .button {
  margin-left: 6px;
}
@media (max-width: 782px) {
  .woocommerce-orders-table__cell-order-actions .button {
    display: block;
    width: 100%;
  }
}
