/*
Theme Name: USA Minimal Checkout
Theme URI: https://woocommerce.com/
Author: Checkout Studio
Description: Reference-inspired compact WooCommerce checkout, shipping and optional separate billing, US only.
Version: 6.6.0
Requires PHP: 7.4
Text Domain: usa-pro-checkout
*/
:root{--mwc-blue:#0658e9;--mwc-ink:#17191d;--mwc-muted:#656970;--mwc-line:#e3e4e7;--mwc-panel:#f4f4f4}
*,:before,:after{box-sizing:border-box}
html,body{min-width:320px;margin:0;padding:0}
body{font:14px/1.48 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;background:#fff;color:var(--mwc-ink)}
a{color:var(--mwc-blue)}img{max-width:100%;height:auto}
.site-content,.page-content,.page-content>.woocommerce{padding:0!important;margin:0!important;width:100%!important;max-width:none!important}
.page-content>h1,.page-content>.entry-title,body.woocommerce-checkout .entry-title{display:none!important}
body.woocommerce-checkout:not(.woocommerce-order-received){background:linear-gradient(to right,#fff 0%,#fff 50%,var(--mwc-panel) 50%,var(--mwc-panel) 100%)}
.woocommerce .usa-checkout-wrap{width:100%!important;max-width:1130px!important;margin:0 auto!important;padding:38px 36px 64px!important}
.woocommerce form.checkout.usa-checkout-form{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;column-gap:clamp(44px,8vw,118px)!important;justify-content:center!important;align-items:start!important;width:100%!important;margin:0 auto!important;padding:0!important;max-width:none!important}
.woocommerce form.checkout.usa-checkout-form>.usa-left-column{grid-column:1!important;grid-row:1!important;min-width:0!important;width:100%!important;margin:0!important;max-width:none!important;float:none!important}
.woocommerce form.checkout.usa-checkout-form>.usa-order{grid-column:2!important;grid-row:1!important;width:100%!important;min-width:0!important;margin:0!important;max-width:none!important;float:none!important;position:sticky;top:24px;background:transparent!important}
.usa-left-column>.usa-details,.usa-express-checkout{max-width:none!important;width:100%!important;margin:0!important;min-width:0!important}
.usa-express-checkout:empty{display:none!important}
.usa-express-checkout:has(:not(script):not(style)){margin:0 0 24px!important}
.usa-express-checkout iframe,.usa-express-checkout>*{max-width:100%!important}
.usa-section{margin:0 0 20px!important;width:100%!important;clear:both!important}
.usa-section h2,.usa-order h2{font-size:15px!important;font-weight:750!important;letter-spacing:-.2px!important;line-height:1.35!important;margin:0 0 10px!important;color:#16181b}
.usa-muted{font-size:11px;color:var(--mwc-muted);margin:7px 0 0}
.woocommerce form.checkout .form-row{display:block!important;float:none!important;clear:none!important;width:100%!important;padding:0!important;margin:0 0 10px!important;max-width:none!important}
.woocommerce form.checkout .form-row-first{float:left!important;clear:left!important;width:calc(50% - 6px)!important}
.woocommerce form.checkout .form-row-last{float:right!important;width:calc(50% - 6px)!important}
.woocommerce form.checkout .form-row-wide{clear:both!important}
.woocommerce form.checkout .form-row label{display:block!important;font-size:12px!important;line-height:1.4!important;font-weight:650!important;color:#262a30!important;margin:0 0 5px!important}
.woocommerce form.checkout .form-row input.input-text,
.woocommerce form.checkout .form-row select,
.woocommerce form.checkout .form-row textarea,
.woocommerce form.checkout .select2-container .select2-selection--single{display:block!important;width:100%!important;min-height:39px!important;max-width:100%!important;padding:8px 10px!important;border:1px solid var(--mwc-line)!important;border-radius:3px!important;background:#f0f0f0!important;box-shadow:none!important;color:#1c1c1c!important;font-size:13px!important}
.woocommerce form.checkout .form-row textarea{min-height:74px!important}
.woocommerce form.checkout .select2-container{width:100%!important}
.woocommerce form.checkout .select2-selection--single .select2-selection__rendered{line-height:22px!important;padding:0!important}
.woocommerce form.checkout .select2-selection__arrow{height:38px!important}
.woocommerce form.checkout .form-row input:focus,.woocommerce form.checkout .form-row select:focus{outline:2px solid #90b5fd!important;background:#fff!important}
.usa-choice{display:flex;align-items:center;gap:9px;font-size:12px;background:#fafafa;border:1px solid var(--mwc-line);padding:10px;border-radius:4px;cursor:pointer}
.usa-choice input{accent-color:var(--mwc-blue)}
.usa-billing-fields{background:#fafafa;border:1px solid var(--mwc-line);padding:14px;margin:10px 0;border-radius:5px}
.usa-billing-fields[hidden]{display:none!important}
.usa-shipping-method-section #usa-shipping-methods{padding:10px;border:1px solid var(--mwc-line);background:#f4f4f4;border-radius:4px;font-size:12px}
.usa-shipping-method-section #usa-shipping-methods ul{margin:0;padding:0;list-style:none}
.usa-shipping-method-section #usa-shipping-methods label{font-weight:500}
.usa-order-heading{display:none!important}
.usa-order #usa-order-content,.usa-order #order_review{display:block!important;width:100%!important;max-width:none!important}
.woocommerce table.shop_table{width:100%!important;margin:0!important;padding:0!important;border:0!important;border-collapse:collapse!important;background:transparent!important}
.woocommerce table.shop_table thead{display:none!important}
.woocommerce table.shop_table th,.woocommerce table.shop_table td{font-size:13px!important;line-height:1.4!important;padding:12px 2px!important;border:0!important;border-bottom:1px solid #dadada!important;background:transparent!important;vertical-align:middle!important}
.woocommerce table.shop_table th{text-align:left!important}.woocommerce table.shop_table td:last-child{text-align:right!important}
.woocommerce table.shop_table .product-name{text-align:left!important}
.woocommerce table.shop_table .order-total th,.woocommerce table.shop_table .order-total td{font-size:18px!important;font-weight:800!important;border-bottom:0!important}
.usa-item{display:flex;align-items:center;gap:12px;text-align:left!important}
.usa-item-image{flex:0 0 54px;width:54px;height:54px;border:1px solid #e1e1e1;border-radius:5px;background:#fff;position:relative;display:flex;align-items:center;justify-content:center}
.usa-item-image img{width:100%;height:100%;object-fit:contain;border-radius:4px}
.usa-item-count{position:absolute;right:-6px;top:-8px;min-width:19px;padding:2px 5px;border-radius:20px;background:#454545;color:#fff;font-size:11px;text-align:center}
.usa-item-name{font-size:12px;line-height:1.35}
.woocommerce-checkout-review-order-table .product-quantity{display:none!important}
.woocommerce #payment{background:transparent!important;border:0!important;padding:0!important;margin:0!important}
.woocommerce #payment:before{display:none!important}
.woocommerce #payment ul.payment_methods{margin:0 0 14px!important;padding:9px 11px!important;background:#fff!important;border:1px solid var(--mwc-line)!important;border-radius:4px!important}
.woocommerce #payment ul.payment_methods li{padding:5px 0!important}
.woocommerce #payment div.payment_box{border-radius:4px!important;background:#f3f4f6!important}
.woocommerce #payment div.form-row{padding:10px 0!important}
.woocommerce #payment #place_order,.woocommerce button.button,.woocommerce a.button{float:none!important;width:100%!important;min-height:42px!important;border:0!important;border-radius:4px!important;padding:10px 16px!important;font-size:13px!important;font-weight:700!important;color:#fff!important;background:var(--mwc-blue)!important}
.woocommerce #payment #place_order:hover{background:#0349be!important}
.woocommerce #payment .woocommerce-terms-and-conditions-wrapper{font-size:11px!important}
.woocommerce .woocommerce-info,.woocommerce .woocommerce-message,.woocommerce .woocommerce-error{font-size:12px!important;margin:0 0 16px!important;border-radius:4px!important}
.usa-mobile-summary-toggle{display:none!important}
/* Mobile: collapsible summary first, one-column form below */
@media(max-width:790px){
 body.woocommerce-checkout:not(.woocommerce-order-received){background:#fff!important}
 .woocommerce .usa-checkout-wrap{max-width:640px!important;padding:0 16px 40px!important}
 .woocommerce form.checkout.usa-checkout-form{display:flex!important;flex-direction:column!important;gap:0!important}
 .woocommerce form.checkout.usa-checkout-form>.usa-order{order:0!important;position:static!important;width:calc(100% + 32px)!important;margin:0 -16px 22px!important;background:#f3f3f3!important;padding:0 16px!important;border-bottom:1px solid #ddd!important}
 .woocommerce form.checkout.usa-checkout-form>.usa-left-column{order:1!important;width:100%!important}
 .usa-mobile-summary-toggle{display:flex!important;align-items:center;justify-content:space-between;gap:10px;width:100%;min-height:56px;border:0;background:transparent;color:#0b55cd;text-align:left;font-size:14px;cursor:pointer;padding:10px 0}
 .usa-mobile-summary-toggle .usa-mobile-total{margin-left:auto;color:#202124}
 .usa-order #usa-order-content{display:none!important;padding:0 0 16px!important}
 .usa-order #usa-order-content.usa-summary-open{display:block!important}
 .usa-section{margin-bottom:19px!important}
}
@media(max-width:420px){
 .woocommerce form.checkout .form-row-first,.woocommerce form.checkout .form-row-last{width:100%!important;float:none!important}
 .usa-item-image{width:50px;height:50px;flex-basis:50px}
}

/* Shipping row must always be visible and clearly distinguish missing rates. */
.usa-shipping-method-section{display:block!important}.usa-shipping-status{margin:0!important;font-size:12px;line-height:1.5;color:#555}.usa-shipping-method-section #usa-shipping-methods ul#shipping_method{padding:0;margin:0;list-style:none}.usa-shipping-method-section #usa-shipping-methods ul#shipping_method li{display:flex;align-items:center;gap:9px;margin:0 0 6px}.usa-shipping-method-section #usa-shipping-methods ul#shipping_method li:last-child{margin-bottom:0}

/* v6.2: shipping label mirrors Woo rate without moving Woo inputs */
#usa-shipping-methods{min-height:38px;display:flex;align-items:center;padding:10px!important;background:#f8f8f8!important}
#usa-shipping-methods.usa-shipping-not-found{background:#fff8ed!important}

/* 6.3 Express shipping: display the actual selected rate, without touching Woo calculations. */
#usa-shipping-methods{min-height:63px!important;background:#f7f8fa!important;border:1px solid #dde1e6!important;border-radius:9px!important;padding:13px 15px!important;display:block!important}
.usa-shipping-card{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%}
.usa-shipping-card-copy{display:flex;flex-direction:column;gap:3px}
.usa-shipping-card-title{font-size:14px;font-weight:650;color:#1d232b;line-height:1.4}
.usa-shipping-card-subtitle{font-size:12px;color:#59616e;line-height:1.4}
.usa-shipping-check{display:flex;width:21px;height:21px;flex:0 0 21px;align-items:center;justify-content:center;border-radius:50%;background:#175cd3;color:#fff;font-size:13px;font-weight:700}
#usa-shipping-methods.usa-shipping-not-found{background:#fff8ed!important}

/* 6.5 Checkout-only visual cleanup and keyboard-safe responsive layout */
body.woocommerce-checkout .woocommerce-form-coupon-toggle,
body.woocommerce-checkout form.checkout_coupon,
body.woocommerce-checkout .woocommerce-info:has(a.showcoupon){display:none!important}
.usa-mobile-summary-label{display:none}
/* Avoid viewport/keyboard clipping. Never pin the checkout form to a fixed height. */
html{height:auto;scroll-padding-bottom:clamp(96px,22vh,220px)}
body.woocommerce-checkout{min-height:100%;overflow-y:auto!important;overflow-x:hidden!important}
.usa-checkout-wrap,.usa-checkout-form,.usa-left-column,.usa-order,.usa-details{height:auto!important;max-height:none!important;overflow:visible!important}
.usa-section input,.usa-section select,.usa-section textarea{scroll-margin-top:88px;scroll-margin-bottom:180px}
@media(max-width:790px){
 html{scroll-padding-top:20px;scroll-padding-bottom:40vh}
 body.woocommerce-checkout .woocommerce .usa-checkout-wrap{width:100%!important;max-width:100%!important;padding:0 16px max(45px,env(safe-area-inset-bottom))!important}
 .woocommerce form.checkout.usa-checkout-form{width:100%!important;min-width:0!important;max-width:100%!important}
 .usa-mobile-summary-label{display:flex!important;justify-content:space-between;align-items:center;gap:10px;padding:13px 0 10px;font-size:14px;font-weight:600;color:#1c232b}
 .usa-mobile-summary-label .usa-mobile-total{white-space:nowrap}
 .usa-order #usa-order-content{display:block!important;padding:0 0 12px!important}
 .usa-order #usa-order-content.usa-summary-open{display:block!important}
 .woocommerce form.checkout input.input-text,.woocommerce form.checkout textarea,
 .woocommerce form.checkout select,.woocommerce form.checkout .select2-selection--single{font-size:16px!important}
 .usa-checkout-form .usa-left-column{padding-bottom:max(40px,env(safe-area-inset-bottom))}
}
@media(max-width:420px){
 .woocommerce .usa-checkout-wrap{padding-left:12px!important;padding-right:12px!important}
 .woocommerce form.checkout.usa-checkout-form>.usa-order{margin-left:-12px!important;margin-right:-12px!important;width:calc(100% + 24px)!important;padding-left:12px!important;padding-right:12px!important}
}

/* v6.6: real mobile order-summary accordion, collapsed by default. */
@media(max-width:790px){
  .woocommerce form.checkout.usa-checkout-form .usa-mobile-summary-label{
     display:flex!important;width:100%;appearance:none;cursor:pointer;text-align:left;
     border:0;background:transparent;color:#1a4bb1;padding:14px 0;min-height:55px;
     align-items:center;justify-content:space-between;gap:12px;
  }
  .usa-summary-chevron{display:inline-block;margin-left:4px;transition:transform .18s ease}
  .usa-mobile-summary-label[aria-expanded="true"] .usa-summary-chevron{transform:rotate(180deg)}
  .woocommerce form.checkout.usa-checkout-form .usa-order #usa-order-content{display:none!important}
  .woocommerce form.checkout.usa-checkout-form .usa-order #usa-order-content.usa-summary-open{display:block!important}
}
@media(min-width:791px){
 .usa-mobile-summary-label{display:none!important}
 .usa-order #usa-order-content{display:block!important}
}
/* Settings from Appearance > Customize > Checkout Sizes. */
body.woocommerce-checkout .woocommerce form.checkout.usa-checkout-form .form-row input.input-text,
body.woocommerce-checkout .woocommerce form.checkout.usa-checkout-form .form-row select,
body.woocommerce-checkout .woocommerce form.checkout.usa-checkout-form .form-row textarea,
body.woocommerce-checkout .woocommerce form.checkout.usa-checkout-form .select2-container .select2-selection--single{
 min-height:var(--usa-field-height,42px)!important;font-size:var(--usa-input-font,16px)!important;
}
body.woocommerce-checkout .woocommerce form.checkout.usa-checkout-form .form-row label{
 font-size:var(--usa-label-font,13px)!important;
}
/* First and Last Name must share the same row, including small phones. */
body.woocommerce-checkout .woocommerce form.checkout.usa-checkout-form #shipping_first_name_field,
body.woocommerce-checkout .woocommerce form.checkout.usa-checkout-form #billing_first_name_field{
 display:block!important;float:left!important;clear:left!important;width:calc(50% - 6px)!important;
}
body.woocommerce-checkout .woocommerce form.checkout.usa-checkout-form #shipping_last_name_field,
body.woocommerce-checkout .woocommerce form.checkout.usa-checkout-form #billing_last_name_field{
 display:block!important;float:right!important;clear:none!important;width:calc(50% - 6px)!important;
}
body.woocommerce-checkout .woocommerce form.checkout.usa-checkout-form #shipping_country_field,
body.woocommerce-checkout .woocommerce form.checkout.usa-checkout-form #billing_country_field{
 clear:both!important;
}
@media(max-width:420px){
 body.woocommerce-checkout .woocommerce form.checkout.usa-checkout-form #shipping_first_name_field,
 body.woocommerce-checkout .woocommerce form.checkout.usa-checkout-form #shipping_last_name_field,
 body.woocommerce-checkout .woocommerce form.checkout.usa-checkout-form #billing_first_name_field,
 body.woocommerce-checkout .woocommerce form.checkout.usa-checkout-form #billing_last_name_field{
  width:calc(50% - 5px)!important;
 }
}
