/* Тема модалки входа (общий ru/auth.js) под дизайн MP card.
   Только внешний вид: разметку и логику даёт auth.js. Классы .authModal* фиксированы в auth.js.
   Токены берём из styles.css (--accent, --paper, --line, --ink, --muted). */

.authModal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(23, 22, 20, 0.55);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.authModal.visible { display: flex; }

.authModalCard {
  position: relative;
  width: min(420px, 100%);
  background: var(--paper, #fbf8f2);
  border: 1px solid var(--line, #d9d1c6);
  border-radius: var(--radius, 18px);
  box-shadow: 0 24px 70px rgba(37, 30, 22, 0.22);
  padding: 34px 30px 30px;
  font-family: var(--font, Inter, Arial, sans-serif);
  color: var(--ink, #171614);
}

.authModalClose {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line, #d9d1c6);
  border-radius: 8px;
  background: transparent;
  color: var(--muted, #706d67);
  cursor: pointer;
  transition: 0.18s;
}
.authModalClose:hover { color: var(--ink, #171614); border-color: var(--ink, #171614); }

#authModalTitle {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
  letter-spacing: -0.03em;
  font-size: 30px;
  line-height: 1.05;
  margin: 0 0 8px;
}
#authModalSubtitle { margin: 0 0 22px; color: var(--muted, #706d67); font-size: 14px; line-height: 1.5; }

.authModalInput {
  width: 100%;
  border: 1px solid var(--line, #d9d1c6);
  border-radius: 10px;
  padding: 14px 15px;
  margin-bottom: 12px;
  background: #fff;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.authModalInput:focus {
  border-color: var(--accent, #ef3e22);
  box-shadow: 0 0 0 3px rgba(239, 62, 34, 0.12);
}

.authModalBtn {
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 15px;
  background: var(--accent, #ef3e22);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: 0.18s;
}
.authModalBtn:hover { background: var(--accent-dark, #c92d17); }
.authModalBtn:disabled { opacity: 0.6; cursor: not-allowed; }

.authModalMsg { min-height: 18px; margin: 10px 0 0; font-size: 13px; color: var(--success, #2f8f5b); }
.authModalMsg.error { color: var(--accent-dark, #c92d17); }

.authModalToggleRow { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; }
.authModalToggle {
  border: 0;
  background: none;
  padding: 0;
  color: var(--muted, #706d67);
  font-size: 13px;
  cursor: pointer;
  transition: color 0.18s;
}
.authModalToggle:hover { color: var(--accent, #ef3e22); }

.authModalDivider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 20px 0 16px;
  color: var(--muted, #706d67);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.authModalDivider::before,
.authModalDivider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line, #d9d1c6);
}
.authModalDivider::before { margin-right: 12px; }
.authModalDivider::after { margin-left: 12px; }

.authModalBtnGoogle,
.authModalBtnVk,
.authModalBtnYandex,
.authModalBtnPhone {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--line, #d9d1c6);
  border-radius: 10px;
  padding: 13px;
  margin-bottom: 10px;
  background: #fff;
  color: var(--ink, #171614);
  font-weight: 600;
  cursor: pointer;
  transition: 0.18s;
}
.authModalBtnGoogle:hover,
.authModalBtnVk:hover,
.authModalBtnYandex:hover,
.authModalBtnPhone:hover {
  border-color: var(--ink, #171614);
  transform: translateY(-1px);
}

/* Phone-OTP в auth.js скрыт (на аудиторе тоже отключён) — на всякий случай прячем и тут. */
.authModalBtnPhone,
.authPhoneStep { display: none !important; }

@media (max-width: 480px) {
  .authModalCard { padding: 28px 20px 24px; }
  #authModalTitle { font-size: 26px; }
}
