/* resources/css/auth.css - Стили страницы входа/регистрации */

/* === Цветовая палитра сайта === */
:root {
  --color-primary: #4a7c59;
  --color-primary-dark: #3a6347;
  --color-secondary: #c9a961;
  --color-secondary-dark: #b8964e;
  --color-bg-light: #f8f5f0;
  --color-text-dark: #2d3748;
  --color-text-light: #64748b;
  --color-white: #ffffff;
  --color-error: #e53e3e;
  --color-error-light: #fff5f5;
}

/* === Основная разметка === */
.auth-page {
  display: flex;
  min-height: 100vh;
}

/* === Визуальная панель (слева) === */
.auth-visual {
  display: none;
  position: relative;
  width: 50%;
  background: linear-gradient(135deg, rgba(74, 124, 89, 0.9) 0%, rgba(58, 99, 71, 0.95) 100%),
    url('https://images.unsplash.com/photo-1564013799919-ab600027ffc6?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
  background-size: cover;
  background-position: center;
  align-items: center;
  justify-content: center;
  padding: 3rem;
}

.auth-visual-content {
  text-align: center;
  color: var(--color-white);
}

.auth-brand-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.auth-brand-text {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.95);
  max-width: 400px;
}

/* === Секция формы (справа) === */
.auth-form-section {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, var(--color-bg-light) 0%, #ffffff 100%);
  padding: 2rem;
}

@media (min-width: 1024px) {
  .auth-visual {
    display: flex;
  }

  .auth-form-section {
    width: 50%;
  }
}

.auth-form-wrapper {
  width: 100%;
  max-width: 440px;
}

/* === Мобильный бренд === */
.auth-mobile-brand {
  text-align: center;
  margin-bottom: 2rem;
  display: block;
}

.auth-mobile-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-primary);
}

@media (min-width: 1024px) {
  .auth-mobile-brand {
    display: none;
  }
}

/* === Заголовок формы === */
.auth-header {
  margin-bottom: 2rem;
}

.auth-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-text-dark);
  margin-bottom: 0.5rem;
}

.auth-subtitle {
  font-size: 1.1rem;
  color: var(--color-text-light);
}

/* === Форма === */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* === Группы полей === */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-dark);
}

/* === Поля ввода с иконками === */
.form-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.form-input-icon {
  position: absolute;
  left: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: #9ca3af;
  pointer-events: none;
}

.form-input-icon svg {
  width: 100%;
  height: 100%;
}

.form-input {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 2.75rem;
  font-size: 1rem;
  color: var(--color-text-dark);
  background: var(--color-white);
  border: 1px solid #d1d5db;
  border-radius: 12px;
  transition: all 0.2s ease;
}

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

.form-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(74, 124, 89, 0.1);
}

.form-input.input-error {
  border-color: var(--color-error);
  background: var(--color-error-light);
}

.form-input.input-error:focus {
  box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.1);
}

/* === Сообщения об ошибках === */
.form-error {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  color: var(--color-error);
  margin-top: 0.25rem;
}

.error-icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

/* === Чекбокс === */
.form-row {
  display: flex;
  align-items: center;
}

.checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  gap: 0.5rem;
}

.checkbox-input {
  width: 1rem;
  height: 1rem;
  color: var(--color-primary);
  border-color: #d1d5db;
  border-radius: 4px;
  cursor: pointer;
}

.checkbox-input:focus {
  outline: none;
  ring: 2px solid var(--color-primary);
}

.checkbox-text {
  font-size: 0.95rem;
  color: var(--color-text-light);
}

/* === Кнопка отправки === */
.btn-submit {
  width: 100%;
  padding: 1rem 2rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-text-dark);
  background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-secondary-dark) 100%);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 14px rgba(201, 169, 97, 0.4);
}

.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(201, 169, 97, 0.6);
  background: linear-gradient(135deg, var(--color-secondary-dark) 0%, #a38542 100%);
}

.btn-submit:active {
  transform: translateY(0);
}

.btn-submit:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(201, 169, 97, 0.5);
}

/* === Разделитель === */
.form-divider {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1.5rem 0;
}

.divider-line {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
}

.divider-line::before {
  content: '';
  width: 100%;
  height: 1px;
  background: #e5e7eb;
}

.divider-text {
  position: relative;
  padding: 0 1rem;
  font-size: 0.95rem;
  color: var(--color-text-light);
  background: linear-gradient(180deg, var(--color-bg-light) 0%, #ffffff 100%);
}

/* === Кнопка Яндекс === */
.btn-yandex {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.875rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-white);
  background: linear-gradient(135deg, #fc3f1d 0%, #e52e0f 100%);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 14px rgba(252, 63, 29, 0.3);
  text-decoration: none;
}

.btn-yandex:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(252, 63, 29, 0.5);
  background: linear-gradient(135deg, #e52e0f 0%, #c92409 100%);
}

.btn-yandex:active {
  transform: translateY(0);
}

.yandex-icon {
  width: 24px;
  height: 24px;
}

/* === Подвал формы === */
.auth-footer-text {
  text-align: center;
  font-size: 1rem;
  color: var(--color-text-light);
  margin-top: 1rem;
}

.auth-link {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.auth-link:hover {
  color: var(--color-primary-dark);
}

/* === Анимация autofill для браузеров === */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0px 1000px var(--color-white) inset;
  transition: background-color 5000s ease-in-out 0s;
}

/* === Адаптивность === */
@media (max-width: 768px) {
  .auth-form-section {
    padding: 1.5rem;
  }

  .auth-title {
    font-size: 1.75rem;
  }

  .auth-brand-title {
    font-size: 2.5rem;
  }
}
