:root{--currency-size:16px;--big-price-size:28px}
.container{max-width:1100px;margin:20px auto;padding:16px}
.grid{display:grid;grid-template-columns:1fr 360px;gap:20px;align-items:start}
@media (max-width:1100px){ .grid{grid-template-columns:1fr 320px} }
@media (max-width:880px){ .grid{grid-template-columns:1fr;gap:14px} .card{padding:14px} }
/* Preloader */
.page-preloader{position:fixed;inset:0;display:none;align-items:center;justify-content:center;background:rgba(15,23,42,0.45);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);z-index:2000;opacity:0;visibility:hidden;pointer-events:none;transition:opacity .28s ease, visibility .28s ease}
.page-preloader__card{background:rgba(15,23,42,0.85);color:#fff;border-radius:18px;padding:26px 32px;box-shadow:0 24px 70px rgba(15,23,42,0.28);display:flex;flex-direction:column;align-items:center;gap:16px;min-width:220px;text-align:center}
.page-preloader__spinner{width:44px;height:44px;border-radius:50%;border:5px solid rgba(255,255,255,0.22);border-top-color:var(--accent);animation:loader-spin .9s linear infinite}
.page-preloader__label{font-weight:700;font-size:15px;letter-spacing:0.01em}
.page-preloader.is-hidden{opacity:0;visibility:hidden;pointer-events:none}
body.preloader-active #step3Root{filter:blur(6px);pointer-events:none;user-select:none}
body.preloader-active #pagePreloader{display:flex;opacity:1;visibility:visible;pointer-events:auto}
/* Mobile: add spacing between main and summary cards to avoid overlap when stacked */
@media (max-width:520px){
  .grid{grid-template-columns:1fr;gap:16px}
  main{margin-bottom:8px}
  .calling-picker-list{position:fixed;left:0;right:0;top:auto;bottom:auto;max-height:65vh;min-width:0;border-radius:18px;padding:16px 0;} 
}

/* Card & Fields */
.card{padding:18px;box-shadow:0 8px 24px var(--shadow)}
.card-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}
.login-inline{font-weight:700;color:var(--muted);font-size:14px}
.login-identity{display:inline}
.login-identity--mobile{display:none}
.login-identity--desktop{display:inline}
.input, select{padding:0 16px;height:52px;line-height:52px;border-radius:12px;border:1px solid var(--border-color);width:100%;font-size:15px;background:#fff;box-sizing:border-box}
/* Field wrapper spacing: ensure consistent vertical gaps between fields */
.field{margin-bottom:14px}
@media (max-width:520px){ .field{margin-bottom:12px} }
@media (max-width:520px){
  .login-identity--desktop{display:none}
  .login-identity--mobile{display:inline}
}
label.field-label{display:block;font-size:13px;color:var(--muted);margin-bottom:6px}
.form-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}
@media (max-width:520px){ .form-row{grid-template-columns:1fr} }
.continue-btn.primary{box-shadow:0 10px 30px rgba(91,70,255,0.12)}
.continue-btn:disabled{opacity:0.6;cursor:not-allowed}

/* Sweep animation for active Create Order button */
.continue-btn.sweep{overflow:hidden}
.continue-btn.sweep::after{content:'';position:absolute;left:-60%;top:0;bottom:0;width:60%;transform:skewX(-20deg);background:linear-gradient(90deg,rgba(255,255,255,0.06),rgba(255,255,255,0.12),rgba(255,255,255,0.06));animation:btn-sweep 1.6s linear infinite;pointer-events:none}
@keyframes btn-sweep{0%{left:-60%;opacity:0}40%{left:50%;opacity:1}100%{left:140%;opacity:0}}
.modal-backdrop{position:fixed;left:0;right:0;top:0;bottom:0;background:rgba(0,0,0,0.45);display:none;align-items:center;justify-content:center;z-index:1100}
.modal{width:92%;max-width:520px;background:#fff;border-radius:12px;box-shadow:0 20px 60px rgba(0,0,0,0.3);position:relative;padding:22px}

/* Improved login modal styling */
.modal.login-modern{position:relative;display:flex;flex-direction:column;width:92%;max-width:420px;border-radius:20px;padding:2px;box-sizing:border-box;overflow:hidden;background:linear-gradient(160deg,rgba(91,70,255,0.65),rgba(29,78,216,0.65));box-shadow:0 28px 70px rgba(15,23,42,0.28);max-height:calc(100vh - 40px)}
.modal.login-modern::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(255,255,255,0.08),rgba(15,23,42,0.12));pointer-events:none}
.modal.login-modern button#closeModal{position:absolute;right:18px;top:16px;background:rgba(15,23,42,0.65);color:#fff;border:0;width:34px;height:34px;border-radius:50%;cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:16px;z-index:5;transition:transform .18s ease, background .18s ease}
.modal.login-modern button#closeModal:hover{background:rgba(15,23,42,0.85);transform:scale(1.05)}
.modal.login-modern .login-content{flex:1 1 auto;display:flex;flex-direction:column;min-height:0}
.login-content form{height:100%;width:100%;display:flex;flex-direction:column;gap:14px}
.login-content form .login-input{width:100%;box-sizing:border-box}
.login-actions{display:flex;gap:12px;justify-content:space-between;margin-top:6px;flex-wrap:wrap}
.login-actions .continue-btn{flex:1 0 auto;min-width:140px}
.pw-wrap{position:relative}
.pw-toggle{position:absolute;right:10px;top:50%;transform:translateY(-50%);background:rgba(241,245,249,0.9);border:1px solid rgba(148,163,184,0.4);padding:6px 8px;border-radius:8px;cursor:pointer;font-size:13px;line-height:1;color:#475569;transition:all .2s ease}
.pw-toggle:hover{color:#1e293b;border-color:rgba(99,102,241,0.4)}
.pw-toggle[aria-pressed="true"]{color:var(--accent);background:rgba(99,102,241,0.12);border-color:rgba(99,102,241,0.4)}
.login-error{color:#b91c1c;margin-top:8px}

/* ensure the injected form wrapper is centered inside the modal when opened */
.login-content .form-start-edge { display:flex; flex-direction:column; align-items:center; justify-content:center }
.login-content .form-start-edge form { width:100%; max-width:360px }

@media (max-width:520px){
  .modal.login-modern{width:96%;max-width:360px;border-radius:18px;padding:1.5px}
  .login-actions{gap:10px}
  .login-actions .continue-btn{width:100%;min-width:0}
}
.toast{position:fixed;right:16px;top:16px;z-index:10050;background:#0f172a;color:#fff;padding:10px 14px;border-radius:10px;box-shadow:0 8px 30px rgba(0,0,0,0.18);opacity:0;transform:translateY(-6px);transition:opacity .22s, transform .22s}
.toast.show{opacity:1;transform:translateY(0)}
.badge{display:inline-flex;padding:6px 14px;border-radius:999px 999px 0 0;background:transparent;color:var(--muted);font-weight:600;border:1px solid rgba(0,0,0,0.06);align-items:center;gap:8px}
/* manual registrar badge: red edge-oval attached to button */
.button-wrap{position:relative;display:block;width:100%;padding-top:36px;padding-bottom:0;margin-top:18px;}
/* place the badge centered below the button; blend it into the base */
.badge-manual{position:absolute;left:50%;transform:translate(-50%, 0);top:-6px;display:inline-flex;align-items:center;justify-content:center;padding:8px 20px;min-height:36px;border-radius:999px 999px 0 0;background:linear-gradient(135deg,#7a1b1b,#b42323);
border:2px solid rgba(139,21,21,0.85);color:#fff;font-weight:700;box-shadow:0 12px 24px rgba(15,23,42,0.16);font-size:13px;z-index:2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:82%}
/* cleaning sweep effect (subtle) */
.badge-manual::after{content:'';position:absolute;left:-60%;top:0;bottom:0;width:60%;transform:skewX(-20deg);background:linear-gradient(90deg,rgba(255,255,255,0.16),rgba(255,255,255,0));animation:badge-sweep 5.2s linear infinite}
@keyframes badge-sweep{0%{left:-60%;opacity:0}40%{left:50%;opacity:1}100%{left:140%;opacity:0}}
.badge-instant{position:absolute;left:50%;transform:translate(-50%, 0);top:-6px;display:inline-flex;align-items:center;justify-content:center;padding:8px 20px;min-height:36px;border-radius:999px 999px 0 0;background:linear-gradient(135deg,#0e7a4d,#30a46c);
border:2px solid rgba(6,95,70,0.85);color:#fff;font-weight:700;box-shadow:0 12px 24px rgba(15,23,42,0.14);font-size:13px;z-index:2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:82%;text-align:center}
.badge-instant::after{content:'';position:absolute;left:-60%;top:0;bottom:0;width:60%;transform:skewX(-20deg);background:linear-gradient(90deg,rgba(255,255,255,0.18),rgba(255,255,255,0));animation:badge-sweep 5.2s linear infinite}
.continue-btn{position:relative;z-index:0;margin-top:0}
/* button sits above the badge so any overlap is hidden behind it */
.continue-btn .btn-label{display:inline-flex;align-items:center;justify-content:center;gap:0.4rem}
.continue-btn .btn-spinner{display:none}
.continue-btn.is-loading{pointer-events:none;opacity:0.92}
.continue-btn.is-loading .btn-label{gap:0.6rem}
.continue-btn.is-loading .btn-spinner{display:inline-block;width:18px;height:18px;border-radius:50%;border:2px solid rgba(255,255,255,0.5);border-top-color:#fff;animation:btn-spinner .8s linear infinite}
@keyframes btn-spinner{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}

/* Phone calling code inline */
.phone-row{display:flex;gap:0;align-items:center}
/* ensure the help text sits below the phone input instead of inline */
.phone-row{flex-wrap:wrap}
.phone-row .phone-inline{order:1;width:100%}
.phone-row .field-help{order:2;flex-basis:100%;width:100%;margin-top:6px;font-size:13px;color:var(--muted)}
.calling-code-select{display:none}

/* Locked billing fields (auto-filled from account) */
.locked-billing{background-color:rgba(0,0,0,0.02);border-radius:6px}
.locked-billing[readonly]{cursor:not-allowed;opacity:0.95}

/* Password input inline toggle */
.pw-wrap .pw-input{padding-right:40px}
.pw-toggle{font-size:14px;line-height:1;color:var(--muted);background:transparent}
.pw-toggle[aria-pressed="true"]{color:var(--accent)}

/* validation visuals */
.input.valid{border-color: #10b981; box-shadow: 0 0 0 3px rgba(16,185,129,0.06);} 
.input.invalid{border-color: #dc2626; box-shadow: 0 0 0 3px rgba(220,38,38,0.06);} 

/* Phone + calling code combo */
.phone-inline{display:flex;align-items:stretch;width:100%;border:1px solid var(--border-color);border-radius:12px;background:#fff;overflow:visible;min-height:52px;box-shadow:0 0 0 1px rgba(15,23,42,0.02);} 
.phone-inline > .calling-picker{position:relative;flex:0 0 auto;min-width:110px;background:linear-gradient(180deg,#f5f7ff 0%,#fbfcff 100%);} 
.calling-picker-button{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 16px;height:52px;border:0;background:transparent;font-weight:600;color:#0f172a;cursor:pointer;transition:background 0.15s ease, color 0.15s ease;} 
.calling-picker-button svg{flex-shrink:0;opacity:0.55;transition:opacity 0.2s ease;} 
.calling-picker-button:hover svg{opacity:0.75;} 
.calling-picker-button:hover{background:rgba(99,102,241,0.08);} 
.calling-picker-button:focus-visible{outline:2px solid rgba(99,102,241,0.5);outline-offset:2px;} 
#callingPickerDisplay{display:flex;align-items:center;gap:10px;width:100%;justify-content:flex-start;text-align:left;flex:1;} 
.calling-picker-display-flag{font-size:20px;line-height:1;} 
.calling-picker-display-code{font-weight:600;font-variant-numeric:tabular-nums;} 
.calling-picker-display-country{font-size:13px;color:#64748b;margin-left:auto;} 
.phone-inline > .input#phone{flex:1;padding:0 16px;border:0;background:transparent;height:100%;min-height:52px;font-size:15px;color:#0f172a;min-width:0;} 
.phone-inline > .input#phone:focus{outline:none;} 
.hidden{display:none !important;} 

.calling-picker-list{position:absolute;left:0;top:calc(100% + 8px);z-index:1400;min-width:260px;max-width:360px;max-height:320px;overflow:auto;background:#fff;border-radius:12px;border:1px solid rgba(15,23,42,0.08);box-shadow:0 16px 40px rgba(15,23,42,0.12);padding:8px 0;} 
.calling-picker-item{display:flex;align-items:center;gap:12px;padding:10px 16px;font-size:14px;cursor:pointer;transition:background 0.15s ease;} 
.calling-picker-item:hover,.calling-picker-item:focus{background:#f4f6ff;} 
.calling-picker-item:focus{outline:none;} 
.calling-picker-flag{font-size:18px;line-height:1;} 
.calling-picker-code{font-weight:600;font-variant-numeric:tabular-nums;} 
.calling-picker-name{margin-left:auto;color:#64748b;font-size:13px;text-align:right;max-width:60%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;} 

@media (max-width:640px){
  .phone-inline{border-radius:14px;min-height:56px;box-shadow:none;border:1px solid rgba(15,23,42,0.08);overflow:visible;} 
  .phone-inline > .calling-picker{border-right:1px solid rgba(15,23,42,0.08);} 
  .calling-picker-button{height:56px;padding:0 18px;justify-content:space-between;} 
  .phone-inline > .input#phone{min-height:56px;height:100%;padding:0 16px;font-size:16px;} 
  .calling-picker-list{position:fixed;left:0;right:0;bottom:0;top:auto;max-height:65vh;min-width:0;border-radius:18px 18px 0 0;padding:16px 0;} 
  .calling-picker-item{padding:14px 20px;font-size:16px;} 
  .calling-picker-name{max-width:70%;font-size:14px;} 
  .row-name{grid-template-columns:1fr 1fr !important;} 
  .row-contact,.row-address,.row-passwords{grid-template-columns:1fr !important;} 
  .row-city-country,.row-state-post{grid-template-columns:1fr 1fr !important;} 
  .row-contact .field,.row-address .field,.row-passwords .field{width:100%;} 
}

/* Country picker overlay that enhances the native select visually */
/* Country picker container and button (distinct from calling picker) */
.country-picker{position:absolute;left:8px;right:8px;top:6px;bottom:6px;border-radius:8px;pointer-events:auto}
.country-picker-button{display:inline-flex;align-items:center;gap:10px;padding:8px 12px;border-radius:10px;border:1px solid var(--border-color);background:linear-gradient(90deg,#fff,#fbfbff);cursor:pointer;height:40px;font-weight:700}
.country-picker-button:focus{outline:2px solid rgba(91,70,255,0.14);box-shadow:0 6px 20px rgba(91,70,255,0.06)}
.country-picker .flag{font-size:18px}
.country-picker .name{font-size:14px;color:#0f172a}
.country-picker .meta{font-size:13px;color:var(--muted);margin-left:auto}
/* Country picker list (desktop) */
.country-picker-list{position:absolute;left:0;top:calc(100% + 8px);z-index:60;max-height:320px;overflow:auto;background:#fff;border-radius:10px;border:1px solid #eef2ff;box-shadow:0 8px 30px rgba(12,18,36,0.12);min-width:320px}
.country-picker-item{display:flex;align-items:center;gap:12px;padding:10px 12px;cursor:pointer;border-bottom:1px solid #f6f7ff}
.country-picker-item:hover{background:#f8f9ff}
.country-picker-item .country-name{font-weight:600}
.country-picker-item .country-code{margin-left:auto;color:var(--muted);font-size:13px}
/* Sticky search at top of the list */
.country-picker-list .search-wrap{position:sticky;top:0;background:#fff;padding:10px;border-bottom:1px solid #f1f3ff;z-index:70}
.country-picker-list .search-wrap .input{width:100%;padding:8px}
/* Mobile bottom-sheet variant for country picker */
@media (max-width:520px){
  .country-picker-list{position:fixed;left:0;right:0;bottom:0;top:auto;max-height:72vh;border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:12px;border-top-right-radius:12px;min-width:unset;padding-bottom:12px}
  .country-picker-item{padding:16px 18px;font-size:16px}
  .country-picker .flag{font-size:22px}
  .country-picker-list .search-wrap{padding:12px}
}