/* Quick auth popup — India theme */
.fr-auth {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: grid;
  place-items: center;
  padding: 1rem;
}
.fr-auth[hidden] { display: none !important; }

.fr-auth__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(3px);
}

.fr-auth__dialog {
  position: relative;
  width: min(420px, 100%);
  max-height: min(92vh, 640px);
  overflow: auto;
  background: #fff;
  border-radius: 18px;
  border: 1px solid var(--line);
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22);
  padding: 1.5rem 1.35rem 1.35rem;
  animation: frAuthIn 0.22s ease-out;
}
@keyframes frAuthIn {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .fr-auth__dialog { animation: none; }
}

.fr-auth__close {
  position: absolute;
  top: 0.65rem;
  right: 0.75rem;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  background: var(--bg);
  border-radius: 999px;
  font-size: 1.35rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}
.fr-auth__close:hover { color: var(--blue); background: var(--blue-soft); }

.fr-auth__head { padding-right: 1.5rem; margin-bottom: 1rem; }
.fr-auth__head h2 {
  margin: 0.15rem 0 0;
  font-size: 1.35rem;
  line-height: 1.25;
  color: #0f172a;
}
.fr-auth__lead {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.fr-auth__tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  padding: 0.3rem;
  background: var(--bg);
  border-radius: 12px;
  margin-bottom: 1rem;
}
.fr-auth__tabs:has(.fr-auth__tab:only-child) {
  grid-template-columns: 1fr;
}
.fr-auth__tab {
  border: 0;
  background: transparent;
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
}
.fr-auth__tab.is-active {
  background: #fff;
  color: var(--blue);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
}

.fr-auth__msg {
  margin: 0 0 0.85rem;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.4;
}
.fr-auth__msg.is-error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}
.fr-auth__msg.is-ok {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.fr-auth__form { display: none; }
.fr-auth__form.is-active { display: grid; gap: 0.85rem; }

.fr-auth__field { display: grid; gap: 0.35rem; }
.fr-auth__field span {
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
}
.fr-auth__field input {
  width: 100%;
  min-height: 46px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 0.55rem 0.85rem;
  font: inherit;
  color: #0f172a;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.fr-auth__field input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.15);
}

.fr-auth__check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
}
.fr-auth__check input { width: 1rem; height: 1rem; accent-color: var(--blue); }

.fr-auth__submit {
  width: 100%;
  min-height: 48px;
  justify-content: center;
  margin-top: 0.15rem;
}
.fr-auth__submit.is-busy {
  opacity: 0.75;
  pointer-events: none;
}

.fr-auth__hint {
  margin: 0;
  text-align: center;
  font-size: 0.85rem;
}
.fr-auth__hint a { color: var(--blue); font-weight: 700; }

.fr-auth__note {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
}
.fr-auth__note--solo {
  padding: 0.75rem;
  background: var(--orange-soft);
  border-radius: 10px;
}

body.fr-auth-open { overflow: hidden; }

.fr-auth-complete {
  margin-bottom: 1.25rem !important;
}

@media (max-width: 480px) {
  .fr-auth__dialog { padding: 1.25rem 1rem 1.1rem; border-radius: 14px; }
  .fr-auth__head h2 { font-size: 1.2rem; }
}
