/* ==========================================================================
   Inside the Sim - WooCommerce (checkout / cart / account) dark brand theme
   Loaded only on WooCommerce pages. Brand vars come from app.css :root.
   ========================================================================== */

.woocommerce, .wc-block-checkout, .wp-block-woocommerce-checkout, .wp-block-woocommerce-cart,
.wc-block-cart, .woocommerce-account, .woocommerce-order, .wc-block-components-notice-banner {
  color: var(--text);
  font-family: var(--f-body);
}

/* --- headings --- */
.woocommerce h1, .woocommerce h2, .woocommerce h3,
.wc-block-components-title, .wc-block-components-checkout-step__title,
.wp-block-woocommerce-checkout-order-summary-block .wc-block-components-title {
  color: var(--text) !important;
  font-family: var(--f-display) !important;
  font-weight: 700;
}
.wc-block-components-checkout-step__description,
.wc-block-components-checkout-step__heading-content { color: var(--sub) !important; }

/* --- form fields --- */
.wc-block-components-text-input input, .wc-block-components-text-input textarea,
.wc-block-components-address-form input, .wc-block-components-address-form select,
.wc-block-components-select select, .wc-block-components-combobox input,
.wc-block-components-quantity-selector input,
.woocommerce form .form-row input.input-text, .woocommerce form .form-row textarea,
.woocommerce form .form-row select, .woocommerce .select2-selection,
input[type="text"], input[type="email"], input[type="tel"], input[type="password"],
input[type="number"], input[type="search"], textarea, select {
  background: var(--bg2) !important;
  color: var(--text) !important;
  border: 1px solid var(--line) !important;
  border-radius: 11px !important;
  box-shadow: none !important;
}
.wc-block-components-text-input label,
.woocommerce form .form-row label, .wc-block-components-checkout-step label,
.wc-block-components-radio-control__label, .wc-block-components-checkbox__label {
  color: var(--sub) !important;
}
::placeholder { color: var(--dim) !important; }
.wc-block-components-text-input.is-active input,
input:focus, textarea:focus, select:focus {
  border-color: var(--green) !important;
  outline: none !important;
  box-shadow: none !important;
}
/* the block field wrapper draws its own border/corners; keep a single clean one */
.wc-block-components-text-input, .wc-block-components-combobox,
.wc-block-components-country-input, .wc-block-components-state-input,
.wc-block-components-address-form__field {
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
}
.wc-block-components-text-input::before, .wc-block-components-text-input::after,
.wc-block-components-combobox::before, .wc-block-components-combobox::after {
  display: none !important;
}
.wc-block-components-text-input.is-active { box-shadow: none !important; }
/* floating label recolour when active */
.wc-block-components-text-input.is-active label { color: var(--green) !important; }

/* --- express checkout + payment method rows --- */
.wc-block-components-express-payment, .wp-block-woocommerce-checkout-express-payment-block,
.wc-block-checkout__payment-method, .wc-block-components-radio-control-accordion-option,
.wc-block-components-radio-control__option {
  background: var(--bg1) !important;
  border-color: var(--line) !important;
  border-radius: 12px !important;
}
.wc-block-components-express-payment__title-container::before,
.wc-block-components-express-payment__title-container::after { border-color: var(--line) !important; }
.wc-block-components-express-payment__title, .wc-block-checkout__actions .wc-block-components-checkout-step__title { color: var(--sub) !important; }

/* --- order summary / totals --- */
.wp-block-woocommerce-checkout-order-summary-block, .wc-block-components-sidebar,
.wc-block-checkout__sidebar, .wc-block-cart__sidebar, .cart_totals, .woocommerce-order-details,
.woocommerce-customer-details {
  background: var(--bg1) !important;
  border: 1px solid var(--line) !important;
  border-radius: var(--r) !important;
}
.wc-block-components-totals-item__label, .woocommerce-Price-currencySymbol { color: var(--sub) !important; }
.wc-block-components-totals-item__value, .wc-block-components-order-summary-item__total-price,
.wc-block-components-product-name, .wc-block-components-totals-footer-item .wc-block-components-totals-item__value,
.woocommerce-Price-amount { color: var(--text) !important; }
.wc-block-components-order-summary-item__quantity { background: var(--bg3) !important; color: var(--text) !important; }
.wc-block-components-panel__button, .wc-block-components-totals-coupon__button { color: var(--green) !important; }
hr, .wc-block-components-totals-item, .wc-block-components-order-summary__content { border-color: var(--line) !important; }

/* --- buttons --- */
.wc-block-components-checkout-place-order-button,
.wc-block-components-button.contained, .wp-element-button,
.woocommerce #place_order, .woocommerce button.button.alt,
.woocommerce a.button.alt, .woocommerce a.button, .woocommerce button.button {
  background: var(--green) !important;
  color: var(--black) !important;
  border: 0 !important;
  border-radius: 12px !important;
  font-family: var(--f-display) !important;
  font-weight: 700 !important;
}
.wc-block-components-button.contained:hover, .woocommerce #place_order:hover { filter: brightness(1.05); }
.wc-block-components-totals-coupon__form .wc-block-components-button { background: var(--bg3) !important; color: var(--text) !important; }

/* --- links, notices, misc --- */
.woocommerce a, .wc-block-components-checkout a, .wc-block-components-address-card a { color: var(--green); }
.wc-block-components-notice-banner {
  background: var(--bg2) !important; border-radius: 12px !important; color: var(--text) !important;
}
.wc-block-components-address-card, .wc-block-checkout__terms { color: var(--sub) !important; border-color: var(--line) !important; }
.wc-block-components-panel { border-color: var(--line) !important; }
.select2-dropdown, .select2-results { background: var(--bg2) !important; color: var(--text) !important; border-color: var(--line) !important; }
.select2-results__option--highlighted { background: var(--bg3) !important; }

/* --- spacing / layout polish --- */
.wc-block-components-checkout-step { margin-bottom: 24px !important; padding-bottom: 24px !important; }
.wc-block-checkout__actions, .wc-block-checkout__actions-block { margin-top: 22px !important; }
.wc-block-components-order-summary-item { padding: 14px 4px !important; }
.wc-block-components-totals-item { padding: 12px 4px !important; }
.wp-block-woocommerce-checkout-order-summary-block { padding: 6px !important; }
.wc-block-components-address-card__edit { color: var(--green) !important; }

/* --- classic (shortcode) checkout / cart --- */
.woocommerce form.checkout, .woocommerce .cart-collaterals { color: var(--text); }
.woocommerce h3, .woocommerce #order_review_heading { color: var(--text) !important; font-family: var(--f-display) !important; font-weight: 700; }
.woocommerce form .form-row label, .woocommerce-checkout .form-row label { color: var(--sub) !important; }
.woocommerce-checkout #payment {
  background: var(--bg1) !important; border: 1px solid var(--line) !important; border-radius: var(--r) !important;
}
.woocommerce-checkout #payment ul.payment_methods {
  background: transparent !important; border-bottom: 1px solid var(--line) !important;
}
.woocommerce-checkout #payment ul.payment_methods li, .woocommerce-checkout #payment label { color: var(--text) !important; }
.woocommerce-checkout #payment div.payment_box {
  background: var(--bg2) !important; color: var(--sub) !important; border-radius: 10px !important;
}
.woocommerce-checkout #payment div.payment_box::before { border-bottom-color: var(--bg2) !important; }
.woocommerce table.shop_table, .woocommerce-checkout-review-order-table, .woocommerce table.cart {
  background: var(--bg1) !important; border: 1px solid var(--line) !important; border-radius: var(--r) !important; overflow: hidden;
}
.woocommerce table.shop_table th, .woocommerce table.shop_table td,
.woocommerce table.shop_table tfoot td, .woocommerce table.shop_table tfoot th { border-color: var(--line) !important; color: var(--text) !important; }
.woocommerce table.shop_table thead th, .woocommerce .cart-subtotal th, .woocommerce .order-total th { color: var(--sub) !important; }
.woocommerce-info, .woocommerce-message, .woocommerce-error, .woocommerce .woocommerce-info {
  background: var(--bg2) !important; color: var(--text) !important; border-top-color: var(--green) !important;
}
.woocommerce #place_order, .woocommerce button#place_order { width: 100% !important; margin-top: 10px !important; padding: 15px !important; }
.woocommerce .select2-container--default .select2-selection--single .select2-selection__rendered { color: var(--text) !important; }
.woocommerce .blockUI.blockOverlay { background: var(--bg) !important; }

/* hide coupons (not used on this site) */
.checkout_coupon, .woocommerce-form-coupon-toggle, .woocommerce-form-coupon,
.woocommerce-info.coupon, .cart .actions .coupon, .woocommerce-checkout .woocommerce-form-coupon-toggle { display: none !important; }

/* breathing room around "Your order" */
.woocommerce #order_review_heading { margin: 48px 0 20px !important; }

/* payment method list: tidy checklist look */
.woocommerce-checkout #payment ul.payment_methods { padding: 8px 18px !important; margin: 0 !important; }
.woocommerce-checkout #payment ul.payment_methods li {
  padding: 15px 2px !important; margin: 0 !important; list-style: none !important;
  border-bottom: 1px solid var(--line) !important;
}
.woocommerce-checkout #payment ul.payment_methods li:last-child { border-bottom: 0 !important; }
.woocommerce-checkout #payment ul.payment_methods li input[type="radio"] { accent-color: var(--green); }
.woocommerce-checkout #payment ul.payment_methods li label { font-weight: 600 !important; }
.woocommerce-checkout #payment div.payment_box { margin: 12px 0 4px !important; padding: 16px !important; }

/* space between the payment card and the pay button, button full width of the card */
.woocommerce-checkout #payment .form-row.place-order, .woocommerce-checkout #payment .place-order {
  margin: 22px 0 0 !important; padding: 18px !important; border-top: 1px solid var(--line) !important;
}
.woocommerce #place_order, .woocommerce button#place_order { width: 100% !important; }

/* space the PayPal button away from the payment card */
.woocommerce-checkout #ppc-button-ppcp-gateway,
.woocommerce-checkout .ppcp-button-container,
.woocommerce-checkout [id*="ppc-button"],
.woocommerce-checkout .ppc-button-wrapper { margin-top: 28px !important; }
.woocommerce-checkout #payment .paypal-buttons,
.woocommerce-checkout [id*="ppc-button"] .paypal-buttons { width: 100% !important; }
/* Apple Pay was clipped. Fix ONLY the Apple Pay container (never touch .paypal-buttons -
   PayPal's iframe height is SDK-controlled and collapses if forced). */
.woocommerce-checkout #payment .place-order,
.woocommerce-checkout #ppc-button-ppcp-gateway,
.woocommerce-checkout [id^="ppc-button"] {
  overflow: visible !important;
  max-height: none !important;
}
.woocommerce-checkout #ppc-button-applepay-container,
.woocommerce-checkout .ppc-button-applepay-container {
  height: auto !important; min-height: 48px !important; max-height: none !important;
  overflow: visible !important; width: 100% !important;
}
.woocommerce-checkout apple-pay-button,
.woocommerce-checkout #ppc-button-applepay-container apple-pay-button {
  --apple-pay-button-width: 100%;
  --apple-pay-button-height: 48px;
  --apple-pay-button-border-radius: 10px;
  display: block !important;
  width: 100% !important;
  height: 48px !important;
  min-height: 48px !important;
}

/* --- cart page polish --- */
/* no product thumbnail (no images used); keep the cell tiny so the row stays aligned */
.woocommerce table.cart td.product-thumbnail img,
.woocommerce table.cart td.product-thumbnail { display: none !important; }
.woocommerce table.cart td.product-name { padding-left: 16px !important; }
/* spacing inside the Cart totals card */
.woocommerce .cart_totals { padding: 6px 22px 22px !important; }
.woocommerce .cart_totals h2 { margin: 16px 0 14px !important; }
.woocommerce .cart_totals table.shop_table th,
.woocommerce .cart_totals table.shop_table td { padding: 14px 16px !important; }
.woocommerce .cart-collaterals .cart_totals .wc-proceed-to-checkout { padding: 18px 0 0 !important; }
.woocommerce .cart_totals .wc-proceed-to-checkout a.checkout-button { margin-bottom: 0 !important; }

/* --- order-received (thank you) page --- */
.woocommerce-thankyou-order-received { margin: 0 0 30px !important; font-size: 16px !important; }
.woocommerce-order .woocommerce-order-details,
.woocommerce-order .woocommerce-customer-details { padding: 6px 26px 26px !important; margin-bottom: 28px !important; }
.woocommerce-order-details__title, .woocommerce-customer-details__title,
.woocommerce-column__title { margin: 20px 0 16px !important; }
.woocommerce-order .woocommerce-order-details table.shop_table { margin-bottom: 0 !important; }

/* container width on WooCommerce pages */
body.woocommerce-checkout .wrap, body.woocommerce-cart .wrap, body.woocommerce-account .wrap,
body.woocommerce-page .wrap { max-width: var(--wrap) !important; }
