/* ============================================================
   Nexpeco — вхід і реєстрація.
   Скло, картка та кнопки — у styles/glass.css.
   ============================================================ */

.auth-shell {
  width: 100%;
  max-width: 30rem;
}

.brand {
  flex: 1;
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: -0.01em;
}

/* --- Вибір мови в шапці -------------------------------------- */

.lang-switch {
  flex: none;
  padding: 0.5rem 0.65rem;

  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-soft);

  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: var(--transition);
}

.lang-switch:hover { color: var(--text); background: rgba(255, 255, 255, 0.12); }

.lang-switch:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* --- Форма --------------------------------------------------- */

/* display нижче перебиває вбудований [hidden] { display: none },
   тому приховану форму ховаємо явно. */
.auth-form[hidden] { display: none; }

.auth-form {
  display: grid;
  gap: 1rem;
  text-align: left;
}

/* Показати / сховати пароль */
.reveal {
  position: absolute;
  top: 50%;
  right: 0.5rem;
  transform: translateY(-50%);

  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;

  font-size: 0.95rem;
  line-height: 1;
  color: var(--text-muted);
  background: none;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0.55;
  transition: var(--transition);
}

.reveal:hover { opacity: 0.9; background: rgba(255, 255, 255, 0.08); }
.reveal.is-on { opacity: 1; color: var(--accent); }

.reveal:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* --- Дрібні посилання ---------------------------------------- */

/* «Forgot password?» стоїть у потоці форми, тому без повної ширини. */
.btn-text-inline {
  width: auto;
  margin: -0.25rem 0 0;
  padding: 0;
  justify-self: center;
  font-size: 0.9rem;
}

.auth-switch {
  margin: 1.5rem 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.auth-switch button {
  padding: 0;
  font: inherit;
  font-weight: 700;
  color: var(--accent);
  background: none;
  border: none;
  cursor: pointer;
}

.auth-switch button:hover { color: var(--accent-hover); }

.auth-switch button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* --- Помилка ------------------------------------------------- */

.form-error {
  display: none;
  margin: 0 0 1rem;
  padding: 0.7rem 0.85rem;

  font-size: 0.88rem;
  text-align: left;
  color: #ffc4c4;

  background: var(--danger-soft);
  border: 1px solid rgba(229, 72, 77, 0.45);
  border-radius: var(--r-md);
}

.form-error.is-visible { display: block; }

/* --- Підвал -------------------------------------------------- */

.auth-footer {
  margin-top: 1.75rem;
  text-align: center;
  font-size: 0.85rem;
}

.auth-footer a {
  margin: 0 0.5rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition);
}

.auth-footer a:hover { color: var(--accent); }
