/* Qanda Commerce UX 1.0
   Checkout behavior is driven by WooCommerce state; CSS only changes presentation. */

/* Pickup: keep identity/contact fields, remove customer delivery-address questions.
   IDs/classes below are public checkout field identifiers, not positional selectors. */
body.qanda-pickup-mode .wp-block-woocommerce-checkout-billing-address-block
  :is(.wc-block-components-address-form__country,
      .wc-block-components-address-form__address_1,
      .wc-block-components-address-form__address_2,
      .wc-block-components-address-form__city,
      .wc-block-components-address-form__state,
      .wc-block-components-address-form__postcode){
	display:none!important;
}

/* Hide country selector for Qanda delivery too: Bahrain is the fixed selling country. */
body.woocommerce-checkout .wp-block-woocommerce-checkout-billing-address-block .wc-block-components-address-form__country,
body.woocommerce-checkout .wp-block-woocommerce-checkout-shipping-address-block .wc-block-components-address-form__country{
	display:none!important;
}

/* Bahrain does not need postcode for Qanda's present delivery flow. */
body.woocommerce-checkout .wc-block-components-address-form__postcode{display:none!important}

/* Order note is intentionally removed from the streamlined Qanda flow. */
body.woocommerce-checkout .wp-block-woocommerce-checkout-order-note-block{display:none!important}

/* Make Local Pickup location the visual destination when collection is chosen. */
body.qanda-pickup-mode .wp-block-woocommerce-checkout-pickup-options-block{
	padding:14px 0 6px;
}
body.qanda-pickup-mode .wp-block-woocommerce-checkout-pickup-options-block .wc-block-components-radio-control__option{
	background:#fbfaf7!important;
}

/* Cart/checkout button fallback. This also catches blocks that do not inherit the theme element style. */
body.qanda-store :is(.wc-block-cart,.wc-block-checkout,.wp-block-woocommerce-empty-cart-block)
 :is(.wc-block-components-button,.wp-element-button,.wp-block-button__link){
	background:#111!important;border-color:#111!important;color:#fff!important;border-radius:0!important;box-shadow:none!important;
}
body.qanda-store :is(.wc-block-cart,.wc-block-checkout,.wp-block-woocommerce-empty-cart-block)
 :is(.wc-block-components-button,.wp-element-button,.wp-block-button__link):hover{
	background:#2a2927!important;border-color:#2a2927!important;color:#fff!important;
}

/* Empty-cart recommendations should look like Qanda, not a separate Woo theme. */
body.qanda-store .wp-block-woocommerce-empty-cart-block{
	padding-block:14px 50px;
}
body.qanda-store .wp-block-woocommerce-empty-cart-block > .wp-block-heading{
	font-size:clamp(28px,7vw,40px)!important;
	margin-bottom:22px!important;
}
body.qanda-store .wp-block-woocommerce-empty-cart-block .wc-block-grid__product-title{
	color:#111!important;font-weight:680!important;text-decoration:none!important;
}

/* Checkout hierarchy: slightly calmer, conversion-first. */
body.qanda-store .wp-block-woocommerce-checkout-fields-block > :where(div,section){
	margin-block-end:26px;
}
body.qanda-store .wp-block-woocommerce-checkout-payment-block{
	margin-block-top:8px;
}
body.qanda-store .wc-block-components-checkout-step__heading{
	margin-bottom:12px!important;
}
body.qanda-store .wc-block-components-title{
	font-weight:680!important;
}
body.qanda-store .wc-block-checkout__guest-checkout-notice{
	color:#756f67!important;font-size:13px!important;
}

/* Payment rows get their branded label from Qanda Payments v2.3+. */
.qanda-payment-method-label{
	display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-width:0;
}
.qanda-payment-method-label__text{min-width:0;font-weight:650}
.qanda-payment-method-label__brands{display:inline-flex;align-items:center;gap:7px;flex:0 0 auto}
.qanda-payment-method-label__brands img{display:block;max-height:24px;max-width:70px;width:auto;height:auto;object-fit:contain}
.qanda-payment-method-label__card{
	display:inline-grid;place-items:center;width:31px;height:22px;border:1.4px solid #111;border-radius:3px;position:relative;
}
.qanda-payment-method-label__card:before{
	content:"";position:absolute;left:0;right:0;top:6px;border-top:1.4px solid #111
}

/* Mobile conversion polish */
@media(max-width:767px){
	body.qanda-store .wc-block-components-checkout-step{margin-bottom:24px!important}
	body.qanda-store .wc-block-components-checkout-step__heading{font-size:18px!important}
	body.qanda-store .wc-block-components-text-input input,
	body.qanda-store .wc-block-components-combobox .wc-block-components-combobox-control input{
		min-height:52px!important;font-size:16px!important
	}
	body.qanda-store .wp-block-woocommerce-checkout-order-summary-block{
		margin-bottom:18px!important
	}
	body.qanda-store .wc-block-components-checkout-place-order-button{
		min-height:54px!important;font-size:15px!important
	}
	body.qanda-store .wp-block-woocommerce-empty-cart-block{
		padding-top:6px
	}
}
