/* MoveAthens Login Modal — theme-aware, matches contact-modal & guest-qr style.
   Loaded only on welcome.html (mobile/tablet); desktop uses its own contact modal. */

.ma-login-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ma-login-modal[hidden] { display: none !important; }
body.ma-login-modal-open { overflow: hidden; }

.ma-login-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 14, 28, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: maLoginFadeIn 180ms ease-out;
}

.ma-login-modal__card {
  position: relative;
  width: min(92vw, 380px);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: #151c2e;
  color: #e6ecff;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  padding: 26px 22px 22px;
  box-shadow: 0 30px 70px rgba(0,0,0,0.55);
  animation: maLoginSlideUp 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.ma-login-modal__x {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 0;
  color: rgba(255,255,255,0.65);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  border-radius: 999px;
}
.ma-login-modal__x:hover { background: rgba(255,255,255,0.08); color: #fff; }

.ma-login-modal__icon {
  font-size: 28px;
  text-align: center;
  margin-bottom: 6px;
}

.ma-login-modal__title {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.2px;
}

.ma-login-modal__desc {
  margin: 0 0 16px;
  font-size: 13.5px;
  line-height: 1.45;
  color: rgba(230, 236, 255, 0.74);
  text-align: center;
}

.ma-login-modal__form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ma-login-modal__label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  margin-bottom: 4px;
  color: rgba(230, 236, 255, 0.66);
}

.ma-login-modal__input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  font-size: 16px; /* prevents iOS auto-zoom */
  font-family: inherit;
  /* v14XX: white inputs with dark text in BOTH modes — matches the polished
     "PIN field" look that the user prefers. iOS / Safari paint password fields
     and autofilled fields with system colors, so we set explicit
     `-webkit-text-fill-color` + `color-scheme: light` to keep the input chrome
     consistent regardless of OS theme. */
  background: #ffffff;
  color: #0b1220;
  -webkit-text-fill-color: #0b1220;
  caret-color: #1A2456;
  color-scheme: light;
  border: 1px solid rgba(15,23,42,0.18);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.ma-login-modal__input::placeholder {
  color: rgba(15, 23, 42, 0.40);
}
.ma-login-modal__input:focus {
  border-color: #1A2456;
  box-shadow: 0 0 0 3px rgba(26, 36, 86, 0.15);
}
/* Override iOS / Chrome autofill yellow background that hides the text */
.ma-login-modal__input:-webkit-autofill,
.ma-login-modal__input:-webkit-autofill:hover,
.ma-login-modal__input:-webkit-autofill:focus {
  -webkit-text-fill-color: #0b1220;
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset;
  caret-color: #1A2456;
}

.ma-login-modal__btn {
  margin-top: 6px;
  padding: 13px 16px;
  background: linear-gradient(135deg, #1A2456 0%, #2a3a7a 100%);
  color: #fff;
  border: 0;
  border-radius: 10px;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: transform 0.12s, opacity 0.15s;
}
.ma-login-modal__btn:hover { opacity: 0.92; }
.ma-login-modal__btn:active { transform: scale(0.98); }
.ma-login-modal__btn:disabled { opacity: 0.55; cursor: progress; }

.ma-login-modal__error {
  margin: 4px 0 0;
  min-height: 16px;
  font-size: 12.5px;
  text-align: center;
  color: #ff8b8b;
}

@keyframes maLoginFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes maLoginSlideUp {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Light theme override ── */
html.ma-force-light .ma-login-modal__card,
html:not(.ma-force-dark) .ma-login-modal__card {
  background: #ffffff;
  color: #0b1220;
  border-color: rgba(15, 23, 42, 0.10);
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.25);
}
html.ma-force-light .ma-login-modal__x,
html:not(.ma-force-dark) .ma-login-modal__x {
  color: rgba(15, 23, 42, 0.55);
}
html.ma-force-light .ma-login-modal__x:hover,
html:not(.ma-force-dark) .ma-login-modal__x:hover {
  background: rgba(15, 23, 42, 0.06);
  color: #0b1220;
}
html.ma-force-light .ma-login-modal__desc,
html:not(.ma-force-dark) .ma-login-modal__desc {
  color: rgba(15, 23, 42, 0.65);
}
html.ma-force-light .ma-login-modal__label,
html:not(.ma-force-dark) .ma-login-modal__label {
  color: rgba(15, 23, 42, 0.60);
}
/* Note: input styles are intentionally identical in dark + light modes
   (always white bg + dark text — user preference v1431). */
html.ma-force-light .ma-login-modal__error,
html:not(.ma-force-dark) .ma-login-modal__error {
  color: #c0392b;
}

/* Re-assert dark when explicit */
html.ma-force-dark .ma-login-modal__card {
  background: #151c2e;
  color: #e6ecff;
}

@media (prefers-color-scheme: dark) {
  html:not(.ma-force-light) .ma-login-modal__card {
    background: #151c2e;
    color: #e6ecff;
    border-color: rgba(255,255,255,0.08);
  }
  html:not(.ma-force-light) .ma-login-modal__desc { color: rgba(230, 236, 255, 0.74); }
  html:not(.ma-force-light) .ma-login-modal__label { color: rgba(230, 236, 255, 0.66); }
  /* Inputs intentionally stay white in dark mode (user preference v1431). */
  html:not(.ma-force-light) .ma-login-modal__x { color: rgba(255,255,255,0.65); }
}
