/*
 * NewtonMag guest account authentication v11
 * Loaded ONLY on guest My Account by page.php.
 * Authentication/OTP logic is untouched; this file is presentation-only.
 */
body.woocommerce-account:not(.logged-in) {
  --nm-auth-navy:#14263d;
  --nm-auth-blue:#2667df;
  --nm-auth-cyan:#16a5c7;
  --nm-auth-text:#40556c;
  --nm-auth-line:#dfe8f3;
}

body.woocommerce-account:not(.logged-in) .nm-account-auth-entry {
  width:min(720px,calc(100% - 32px));
  margin:58px auto 82px;
  padding:26px;
  display:flex;
  align-items:center;
  gap:20px;
  border:1px solid var(--nm-auth-line);
  border-radius:23px;
  background:radial-gradient(circle at 92% 12%,rgba(22,165,199,.07),transparent 28%),linear-gradient(135deg,#fff,#f7f9fc);
  box-shadow:0 14px 38px rgba(20,38,61,.065);
  box-sizing:border-box;
  direction:rtl;
  contain:layout paint;
}
body.woocommerce-account:not(.logged-in) .nm-account-auth-entry__mark {
  flex:0 0 70px;
  width:70px;
  height:70px;
  display:grid;
  place-items:center;
  border:1px solid #d8e5f5;
  border-radius:21px;
  background:linear-gradient(145deg,#fff,#edf5ff);
  color:var(--nm-auth-blue);
  font:900 29px/1 Arial,sans-serif;
  box-shadow:0 8px 22px rgba(38,103,223,.08);
}
body.woocommerce-account:not(.logged-in) .nm-account-auth-entry__copy { min-width:0; flex:1; }
body.woocommerce-account:not(.logged-in) .nm-account-auth-entry__copy > span { color:#55718e; font-size:12px; font-weight:800; }
body.woocommerce-account:not(.logged-in) .nm-account-auth-entry h1 { margin:3px 0 5px!important; color:var(--nm-auth-navy)!important; font-size:23px!important; font-weight:900!important; line-height:1.55!important; }
body.woocommerce-account:not(.logged-in) .nm-account-auth-entry p { margin:0 0 14px!important; color:#738397!important; font-size:13px!important; line-height:1.95!important; }
body.woocommerce-account:not(.logged-in) .nm-account-auth-open {
  min-height:45px;
  padding:8px 18px;
  border:0;
  border-radius:13px;
  background:linear-gradient(120deg,#285edb,#2678df 56%,#17a5c6);
  color:#fff;
  box-shadow:0 8px 20px rgba(38,103,223,.16);
  font:800 13.5px/1.6 inherit;
  cursor:pointer;
}

/* Existing Parsa popup, presentation only. No IDs/backend changed. */
body.woocommerce-account:not(.logged-in) #login_popup {
  width:min(430px,calc(100% - 28px))!important;
  max-height:min(720px,calc(100vh - 32px));
  overflow:auto!important;
  padding:21px 21px 19px!important;
  border:1px solid #dce7f3!important;
  border-radius:23px!important;
  background:#fff!important;
  box-shadow:0 26px 70px rgba(10,28,48,.22)!important;
  z-index:999999!important;
  contain:layout paint;
}
body.woocommerce-account:not(.logged-in) #cover-overlay {
  position:fixed!important;
  inset:0!important;
  z-index:9998!important;
  background:rgba(9,25,43,.54)!important;
  opacity:1!important;
  /* No backdrop-filter: cheaper GPU/compositing path on mobile. */
}
body.woocommerce-account:not(.logged-in) #login_popup .reg-logo { margin-bottom:15px!important; text-align:center; }
body.woocommerce-account:not(.logged-in) #login_popup .reg-logo img { max-width:185px; max-height:72px; object-fit:contain; }
body.woocommerce-account:not(.logged-in) #login_popup .form h2 { margin:0 0 15px!important; color:var(--nm-auth-navy)!important; font-size:20px!important; font-weight:900!important; }
body.woocommerce-account:not(.logged-in) #login_popup .mc-field label { display:block; margin-bottom:7px; color:#415a73; font-size:12.5px; font-weight:800; }
body.woocommerce-account:not(.logged-in) #login_popup .mc-field .relative { position:relative; }
body.woocommerce-account:not(.logged-in) #login_popup .mc-field input {
  width:100%!important;
  min-height:52px!important;
  padding:10px 70px 10px 14px!important;
  border:1px solid #dce5ef!important;
  border-radius:14px!important;
  background:#f9fbfd!important;
  color:#243b53!important;
  font-size:14px!important;
  box-sizing:border-box;
}
body.woocommerce-account:not(.logged-in) #login_popup .mc-field input:focus { outline:0!important; border-color:#729ced!important; box-shadow:0 0 0 4px rgba(38,103,223,.075)!important; background:#fff!important; }
body.woocommerce-account:not(.logged-in) #login_popup #mc-login > button,
body.woocommerce-account:not(.logged-in) #login_popup .mc-btn-primary {
  width:100%!important;
  min-height:48px!important;
  border:0!important;
  border-radius:13px!important;
  background:linear-gradient(120deg,#285edb,#2678df 56%,#17a5c6)!important;
  color:#fff!important;
  font-size:13.5px!important;
  font-weight:900!important;
  box-shadow:0 8px 20px rgba(38,103,223,.16)!important;
}
body.woocommerce-account:not(.logged-in) #login_popup button svg { width:18px!important; height:18px!important; vertical-align:middle; margin-left:5px; }
body.woocommerce-account:not(.logged-in) #login_popup .mc-codes { display:flex; gap:8px; justify-content:center; direction:ltr; margin:15px 0; }
body.woocommerce-account:not(.logged-in) #login_popup .mc-codes input { width:48px!important; height:52px!important; border:1px solid #dbe5f0!important; border-radius:12px!important; text-align:center!important; font-size:20px!important; font-weight:900!important; color:var(--nm-auth-navy)!important; }
body.woocommerce-account:not(.logged-in) #login_popup #mc-edit-number { min-height:42px; border:1px solid #dce5ef; border-radius:11px; background:#fff; color:#536a80; font-weight:800; }

@media (max-width:640px) {
  body.woocommerce-account:not(.logged-in) .nm-account-auth-entry { margin:26px auto 56px; padding:19px; align-items:flex-start; }
  body.woocommerce-account:not(.logged-in) .nm-account-auth-entry__mark { flex-basis:54px; width:54px; height:54px; border-radius:16px; font-size:23px; }
  body.woocommerce-account:not(.logged-in) .nm-account-auth-entry h1 { font-size:20px!important; }
  body.woocommerce-account:not(.logged-in) #login_popup { padding:18px 16px 16px!important; border-radius:20px!important; }
}
@media (prefers-reduced-motion:reduce) {
  body.woocommerce-account:not(.logged-in) #login_popup,
  body.woocommerce-account:not(.logged-in) .nm-account-auth-open { transition:none!important; animation:none!important; }
}
