/* Стили для форм Devise */

/* Контейнер для форм */
.devise-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px;
}

.devise-form-container {
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  padding: 40px;
  width: 100%;
  max-width: 400px;
  position: relative;
  overflow: hidden;
}

.devise-form-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #667eea, #764ba2);
}

/* Логотип в форме */
.devise-logo {
  text-align: center;
  margin-bottom: 30px;
}

.devise-logo img {
  height: 60px;
  width: auto;
}

.devise-logo h2 {
  color: #333;
  font-size: 1.8rem;
  font-weight: 700;
  margin: 15px 0 5px 0;
}

.devise-logo p {
  color: #666;
  font-size: 0.9rem;
  margin: 0;
}

/* Поля формы */
.devise-form .field {
  margin-bottom: 20px;
}

.devise-form label {
  display: block;
  margin-bottom: 8px;
  color: #333;
  font-weight: 600;
  font-size: 0.9rem;
}

.devise-form input[type="email"],
.devise-form input[type="password"],
.devise-form input[type="text"] {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e1e5e9;
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.devise-form input[type="email"]:focus,
.devise-form input[type="password"]:focus,
.devise-form input[type="text"]:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  transform: translateY(-1px);
}

/* Кнопки */
.devise-form .actions {
  margin-top: 30px;
}

.devise-form input[type="submit"] {
  width: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 14px 20px;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.devise-form input[type="submit"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.devise-form input[type="submit"]:active {
  transform: translateY(0);
}

/* Ссылки */
.devise-links {
  margin-top: 25px;
  text-align: center;
}

.devise-links a {
  color: #667eea;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s ease;
  display: block;
  margin: 8px 0;
}

.devise-links a:hover {
  color: #764ba2;
  text-decoration: underline;
}

/* Flash сообщения */
.notice, .alert {
  padding: 15px 20px;
  border-radius: 10px;
  margin-bottom: 20px;
  font-weight: 500;
  text-align: center;
}

.notice {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Ошибки валидации */
.field_with_errors input {
  border-color: #dc3545 !important;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1) !important;
}

.error-messages {
  background: #f8d7da;
  color: #721c24;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 0.9rem;
}

.error-messages h2 {
  font-size: 1rem;
  margin: 0 0 10px 0;
  color: #721c24;
}

.error-messages ul {
  margin: 0;
  padding-left: 20px;
}

.error-messages li {
  margin: 5px 0;
}

/* Чекбокс "Запомнить меня" */
.field.boolean {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.field.boolean input[type="checkbox"] {
  margin-right: 10px;
  transform: scale(1.2);
}

.field.boolean label {
  margin: 0;
  font-weight: 500;
  cursor: pointer;
}

/* Адаптивность */
@media (max-width: 480px) {
  .devise-form-container {
    padding: 30px 20px;
    margin: 10px;
  }
  
  .devise-logo h2 {
    font-size: 1.5rem;
  }
  
  .devise-form input[type="submit"] {
    padding: 12px 16px;
    font-size: 0.9rem;
  }
}

/* Анимации */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.devise-form-container {
  animation: fadeInUp 0.6s ease-out;
}

/* Дополнительные стили для разных страниц */
.devise-form-container h2 {
  text-align: center;
  color: #333;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 30px;
}

/* Стили для страницы регистрации */
.devise-form-container .field:last-child {
  margin-bottom: 0;
}

/* Стили для страницы восстановления пароля */
.devise-form-container p {
  color: #666;
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.5;
}

/* Дополнительные стили для страниц паролей */
.devise-form-container em {
  color: #666;
  font-size: 0.85rem;
  font-style: italic;
  display: block;
  margin-top: 5px;
}

/* Стили для скрытых полей */
.devise-form input[type="hidden"] {
  display: none;
}

/* Улучшенные стили для сообщений об ошибках на страницах паролей */
.devise-form-container .error-messages {
  margin-bottom: 25px;
}

/* Стили для успешных сообщений */
.devise-form-container .notice {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  padding: 15px 20px;
  border-radius: 10px;
  margin-bottom: 20px;
  text-align: center;
  font-weight: 500;
}

/* Анимация для кнопки отправки */
.devise-form input[type="submit"]:disabled {
  background: #6c757d;
  cursor: not-allowed;
  transform: none;
}

.devise-form input[type="submit"]:disabled:hover {
  transform: none;
  box-shadow: none;
}

/* Стили для ссылки "Забыли пароль?" */
.forgot-password-link {
  color: #dc3545 !important;
  font-weight: 600;
  text-decoration: underline;
  transition: color 0.3s ease;
}

.forgot-password-link:hover {
  color: #c82333 !important;
  text-decoration: none;
} 