/* ============================================================
   Login / Sign up Modals — SMSACTIVE
   Self-contained component: include this file + the modal markup
   + login-modal.js. Add class="js-login-trigger" to any button that
   should open the login modal, or "js-signup-trigger" for sign up —
   both work from anywhere on the page, including inside either modal
   (so "Sign up" inside login, and "Log in" inside sign up, just work).
   ============================================================ */

.login-overlay{
  position:fixed;
  inset:0;
  z-index:2000;
  display:flex;
  align-items:flex-start;
  justify-content:center;
  padding:84px 20px 32px;
  overflow-y:auto;
  background:rgba(4,14,36,.55);
  -webkit-backdrop-filter:blur(6px);
  backdrop-filter:blur(6px);
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:opacity .2s ease, visibility 0s linear .2s;
}
.login-overlay.is-open{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
  transition:opacity .2s ease, visibility 0s;
}

.login-modal{
  position:relative;
  width:100%;
  max-width:400px;
  background:#eef8f3;
  border-radius:32px;
  padding:36px 32px 28px;
  box-shadow:0 30px 70px -20px rgba(4,14,36,.5);
  transform:scale(.95) translateY(10px);
  transition:transform .22s cubic-bezier(.34,1.4,.64,1);
}
.login-overlay.is-open .login-modal{
  transform:scale(1) translateY(0);
}

.login-modal__close{
  position:absolute;
  top:-56px;
  right:-56px;
  width:40px;
  height:40px;
  border-radius:50%;
  background:#fff;
  border:none;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#0f3d28;
  box-shadow:0 6px 16px -4px rgba(4,14,36,.35);
  transition:transform .16s ease, background .16s ease, box-shadow .16s ease;
}
.login-modal__close:hover{
  background:#f4f4f4;
  transform:scale(1.06);
  box-shadow:0 8px 18px -4px rgba(4,14,36,.4);
}
.login-modal__close:active{transform:scale(.97);}
.login-modal__close svg{width:16px;height:16px;}

@media (max-width:520px){
  .login-modal__close{
    top:-44px;
    right:-6px;
    width:34px;
    height:34px;
  }
  .login-modal__close svg{width:14px;height:14px;}
}

.login-modal__title{
  font-family:var(--font-heading);
  margin:0 0 22px;
  text-align:center;
  font-size:25px;
  font-weight:700;
  color:#0f3d28;
}

.login-field{margin-bottom:16px;}
.login-field label{
  display:block;
  font-family:var(--font-heading);
  margin-bottom:8px;
  font-size:13px;
  font-weight:600;
  color:#0f3d28;
}
.login-field label .req{color:#f39c1f;margin-left:1px;}

.login-input-wrap{position:relative;}
.login-field input{
  width:100%;
  padding:14px 16px;
  border-radius:14px;
  border:none;
  background:#dcefe6;
  font-family:inherit;
  font-size:14px;
  color:#0f3d28;
}
.login-field input::placeholder{color:#6b9c84;}
.login-field--password input{padding-right:46px;}

.login-eye-toggle{
  position:absolute;
  top:50%;
  right:12px;
  transform:translateY(-50%);
  background:none;
  border:none;
  cursor:pointer;
  color:#3a7a5b;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:4px;
}
.login-eye-toggle svg{width:19px;height:19px;}
.login-eye-toggle .icon-eye-off{display:none;}
.login-field--password.is-visible .icon-eye{display:none;}
.login-field--password.is-visible .icon-eye-off{display:block;}

.login-submit{
  width:100%;
  margin-top:20px;
  padding:15px;
  border-radius:999px;
  border:none;
  background:#f39c1f;
  color:#fff;
  font-family:inherit;
  font-size:15px;
  font-weight:600;
  cursor:pointer;
  transition:background .16s ease;
}
.login-submit:hover{background:#e97a0c;}

.login-signup-row{
  margin-top:14px;
  text-align:center;
  font-size:13px;
  font-weight:400;
  color:#0f3d28;
}
.login-signup-row a{
  color:#f39c1f;
  font-weight:700;
  text-decoration:none;
}
.login-signup-row a:hover{text-decoration:underline;}

.login-divider{
  border:none;
  border-top:1px solid rgba(11,27,61,.14);
  margin:20px 0 18px;
}

.login-social{
  display:flex;
  justify-content:center;
}
.login-social-btn{
  width:44px;
  height:44px;
  border-radius:50%;
  background:#fff;
  border:1px solid rgba(11,27,61,.12);
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 4px 12px -4px rgba(11,27,61,.2);
  cursor:pointer;
  transition:transform .1s ease;
}
.login-social-btn:active{transform:scale(.92);}
.login-social-btn svg{width:22px;height:22px;}

.login-provider-list{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-bottom:20px;
}
.login-provider-btn{
  display:flex;
  align-items:center;
  gap:12px;
  padding:13px 16px;
  border-radius:14px;
  background:#dcefe6;
  color:#0f3d28;
  font-family:inherit;
  font-size:14px;
  font-weight:600;
  text-decoration:none;
  transition:background .16s ease, transform .1s ease;
}
.login-provider-btn:hover{background:#cfe8dc;}
.login-provider-btn:active{transform:scale(.98);}
.login-provider-btn svg{width:21px;height:21px;flex:0 0 auto;}

.login-terms{
  margin:14px 0 0;
  text-align:center;
  font-size:12px;
  font-weight:400;
  line-height:1.5;
  color:#0f3d28;
}
.login-terms a{color:#f39c1f;text-decoration:none;}
.login-terms a:hover{text-decoration:underline;}

@media (max-width:420px){
  .login-modal{padding:30px 22px 24px;border-radius:26px;}
  .login-modal__title{font-size:22px;}
}

/* ---------- Header-anchored dropdown variant ---------- */
/* Same overlay/modal markup as above — header-auth-dropdown.js sets
   .login-modal's inline top/right to pin it under whichever header
   button opened it, and adds this class so it reads as a compact
   dropdown (no dark backdrop, close button tucked into its own corner)
   instead of the full centered dialog used everywhere else on the page. */
.login-overlay--anchored{
  background:transparent;
  -webkit-backdrop-filter:none;
  backdrop-filter:none;
  padding:0;
}
.login-overlay--anchored .login-modal{
  width:360px;
  max-width:calc(100vw - 32px);
  padding-top:46px;
  border-radius:20px;
  box-shadow:0 24px 60px -18px rgba(11,27,61,.35);
  border:1px solid rgba(11,27,61,.08);
  /* header-auth-dropdown.js sets an inline max-height on phones when
     there isn't full room above/below the button (keyboard open, short
     viewport) — this is what makes that height cap scroll instead of
     just clipping the bottom of the form off-screen. */
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
}
.login-overlay--anchored .login-modal__close{
  top:14px;
  right:14px;
  width:28px;
  height:28px;
  background:rgba(11,27,61,.06);
  box-shadow:none;
}
.login-overlay--anchored .login-modal__close:hover{background:rgba(11,27,61,.1);}
.login-overlay--anchored .login-modal__close svg{width:13px;height:13px;}

@media (max-width:420px){
  .login-overlay--anchored .login-modal{width:calc(100vw - 32px);}
}
