/* One checkout form, adapted to its page or dialog container. */
.order-contact-fields { display: grid; gap: 14px; align-items: start; }
.order-contact-fields>label { display: grid; align-content: start; grid-auto-rows: max-content; min-width: 0; }
.order-contact-fields>label>input,.order-contact-fields>label>select,.order-contact-fields .phone-field { box-sizing: border-box; height:var(--control-height); min-height:var(--control-height); width:100%; min-width:0; }
.order-contact-fields .phone-field input { height:100%; min-height:0; }
.order-contact-fields .field-hint,.order-contact-fields .phone-hint { margin:0; font-size:var(--text-small,12px); line-height:1.45; font-weight:400; overflow-wrap:anywhere; }
.phone-field { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; background: white; min-width: 0; }
.phone-prefix { flex: 0 0 auto; padding-left: 12px; font-size: var(--text-control,16px); font-weight: 400; color: var(--ink); }
.phone-field input { width: 100%; min-width: 0; min-height: var(--control-height); padding-left: 6px; border: 0; background: transparent; font-size: var(--text-control,16px); }
.phone-field:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.phone-field input:focus-visible { outline: none; box-shadow: none; }
.phone-hint { font-size: var(--text-small,12px); font-weight: 400; color: var(--muted); }
.phone-field:has([aria-invalid=true]) { border-color: #bb1234; }
label:has([aria-invalid=true])>.phone-hint { color: #bb1234; }
.checkout-modes { display: grid; gap: 10px; padding: 0; margin: 0; border: 0; min-width: 0; }
.checkout-modes legend { margin-bottom: 12px; font-size: var(--text-body,16px); font-weight: 600; }
.checkout-mode,.checkout-wallets .payment-method { display: flex; align-items: center; gap: 10px; padding: 12px; margin: 0; border: 1px solid var(--line); border-radius: 8px; background: white; cursor: pointer; }
.checkout-mode:has(:checked),.payment-method:has(:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--selected-surface,#faf7ff); }
.checkout-mode input,.checkout-wallets input { width: 18px; height: 18px; min-height: 18px; flex: 0 0 18px; margin: 0; padding: 0; accent-color: var(--accent); }
.checkout-mode b { display: block; font-size: var(--text-body,14px); }
.checkout-mode small { display: block; margin-top: 4px; color: var(--muted); font-size: var(--text-small,12px); line-height: 1.5; font-weight: 400; }
.checkout-panel { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(280px,1fr); gap: 16px; align-items: start; }
.order-contact-fields [hidden],.checkout-panel [hidden],.product-checkout [hidden] { display: none !important; }
.checkout-main,.checkout-aside,.product-checkout-fields { display: grid; min-width: 0; gap: 16px; }
.product-checkout-fields { border: 0; padding: 0; margin: 0; }
.checkout-aside { position: sticky; top: 16px; }
.cart-checkout-form .checkout-aside { top: calc(var(--header-height,80px) + 16px); }
.checkout-section { min-width: 0; padding: var(--card-padding); background: white; border: 1px solid var(--line); border-radius: var(--card-radius); }
.checkout-section h2,.checkout-section h3 { font-size: 18px; line-height: 1.4; margin: 0 0 12px; }
.checkout-section label { margin: 0 0 14px; font-size: var(--text-body,14px); }
.checkout-section .order-contact-fields label,.checkout-section .payment-method,.checkout-section .checkout-mode { margin: 0; }
.checkout-section input:not([type=radio]),.checkout-section select { font-size: var(--text-control,16px); min-height: var(--control-height); }
.checkout-section .delivery-fields { gap: 12px; }
.checkout-section .autocomplete label { margin: 0; }
.checkout-section .autocomplete-results { top: 100%; }
.checkout-panel .field-hint { margin: 10px 0 0; font-size: var(--text-small,12px); color: var(--muted); line-height: 1.5; }
.checkout-status:empty,.checkout-panel [data-directory-status]:empty { display: none; }
.checkout-panel .checkout-status { color: #b4203d; }
.quick-total { display: flex; flex-wrap:wrap; justify-content: space-between; align-items: baseline; gap: 8px 12px; }
.quick-total strong { white-space: nowrap; font-variant-numeric: tabular-nums; }
.checkout-submit .quick-total { border:0; border-top:1px solid var(--line); padding:14px 0 0; margin:14px 0 0; }
.checkout-submit .quick-total>span { font-size: var(--text-body,14px); }
.checkout-submit .quick-total strong { font-size: var(--text-total,24px); }
.checkout-submit>.sales-credit { margin-bottom:12px; }
.checkout-submit>button { width:100%; min-height:44px; margin-top:16px; border-radius:8px; padding:10px 16px; font-size:var(--text-body,14px); line-height:1.45; white-space:normal; overflow-wrap:anywhere; }
.checkout-submit>.plain { min-height: 44px; font-size: 13px; margin-top: 4px; }
.order-summary-item { display:grid; grid-template-columns:56px minmax(0,1fr); align-items:start; gap:12px; padding:14px 0; min-width:0; }
.order-summary-item+.order-summary-item { border-top:1px solid var(--line); }
.order-summary-item:first-child { padding-top:0; }
.order-summary-item:last-child { padding-bottom:0; }
.order-summary-photo { display:flex; align-items:center; justify-content:center; width:56px; height:64px; border:1px solid var(--line); border-radius:8px; overflow:hidden; background:white; font-size:10px; color:var(--muted); }
.order-summary-photo>a { display:block; width:100%; height:100%; }
.order-summary-photo img { display:block; width:100%; height:100%; object-fit:contain; }
.order-summary-photo .placeholder { width:100%; height:100%; min-height:0; padding:10px; }.order-summary-photo .placeholder>span { display:none; }
.order-summary-description { min-width:0; overflow-wrap:anywhere; }
.order-summary-name { display:block; font-size:13px; line-height:1.45; font-weight:600; }
.order-summary-description>small,.order-summary-meta { display:block; margin-top:4px; color:var(--muted); font-size:12px; line-height:1.45; }
.order-summary-pricing { display:flex; flex-wrap:wrap; align-items:baseline; justify-content:space-between; gap:6px 12px; margin-top:8px; }
.order-summary-quantity { font-size:12px; line-height:1.45; color:var(--muted); }
.order-summary-amount { display:flex; flex-wrap:wrap; align-items:baseline; gap:6px; font-size:14px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.order-summary-amount del { font-size:12px; color:var(--muted); font-weight:400; }
.order-summary-amount strong { font-size:14px; }
.order-summary-gift,.order-summary-amount .order-summary-gift { padding:2px 6px; border-radius:4px; background:var(--pale); color:var(--accent); font-size:12px; font-weight:500; }
@media(max-width:420px){.order-summary-item{grid-template-columns:44px minmax(0,1fr);gap:10px;}.order-summary-photo{width:44px;height:54px;}}
.checkout-order-items .textlink { font-size: 13px; margin-top: 12px; }
.checkout-carriers,.checkout-payment-choices { display: grid; gap: 8px; margin-bottom: 14px; }
.checkout-choice { width: 100%; justify-content: start; gap: 10px; padding: 12px; min-height: 56px; text-align: left; border-radius: 8px; font-size: var(--text-body,14px); font-weight: 400; }
.checkout-payment-choices .checkout-choice { min-height: 52px; padding: 8px 10px; gap: 8px; }
.checkout-choice::before { content: ''; flex: 0 0 18px; width: 18px; height: 18px; border: 2px solid var(--field-border,#b9b6c8); border-radius: 50%; }
.checkout-choice[aria-checked=true] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.checkout-choice[aria-checked=true]::before { border-color: var(--accent); background: var(--accent); box-shadow: inset 0 0 0 3px white; }
.checkout-choice b { display: block; font-size: var(--text-body,14px); }
.checkout-choice small { display: block; margin-top: 3px; color: var(--muted); font-size: var(--text-small,12px); line-height: 1.4; }
.checkout-choice:disabled { opacity: .55; cursor: not-allowed; }
.checkout-choice>img { flex: 0 0 22px; }
.checkout-wallets { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; min-width: 0; border: 0; padding: 0; margin: 16px 0 0; }
.checkout-wallets legend { font-size: 13px; font-weight: 500; margin-bottom: 10px; }
.checkout-wallets .payment-method { min-height: 44px; justify-content: center; padding: 6px; gap: 6px; font-size: 13px; }
.payment-method:first-of-type { grid-column: 1/-1; }
.payment-brand { display: block; max-width: 100%; height: 22px; object-fit: contain; filter: none; }
.payment-method:first-of-type .payment-brand { object-fit: cover; }
.checkout-section summary { min-height: 32px; font-size: var(--text-body,14px); font-weight: 500; }
.checkout-section textarea { margin-top: 12px; }
.view-checkout .checkout-intro { padding: 12px 0; margin: 0 0 12px; }
.checkout-intro h1 { font-size: var(--page-heading); }
.checkout-intro p { font-size: var(--text-body,14px); line-height: 1.5; }
.product-checkout { width: min(1080px,calc(100% - 32px)); height: auto; max-width: none; max-height: calc(100dvh - 32px); margin: auto; padding: 0; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); background: var(--bg); overflow: hidden; }
.product-checkout[open] { display: flex; flex-direction: column; }
.product-checkout::backdrop { background: #17382d80; }
.product-checkout-heading { flex: 0 0 auto; background: white; padding: 10px 16px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.product-checkout-heading h2 { flex: 1; margin: 0; font-size: var(--section-heading); line-height: 1.3; text-align: center; }
.product-checkout-heading button { flex: 0 0 44px; min-height: 44px; padding: 8px; }
.checkout-scroll { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 16px; }
.checkout-exit { position: absolute; inset: 0; z-index: 5; background: #17382d77; display: flex; align-items: end; }
.checkout-exit>div { width: 100%; padding: 24px; border-radius: 16px 16px 0 0; background: white; display: grid; gap: 14px; max-height: 100%; overflow-y: auto; }
.checkout-exit h3 { font-size: var(--section-heading); margin: 0; }
.checkout-exit p { font-size: var(--text-body,14px); line-height: 1.5; margin: 0; color: var(--muted); }
html:has(.product-checkout[open]) { overflow: hidden; }
@media(max-width:1023px) {
 .checkout-panel { grid-template-columns: minmax(0,1fr); gap: 12px; }
 .checkout-main,.product-checkout-fields,.checkout-aside { gap: 12px; }
 .checkout-aside { position: static; }
 .product-checkout { inset: 0; width: 100%; height: 100dvh; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; }
 .product-checkout-heading { padding: 6px 8px; gap: 4px; }
 .product-checkout-heading h2 { font-size: var(--text-subheading,17px); }
 .checkout-scroll { flex: 1; padding: 12px 10px calc(14px + env(safe-area-inset-bottom)); }
 .checkout-section { padding: 16px 14px; }
 .checkout-submit .quick-total strong { font-size: var(--text-total,24px); }
}
