/* ============================================================
   AURUMFIT — Auth modals
   Steps: 1 phone → 2 sms → 3 profile → 4 email-code
   Figma nodes: 1-904 / 1-1384 / 16-2 / 16-487
   ============================================================ */

/* ---------- Overlay ---------- */
.auth-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.84);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.auth-overlay.is-open {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 60px;
}

/* ---------- Steps visibility ---------- */
.auth-step { display: none; width: 100%; }
.auth-step.is-active {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ---------- Logo (single image, node 1:1371) ---------- */
.auth-logo {
  width: 190px;
  height: auto;
  margin-top: 40px;
  margin-bottom: 28px;
  flex-shrink: 0;
}

/* ---------- Text block above card (steps 3, 4) ---------- */
.auth-above {
  text-align: center;
  width: 580px;
  max-width: calc(100% - 32px);
  margin-bottom: 20px;
}

.auth-above .auth-title {
  font-size: 26px;
  font-weight: 500;
  color: var(--color-white);
  margin-bottom: 14px;
}

.auth-above .auth-desc {
  font-size: 15px;
  color: var(--color-gray-light);
  line-height: 1.6;
}

/* ---------- Card wrapper ---------- */
.auth-card-wrap {
  width: 480px;
  max-width: calc(100% - 32px);
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

/* ---------- Close button (above card, aligned right) ---------- */
.auth-close {
  align-self: flex-end;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-family: var(--font-text);
  font-size: 15px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.2s;
}

.auth-close:hover { color: rgba(255, 255, 255, 0.9); }

.auth-close::before {
  content: '×';
  font-size: 18px;
  line-height: 1;
  font-weight: 300;
}

/* ---------- Card ---------- */
.auth-card {
  width: 100%;
  background: #494949;
  border-radius: 12px;
  padding: 36px 40px 40px;
}

/* Title inside card (steps 1, 2) */
.auth-card > .auth-title {
  font-family: var(--font-text);
  font-size: 20px;
  font-weight: 500;
  color: var(--color-white);
  text-align: center;
  margin-bottom: 12px;
}

/* Desc inside card */
.auth-card > .auth-desc {
  font-size: 14px;
  color: var(--color-gray-light);
  text-align: center;
  line-height: 1.55;
  margin-bottom: 28px;
}

.auth-card > .auth-desc strong {
  display: block;
  color: var(--color-white);
  font-size: 16px;
  font-weight: 500;
  margin-top: 6px;
}

/* ---------- Field ---------- */
.auth-field {
  margin-bottom: 20px;
}

.auth-field__label {
  display: block;
  font-size: 12px;
  color: var(--color-gray);
  margin-bottom: 8px;
}

.auth-field__wrap {
  position: relative;
}

/* Underline-only input (Figma: border-bottom only) */
.auth-field__input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 0;
  padding: 10px 32px 10px 0;
  font-family: var(--font-text);
  font-size: 16px;
  color: var(--color-white);
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.auth-field__input::placeholder { color: rgba(255,255,255,0.3); }

.auth-field__input:focus {
  border-bottom-color: var(--color-accent-2);
}

.auth-field__clear {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--color-gray);
  cursor: pointer;
  line-height: 1;
  display: none;
  background: none;
  border: none;
  padding: 0;
}

.auth-field__input:not(:placeholder-shown) ~ .auth-field__clear {
  display: block;
}

/* ---------- OTP (step 2) ---------- */
.auth-otp {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 10px;
}

.auth-otp__cell {
  width: 44px;
  height: 52px;
  background: transparent;
  border: none;
  border-bottom: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 0;
  text-align: center;
  font-family: var(--font-text);
  font-size: 24px;
  color: var(--color-white);
  outline: none;
  transition: border-color 0.2s;
  padding: 0;
}

.auth-otp__cell:focus {
  border-bottom-color: var(--color-accent-2);
}

.auth-timer {
  font-size: 13px;
  color: var(--color-gray);
  text-align: center;
  margin-bottom: 28px;
}

/* ---------- Button ---------- */
.auth-btn {
  display: block;
  width: 100%;
  height: 52px;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--color-accent-1), var(--color-accent-2));
  border: none;
  font-family: var(--font-text);
  font-size: 16px;
  color: #000;
  cursor: pointer;
  transition: filter 0.2s;
  margin-top: 8px;
}

.auth-btn:hover { filter: brightness(1.07); }

/* ---------- Legal (step 1) ---------- */
.auth-legal {
  font-size: 12px;
  color: var(--color-gray);
  text-align: center;
  margin-top: 18px;
  line-height: 1.6;
}

.auth-legal a {
  color: var(--color-gray-light);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ---------- Mobile ---------- */
@media (max-width: 560px) {
  .auth-logo { width: 140px; margin-top: 28px; margin-bottom: 20px; }

  .auth-card-wrap,
  .auth-above { width: calc(100% - 32px); }

  .auth-card { padding: 28px 20px 32px; }

  .auth-otp { gap: 8px; }
  .auth-otp__cell { width: 36px; height: 44px; font-size: 20px; }
}

/* ---------- Error message ---------- */
.auth-error {
  font-size: 13px;
  color: #ff6b6b;
  margin-bottom: 12px;
  text-align: center;
}
