/* Arcline modal + form styles, extracted */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 9, 20, 0.68);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--s-4);
}

.modal-overlay.open { display: flex; }

.modal {
  width: min(520px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: var(--c-white);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  padding: var(--s-6);
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--s-5);
}

.modal__title { font-size: 1.3rem; font-weight: 700; }

.modal__close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: background var(--duration-fast);
}

.modal__close:hover { background: var(--c-foam); }

.modal__close svg { width: 22px; height: 22px; color: var(--c-slate); }

.form-row { margin-bottom: var(--s-4); }

.form-row label { display: block; margin-bottom: var(--s-2); }

.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
}

.field-error {
  font-size: 0.78rem;
  color: var(--c-danger);
  margin-top: var(--s-1);
  min-height: 1em;
}

.password-wrap { position: relative; }
.password-wrap input { padding-right: 2.6rem; }
.password-wrap button {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  padding: var(--s-1);
  color: var(--c-slate);
}

.strength {
  display: flex;
  gap: var(--s-1);
  margin-top: var(--s-2);
}

.strength__bar {
  flex: 1;
  height: 4px;
  border-radius: var(--r-full);
  background: var(--c-foam);
}

.strength__bar.fill { background: var(--c-success); }
.strength__bar.weak.fill { background: var(--c-danger); }
.strength__bar.fair.fill { background: var(--c-warning); }

.sso-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-3);
  margin-bottom: var(--s-4);
}

.sso-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: var(--s-3);
  border: 1px solid var(--c-foam);
  border-radius: var(--r-md);
  font-size: 0.85rem;
  font-weight: 500;
  transition: background var(--duration-fast), border-color var(--duration-fast);
}

.sso-btn:hover { background: var(--c-snow); border-color: var(--c-mist); }

.sso-btn svg { width: 18px; height: 18px; }

.progress {
  display: flex;
  gap: var(--s-2);
  margin-bottom: var(--s-5);
}

.progress__step {
  flex: 1;
  height: 4px;
  border-radius: var(--r-full);
  background: var(--c-foam);
}

.progress__step.active { background: var(--c-accent); }

/* Шаги мастера регистрации.
   Без этого правила все шаги видны одновременно — форма читается как макет.
   Показывается только активный шаг; переключение делает JS. */
.signup-step { display: none; }
.signup-step.active { display: block; animation: step-in .28s var(--ease-out); }
@keyframes step-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .signup-step.active { animation: none; }
}

/* Индикатор надёжности пароля: заполняется скриптом, но базовое
   состояние должно быть визуально осмысленным. */
.strength { display: flex; gap: 4px; margin-top: 8px; }
.strength__bar {
  flex: 1;
  height: 3px;
  border-radius: var(--r-full);
  background: var(--c-foam);
  transition: background .25s var(--ease-out);
}
.strength__bar.fill { background: var(--c-success); }
.strength__bar.weak.fill { background: var(--c-danger); }
.strength__bar.fair.fill { background: var(--c-warning); }

/* Нативный select не должен выбиваться из полированного UI */
.form-row select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--c-slate) 50%),
                    linear-gradient(135deg, var(--c-slate) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 40px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-size: 0.88rem;
  color: var(--c-slate);
  margin-bottom: var(--s-4);
}

.checkbox-row input { width: auto; }

.form-note {
  font-size: 0.78rem;
  color: var(--c-slate);
  margin-top: var(--s-4);
  line-height: 1.5;
}

.form-link {
  font-size: 0.85rem;
  color: var(--c-accent);
  font-weight: 500;
}

.form-link:hover { text-decoration: underline; }

/* ── Переключатель видимости пароля ──────────────────────────────────────── */
.password-wrap { position: relative; display: block; }
.password-wrap input { padding-right: 46px; width: 100%; }
.password-wrap button {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--c-slate);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: color .2s var(--ease-out), background .2s var(--ease-out);
}
.password-wrap button:hover { color: var(--c-ink); background: var(--c-foam); }
.password-wrap button:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.password-wrap button svg { width: 18px; height: 18px; }

/* ── Подпись шага мастера ────────────────────────────────────────────────── */
.progress__label {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--c-slate);
  margin: var(--s-3) 0 var(--s-5);
}

/* ── Компактный ряд SSO на странице регистрации ──────────────────────────── */
.sso-row--compact { margin-bottom: var(--s-4); }
.divider {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin: var(--s-4) 0 var(--s-5);
  color: var(--c-slate);
  font-size: .82rem;
}
.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--c-foam);
}
