/*
 * Re-skin for WooCommerce's own checkout/cart/my-account/order templates.
 * This file ONLY restyles WooCommerce's default markup with the site's design
 * tokens/fonts/colors — no WooCommerce PHP templates or logic are modified.
 * Loaded only on WooCommerce pages, see buildsoftech_enqueue_assets() in functions.php.
 */

.woo-wrap { padding-top: 160px; }
.woo-wrap .legal-content { max-width: 900px; }
.woo-wrap .legal-content > h1:first-child { display: none; }

/* Hero band (matches .premium-contact-hero) + overlapping white card, used on
   Cart/Checkout/My Account/Order Confirmation pages instead of the plain
   the_title() heading (see page.php). */
.woo-hero {
  background: linear-gradient(135deg, var(--bg-slate-900) 0%, var(--primary) 100%);
  padding: 140px 0 100px;
  text-align: center; color: #fff; position: relative; overflow: hidden;
}
.woo-hero::before {
  content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
  background: radial-gradient(circle at center, rgba(255,255,255,0.05) 0%, transparent 50%);
  pointer-events: none;
}
.woo-hero h1 {
  font-size: 40px; font-weight: 500; line-height: 1.1;
  color: #fff; font-family: var(--font-display); letter-spacing: -0.03em; margin: 0;
}
@media (min-width: 768px) { .woo-hero h1 { font-size: 52px; } }
@media (max-width: 767px) { .woo-hero h1 { font-size: 28px !important; } }

/* WC's own mobile CSS swaps the sidebar (order summary) to appear ABOVE the main
   form via flex "order" — the client wants the summary to stay at the bottom
   like desktop, so this puts main back first / sidebar back last on mobile too. */
@media (max-width: 767px) {
  .wc-block-components-main { order: 0 !important; }
  .wc-block-components-sidebar { order: 1 !important; }
}

.woo-wrap-card { padding-top: 0 !important; padding-bottom: 100px; background: #fff; }
.woo-card > .wc-block-checkout, .woo-card > .wc-block-cart { padding-top: 0 !important; }
.woo-wrap-card .legal-content.woo-card {
  max-width: 1100px; margin: -60px auto 0; position: relative; z-index: 10;
  background: #fff; border-radius: 24px; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.15);
  border: 1px solid #E2E8F0; padding: 40px;
}
@media (max-width: 640px) {
  .woo-hero { padding: 120px 0 64px; }
  .woo-wrap-card .legal-content.woo-card {
    margin-top: -32px;
    margin-left: 16px;
    margin-right: 16px;
    width: auto;
    padding: 24px;
    border-radius: 16px;
  }
}

.woocommerce h1, .woocommerce h2, .woocommerce h3 {
  font-family: var(--font-display);
  color: var(--text-slate-900);
  letter-spacing: -0.02em;
}

.woocommerce form .form-row label,
.woocommerce-billing-fields label,
.woocommerce-additional-fields label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-slate-900);
  margin-bottom: 8px;
  display: block;
}

.woocommerce form .input-text,
.woocommerce form select,
.woocommerce form textarea,
.woocommerce-checkout #payment textarea {
  width: 100%;
  padding: 14px 18px;
  border: 1px solid var(--text-slate-400);
  border-radius: var(--radius-sm, 8px);
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--text-slate-900);
  background: #fff;
  transition: border-color 0.2s;
}

.woocommerce form .input-text:focus,
.woocommerce form select:focus,
.woocommerce form textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.woocommerce table.shop_table {
  border: 1px solid var(--text-slate-400);
  border-radius: 12px;
  overflow: hidden;
  border-collapse: collapse;
  width: 100%;
}

.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
  padding: 14px 16px;
  border-bottom: 1px solid #e2e8f0;
  color: var(--text-slate-700);
  font-size: 15px;
}

.woocommerce table.shop_table th { font-weight: 600; color: var(--text-slate-900); background: var(--bg-secondary, #F8FAFC); }

.woocommerce-checkout #payment {
  background: var(--bg-secondary, #F8FAFC);
  border-radius: 16px;
  padding: 24px;
  border: 1px solid #e2e8f0;
}

.woocommerce-checkout #payment ul.payment_methods { list-style: none; padding: 0; margin: 0 0 16px; }
.woocommerce-checkout #payment ul.payment_methods li { padding: 12px 0; border-bottom: 1px solid #e2e8f0; }
.woocommerce-checkout #payment .payment_box { background: #fff; border-radius: 12px; padding: 16px; margin-top: 12px; font-size: 14px; color: var(--text-slate-600); line-height: 1.7; }

.woocommerce #payment #place_order,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
  background: var(--primary);
  color: #fff !important;
  border: none;
  border-radius: 9999px;
  padding: 14px 32px;
  font-weight: 600;
  font-size: 15px;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: opacity 0.2s;
}

.woocommerce #payment #place_order:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover {
  opacity: 0.9;
}

.woocommerce-message, .woocommerce-info, .woocommerce-error, .woocommerce-noreviews {
  border-top-color: var(--primary) !important;
  border-radius: 8px;
  font-family: var(--font-sans);
}

.woocommerce ::placeholder { color: var(--text-slate-400); }

@media (max-width: 640px) {
  .woo-wrap { padding-top: 120px; }
}

/* Thank-you page + shared payment-details partial (template-parts/payment-details.php) */
.thankyou-wrap { max-width: 640px; }
.thankyou-check {
  width: 72px; height: 72px; border-radius: 9999px;
  background: #dcfce7; color: #16a34a;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 24px;
}
.thankyou-order-box {
  background: var(--bg-secondary, #F8FAFC);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px;
  margin: 24px 0;
}

.payment-details-block {
  background: var(--bg-secondary, #F8FAFC);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px;
  margin: 24px 0;
}
.payment-details-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid #e2e8f0; gap: 16px;
}
.payment-details-row:last-child { border-bottom: none; }
.payment-details-label { font-size: 14px; color: var(--text-slate-600); }
.payment-details-value { font-size: 15px; font-weight: 600; color: var(--text-slate-900); text-align: right; word-break: break-word; }

.payment-qr-placeholder {
  margin: 16px 0;
  padding: 32px 16px;
  border: 2px dashed var(--text-slate-400);
  border-radius: 12px;
  text-align: center;
  color: var(--text-slate-500);
  font-weight: 600;
  font-size: 14px;
  background: #fff;
}
.payment-qr-image { max-width: 220px; display: block; margin: 16px auto; border-radius: 8px; }

.whatsapp-cta-btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: #25D366; color: #fff !important;
  border-radius: 9999px; padding: 14px 28px;
  font-weight: 600; font-size: 15px; font-family: var(--font-sans);
  transition: opacity 0.2s;
}
.whatsapp-cta-btn:hover { opacity: 0.9; }

/* ==========================================================================
   WooCommerce Cart/Checkout BLOCKS (this store uses the block-based checkout,
   not the classic [woocommerce_checkout] shortcode — the "wc-block-*" classes
   below are what actually render on /checkout/ and /cart/, so the classic
   selectors above the ---- separator don't reach them). Re-skinned to match
   the site's card/button/input language (see .legal-content, .pricing-card,
   .btn in the main style.css for the source patterns being mirrored here).
   ========================================================================== */

.wc-block-checkout, .wc-block-cart {
  font-family: var(--font-sans);
  color: #404040;
}

.wc-block-components-checkout-step__title,
.wc-block-components-title {
  font-family: var(--font-display) !important;
  color: var(--text-slate-900) !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em;
}

/* Each checkout section (contact / shipping / billing / payment) as its own card. */
.wc-block-components-checkout-step {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 20px;
  padding: 28px 28px 32px;
  margin-bottom: 20px;
}
.wc-block-components-checkout-step__content { margin-top: 4px; }

.wc-block-components-text-input input,
.wc-block-components-address-form input,
.wc-block-checkout select,
.wc-block-components-combobox-control input {
  font-family: var(--font-sans) !important;
  border-radius: var(--radius-sm, 8px) !important;
  border-color: var(--text-slate-400) !important;
}
.wc-block-components-text-input input:focus,
.wc-block-components-address-form input:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 1px var(--primary) !important;
}
.wc-block-components-text-input label,
.wc-block-components-address-form label {
  font-family: var(--font-sans) !important;
  color: #737373 !important;
}

/* Payment method option (the "UPI / Bank Transfer" row). The visible border/radius
   lives on the OUTER accordion-option wrapper (spans title + description together);
   WC's own default box-shadow outline on that same element is switched off so the
   two don't stack into a double border, and the inner label stays borderless. */
.wc-block-components-radio-control-accordion-option {
  box-shadow: none !important;
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 12px !important;
  overflow: hidden;
  margin-bottom: 8px;
}
.wc-block-components-radio-control-accordion-option--checked-option-highlighted {
  border-color: var(--primary);
  background: var(--bg-secondary, #F8FAFC);
}
.wc-block-components-radio-control__option {
  background: transparent;
  border: none !important;
  border-radius: 0 !important;
  margin-bottom: 0;
  padding: 16px 16px 16px 52px !important;
}
.wc-block-components-radio-control__input {
  accent-color: var(--primary);
}
.wc-block-components-payment-method-label {
  font-family: var(--font-sans);
  font-weight: 600;
  color: var(--text-slate-900);
}
.wc-block-components-payment-method-description {
  color: #525252;
  font-size: 14px;
  line-height: 1.6;
}
.wc-block-components-radio-control-accordion-content { color: #525252; font-size: 14px; line-height: 1.7; }

/* Place order + other block buttons. */
.wc-block-components-checkout-place-order-button,
.wc-block-cart__submit-button,
.wp-block-woocommerce-proceed-to-checkout-block .wc-block-components-button {
  background: var(--primary) !important;
  border-radius: 9999px !important;
  font-family: var(--font-sans) !important;
  font-weight: 600 !important;
  padding: 14px 32px !important;
  height: auto !important;
}
.wc-block-components-checkout-place-order-button:hover { background: var(--primary-hover) !important; }

/* Order summary sidebar (cart contents + totals). Sits inside the page's own
   .woo-card frame (see page.php) so it does not need its own border/shadow too
   — that produced a visible double-border. */
.wc-block-components-sidebar {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}
.woo-card .wc-block-components-checkout-step {
  border: none;
  box-shadow: none;
  padding: 24px 0;
  border-bottom: 1px solid #EEF2F6;
  border-radius: 0;
  margin-bottom: 0;
}
.woo-card .wc-block-components-checkout-step:last-of-type { border-bottom: none; }
.wc-block-components-checkout-order-summary__title-text,
.wc-block-components-order-summary__title { font-family: var(--font-display) !important; color: var(--text-slate-900) !important; font-weight: 600 !important; }

.wc-block-components-order-summary-item {
  padding: 14px 0;
  border-bottom: 1px solid #EEF2F6;
  align-items: flex-start !important;
}
.wc-block-components-order-summary-item__image { border-radius: 10px; overflow: hidden; }
.wc-block-components-order-summary-item__description,
.wc-block-components-order-summary-item__individual-prices,
.wc-block-components-order-summary-item__individual-price { color: #525252 !important; }
.wc-block-components-product-name { color: var(--text-slate-900) !important; font-weight: 600; font-family: var(--font-sans); }
.wc-block-components-order-summary-item__total-price .wc-block-formatted-money-amount { color: var(--text-slate-900); font-weight: 600; }

.wc-block-components-totals-item__label { color: #525252; }
.wc-block-formatted-money-amount { font-family: var(--font-sans); color: var(--text-slate-900); }
.wc-block-components-totals-footer-item .wc-block-components-totals-item__label,
.wc-block-components-totals-footer-item .wc-block-formatted-money-amount {
  font-family: var(--font-display) !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  color: var(--text-slate-900) !important;
}
.wc-block-components-totals-wrapper::after { border-color: #EEF2F6 !important; }
.wc-block-components-totals-coupon-link, .wc-block-components-panel__button { color: var(--primary) !important; font-weight: 600; }

.wc-block-components-checkbox svg { fill: var(--primary); }
/* "You are currently checking out as a guest" — not useful here since guest
   checkout is the only option offered (no account creation flow to contrast it with). */
.wc-block-checkout__guest-checkout-notice { display: none; }
/* Order-note textarea: default WC textareas are user-resizable (both directions),
   which let this stretch to an enormous size by accident. Cap it to a sensible,
   non-resizable box. */
.wc-block-checkout__add-note textarea,
.wc-block-components-textarea {
  resize: none !important;
  height: 90px !important;
  max-height: 90px !important;
}
/* Terms checkbox label: keep it as a light, small disclaimer line (matches the
   original plain-text notice) rather than WC's bold default checkbox-label style. */
.wc-block-checkout__terms .wc-block-components-checkbox__label {
  font-size: 13px !important;
  font-weight: 400 !important;
  color: #737373 !important;
}
.wc-block-checkout__terms .wc-block-components-checkbox__label a {
  font-weight: 400;
  color: var(--primary);
}
.wc-block-checkout__terms .wc-block-components-checkbox__input {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
}
.wc-block-checkout__terms .wc-block-components-checkbox__mark {
  width: 11px !important;
  height: 11px !important;
}
/* The site-wide `input { padding: 14px 16px }` rule (written for the contact form)
   was inflating this 20x20 checkbox to 34x30, throwing off the checkmark position. */
.wc-block-components-checkbox__input {
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  padding: 0 !important;
}
.wc-block-checkout__terms a { color: var(--primary); font-weight: 600; }

/* Plan products are virtual with no real product photo — the placeholder/broken
   image WooCommerce falls back to looks worse than no image, so hide it and let
   the name/price line take the full row width. */
.wc-block-components-order-summary-item__image { display: none !important; }
.wc-block-components-order-summary-item__description { margin-left: 0 !important; }

/* Only one payment method ever shows (see buildsoftech_only_bacs_gateway), so the
   radio-button chrome is pure noise — present it as a plain selected info row instead. */
.wc-block-components-radio-control__option {
  padding: 16px 20px !important;
  background: var(--bg-secondary, #F8FAFC);
}
.wc-block-components-radio-control__input { display: none !important; }
.wc-block-components-radio-control__option-layout { padding-left: 0 !important; }
.wc-block-components-payment-method-label::before {
  content: "";
  display: inline-block;
  width: 18px; height: 18px;
  margin-right: 8px;
  vertical-align: -3px;
  background: var(--primary);
  border-radius: 4px;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Crect x='2' y='5' width='20' height='14' rx='2'/%3E%3Cline x1='2' y1='10' x2='22' y2='10'/%3E%3C/svg%3E") center / 14px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Crect x='2' y='5' width='20' height='14' rx='2'/%3E%3Cline x1='2' y1='10' x2='22' y2='10'/%3E%3C/svg%3E") center / 14px no-repeat;
}

@media (max-width: 782px) {
  .wc-block-components-checkout-step { padding: 20px; }
}

/* Mobile: WC portals ("Fill") a second full order-summary breakdown right
   before the place-order button so mobile shoppers don't have to scroll back
   to the sidebar. Since the terms/actions block (containing that Fill) now
   lives inside the sidebar too (see checkout-page.js), expanding the sidebar's
   compact title shows its own breakdown AND the Fill's copy at once — keep the
   compact title (total + chevron) as a toggle, but always hide its own inline
   breakdown so only the Fill's copy near the button ever shows the detail. */
@media (max-width: 767px) {
  .wc-block-components-sidebar > .wp-block-woocommerce-checkout-order-summary-block > .wc-block-components-checkout-order-summary__content {
    display: none !important;
  }
}



/* ==========================================================================
   Thank-you page payment wizard (Scan & Pay -> Enter UTR -> WhatsApp success)
   see woocommerce/checkout/thankyou.php and assets/js/payment-wizard.js
   ========================================================================== */
.bst-wizard-page { max-width: 560px; margin: 0 auto; }
.bst-success-icon {
  width: 72px; height: 72px; border-radius: 9999px;
  background: #dcfce7; color: #16a34a;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
}
.bst-badge {
  display: block; text-align: center; margin: 0 auto 16px;
  width: fit-content;
  background: #dcfce7; color: #16a34a;
  font-size: 13px; font-weight: 600;
  padding: 6px 16px; border-radius: 9999px;
}
.bst-order-id-pill {
  display: block; text-align: center; margin: 0 auto 24px;
  width: fit-content;
  background: var(--bg-secondary, #F8FAFC); border: 1px solid #E2E8F0;
  color: var(--text-slate-700); font-size: 13px; font-weight: 600;
  padding: 6px 16px; border-radius: 9999px;
}
.bst-qr-card {
  background: #fff; border: 1px solid #E2E8F0; border-radius: 20px;
  padding: 32px 24px; text-align: center;
}
.bst-qr-image { width: 200px; height: 200px; margin: 0 auto 16px; border-radius: 8px; }
.bst-upi-id {
  display: inline-block; background: var(--bg-secondary, #F8FAFC);
  border: 1px solid #E2E8F0; border-radius: 8px;
  padding: 8px 16px; font-weight: 600; color: var(--text-slate-900);
  margin-bottom: 16px; letter-spacing: 0.02em;
}
.bst-qr-note { color: #525252; font-size: 14px; line-height: 1.7; margin: 0; }
.bst-proceed-btn { border: none; cursor: pointer; font-size: 15px; }
.bst-proceed-btn:disabled { background: var(--text-slate-400); cursor: not-allowed; opacity: 0.8; }
.bst-utr-label { display: block; font-size: 14px; font-weight: 600; color: var(--text-slate-900); margin-bottom: 10px; }
.bst-utr-input {
  width: 100%; max-width: 320px; padding: 14px 18px; margin: 0 auto 16px; display: block;
  border: 1px solid var(--text-slate-400); border-radius: var(--radius-sm, 8px);
  font-family: var(--font-sans); font-size: 15px; color: var(--text-slate-900); text-align: center;
}
.bst-utr-input:focus { outline: none; border-color: var(--primary); }
.bst-utr-error { color: #dc2626; font-size: 13px; margin: -8px 0 16px; text-align: center; }
.bst-post-note { text-align: center; color: #525252; font-size: 14px; margin-top: 16px; }
.bst-post-note-muted { color: var(--text-slate-500); font-size: 13px; line-height: 1.7; }

/* ==========================================================================
   Empty cart redesign (see assets/js/cart-empty.js)
   ========================================================================== */
.wp-block-woocommerce-empty-cart-block { text-align: center; padding: 40px 20px 64px; }
.wc-block-cart__empty-cart__title.with-empty-cart-icon::before { display: none !important; content: none !important; }
.bst-empty-cart-icon {
  width: 96px; height: 96px; border-radius: 9999px;
  background: var(--bg-secondary, #F8FAFC); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 24px;
}
.bst-empty-cart-title.wc-block-cart__empty-cart__title {
  font-family: var(--font-display) !important;
  font-size: 28px !important;
  color: var(--text-slate-900) !important;
  margin-bottom: 8px !important;
}
.bst-empty-cart-subtitle { color: #525252; font-size: 15px; margin: 0 0 28px; }
.bst-empty-cart-cta { display: inline-flex; }
