/* ==========================================================
   EcoBen Store: block cart + block checkout in brand style.
   Targets public component class names of the WooCommerce blocks.
   ========================================================== */

.wp-block-woocommerce-checkout,
.wp-block-woocommerce-cart{ font-family:var(--eb-font); color:var(--eb-ink); }
.woocommerce-checkout .site-main,
.woocommerce-cart .site-main{ padding-top:28px; }
.wp-block-woocommerce-checkout{ padding-top:0; }

/* Section titles */
.wp-block-woocommerce-checkout .wc-block-components-title,
.wp-block-woocommerce-checkout .wc-block-components-checkout-step__title,
.wp-block-woocommerce-cart .wc-block-cart__totals-title,
.wp-block-woocommerce-checkout-order-summary-block .wc-block-components-title{
	font-family:var(--eb-font) !important; font-size:20px !important; font-weight:700 !important; letter-spacing:var(--eb-tracking); color:var(--eb-ink-strong); text-transform:none;
}
.wc-block-components-checkout-step{ margin-bottom:28px !important; }
.wc-block-components-checkout-step__description{ color:var(--eb-ink-faint); font-size:14px; }
.wp-block-woocommerce-checkout .wc-block-components-product-name,
.wp-block-woocommerce-cart .wc-block-components-product-name{ font-family:var(--eb-font); font-weight:600; font-size:14.5px; line-height:1.35; color:var(--eb-ink-strong); }

/* Inputs */
.wc-block-components-text-input input,
.wc-block-components-combobox .wc-block-components-combobox-control input,
.wc-block-components-textarea,
.wc-blocks-components-select .wc-blocks-components-select__select{ border-radius:var(--eb-radius) !important; border-color:var(--eb-line) !important; font-family:var(--eb-font) !important; }
.wc-block-components-text-input input:focus,
.wc-blocks-components-select .wc-blocks-components-select__select:focus{ border-color:var(--eb-primary) !important; box-shadow:0 0 0 1px var(--eb-primary) !important; }
.wc-block-components-text-input label,
.wc-blocks-components-select__label{ font-family:var(--eb-font); }

/* Radios (shipping, payment): one frame per option, selected framed in brand colour */
.wc-block-components-radio-control--highlight-checked::after,
.wc-block-components-radio-control--highlight-checked .wc-block-components-radio-control-accordion-option::after,
.wc-block-components-radio-control--highlight-checked .wc-block-components-radio-control__option::after{ display:none !important; }
.wc-block-components-radio-control--highlight-checked{ display:flex; flex-direction:column; gap:10px; border:0 !important; box-shadow:none !important; }
.wc-block-components-radio-control--highlight-checked > .wc-block-components-radio-control__option,
.wc-block-components-radio-control--highlight-checked > .wc-block-components-radio-control-accordion-option{
	border:1px solid var(--eb-line) !important; border-radius:var(--eb-radius) !important; box-shadow:none !important; background:var(--eb-paper); overflow:hidden; margin:0 !important;
}
.wc-block-components-radio-control--highlight-checked > .wc-block-components-radio-control__option-checked,
.wc-block-components-radio-control--highlight-checked > .wc-block-components-radio-control-accordion-option--checked-option-highlighted{
	border-color:var(--eb-primary) !important; box-shadow:0 0 0 1px var(--eb-primary) !important;
}
.wc-block-components-radio-control-accordion-option .wc-block-components-radio-control__option{ box-shadow:none !important; border:0 !important; margin:0 !important; }
.wc-block-components-radio-control__option{ padding-top:16px !important; padding-bottom:16px !important; }
.wc-block-components-radio-control__label,
.wc-block-components-payment-method-label{ font-family:var(--eb-font); font-weight:600 !important; color:var(--eb-ink-strong); }
.wc-block-components-radio-control-accordion-content{ padding:14px 16px 16px 48px !important; background:var(--eb-cream); border-top:1px solid var(--eb-line); font-size:14px; color:var(--eb-ink-soft); }
.wc-block-components-radio-control .wc-block-components-radio-control__input{ border-color:var(--eb-ink-faint); }
.wc-block-components-radio-control .wc-block-components-radio-control__input:checked{ border-color:var(--eb-primary); }
.wc-block-components-radio-control .wc-block-components-radio-control__input:checked::before{ background:var(--eb-primary); }
.wc-block-components-checkbox .wc-block-components-checkbox__input[type=checkbox]:checked{ background:var(--eb-primary); border-color:var(--eb-primary); }
.wc-block-components-checkbox .wc-block-components-checkbox__mark{ fill:#fff; }

/* Primary actions */
.wc-block-components-checkout-place-order-button,
.wc-block-cart__submit-button,
.wp-block-woocommerce-cart .wc-block-components-button:not(.is-link):not(.wc-block-components-totals-coupon__button){
	background:var(--eb-primary) !important; color:#fff !important; border:0 !important; border-radius:var(--eb-radius) !important; font-family:var(--eb-font) !important; font-weight:700 !important; min-height:56px; font-size:17px !important; transition:background .2s;
}
.wc-block-components-checkout-place-order-button:hover:not(:disabled),
.wc-block-cart__submit-button:hover{ background:var(--eb-primary-soft) !important; }
.wc-block-components-checkout-return-to-cart-button{ color:var(--eb-ink-soft); }
.wc-block-checkout__terms{ font-size:13px; color:var(--eb-ink-faint); }

/* Order summary card */
.wp-block-woocommerce-checkout-order-summary-block,
.wp-block-woocommerce-cart-order-summary-block{ border:1px solid var(--eb-line) !important; border-radius:var(--eb-radius-card); padding:6px 18px; background:var(--eb-paper); transition:opacity .2s; }
.eb-cart-busy .wp-block-woocommerce-checkout-order-summary-block,
.eb-cart-busy .eb-offer{ opacity:.6; pointer-events:none; }
.wc-block-components-order-summary-item{ align-items:flex-start; padding:14px 0 !important; }
.wc-block-components-order-summary-item__image img,
.wc-block-cart-item__image img{ border-radius:var(--eb-radius-s); background:var(--eb-cream); }
.wc-block-components-order-summary-item__image{ width:56px !important; }
.wc-block-components-order-summary-item__image img{ width:56px; max-width:56px; height:56px; object-fit:contain; }
.wc-block-components-order-summary-item:has(.eb-sq) .wc-block-components-order-summary-item__quantity{ display:none !important; }
.wc-block-components-order-summary-item .wc-block-components-product-metadata__description,
.wc-block-cart-item__wrap .wc-block-components-product-metadata__description{ display:none; }
/* The line total sits on the right; the unit price under the name only repeated it. */
.wc-block-components-order-summary-item .wc-block-cart-item__prices{ display:none; }
.wc-block-components-order-summary-item .wc-block-components-product-metadata{ margin-top:4px; font-size:13px; color:var(--eb-ink-faint); }
.wc-block-components-order-summary-item__description{ padding-right:8px; }
.wc-block-components-order-summary-item__total-price{ font-weight:700; color:var(--eb-ink-strong); }
.wc-block-components-totals-item{ font-size:14.5px; }
.wc-block-components-totals-footer-item .wc-block-components-totals-item__value,
.wc-block-components-totals-footer-item .wc-block-components-totals-item__label{ font-size:20px; font-weight:700; color:var(--eb-primary); }

/* Mobile: WooCommerce moves the summary above the place-order button inside its own frame. */
.wp-block-woocommerce-checkout-order-summary-block.checkout-order-summary-block-fill-wrapper{ border:0 !important; padding:0 !important; }
/* ...and keeps a second, collapsed copy in the sidebar under the button: one summary is enough. */
.wc-block-checkout.is-mobile .wc-block-checkout__sidebar{ display:none !important; }
/* Accounts are created automatically (Account\AutoAccount): the guest notice only confuses. */
.wc-block-checkout__guest-checkout-notice{ display:none !important; }

/* Cart page: no cross-sells grid (also removed server side) */
.wp-block-woocommerce-cart .wp-block-woocommerce-product-collection{ display:none !important; }

/* Empty cart: brand buttons and type in the "new products" grid */
.wp-block-woocommerce-empty-cart-block .wc-block-grid__product-add-to-cart .wp-block-button__link{ background:var(--eb-accent) !important; color:#fff !important; border-radius:var(--eb-radius) !important; font-weight:600; padding:10px 16px; }
.wp-block-woocommerce-empty-cart-block .wc-block-grid__product-title{ color:var(--eb-ink-strong); font-weight:600; }
.wp-block-woocommerce-empty-cart-block .wc-block-grid__product-price{ color:var(--eb-primary); font-weight:700; }
.wp-block-woocommerce-empty-cart-block .wc-block-grid__product-rating{ display:none; }

/* Cart page: compact quantity selector like the drawer and the checkout steppers */
.wc-block-components-quantity-selector{ width:auto !important; height:36px; border-radius:999px !important; border:1px solid var(--eb-line) !important; overflow:hidden; }
.wc-block-components-quantity-selector::after{ display:none !important; }
.wc-block-components-quantity-selector .wc-block-components-quantity-selector__input{ width:34px !important; min-width:0; min-height:0 !important; height:34px; padding:0 !important; border:0 !important; box-shadow:none !important; font-size:15px !important; font-weight:600 !important; }
.wc-block-components-quantity-selector .wc-block-components-quantity-selector__button{ width:34px; min-width:34px; height:34px; color:var(--eb-ink) !important; font-size:18px !important; opacity:1 !important; }
.wc-block-cart-item__remove-link{ color:var(--eb-ink-faint) !important; }
.wc-block-cart-items__header{ font-size:12.5px; letter-spacing:.04em; color:var(--eb-ink-faint); }
.wc-block-cart .wc-block-cart-item__product .wc-block-components-product-name{ font-size:15.5px; }

/* Quantity stepper in the summary (checkout.js) */
.eb-sq{ display:inline-flex; align-items:center; margin-top:10px; border:1px solid var(--eb-line); border-radius:999px; height:32px; background:var(--eb-paper); }
.eb-sq__btn{ width:32px; height:100%; border:0; background:none; padding:0; color:var(--eb-ink); font-size:17px; line-height:1; display:inline-flex; align-items:center; justify-content:center; border-radius:999px; }
.eb-sq__btn:hover{ color:var(--eb-primary); }
.eb-sq__btn[data-remove]:hover{ color:var(--eb-danger); }
.eb-sq__btn:disabled{ opacity:.35; }
.eb-sq__n{ min-width:22px; text-align:center; font-weight:600; font-size:14px; }

/* Coupon: tinted bar like ecoben.pl */
.wc-block-components-totals-coupon.wc-block-components-panel{ margin:10px 0 !important; padding:0 !important; border:1px solid #CFE6C4; border-radius:var(--eb-radius); background:var(--eb-tint); }
.wc-block-components-totals-coupon .wc-block-components-panel__button{ min-height:48px; padding:12px 44px 12px 42px !important; margin:0 !important; font-size:14.5px; font-weight:600; color:var(--eb-primary); position:relative; }
.wc-block-components-totals-coupon .wc-block-components-panel__button::before{ content:""; position:absolute; left:14px; top:50%; width:18px; height:18px; transform:translateY(-50%); background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23008000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12.6 2.6A2 2 0 0 0 11.2 2H4a2 2 0 0 0-2 2v7.2a2 2 0 0 0 .6 1.4l8.7 8.7a2.4 2.4 0 0 0 3.4 0l6.6-6.6a2.4 2.4 0 0 0 0-3.4Z'/%3E%3Ccircle cx='7.5' cy='7.5' r='1.2'/%3E%3C/svg%3E") center/contain no-repeat; }
.wc-block-components-totals-coupon .wc-block-components-panel__button-icon{ right:12px !important; left:auto !important; fill:var(--eb-primary); }
.wc-block-components-totals-coupon .wc-block-components-panel__content{ padding:0 12px 12px !important; }
.wc-block-components-totals-coupon__form{ gap:8px; }
.wc-block-components-totals-coupon__button{ background:var(--eb-accent) !important; color:#fff !important; border:0 !important; border-radius:var(--eb-radius) !important; font-weight:600 !important; min-height:48px; }
.wc-block-components-totals-coupon__button:disabled{ opacity:.55; }

/* "Add to your order" offer under the summary (checkout.js) */
.eb-offer{ margin:14px 0 20px; border:1.5px dashed #BFE0AE; border-radius:var(--eb-radius-card); background:var(--eb-tint); padding:14px 16px; transition:opacity .2s; }
.eb-offer__title{ margin:0 0 10px; font-size:14px; font-weight:700; color:var(--eb-primary); }
.eb-offer__row{ display:grid; grid-template-columns:56px 1fr auto; gap:12px; align-items:center; }
.eb-offer__img{ width:56px; height:56px; object-fit:contain; background:var(--eb-paper); border-radius:var(--eb-radius-s); }
.eb-offer__info{ display:flex; flex-direction:column; min-width:0; line-height:1.3; }
.eb-offer__name{ font-size:13.5px; font-weight:600; color:var(--eb-ink-strong); }
.eb-offer__var{ font-size:12px; color:var(--eb-ink-faint); }
.eb-offer__price{ font-size:14px; font-weight:700; color:var(--eb-primary); }
.eb-offer__add{ min-height:38px; padding:0 16px; border:0; border-radius:999px; background:var(--eb-accent); color:#fff; font-size:13.5px; font-weight:600; }
.eb-offer__add:hover{ background:var(--eb-accent-deep); }
.eb-offer__add:disabled{ opacity:.55; }

/* Contact step: "Log in" as a visible pill (opens the login popup, account.js) */
.wc-block-checkout__login-prompt{ display:inline-flex; align-items:center; gap:7px; padding:7px 14px 7px 12px; border-radius:999px; background:var(--eb-tint); border:1px solid #CFE6C4; color:var(--eb-primary) !important; font-size:14px; font-weight:600; text-decoration:none !important; transition:background .15s; }
.wc-block-checkout__login-prompt::before{ content:""; width:16px; height:16px; background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23008000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E") center/contain no-repeat; }
.wc-block-checkout__login-prompt:hover{ background:#E4F2DC; }
/* Known e-mail hint */
.eb-known{ margin:10px 0 0; padding:12px 14px; border-radius:var(--eb-radius); background:var(--eb-tint); border:1px solid #CFE6C4; font-size:14px; color:var(--eb-ink-strong); }
.eb-known__line{ margin:0; line-height:1.5; }
.eb-known__btn, .eb-known__link{ border:0; background:none; padding:0; color:var(--eb-primary); font-weight:700; text-decoration:underline; text-underline-offset:3px; }
.eb-known__msg{ margin:8px 0 0; font-size:13.5px; color:var(--eb-ink-soft); }
.eb-known__msg.is-error{ color:var(--eb-danger); }

/* Private / company pills (checkout.js) */
.eb-buyer-type{ display:flex; gap:10px; flex-wrap:wrap; margin:16px 0 4px; }
.eb-buyer-type__pill{ flex:1 1 160px; min-height:48px; padding:12px 16px; border:1.5px solid var(--eb-line); border-radius:var(--eb-radius); background:var(--eb-paper); color:var(--eb-ink-soft); font-size:15px; font-weight:600; transition:border-color .15s,background .15s,color .15s; }
.eb-buyer-type__pill:hover{ border-color:var(--eb-ink-faint); }
.eb-buyer-type__pill[aria-pressed="true"]{ border-color:var(--eb-primary); background:var(--eb-tint); color:var(--eb-primary); box-shadow:0 0 0 1px var(--eb-primary); }
.eb-visually-hidden{ position:absolute !important; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.eb-field-hidden{ display:none !important; }

@media (min-width:861px){
	.wp-block-woocommerce-checkout .wc-block-components-sidebar{ position:sticky; top:var(--eb-sidebar-top, 96px); align-self:flex-start; }
}
@media (max-width:860px){
	.wp-block-woocommerce-checkout .wc-block-components-sidebar-layout{ display:block; }
	.wp-block-woocommerce-checkout .wc-block-components-main,
	.wp-block-woocommerce-checkout .wc-block-components-sidebar{ width:100%; max-width:100%; padding-left:0; padding-right:0; }
	.wp-block-woocommerce-checkout .wc-block-components-sidebar{ margin-top:24px; }
	.woocommerce-checkout .site-main{ padding-top:16px; }
}

/* Intra-community VAT note under the CUI field */
.eb-vat-note{margin:6px 0 0;font-size:13px;line-height:1.45;color:var(--eb-ink-soft)}
.eb-vat-note.is-exempt{color:var(--eb-primary-deep);font-weight:500}

/* iOS zooms into inputs under 16px: keep form controls at 16px on phones */
@media (max-width:860px){
	.wc-block-components-quantity-selector .wc-block-components-quantity-selector__input{ font-size:16px !important; }
}
