/* css/auth.css
   Стили для авторизации:
   - Модальное окно входа/регистрации (dialog)
*/

/* === ОБЩИЕ СТИЛИ ФОРМ === */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 20px;
}

/* Обертка для инпута (чтобы позиционировать глазик) */
.input-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 100%;
}

.auth-input {
  background: #1a1a24;
  border: 1px solid var(--border-line);
  padding: 12px;
  padding-right: 40px; /* Место для глазика */
  border-radius: 8px;
  color: white;
  font-family: var(--font-main);
  width: 100%;
  box-sizing: border-box;
}

.auth-input:focus {
  outline: none;
  border-color: var(--accent);
}

.hint {
  font-size: 0.75rem;
  color: var(--text-gray);
  margin-left: 5px;
}

/* Блок ошибки */
.auth-error {
  color: var(--danger); /* Красный */
  font-size: 0.9rem;
  text-align: center;
  min-height: 1.2em; /* Чтобы не прыгало */
  margin-top: 5px;
  display: none; /* Скрыт по умолчанию */
}

/* Кнопка "Глазик" */
.toggle-password-btn {
  position: absolute;
  top: 12px; /* Подбираем под высоту инпута */
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-gray);
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.toggle-password-btn:hover {
  color: var(--text-white);
}

.auth-btn {
  background: var(--accent);
  color: white;
  padding: 12px;
  border-radius: 8px;
  font-weight: 600;
  margin-top: 10px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.auth-btn:hover {
  background: var(--accent-hover);
}

.auth-footer {
  margin-top: 20px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-gray);
}

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

.auth-footer a:hover {
  text-decoration: underline;
}

/* === MODAL (DIALOG) === */
dialog#login-modal {
  background: var(--input-bg);
  color: var(--text-white);
  border: 1px solid var(--border-line);
  border-radius: 16px;
  padding: 30px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
}

dialog#login-modal::backdrop {
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
}

dialog#login-modal h3 {
  margin-top: 0;
  margin-bottom: 10px;
  text-align: center;
  font-size: 1.5rem;
}

.close-modal-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  color: var(--text-gray);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 5px;
}

.close-modal-btn:hover {
  color: var(--text-white);
}
