/* Saved checkout addresses are revealed only when the customer opens them. */
.checkout-address-disclosure{margin:14px 0;border:1px solid #dce5ef;border-radius:12px;background:#f8fafc;overflow:hidden;color:#24384e}
.checkout-address-disclosure[hidden]{display:none!important}
.checkout-address-disclosure>summary{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:52px;padding:14px 16px;cursor:pointer;font-size:15px;font-weight:600;list-style:none}
.checkout-address-disclosure>summary::-webkit-details-marker{display:none}
.checkout-address-disclosure>summary::after{content:'';width:8px;height:8px;flex:0 0 8px;border-right:2px solid #536c87;border-bottom:2px solid #536c87;transform:rotate(45deg);margin-right:3px}
.checkout-address-disclosure[open]>summary::after{transform:rotate(225deg)}
.checkout-address-disclosure>summary:focus-visible{outline:3px solid #7baded;outline-offset:-3px}
.checkout-address-disclosure>.saved-checkout-choice{margin:0!important;border:0!important;border-top:1px solid #e1e7ef!important;border-radius:0!important;padding:14px 16px!important;background:transparent!important}
.checkout-address-disclosure .saved-checkout-choice select{min-width:0!important;max-width:100%;flex:1 1 220px}
.checkout-address-disclosure .saved-checkout-choice button{min-height:40px;white-space:normal}
.checkout-address-disclosure .saved-checkout-choice p:empty{display:none}
.checkout-address-disclosure>:is(#shippingSummary,#billingSummaryContainer){margin:0!important;padding:14px 16px!important;max-height:none!important;height:auto!important;overflow:visible!important;border-top:1px solid #e1e7ef;font-size:14px}
.checkout-address-disclosure #shippingSummary>h6{display:none}
.checkout-address-disclosure #shippingSummary>.d-flex{gap:14px;flex-wrap:wrap}
.checkout-address-disclosure #shippingSummary span{overflow-wrap:anywhere;text-align:right}
.checkout-address-disclosure #billingSummaryContainer .card{height:auto!important;max-height:none!important;overflow:visible!important;margin:0!important;box-shadow:none!important}
.checkout-address-disclosure .checkout-address-heading{display:flex!important;flex-direction:row!important;flex-wrap:wrap!important;align-items:baseline;gap:4px 12px!important;min-width:0}
.checkout-address-preview{display:block;font-size:13px;font-weight:400;line-height:1.4;color:#5c6d80;overflow-wrap:anywhere}
.checkout-address-preview[hidden]{display:none}
@media(max-width:767.98px){
  body.checkout-page .checkout-address-disclosure{margin:14px 0;border-radius:10px}
  body.checkout-page .checkout-address-disclosure>summary{padding:12px;gap:10px;font-size:14px}
  body.checkout-page .checkout-address-heading{flex-direction:column!important;align-items:flex-start!important;gap:4px!important}
  body.checkout-page .checkout-address-preview{font-size:12px;line-height:1.5}
  body.checkout-page .checkout-address-disclosure>.saved-checkout-choice{padding:12px!important;gap:8px}
  body.checkout-page .checkout-address-disclosure .saved-checkout-choice select{width:100%;flex-basis:100%;font-size:16px;min-height:44px}
  body.checkout-page .checkout-address-disclosure .saved-checkout-choice button{flex:1;min-height:44px;font-size:13px}
  body.checkout-page .checkout-address-disclosure>:is(#shippingSummary,#billingSummaryContainer){padding:12px!important}
  body.checkout-page .checkout-address-disclosure #shippingSummary>.d-flex{display:grid!important;grid-template-columns:95px minmax(0,1fr);gap:10px;margin-bottom:10px!important;font-size:13px;line-height:1.5}
  body.checkout-page .checkout-address-disclosure #shippingSummary span{text-align:left;min-width:0}
}
.checkout-fulfillment-choice{display:block;margin:0 0 20px;padding:16px;border:1px solid #dce5ef;border-radius:10px;background:#f8fafc;font:600 14px/1.5 Arial;color:#24384e}
.checkout-fulfillment-choice select{margin:8px 0;min-height:44px;font-size:16px}
.checkout-fulfillment-choice p{font-weight:400;line-height:1.5;margin:8px 0 0}
/* Billing remains a collapsible section even without a saved address. */
.checkout-address-disclosure>#billingFormContainer{margin:0;padding:0 16px 16px;border-top:1px solid #e1e7ef}
.checkout-address-disclosure>.form-check{margin:0!important;padding:14px 16px 14px 40px;border-top:1px solid #e1e7ef}
@media(max-width:767.98px){body.checkout-page .checkout-address-disclosure>#billingFormContainer{padding:0 12px 12px}}

.checkout-shipping-body{padding:0 16px 16px}
#checkoutShippingStep[open] #checkoutShippingPreview,#checkoutShippingPreview:empty{display:none}

.checkout-saved-address-label {
  margin: 0 0 10px;
  color: #1a334f;
  font-size: 14px;
  font-weight: 700;
}
.checkout-saved-address-options { display: grid; gap: 8px; }
.checkout-address-option {
  width: 100%;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #d7e2ef;
  border-radius: 12px;
  background: #fff;
  color: #263b52;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.checkout-saved-address-options .checkout-address-option:is(:hover, :focus-visible, :active, [aria-pressed="true"]) { color: #263b52; }
.checkout-address-option:hover { border-color: #79a7e5; background: #f5f9ff; }
.checkout-address-option[aria-pressed="true"] { border-color: #276dcb; background: #edf5ff; }
.checkout-address-option:disabled { cursor: wait; opacity: .65; }
.checkout-address-indicator {
  width: 17px;
  height: 17px;
  margin-top: 2px;
  border: 1px solid #7c91a9;
  border-radius: 50%;
  background: #fff;
}
.checkout-address-option[aria-pressed="true"] .checkout-address-indicator { border: 5px solid #2167bf; }
.checkout-address-description { display: grid; gap: 2px; line-height: 1.45; overflow-wrap: anywhere; }
.checkout-address-description strong { color: #152d48; }
.checkout-address-description span { font-size: 13px; }
.checkout-saved-address-options details > summary {
  width: fit-content;
  padding: 8px 12px;
  border-radius: 10px;
  color: #16589f;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.checkout-saved-address-options details > summary:hover { background: #eaf3ff; }
.checkout-saved-address-options details .checkout-address-option { margin-top: 8px; }

.checkout-delivery-address .checkout-saved-address-options {
  gap: 0;
}

.checkout-delivery-address .checkout-address-option {
  align-items: center;
  min-height: 56px;
  margin: 0;
  padding: 12px 4px;
  border: 0;
  border-bottom: 1px solid #e1e7ef;
  border-radius: 0;
  background: transparent;
}

.checkout-delivery-address .checkout-address-option:hover {
  background: #f4f8fd;
}

.checkout-delivery-address .checkout-address-indicator {
  margin-top: 0;
}

.checkout-delivery-address .checkout-saved-address-options details > summary {
  width: 100%;
  padding-inline: 4px;
}

.checkout-saved-address-options :is(button, summary):focus-visible,
:is(#checkoutShippingStep, #checkoutPaymentStep) .btn:focus-visible {
  outline: 3px solid #6da5ef;
  outline-offset: 2px;
}
:is(#checkoutShippingStep, #checkoutPaymentStep) :is(.form-control, .form-select) {
  min-height: 44px;
  border-radius: 10px;
}
:is(#checkoutShippingStep, #checkoutPaymentStep) .btn {
  border-radius: 12px;
  font-weight: 600;
}
:is(#continueToPayment, #saveShippingInfo, #saveBillingBtn, #payWithAffirmButton, #payWithCardButton) {
  min-height: 48px;
  border-radius: 12px !important;
}

#checkoutShippingStep > summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
}
#checkoutShippingStep[open] > summary {
  grid-template-columns: minmax(0, 1fr);
  cursor: default;
}
#checkoutShippingStep[open] > summary::after,
#checkoutShippingStep[open] .checkout-change-shipping {
  display: none;
}
#checkoutShippingStep:not([open]) > summary:hover {
  background: #edf5ff;
}
#checkoutShippingStep .checkout-address-heading {
  flex-direction: column !important;
  align-items: flex-start !important;
}
.checkout-change-shipping,
.checkout-back-to-shipping {
  border: 1px solid #ccdef5;
  border-radius: 999px;
  background: #f1f7ff;
  color: #164f93;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
}
.checkout-change-shipping {
  padding: 7px 10px;
  text-align: center;
}
.checkout-back-to-shipping {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 14px;
  cursor: pointer;
}
.checkout-back-to-shipping:hover {
  color: #164f93;
  background: #e4efff;
  border-color: #8fb6eb;
}
.checkout-back-to-shipping:focus-visible {
  outline: 3px solid #6da5ef;
  outline-offset: 2px;
}
#shippingSummary .checkout-edit-shipping {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-top: 8px;
  padding: 8px 14px;
  border: 1px solid #bfd6fc;
  border-radius: 10px;
  background: #eff6ff;
  color: #174b8c;
  font-size: 14px;
  font-weight: 600;
}

#shippingSummary .checkout-edit-shipping:hover {
  border-color: #91b9f4;
  background: #e0edff;
  color: #10376c;
}

#shippingSummary .checkout-edit-shipping:focus-visible {
  outline: 3px solid #6da5ef;
  outline-offset: 2px;
  box-shadow: none;
}

#continueToPayment {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

@media (max-width: 767.98px) {
  .checkout-shipping-body { min-width: 0; padding: 0 12px 12px; }
  /* Cancel legacy offsets on full-width buttons inside the checkout steps. */
  :is(#checkoutShippingStep, #checkoutPaymentStep) .btn.w-100 {
    position: static !important;
    inset: auto !important;
    max-width: 100%;
    min-height: 48px;
    height: auto !important;
    margin-inline: 0 !important;
    padding-inline: 12px;
    white-space: normal;
  }
  #continueToPayment { margin-top: 4px; }
  #continueToPayment > i { flex: none; }
  .checkout-back-to-shipping {
    justify-content: center;
    width: 100%;
    margin: 0;
  }
  .checkout-address-option { min-width: 0; gap: 10px; padding: 12px; }
  .checkout-saved-address-options { width: 100%; min-width: 0; }
  .checkout-saved-address-options details > summary {
    min-height: 44px;
    padding-block: 12px;
  }
  .checkout-address-disclosure :is(#shippingSummary, #billingSummaryContainer) .btn {
    min-height: 44px;
  }
}

#checkoutShippingStep[data-pickup="true"] :is(#shippingForm, #shippingLoadError, .checkout-delivery-address),
#checkoutPaymentStep[data-pickup="true"] .checkout-address-disclosure > .form-check:has(#sameAsShipping) {
  display: none !important;
}

#checkoutShippingStep,
#checkoutShippingStep :is(.checkout-fulfillment-choice, .checkout-delivery-address) {
  background-color: #fff;
}
