/* vh fallback also supports desktop browsers without dynamic viewport units. */
#checkoutModal.modal-shell{box-sizing:border-box;position:fixed;inset:0;height:100vh;max-height:100vh;padding:16px;display:flex;align-items:center;justify-content:center;overflow:hidden;z-index:1000}
#checkoutModal.modal-shell.hidden{display:none!important}
#checkoutModal > .modal{box-sizing:border-box;position:relative;flex:0 1 560px;width:100%;min-width:0;min-height:0;height:auto;max-height:calc(100vh - 32px)!important;overflow-y:auto!important;overflow-x:hidden;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:26px 22px 28px;scroll-padding-block:20px}
#checkoutContent{min-width:0;max-width:100%;overflow-wrap:break-word}
#checkoutContent form{padding-bottom:12px}
#checkoutContent fieldset{min-width:0;max-width:100%;box-sizing:border-box}
#checkoutContent input:not([type=checkbox]):not([type=radio]),#checkoutContent select,#checkoutContent textarea{box-sizing:border-box;max-width:100%}
#checkoutContent button[type=submit]{white-space:normal;min-height:48px;height:auto;line-height:1.4;margin-bottom:8px}
@supports(height:100dvh){#checkoutModal.modal-shell{height:100dvh;max-height:100dvh}#checkoutModal > .modal{max-height:calc(100dvh - 32px)!important}}
@media(max-width:600px){#checkoutModal.modal-shell{padding:8px}#checkoutModal > .modal{max-height:calc(100vh - 16px)!important;padding:24px 16px calc(20px + env(safe-area-inset-bottom,0px));border-radius:16px}#checkoutContent input:not([type=checkbox]):not([type=radio]),#checkoutContent select,#checkoutContent textarea{font-size:16px}@supports(height:100dvh){#checkoutModal > .modal{max-height:calc(100dvh - 16px)!important}}}

#cartBody .loopi-checkout-login{display:block;width:100%;min-height:44px;padding:10px 8px;margin:4px 0;border:0;background:transparent;color:#315340;font:inherit;font-size:13px;text-align:center;text-decoration:underline;text-underline-offset:3px;cursor:pointer}

/* Keep checkout fields in document flow, independent of global label layouts. */
#checkoutContent #checkoutForm{display:block;width:100%;min-width:0}
#checkoutContent #checkoutForm fieldset{display:block;width:100%;margin:18px 0;padding:16px;border:1px solid #ded8cb;border-radius:12px}
#checkoutContent #checkoutForm legend{padding:0 6px;font-weight:700;max-width:100%;white-space:normal}
#checkoutContent #checkoutForm label:not(.form-check){display:block;position:static;float:none;width:100%;max-width:100%;margin:0 0 16px;line-height:1.5}
#checkoutContent #checkoutForm input:not([type=checkbox]):not([type=radio]),#checkoutContent #checkoutForm select,#checkoutContent #checkoutForm textarea{display:block;position:static;float:none;width:100%;min-width:0;max-width:100%;height:auto;min-height:46px;margin:6px 0 0;padding:10px 12px;font:inherit;line-height:1.5;border:1px solid #cfc7b8;border-radius:10px;background:#fff;color:#24382e}
#checkoutContent #checkoutForm textarea{min-height:100px;resize:vertical}
#checkoutContent .checkout-summary{display:block;margin:18px 0;padding:14px;background:#f7f3eb;border-radius:12px}
#checkoutContent .checkout-summary>div{display:flex;justify-content:space-between;align-items:baseline;gap:16px;padding:5px 0;line-height:1.5}
#checkoutContent .checkout-summary b{flex-shrink:0;white-space:nowrap}
#checkoutContent #checkoutForm .form-check{display:flex;align-items:flex-start;gap:10px;width:100%;margin:12px 0;line-height:1.5}
#checkoutContent #checkoutForm .form-check input{flex:0 0 auto;width:18px;height:18px;margin:3px 0 0}
#checkoutContent #checkoutForm .form-check span{min-width:0;flex:1}
#checkoutContent #checkoutForm .invoice-box{display:block;margin:18px 0;padding:14px;border:1px solid #ded8cb;border-radius:12px}

/* Mobile: expose the existing login action beside the cart. */
@media(max-width:900px){
  .header .nav-row{gap:6px}
  .header .auth-actions{display:flex!important;flex:0 0 auto;margin-left:0;order:0}
  .header .auth-actions #memberBtn{display:none!important}
  .header .auth-actions #loginBtn{display:inline-flex!important;align-items:center;justify-content:center;box-sizing:border-box;min-height:44px;min-width:78px;margin:0;padding:10px 12px;border:1px solid #153d32;border-radius:10px;background:#153d32;color:#fff;font:inherit;font-size:13px;font-weight:750;line-height:1.2;white-space:nowrap;cursor:pointer}
  .header .auth-actions #loginBtn:focus-visible{outline:3px solid #35b9cc;outline-offset:3px}
  .header .brand{flex:1 1 auto;min-width:0;margin-right:0}
  .header #bagBtn{flex:0 0 42px;width:42px;min-height:44px;margin-left:0;order:0}
  .header #menuBtn{flex:0 0 40px;width:40px;min-height:44px}
}
@media(max-width:430px){
  .header .wordmark{gap:5px}
  .header .wordmark-logo{width:32px;height:32px}
  .header .wordmark-name{flex-direction:column;align-items:flex-start;gap:2px}
  .header .wordmark-name strong{font-size:17px;line-height:1}
  .header .auth-actions #loginBtn{padding-inline:8px;font-size:12px}
}
