/* Shared payment controls for cart checkout and Buy Now. */
#checkoutPaymentPicker .checkout-payment-option{pointer-events:auto!important;touch-action:manipulation;-webkit-tap-highlight-color:rgba(18,101,232,.12)}
#checkoutPaymentPicker .checkout-payment-option>*{pointer-events:none!important}
#checkoutPaymentPicker .checkout-payment-option:active{border-color:#1265e8!important;background:#eaf2ff!important}
.checkout-payment-picker { width:100%; min-width:0; margin:24px 0 16px; color:#19324f; }
#checkoutPaymentPicker { position:relative; z-index:2; isolation:isolate; }
#checkoutPaymentPicker .checkout-payment-option { pointer-events:auto; }
body #affirmPaymentOption[hidden], body #creditCardSummary[hidden], body #paypal-button-container[hidden] { display:none !important; pointer-events:none !important; }
body #affirmPaymentOption:not([hidden]), body #creditCardSummary:not([hidden]), body #paypal-button-container:not([hidden]) { position:relative !important; z-index:0 !important; }
.checkout-payment-header { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; padding:16px 18px; background:#f5f8fc; border:1px solid #dce4ee; border-radius:12px; margin-bottom:14px; }
.checkout-payment-header > div { display:flex; align-items:center; gap:10px; font-size:18px; }
.checkout-payment-header > span { font-size:13px; color:#65758a; }
.checkout-payment-methods { display:grid; gap:12px; }
.checkout-payment-option { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:16px 18px; min-height:84px; width:100%; box-sizing:border-box; background:#fff; border:1px solid #dce4ee; border-radius:12px; transition:border-color .15s,background .15s; }
.checkout-payment-option:has(input:checked) { border-color:#1265e8; background:#f2f7ff; box-shadow:0 0 0 1px #1265e8; }
.checkout-payment-option { cursor:pointer; touch-action:manipulation; }
#checkoutPaymentPicker .checkout-payment-option {
  position:relative !important; inset:auto !important; transform:none !important;
  float:none !important; height:auto !important; min-height:84px;
  padding:16px 18px !important; border:1px solid #dce4ee !important;
  background:#fff !important; color:#19324f; white-space:normal;
}
#checkoutPaymentPicker .checkout-payment-option[aria-checked="true"] { border-color:#1265e8 !important; background:#f2f7ff !important; }
#checkoutPaymentPicker .checkout-payment-option input[type=radio] {
  display:block !important; position:absolute !important; inset:0 !important;
  width:100% !important; height:100% !important; margin:0 !important;
  opacity:0; z-index:1; pointer-events:auto !important; cursor:pointer;
}
.checkout-payment-dot { flex:0 0 20px; width:20px; height:20px; border:2px solid #8996a5; border-radius:50%; box-sizing:border-box; }
.checkout-payment-option[aria-checked="true"] .checkout-payment-dot { border:6px solid #1265e8; background:white; }
.checkout-payment-option:focus-visible { outline:3px solid #b6d2ff; outline-offset:3px; }
.checkout-payment-option:has(input:focus-visible) { outline:3px solid #b6d2ff; outline-offset:2px; }
.checkout-payment-option { margin:0 !important; text-align:left; }
.checkout-payment-main { display:flex; align-items:center; flex:1; min-width:0; gap:12px; cursor:pointer; }
.checkout-payment-option input[type=radio] { appearance:auto; width:20px !important; height:20px !important; flex:0 0 20px; margin:0 !important; accent-color:#1265e8; padding:0; }
.checkout-payment-option strong { display:block; font-size:16px; font-weight:650; line-height:1.4; }
.checkout-payment-option .checkout-payment-title { display:flex; align-items:center; gap:8px; }
.checkout-payment-title .checkout-payment-logo { display:inline-block; width:24px !important; height:24px !important; flex:0 0 24px; margin:0 !important; object-fit:contain; font-size:22px; line-height:24px; color:#31516e; }
.checkout-payment-option small { display:block; margin-top:3px; font-size:13px; line-height:1.45; color:#65758a; }
.checkout-payment-brands { display:flex; align-items:center; gap:6px; flex-shrink:0; }
.checkout-payment-brands img { width:28px !important; height:24px !important; object-fit:contain; margin:0 !important; }
.checkout-payment-badge { display:flex; align-items:center; gap:8px; flex-shrink:0; color:#31516e; font-size:12px; font-weight:600; }
.checkout-payment-help { display:grid; place-items:center; width:28px !important; height:28px !important; padding:0 !important; margin:0 !important; background:#f3f6fa; color:#31516e; border:1px solid #dce4ee; border-radius:50%; font-size:13px; cursor:pointer; }
.checkout-payment-note { margin:12px 0 0; font-size:13px; line-height:1.5; color:#65758a; }
#affirmPaymentOption.checkout-payment-panel, #creditCardSummary { width:100% !important; box-sizing:border-box; position:static !important; z-index:auto !important; padding:20px !important; margin-top:16px !important; border:1px solid #dce4ee !important; border-radius:12px !important; background:#fff !important; box-shadow:none !important; }
#affirmPaymentOption h6, #creditCardSummary h6 { font-size:16px; color:#19324f !important; margin-bottom:10px !important; }
#affirmPaymentOption p { font-size:13px; line-height:1.6; color:#65758a; }
#affirmPaymentOption #payWithAffirmButton, #creditCardSummary #payWithCardButton { min-height:48px; height:auto !important; padding:12px 16px !important; border-radius:9px; font-size:16px; font-weight:600; margin:12px 0 0 !important; }
#affirmPaymentOption #payWithAffirmButton {
  position:static !important; inset:auto !important; left:auto !important; right:auto !important;
  top:auto !important; bottom:auto !important; transform:none !important;
  display:flex !important; align-items:center; justify-content:center;
  width:100% !important; max-width:100% !important; min-width:0 !important;
  box-sizing:border-box; float:none !important; margin-left:0 !important; margin-right:0 !important;
  white-space:normal; text-align:center; overflow-wrap:anywhere;
}
@media(max-width:575.98px) {
  .checkout-payment-header { padding:14px; flex-direction:column; align-items:flex-start; gap:4px; }
  .checkout-payment-option { padding:14px; gap:10px; min-height:88px; }
  .checkout-payment-main { gap:10px; }
  .checkout-payment-option strong { font-size:15px; }
  .checkout-payment-option small { font-size:12px; }
  .checkout-payment-brands { gap:3px; }
  .checkout-payment-brands img { width:23px !important; height:22px !important; }
  .checkout-payment-badge { font-size:11px; gap:5px; }
  #affirmPaymentOption.checkout-payment-panel, #creditCardSummary { padding:16px !important; }
}
@media(max-width:379.98px) {
  .checkout-payment-option { flex-wrap:wrap; }
  .checkout-payment-main { flex-basis:100%; }
  .checkout-payment-brands, .checkout-payment-badge { margin-left:30px; }
}

/* Remove historical positioning and fixed heights from the PayPal SDK host. */
/* The footer must stay after checkout, including its transparent padding area. */
body.checkout-page #footer-placeholder {
  position:static !important; inset:auto !important; transform:none !important;
  clear:both !important; margin:32px 0 0 !important; padding:0 !important;
  height:auto !important; min-height:0 !important; max-height:none !important;
}
body.checkout-page #orderContainer {
  position:relative; height:auto !important; min-height:0; overflow:visible;
}
body.checkout-page #card-element {
  position:relative; z-index:auto !important; min-height:48px;
  height:auto !important; padding:14px 12px; box-sizing:border-box;
  background:#fff; border:1px solid #cbd5e1; border-radius:8px;
}
body.checkout-page #card-element.StripeElement--focus {
  border-color:#1265e8; box-shadow:0 0 0 3px rgba(18,101,232,.12);
}
body #paypal-button-container, body #paypal-button {
  position:relative !important; inset:auto !important; top:auto !important; left:auto !important;
  right:auto !important; bottom:auto !important; transform:none !important;
  width:100% !important; max-width:100% !important; min-width:0 !important;
  height:auto !important; min-height:0 !important; max-height:none !important;
  padding:0 !important; margin:16px 0 0 !important; border-radius:0 !important;
  overflow:visible !important; box-sizing:border-box; z-index:auto !important;
}
body #paypal-button { margin:0 !important; }
body #paypal-button .paypal-buttons { width:100% !important; max-width:100% !important; min-width:0 !important; overflow:visible !important; }

#checkoutItemsList .checkout-item-info { flex:1; min-width:0; }
#checkoutItemsList .checkout-item-controls { display:flex; align-items:center; flex-wrap:wrap; gap:16px; margin-top:10px; }
#checkoutItemsList .checkout-item-controls label { display:flex; align-items:center; gap:8px; margin:0; font-size:13px; }
#checkoutItemsList .checkout-item-controls input { width:72px !important; height:44px !important; margin:0 !important; padding:8px !important; border:1px solid #dce4ee !important; border-radius:8px; font-size:16px; }
#checkoutItemsList .checkout-item-controls button { position:static !important; inset:auto !important; transform:none !important; float:none; width:auto !important; height:44px !important; padding:8px 12px !important; margin:0 !important; background:#fff; color:#b42332; border:1px solid #efccd0; border-radius:8px; font-size:13px; }


/* Responsive polish: override the payment picker ID rule on small phones. */
@media (max-width: 379.98px) {
  #checkoutPaymentPicker .checkout-payment-option { padding: 12px !important; gap: 10px; }
  #checkoutPaymentPicker .checkout-payment-title { flex-wrap: wrap; }
  #checkoutPaymentPicker .checkout-payment-main > span { min-width: 0; }
}
/* PayPal owns its button surface; checkout failures stay visible beside it. */
body.checkout-page #paypal-button {background:transparent!important;border:0!important;box-shadow:none!important;border-radius:0!important;}
body.checkout-page #paypalCheckoutError[hidden] {display:none!important;}
body.checkout-page #paypalCheckoutError:not([hidden]) {display:block!important;margin:0 0 12px!important;font-size:14px;line-height:1.5;}
/* A consistent, calm notice for every checkout payment provider. */
body.checkout-page .checkout-notice-modal .modal-dialog {width:calc(100% - 32px)!important;max-width:460px!important;margin-left:auto!important;margin-right:auto!important;}
body.checkout-page .checkout-notice-modal .modal-content {padding:0!important;border:1px solid #e2e8f0!important;border-radius:18px!important;background:#fff!important;box-shadow:0 20px 60px rgba(23,43,67,.18)!important;overflow:hidden;}
body.checkout-page .checkout-notice-modal .modal-header {display:flex;align-items:center;gap:12px;padding:22px 24px 12px!important;border:0!important;background:#fff!important;color:#172b43!important;}
body.checkout-page .checkout-notice-icon {display:grid;place-items:center;flex:0 0 40px;width:40px;height:40px;border-radius:12px;background:#edf4ff;color:#2166c1;}
body.checkout-page .checkout-notice-modal .modal-title {margin:0!important;font-size:18px!important;line-height:1.4;font-weight:650!important;color:#172b43!important;}
body.checkout-page .checkout-notice-modal .btn-close {position:static!important;inset:auto!important;transform:none!important;flex:0 0 32px;width:32px!important;height:32px!important;margin:0 0 0 auto!important;padding:8px!important;box-sizing:border-box;filter:none!important;opacity:.6;box-shadow:none!important;background-color:transparent!important;}
body.checkout-page .checkout-notice-modal .modal-body {padding:4px 24px 22px!important;color:#526174;font-size:15px;line-height:1.65;overflow-wrap:anywhere;}
body.checkout-page .checkout-notice-modal .modal-body p {margin:0!important;}
body.checkout-page .checkout-notice-modal .modal-footer {display:flex;justify-content:flex-end;padding:16px 24px!important;border-top:1px solid #edf1f6!important;background:#fafbfd;}
body.checkout-page .checkout-notice-modal .modal-footer .btn {position:static!important;inset:auto!important;transform:none!important;float:none!important;width:auto!important;min-width:96px;max-width:100%;height:auto!important;min-height:42px;margin:0!important;padding:10px 22px!important;border:1px solid #2166c1!important;border-radius:10px!important;background:#2166c1!important;color:#fff!important;font-size:14px!important;font-weight:600;line-height:1.4;box-shadow:none!important;}
body.checkout-page .checkout-notice-modal .modal-footer .btn:hover {background:#174f9c!important;}
body.checkout-page .checkout-notice-modal :is(.btn,.btn-close):focus-visible {outline:3px solid #a8c8f2;outline-offset:3px;}
body.checkout-page .checkout-payment-notice {padding:14px 16px!important;border:1px solid #d8e5f6;border-radius:10px;background:#f3f7fd;color:#294563;box-shadow:none;}
@media(max-width:575.98px) {
 body.checkout-page .checkout-notice-modal .modal-header {padding:18px 18px 10px!important;gap:10px;}
 body.checkout-page .checkout-notice-modal .modal-body {padding:4px 18px 18px!important;}
 body.checkout-page .checkout-notice-modal .modal-footer {padding:14px 18px!important;}
}
/* Readable, aligned order breakdown. */
body #totalSection.checkout-order-totals{position:static!important;inset:auto!important;width:100%;max-width:100%;margin:20px 0 0!important;padding:18px 20px;background:#fff;border:1px solid #e2e7ee;border-radius:12px;box-sizing:border-box}
body #totalSection .checkout-total-row{display:flex;align-items:baseline;justify-content:space-between;gap:16px;padding:5px 0;font-family:Arial,Helvetica,sans-serif;font-size:14px;line-height:1.5;color:#526174}
body #totalSection .checkout-total-row>:last-child{text-align:right;font-variant-numeric:tabular-nums}
body #totalSection .checkout-grand-total{margin-top:10px;padding-top:14px;border-top:1px solid #e6ebf1;font-size:18px;color:#192d42}
body #totalSection.checkout-order-totals #totalAmount{position:static!important;inset:auto!important;transform:none!important;margin:0!important;padding:0!important;font-size:20px!important;font-weight:700!important;line-height:1.4!important}
@media(max-width:575px){body #totalSection.checkout-order-totals{padding:14px 16px}}
/* Keep pending order totals constrained, even before a quote is ready. */
body #totalSection.checkout-order-totals #totalAmount.shipping-quote-pending{position:relative!important;inset:auto!important;transform:none!important;display:inline-block!important;flex:0 0 108px;width:108px!important;max-width:100%!important;height:10px!important;min-height:10px!important;max-height:10px!important;overflow:hidden!important;isolation:isolate;font-size:0!important;line-height:0!important;background:#edf2f8!important}
/* Compact phone checkout with consistent fields and readable payment choices. */
@media(max-width:767.98px){
  body.checkout-page #col-md-6-checkout-page{min-width:0;padding-left:12px!important;padding-right:12px!important}
  body.checkout-page #col-md-6-checkout-page>.card{border:1px solid #e4e9f0!important;border-radius:16px!important;box-shadow:0 3px 14px #192d4208!important}
  body.checkout-page #col-md-6-checkout-page>.card>.card-body{padding:18px 16px!important;min-width:0}
  body.checkout-page #col-md-6-checkout-page .card-title{font-size:17px!important;font-weight:600!important;text-align:left!important;line-height:1.4!important;color:#192d42!important;margin-bottom:16px!important}
  body.checkout-page :is(#shippingForm,#billingForm) .mb-3{margin-bottom:14px!important}
  body.checkout-page :is(#shippingForm,#billingForm) label{font-size:13px!important;font-weight:500!important;line-height:1.45!important;margin-bottom:6px!important;color:#44576c}
  body.checkout-page :is(#shippingForm,#billingForm) .form-control{width:100%!important;max-width:100%!important;min-width:0;min-height:46px;height:auto!important;padding:10px 12px!important;font-size:16px!important;line-height:1.4!important;border:1px solid #d7dfe9;border-radius:9px!important;box-shadow:none!important;box-sizing:border-box}
  body.checkout-page :is(#shippingForm,#billingForm) button[type=submit]{position:static!important;width:100%!important;min-height:44px;height:auto!important;margin:6px 0 0!important;padding:10px 14px!important;font-size:14px!important;border-radius:9px!important}
  body.checkout-page #sameAsShipping{flex:0 0 18px;width:18px;height:18px}
  body.checkout-page label[for=sameAsShipping]{font-size:13px;line-height:1.5}
  body.checkout-page #checkoutPaymentPicker{margin:22px 0 14px}
  body.checkout-page #checkoutPaymentPicker .checkout-payment-header{padding:12px 14px;gap:4px;border-radius:10px;align-items:flex-start;flex-direction:column}
  body.checkout-page #checkoutPaymentPicker .checkout-payment-header>div{font-size:16px}
  body.checkout-page #checkoutPaymentPicker .checkout-payment-header>span{font-size:12px}
  body.checkout-page #checkoutPaymentPicker .checkout-payment-option{padding:13px!important;min-height:76px;gap:8px;flex-wrap:wrap;border-radius:10px}
  body.checkout-page #checkoutPaymentPicker .checkout-payment-main{flex:1 1 100%;min-width:0;gap:10px;align-items:flex-start}
  body.checkout-page #checkoutPaymentPicker .checkout-payment-main>span:last-child{min-width:0;flex:1}
  body.checkout-page #checkoutPaymentPicker .checkout-payment-dot{flex:0 0 18px;width:18px;height:18px;margin-top:3px}
  body.checkout-page #checkoutPaymentPicker .checkout-payment-title{font-size:14px;line-height:1.45}
  body.checkout-page #checkoutPaymentPicker .checkout-payment-option small{font-size:12px;line-height:1.5;white-space:normal;overflow-wrap:anywhere}
  body.checkout-page #checkoutPaymentPicker :is(.checkout-payment-brands,.checkout-payment-badge){margin-left:28px;gap:5px}
  body.checkout-page :is(#creditCardSummary,#affirmPaymentOption.checkout-payment-panel){padding:16px!important;border-radius:12px!important;margin-top:14px!important;min-width:0}
  body.checkout-page :is(#creditCardSummary,#affirmPaymentOption) h6{font-size:15px!important;line-height:1.4}
  body.checkout-page #creditCardSummary p{font-size:13px;line-height:1.55}
}
/* Shipping/payment must follow the complete delivery notice on phones. */
@media(max-width:767.98px){
  body.checkout-page #col-md-6-checkout-page{position:static!important;inset:auto!important;transform:none!important;float:none!important;margin-top:24px!important;margin-bottom:0!important;height:auto!important}
  body.checkout-page .delivery-info-card{position:static!important;inset:auto!important;transform:none!important;height:auto!important;min-height:0!important;max-height:none!important;overflow:visible!important;margin-bottom:0!important}
  body.checkout-page .delivery-info-card .info-row{height:auto!important;min-height:0!important;max-height:none!important;white-space:normal!important;overflow:visible!important;line-height:1.55;overflow-wrap:anywhere}
}
