/* Mobile purchase controls use the original action nodes and complete business values. */
.checkout-address-list{display:grid;gap:12px;margin:16px 0;min-width:0}
.checkout-address-card{padding:16px;border:1px solid #d9d6cf;border-radius:12px;background:#fff;min-width:0;overflow-wrap:anywhere}
.checkout-address-card.is-selected{border:2px solid #ae1236;padding:15px;background:#fff9fa}
.checkout-address-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.checkout-address-choice{display:flex;align-items:center;gap:10px;min-height:44px;cursor:pointer;min-width:0}
.checkout-address-choice input{width:20px;min-height:20px;height:20px;flex:0 0 20px;accent-color:#ae1236}
.checkout-address-default{font-size:12px;font-weight:600;color:#625a57;background:#f3f0eb;padding:4px 8px;border-radius:5px}
.checkout-address-card p{margin:6px 0;line-height:1.65;white-space:pre-wrap;overflow-wrap:anywhere}
.checkout-address-card>button{margin:10px 8px 0 0}
.checkout-address-form{margin:16px 0;min-width:0}
.checkout-address-form textarea{min-height:108px;resize:vertical}
.checkout-address-form .business-field:has(textarea),.checkout-address-form-actions{grid-column:1/-1}
.checkout-primary-dock{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:24px 0 0;padding:18px 0;border-top:1px solid #e4e0d9;min-width:0}
.checkout-primary-dock:not(:has(>button:not([hidden]))){display:none}
.checkout-primary-dock>.checkout-summary{margin:0;padding:0;display:grid;gap:5px;font-size:13px;line-height:1.4;min-width:0}
.checkout-primary-dock>.checkout-summary>span:last-child{font-size:23px;font-weight:750;overflow-wrap:anywhere}
.checkout-dock-total{display:grid;gap:4px;min-width:0;line-height:1.4}
.checkout-dock-total>span{font-size:12px;color:#655f5b;overflow-wrap:anywhere}
.checkout-dock-total>strong{font-size:23px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.checkout-primary-dock>button{min-height:48px;max-width:100%;white-space:normal;overflow-wrap:anywhere}
.checkout-page .checkout-primary-dock>.checkout-primary-action{background:#af0030;border-color:#af0030;color:#fff}
@media(max-width:760px){
  .checkout-page .checkout-header{padding:12px 16px}
  .checkout-page .checkout-main{margin-top:18px}
  .checkout-page .checkout-heading{margin:18px 0 16px}
  .checkout-page .checkout-heading h1{font-size:26px}
  .checkout-page .checkout-steps{margin-bottom:20px}
  .checkout-page .checkout-main .panel{padding:20px 16px}
  .checkout-page:has(.checkout-primary-dock) .checkout-main{padding-bottom:calc(180px + env(safe-area-inset-bottom))}
  .checkout-page .checkout-primary-dock{position:fixed;left:0;right:0;bottom:0;z-index:38;display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.3fr);gap:12px;margin:0;padding:12px max(16px,env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left));border-top:1px solid #d8d3ca;background:#fffcf8;box-shadow:0 -5px 18px #17181b0a;align-items:center}
  .checkout-page .checkout-primary-dock:not(:has(>button:not([hidden]))){display:none}
  .checkout-page .checkout-primary-dock>button{width:100%;min-height:52px;margin:0;font-size:14px;line-height:1.5;padding:12px 14px;border-radius:9px}
  .checkout-page .checkout-primary-dock>.checkout-summary{font-size:12px;gap:5px;text-align:left}
  .checkout-page .checkout-primary-dock>.checkout-summary>span:last-child,.checkout-page .checkout-dock-total>strong{font-size:21px}
  /* Actual keyboard occlusion, held through a dock pointer gesture, controls flow.
     Focus alone must never move a button between pointerdown and click. */
  .checkout-page.checkout-keyboard-open .checkout-primary-dock{position:static;box-shadow:none;grid-column:1/-1;padding:16px 0;margin-top:16px;background:transparent}
  .checkout-address-form{grid-template-columns:1fr;gap:8px}
  .checkout-address-form .business-field{margin:6px 0}
  .checkout-address-form-actions>button{width:100%;min-height:48px}
  .checkout-address-card{padding:14px}
  .checkout-address-card.is-selected{padding:13px}
}

/* Keep checkout language controls within narrow screens at enlarged text sizes. */
@media(max-width:600px){
  .checkout-page .checkout-header{flex-wrap:wrap}
  .checkout-page .checkout-header .language-control{min-width:0;max-width:100%;margin-left:auto}
  .checkout-page .checkout-header .language-label{white-space:normal;overflow-wrap:anywhere}
  .checkout-page .checkout-header .language-control select{min-width:0;max-width:100%}
  .checkout-page .checkout-steps{grid-template-columns:repeat(3,minmax(0,1fr))}
  .checkout-page .checkout-steps li{min-width:0;flex-wrap:wrap}
  .checkout-page .checkout-steps li>span{min-width:0;max-width:100%;overflow-wrap:anywhere}
}

/* Preserve whole payment amounts and a full-width action on narrow phones. */
@media(max-width:360px){
  body.checkout-page .checkout-primary-dock{grid-template-columns:minmax(0,1fr);gap:8px}
  body.checkout-page .checkout-dock-total{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;column-gap:12px}
  body.checkout-page .checkout-dock-total>strong{max-width:100%;white-space:normal;overflow-wrap:anywhere}
  body.checkout-page:not(.checkout-keyboard-open) .checkout-primary-dock{max-height:calc(100dvh - 24px);overflow-y:auto}
}

/* Short landscape checkouts keep the payment action in the document flow. */
@media(max-width:760px) and (max-height:440px) and (orientation:landscape){
  body.checkout-page .checkout-primary-dock{position:static;grid-template-columns:minmax(0,1fr);margin-top:20px;padding:16px 0;box-shadow:none;background:transparent}
  body.checkout-page .checkout-dock-total{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:6px 16px}
  body.checkout-page .checkout-dock-total>strong{max-width:100%;white-space:normal;overflow-wrap:anywhere}
  body.checkout-page:has(.checkout-primary-dock) .checkout-main{padding-bottom:32px}
}
