/* FILE: public/assets/css/auth-modal.css */

.modal-lock {
  overflow: hidden;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.56);
  backdrop-filter: blur(6px);
}

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

.modal-window {
  width: 100%;
  max-width: 540px;
  max-height: calc(100vh - 40px);
  overflow: auto;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 28px 90px rgba(15, 23, 42, 0.26);
}

.auth-modal {
  padding: 24px;
}

.auth-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  padding: 5px;
  border-radius: 18px;
  background: #f3f4f6;
}

.auth-tab {
  flex: 1 1 0;
  min-height: 42px;
  padding: 10px 12px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #4b5563;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition:
    background-color 0.12s ease,
    color 0.12s ease,
    box-shadow 0.12s ease,
    transform 0.12s ease;
}

.auth-tab:hover {
  color: #111827;
  transform: translateY(-1px);
}

.auth-tab-active {
  background: #ffffff;
  color: #111827;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.auth-pane {
  display: none;
}

.auth-pane-active {
  display: block;
}

.modal-title {
  margin: 0 0 18px;
  color: #111827;
  font-size: 24px;
  line-height: 1.25;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.modal-text {
  margin: 0 0 18px;
  color: #4b5563;
  font-size: 15px;
  line-height: 1.6;
}

.auth-row {
  margin-bottom: 15px;
}

.auth-label {
  display: block;
  margin-bottom: 7px;
  color: #374151;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 800;
}

.auth-field-hint {
  margin: -2px 0 10px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}

.auth-input {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border: 1px solid #d1d5db;
  border-radius: 14px;
  background: #ffffff;
  color: #111827;
  font-size: 15px;
  outline: none;
  transition:
    border-color 0.12s ease,
    box-shadow 0.12s ease,
    background-color 0.12s ease;
}

.auth-input::placeholder {
  color: #9ca3af;
}

.auth-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.13);
}

.auth-input:disabled {
  background: #f8fafc;
  color: #64748b;
  cursor: not-allowed;
}

.auth-prof-block {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.06), transparent 36%),
    #f8fafc;
}

.auth-prof-selects {
  display: grid;
  gap: 10px;
}

.auth-extra-wrap {
  display: grid;
  gap: 14px;
}

.auth-extra-card {
  padding: 13px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #ffffff;
}

.auth-extra-title {
  margin: 0 0 10px;
  color: #334155;
  font-size: 13px;
  line-height: 1.35;
  font-weight: 900;
}

.auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.auth-msg {
  min-height: 22px;
  margin-top: 14px;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.45;
}

.auth-msg.ok {
  color: #166534;
}

.auth-msg.error {
  color: #b91c1c;
}

.auth-suggest {
  margin-top: 8px;
  padding: 6px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.1);
  max-height: 240px;
  overflow: auto;
}

.auth-suggest__item {
  padding: 10px 12px;
  border-radius: 10px;
  color: #111827;
  font-size: 14px;
  line-height: 1.35;
  cursor: pointer;
  transition: background-color 0.12s ease;
}

.auth-suggest__item:hover {
  background: #f3f4f6;
}

.auth-suggest__muted {
  padding: 10px 12px;
  color: #6b7280;
  font-size: 14px;
}

.auth-pop {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(4px);
}

.auth-pop.is-open {
  display: flex;
}

.auth-pop__card {
  width: 100%;
  max-width: 420px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 20px;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.2);
}

.auth-pop__icon {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #dcfce7;
  color: #166534;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}

.auth-pop.is-error .auth-pop__icon {
  background: #fee2e2;
  color: #b91c1c;
}

.auth-pop__content {
  flex: 1 1 auto;
  min-width: 0;
}

.auth-pop__title {
  margin: 0 0 6px;
  color: #111827;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 800;
}

.auth-pop__text {
  color: #374151;
  font-size: 14px;
  line-height: 1.5;
}

.auth-pop__hint {
  margin-top: 8px;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.45;
}

.auth-pop__btn {
  flex: 0 0 auto;
  min-width: 72px;
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #ffffff;
  color: #111827;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition:
    background-color 0.12s ease,
    border-color 0.12s ease,
    transform 0.12s ease;
}

.auth-pop__btn:hover {
  background: #f9fafb;
  transform: translateY(-1px);
}

@media (max-width: 640px) {
  .modal-overlay,
  .auth-pop {
    padding: 14px;
  }

  .modal-overlay.modal-open {
    align-items: flex-start;
  }

  .modal-window {
    max-height: calc(100vh - 28px);
    border-radius: 22px;
  }

  .auth-modal {
    padding: 16px;
  }

  .auth-tabs {
    gap: 6px;
    margin-bottom: 16px;
  }

  .auth-tab {
    min-height: 40px;
    padding: 9px 10px;
    font-size: 13px;
  }

  .modal-title {
    font-size: 22px;
  }

  .auth-prof-block {
    padding: 13px;
    border-radius: 18px;
  }

  .auth-extra-wrap {
    gap: 12px;
  }

  .auth-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .auth-actions .btn {
    width: 100%;
  }

  .auth-pop__card {
    flex-direction: column;
    align-items: stretch;
  }

  .auth-pop__btn {
    width: 100%;
  }
}
/* phone registration */
.auth-phone-block,
.auth-sms-block{
  padding:14px;
  border:1px solid #dbeafe;
  border-radius:18px;
  background:#f8fbff;
}
.auth-phone-row{
  display:grid;
  grid-template-columns:1fr auto;
  gap:10px;
  align-items:center;
}
.auth-phone-row .btn{
  min-height:46px;
  white-space:nowrap;
}
@media (max-width:640px){
  .auth-phone-row{
    grid-template-columns:1fr;
  }
  .auth-phone-row .btn{
    width:100%;
  }
}

/* phone registration wizard */
.auth-stepper{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:8px;
  margin:8px 0 14px;
}
.auth-step{
  display:flex;
  align-items:center;
  gap:8px;
  border:1px solid #dbe8ff;
  border-radius:14px;
  background:#f8fbff;
  color:#64748b;
  padding:9px 10px;
  font-weight:900;
}
.auth-step b{
  width:24px;
  height:24px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:#e2e8f0;
  color:#334155;
  font-size:12px;
}
.auth-step.is-active{
  border-color:#2563eb;
  background:#eff6ff;
  color:#1d4ed8;
}
.auth-step.is-active b{
  background:#2563eb;
  color:#fff;
}
.auth-step.is-done{
  border-color:#86efac;
  background:#f0fdf4;
  color:#166534;
}
.auth-step.is-done b{
  background:#22c55e;
  color:#fff;
}
.auth-step-title{
  margin:0 0 12px;
  padding:10px 12px;
  border-radius:14px;
  background:#f1f5f9;
  color:#0f172a;
  font-size:15px;
  font-weight:900;
}
.auth-step-actions{
  justify-content:space-between;
}
@media(max-width:560px){
  .auth-stepper{grid-template-columns:1fr;}
}

/* registration warning cards */
.auth-warning-card{
  position:relative;
  display:grid;
  gap:4px;
  margin:0 0 10px;
  padding:13px 15px 13px 44px;
  border:1px solid #bfdbfe;
  border-radius:16px;
  background:linear-gradient(135deg,#eff6ff 0%,#ffffff 100%);
  color:#334155;
  box-shadow:0 10px 24px rgba(37,99,235,.08);
}
.auth-warning-card::before{
  content:"!";
  position:absolute;
  left:14px;
  top:14px;
  width:22px;
  height:22px;
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#2563eb;
  color:#fff;
  font-size:14px;
  font-weight:900;
}
.auth-warning-card b{
  color:#0f172a;
  font-size:14px;
  font-weight:900;
}
.auth-warning-card span{
  color:#64748b;
  font-size:13px;
  font-weight:800;
  line-height:1.35;
}
.auth-warning-card--fio{
  border-color:#fde68a;
  background:linear-gradient(135deg,#fffbeb 0%,#ffffff 100%);
  box-shadow:0 10px 24px rgba(245,158,11,.08);
}
.auth-warning-card--fio::before{
  background:#f59e0b;
}
