/* ============ Heaxabell Checkout — success / error / cancel / pay pages ============ */

/* Success + error + cancel shared card */
.orderSuccessPage{max-width:560px;margin:0 auto;padding:8px 16px 56px}
.orderSuccess{text-align:center;background:transparent;padding:24px 22px 30px}
.orderSuccess__icon{width:76px;height:76px;border-radius:50%;background:var(--green);color:#fff;display:grid;place-items:center;margin:0 auto 18px;box-shadow:0 8px 24px rgba(4,180,98,.35)}
.orderSuccess__icon svg{width:38px;height:38px}
.orderSuccess__icon--warn{background:#f59e0b;box-shadow:0 8px 24px rgba(245,158,11,.35)}
.orderSuccess__title{margin:0 0 6px;font-size:24px;font-weight:800;letter-spacing:-.02em;color:var(--ink)}
.orderSuccess__sub{margin:0 0 24px;font-size:14px;color:var(--ink-2);line-height:1.55}
.orderSuccess__meta{background:var(--accent-soft);border:1px solid rgba(254,44,85,.14);border-radius:14px;padding:6px 16px;margin:0 0 20px;text-align:left}
.orderSuccess__metaRow{display:flex;justify-content:space-between;align-items:center;padding:10px 0;border-bottom:1px dashed rgba(254,44,85,.16);font-size:13.5px}
.orderSuccess__metaRow:last-child{border-bottom:0}
.orderSuccess__metaRow span{color:var(--ink-2)}
.orderSuccess__metaRow b{font-weight:800;color:var(--ink);text-align:right}
.orderSuccess__metaRow b .woocommerce-Price-amount{color:var(--accent);font-size:15px}
.orderSuccess .woocommerce-Price-currencySymbol{color:var(--accent);font-size:.86em;margin-right:1px}
.orderSuccess__items{margin:0 0 24px;display:flex;flex-direction:column;gap:10px;text-align:left}
.orderSuccess__item{display:flex;align-items:center;gap:12px;background:var(--bg);border:1px solid var(--line);border-radius:12px;padding:10px 12px}
.orderSuccess__itemThumb{width:52px;height:52px;border-radius:10px;overflow:hidden;background:#fff;border:1px solid var(--line);flex-shrink:0;display:grid;place-items:center}
.orderSuccess__itemThumb img{width:100%;height:100%;object-fit:cover}
.orderSuccess__itemThumb svg{width:24px;height:24px;color:var(--ink-3)}
.orderSuccess__itemInfo{flex:1;min-width:0;display:flex;flex-direction:column}
.orderSuccess__itemName{font-size:13.5px;font-weight:600;color:var(--ink);line-height:1.35;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.orderSuccess__itemQty{font-size:12px;color:var(--ink-2);margin-top:2px}
.orderSuccess__itemTotal{font-size:14px;font-weight:800;color:var(--accent);white-space:nowrap}
.orderSuccess__actions{display:flex;flex-direction:column;gap:10px;margin-top:4px}
.orderSuccess__btn{display:flex;align-items:center;justify-content:center;height:50px;border-radius:12px;font-size:15px;font-weight:800;text-decoration:none;transition:transform .12s ease,opacity .12s}
.orderSuccess__btn:active{transform:scale(.98)}
.orderSuccess__btn--primary{background:var(--accent);color:#fff;box-shadow:0 6px 18px rgba(254,44,85,.32)}
.orderSuccess__btn--ghost{background:#fff;color:var(--ink);border:1.5px solid var(--line)}
.orderSuccess__btn--link{background:transparent;color:var(--accent);height:auto;padding:4px 0;font-size:14px}
.orderSuccess__note{margin:0;font-size:12.5px;color:var(--ink-2);line-height:1.5}
@media(min-width:820px){
  .orderSuccessPage{padding:56px 16px 72px}
  .orderSuccess{padding:48px 40px 36px}
  .orderSuccess__title{font-size:28px}
}

/* Order-received: restore default bottom nav (tabbar) on mobile */
@media(max-width:767px){
  .page-order-received .tabbar{display:block}
  .page-order-received .checkout__bottombar{display:none}
}

/* Order-pay (switch payment) — redesigned cards following the theme */
.payPage{max-width:640px;margin:0 auto;padding:0 16px 40px}
.payPage .pageHead{margin-bottom:14px}

/* Cards */
.payCard{background:var(--card);border:1px solid var(--line);border-radius:var(--radius-lg);padding:16px;margin-bottom:14px}
.payCard__head{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}
.payCard__title{margin:0;font-size:16px;font-weight:800;letter-spacing:-.01em;color:var(--ink);font-family:var(--font-display)}
.payCard__orderno{font-size:13px;font-weight:700;color:var(--accent)}

/* Order items */
.payCard__items{display:flex;flex-direction:column;gap:12px;margin-bottom:14px}
.payItem{display:flex;align-items:center;gap:12px}
.payItem__thumb{width:54px;height:54px;border-radius:12px;overflow:hidden;background:var(--bg);border:1px solid var(--line);flex-shrink:0;display:grid;place-items:center}
.payItem__thumb img{width:100%;height:100%;object-fit:cover}
.payItem__thumb svg{width:24px;height:24px;color:var(--ink-3)}
.payItem__info{flex:1;min-width:0;display:flex;flex-direction:column}
.payItem__name{font-size:13.5px;font-weight:600;color:var(--ink);line-height:1.35;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.payItem__qty{font-size:12px;color:var(--ink-2);margin-top:2px}
.payItem__total{font-size:14px;font-weight:800;color:var(--ink);font-family:var(--font-price);font-variant-numeric:tabular-nums;white-space:nowrap}

/* Totals */
.payCard__totals{border-top:1px dashed var(--line);padding-top:12px;display:flex;flex-direction:column;gap:9px}
.payTotRow{display:flex;justify-content:space-between;align-items:baseline;font-size:13.5px}
.payTotRow span{color:var(--ink-2)}
.payTotRow b{font-weight:700;color:var(--ink);font-family:var(--font-price);font-variant-numeric:tabular-nums;text-align:right}
.payTotRow--total{margin-top:3px;padding-top:11px;border-top:1px solid var(--line)}
.payTotRow--total span{font-size:14px;font-weight:700;color:var(--ink)}
.payTotRow--total b{font-size:19px;font-weight:800;color:var(--accent)}

/* Payment methods */
.payCard--methods .wc_payment_methods{list-style:none;margin:0 0 4px;padding:0;display:flex;flex-direction:column;gap:10px}
.payCard--methods .wc_payment_method{margin:0;padding:0}
.payCard--methods .wc_payment_method label{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 14px;border:1.5px solid var(--line);border-radius:var(--radius);background:#fff;cursor:pointer;transition:border-color .15s ease,background .15s ease}
.payCard--methods .wc_payment_method label:hover{border-color:var(--ink-3)}
.payCard--methods .wc_payment_method .input-radio{position:absolute;opacity:0;pointer-events:none}
.payCard--methods .wc_payment_method:has(.input-radio:checked) label{border-color:var(--accent);background:var(--accent-soft);box-shadow:0 0 0 1px var(--accent)}
.payMethod__name{font-size:14px;font-weight:700;color:var(--ink);display:flex;align-items:center;gap:10px}
.payMethod__name::before{content:"";width:18px;height:18px;border-radius:50%;border:2px solid var(--ink-3);flex-shrink:0;transition:border-color .15s ease,box-shadow .15s ease;box-shadow:inset 0 0 0 0 var(--accent)}
.payCard--methods .wc_payment_method:has(.input-radio:checked) .payMethod__name::before{border-color:var(--accent);box-shadow:inset 0 0 0 5px var(--accent)}
.payMethod__icon{display:flex;align-items:center;gap:6px;flex-shrink:0}
.payMethod__icon img{max-height:22px;width:auto;max-width:60px}
.payCard--methods .payment_box{background:var(--accent-soft);border-radius:var(--radius);padding:12px 14px;margin-top:8px;font-size:13px;color:var(--ink-2)}

/* Terms */
.payCard__terms{margin-top:6px}
.payCard__terms .woocommerce-terms-and-conditions-wrapper{margin:0}
.payCard__terms .form-row{margin:0;padding:0}
.payCard__terms label.checkbox{font-size:13px;color:var(--ink-2);display:flex;align-items:flex-start;gap:8px;line-height:1.5}
.payCard__terms input.input-checkbox{margin-top:2px;accent-color:var(--accent)}

/* Native submit (desktop) */
.payPage .paySubmit{width:100%;height:52px;border-radius:var(--radius);background:var(--accent);color:#fff;font-size:15px;font-weight:800;border:0;font-family:var(--font-display);margin-top:6px}
.payPage .paySubmit:disabled{filter:grayscale(1);opacity:.55;cursor:not-allowed}

/* Mobile: hide native submit (bottom bar handles it) */
@media(max-width:767px){
  .payPage form#order_review .paySubmit{display:none}
  .payPage{padding-bottom:96px}
}

/* Cart empty — show default bottom navbar (tabbar) */
@media(max-width:767px){
  .woocommerce-cart.cart-empty .tabbar{display:block}
  .woocommerce-cart.cart-empty .cart__bottombar{display:none}
}

/* Address selector (checkout, logged-in) — standalone card via .hx-ocard */
.hxAddr .hxAddr__list{display:flex;flex-direction:column;gap:10px}
.hxAddr__card{display:flex;align-items:flex-start;gap:12px;padding:13px 14px;border:1.5px solid var(--line);border-radius:var(--radius);background:#fff;cursor:pointer;transition:border-color .15s ease,background .15s ease}
.hxAddr__card:hover{border-color:var(--ink-3)}
.hxAddr__card input[type="radio"]{position:absolute;opacity:0;pointer-events:none}
.hxAddr__radio{width:18px;height:18px;border-radius:50%;border:2px solid var(--ink-3);flex-shrink:0;margin-top:1px;box-shadow:inset 0 0 0 0 var(--accent);transition:border-color .15s ease,box-shadow .15s ease}
.hxAddr__card:has(input[type="radio"]:checked){border-color:var(--accent);background:var(--accent-soft);box-shadow:0 0 0 1px var(--accent)}
.hxAddr__card:has(input[type="radio"]:checked) .hxAddr__radio{border-color:var(--accent);box-shadow:inset 0 0 0 5px var(--accent)}
.hxAddr__body{display:flex;flex-direction:column;gap:2px;min-width:0}
.hxAddr__label{font-size:14px;font-weight:700;color:var(--ink)}
.hxAddr__preview{font-size:12.5px;color:var(--ink-2);line-height:1.45;overflow-wrap:anywhere}
.hxAddr__card--new .hxAddr__label{color:var(--accent)}

/* When the address selector is present, hide the redundant billing form
   heading ("Shipping Address" — the selector card already titles it) and
   collapse the billing fields wrapper when a saved address is chosen.
   NOTE: has-hx-addr is added to <body> via body_class, so scope under body. */
body.has-hx-addr .woocommerce-billing-fields h3{display:none}
body.has-hx-addr .woocommerce-billing-fields{
  background:transparent;border:0;border-radius:0;padding:0;margin:0;box-shadow:none
}
body.has-hx-addr .woocommerce-billing-fields.is-hidden,
body.has-hx-addr .woocommerce-shipping-fields.is-hidden{display:none}

/* On desktop, make the standalone selector span the full width above the
   two-column checkout grid (customer details | order review). */
@media(min-width:820px){
  .checkoutPage form.checkout .hxAddr{grid-column:1 / -1}
}

/* ============ My Account — View Order (redesign + tracking progress) ============ */
.hx-vieworder__head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:14px}
.hx-vieworder__num{font-size:16px;font-weight:800;color:var(--ink);font-family:var(--font-display);letter-spacing:-.01em}
.hx-vieworder__date{font-size:12.5px;color:var(--ink-2);margin-top:3px}
.hx-vieworder__status{font-size:12px;font-weight:700;padding:5px 12px;border-radius:999px;white-space:nowrap}
.hx-vieworder__status--processing{background:var(--accent-soft);color:var(--accent)}
.hx-vieworder__status--completed{background:#e6f7ef;color:#0a8f4d}
.hx-vieworder__status--on-hold{background:#fff4e0;color:#b4740a}
.hx-vieworder__status--cancelled,.hx-vieworder__status--failed,.hx-vieworder__status--refunded{background:#fdecec;color:#c0203a}
.hx-vieworder__status--pending{background:#eef0f4;color:var(--ink-2)}

/* Tracking card */
.hx-track{background:var(--card);border:1px solid var(--line);border-radius:14px;padding:16px;margin-bottom:14px}
.hx-track__head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:16px}
.hx-track__title{font-size:16px;font-weight:800;color:var(--ink);font-family:var(--font-display)}
.hx-track__link{font-size:13px;font-weight:700;color:var(--accent);text-decoration:none}
.hx-track__empty{font-size:13px;color:var(--ink-2);margin:0}
.hx-track--none .hx-track__title{margin:0}

/* Progress steps */
.hx-track__steps{display:flex;align-items:flex-start;justify-content:space-between;position:relative;margin-bottom:16px}
.hx-track__steps::before{content:"";position:absolute;top:9px;left:12px;right:12px;height:2px;background:var(--line)}
.hx-track__step{display:flex;flex-direction:column;align-items:center;gap:7px;position:relative;flex:1;z-index:1}
.hx-track__dot{width:20px;height:20px;border-radius:50%;background:#fff;border:2px solid var(--line);flex-shrink:0}
.hx-track__step.is-done .hx-track__dot{background:var(--accent);border-color:var(--accent)}
.hx-track__step.is-current .hx-track__dot{background:var(--accent);border-color:var(--accent);box-shadow:0 0 0 5px var(--accent-soft)}
.hx-track__label{font-size:11px;font-weight:600;color:var(--ink-2);text-align:center;line-height:1.3}
.hx-track__step.is-done .hx-track__label,.hx-track__step.is-current .hx-track__label{color:var(--ink);font-weight:700}

/* Latest status + collapsible history */
.hx-track__latest{display:flex;flex-direction:column;gap:4px;background:var(--accent-soft);border-radius:10px;padding:12px 14px;margin-bottom:12px}
.hx-track__latestLabel{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.03em;color:var(--accent)}
.hx-track__latestText{font-size:13.5px;font-weight:600;color:var(--ink);line-height:1.45}

/* Collapsible history */
.hx-track__history{border-top:1px dashed var(--line)}
.hx-track__toggle{display:flex;align-items:center;justify-content:space-between;gap:10px;list-style:none;cursor:pointer;padding:13px 0 3px;font-size:13px;font-weight:700;color:var(--ink)}
.hx-track__toggle::-webkit-details-marker{display:none}
.hx-track__toggle::marker{content:""}
.hx-track__chevron{width:18px;height:18px;color:var(--ink-2);transition:transform .2s ease;flex-shrink:0}
.hx-track__history[open] .hx-track__chevron{transform:rotate(180deg)}

/* Timeline events (full width) */
.hx-track__events{display:flex;flex-direction:column;padding:4px 0 6px}
.hx-track__event{display:flex;gap:12px;position:relative;padding:0 0 14px}
.hx-track__event:last-child{padding-bottom:2px}
.hx-track__event:not(:last-child)::before{content:"";position:absolute;left:5px;top:16px;bottom:0;width:2px;background:var(--line)}
.hx-track__eventDot{width:12px;height:12px;border-radius:50%;background:var(--line);flex-shrink:0;margin-top:3px;position:relative;z-index:1}
.hx-track__event:first-child .hx-track__eventDot{background:var(--accent);box-shadow:0 0 0 4px var(--accent-soft)}
.hx-track__eventBody{flex:1;min-width:0}
.hx-track__eventProc{font-size:13px;font-weight:600;color:var(--ink);line-height:1.4}
.hx-track__eventOffice{font-size:12px;color:var(--ink-2);line-height:1.45;margin-top:1px}
.hx-track__eventDate{font-size:11.5px;color:var(--ink-3);margin-top:2px}

/* Order details table inside view-order (keep themed, full width) */
.hx-vieworder .woocommerce-order-details{width:100%;max-width:100%}
.hx-vieworder .woocommerce-order-details__title{font-size:16px;font-weight:800;margin:0 0 14px}
.hx-vieworder .woocommerce-table--order-details{width:100%;max-width:100%;border-collapse:collapse;table-layout:fixed}
.hx-vieworder .woocommerce-table--order-details th{font-size:12px;text-transform:uppercase;letter-spacing:.03em;color:var(--ink-2);text-align:left;padding:10px 0;border-bottom:1px solid var(--line)}
.hx-vieworder .woocommerce-table--order-details th.product-total{text-align:right}
.hx-vieworder .woocommerce-table--order-details td{padding:12px 0;border-bottom:1px solid var(--line);vertical-align:top}
.hx-vieworder .woocommerce-table--order-details td.product-total{text-align:right}
.hx-vieworder .woocommerce-table--order-details td.product-name{width:70%}
.hx-vieworder .woocommerce-table--order-details td.product-total{width:30%;white-space:nowrap}
.hx-vieworder .woocommerce-table--order-details tfoot th,.hx-vieworder .woocommerce-table--order-details tfoot td{border-bottom:0;padding:8px 0;font-size:13.5px}
.hx-vieworder .woocommerce-table--order-details tfoot tr:last-child th,.hx-vieworder .woocommerce-table--order-details tfoot tr:last-child td{font-weight:800}
.hx-vieworder .woocommerce-OrderUpdate{border-bottom:1px solid var(--line);padding:10px 0;margin:0}
.hx-vieworder .woocommerce-OrderUpdate-meta{font-size:12px;color:var(--ink-2)}
.hx-vieworder .woocommerce-OrderUpdate-description{font-size:13px;color:var(--ink)}
.hx-vieworder__notes{margin-top:14px}
