/**
 * Login Page Styles
 *
 * Feature: 005-auth
 * User Story 1: Login with Magic Link
 * Task: T032
 *
 * Styles for authentication pages: login, magic link sent, and error pages.
 * Provides a clean, accessible, and responsive design.
 */

/* Container and Layout */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 2rem;
}

.login-container {
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  padding: 3rem;
  max-width: 480px;
  width: 100%;
  text-align: center;
}

/* Typography */
.login-container h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 1rem;
}

.login-container h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #2d3748;
  margin-top: 2rem;
  margin-bottom: 1rem;
  text-align: left;
}

.login-description,
.confirmation-message,
.error-description {
  font-size: 1rem;
  color: #4a5568;
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* Icons */
.success-icon,
.error-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: bold;
  margin: 0 auto 1.5rem;
}

.success-icon {
  background: #48bb78;
  color: white;
}

.error-icon {
  background: #f56565;
  color: white;
}

/* Form Styles */
.login-form {
  margin-top: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 0.5rem;
}

.form-group input[type="text"],
.form-group input[type="email"] {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

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

.form-group input[type="text"]:disabled,
.form-group input[type="email"]:disabled {
  background-color: #f7fafc;
  cursor: not-allowed;
  opacity: 0.6;
}

/* Buttons */
.submit-button,
.primary-button {
  width: 100%;
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  display: inline-block;
  box-sizing: border-box;
}

.submit-button:hover:not(:disabled),
.primary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.submit-button:active:not(:disabled),
.primary-button:active {
  transform: translateY(0);
}

.submit-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Error Messages */
.error-message {
  background: #fff5f5;
  border: 1px solid #feb2b2;
  color: #c53030;
  padding: 0.875rem 1rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  text-align: left;
}

/* Help Text */
.help-text {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #e2e8f0;
  text-align: left;
}

.help-text p {
  font-size: 0.875rem;
  color: #718096;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.help-text strong {
  color: #2d3748;
  font-weight: 600;
}

.help-text .link,
.help-text a {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
}

.help-text .link:hover,
.help-text a:hover {
  text-decoration: underline;
}

/* Instructions */
.instructions {
  background: #f7fafc;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 2rem 0;
  text-align: left;
}

.instructions ol,
.instructions ul {
  margin: 0;
  padding-left: 1.5rem;
}

.instructions li {
  font-size: 0.938rem;
  color: #4a5568;
  line-height: 1.8;
  margin-bottom: 0.5rem;
}

/* Error Actions */
.error-actions {
  margin: 2rem 0;
}

/* Responsive Design */
@media (max-width: 640px) {
  .login-page {
    padding: 1rem;
  }

  .login-container {
    padding: 2rem 1.5rem;
  }

  .login-container h1 {
    font-size: 1.5rem;
  }

  .login-container h2 {
    font-size: 1.125rem;
  }

  .success-icon,
  .error-icon {
    width: 48px;
    height: 48px;
    font-size: 1.5rem;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .submit-button,
  .primary-button,
  .form-group input[type="text"],
  .form-group input[type="email"] {
    transition: none;
  }
}

/* Focus Visible for Keyboard Navigation */
.submit-button:focus-visible,
.primary-button:focus-visible,
.link:focus-visible,
a:focus-visible {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}
