/* src/public/css/auth-styles.css */
/* Modern styles for authentication pages (login & register) */

/* Auth container with background */
.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--color-gray-50);
  }
  
  .auth-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
  }
  
  /* Auth card styling */
  .auth-card-container {
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
  }
  
  .auth-card-container .card {
    border-radius: var(--border-radius-xl);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    padding: 2.5rem;
    border: none;
    position: relative;
    overflow: visible;
  }
  
  
  /* Logo & branding area */
  .auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
  }
  
  .auth-logo-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.2);
    margin-right: 1rem;
  }
  
  .auth-logo-icon svg {
    width: 24px;
    height: 24px;
    color: white;
  }
  
  .auth-logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-gray-800);
    line-height: 1;
  }
  
  .auth-logo-text span {
    display: block;
    font-size: 0.875rem;
    color: var(--color-gray-500);
    font-weight: 400;
    margin-top: 0.25rem;
  }
  
  /* Auth title styling */
  .auth-card-container h2 {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-gray-800);
    margin-bottom: 0.5rem;
  }
  
  .auth-subtitle {
    text-align: center;
    color: var(--color-gray-500);
    margin-bottom: 2rem;
  }
  
  /* Form styling */
  .auth-form-group {
    margin-bottom: 1.5rem;
  }
  
  .auth-label {
    display: block;
    font-weight: 500;
    color: var(--color-gray-700);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
  }
  
  .auth-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-gray-300);
    border-radius: 0.5rem;
    background-color: white;
    color: var(--color-gray-800);
    font-size: 0.95rem;
    transition: all 0.2s ease;
  }
  
  .auth-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
  }
  
  .auth-input::placeholder {
    color: var(--color-gray-400);
  }
  
  /* Password visibility toggle */
  .password-field {
    position: relative;
  }
  
  .password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--color-gray-500);
    cursor: pointer;
  }
  
  .password-toggle:hover {
    color: var(--color-gray-700);
  }
  
  /* Auth button styling */
  .auth-button {
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 1rem;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.2);
  }
  
  .auth-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(79, 70, 229, 0.3);
  }
  
  .auth-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.4);
  }
  
  .auth-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(79, 70, 229, 0.2);
  }
  
  /* Form footer */
  .form-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-gray-100);
  }
  
  .form-footer p {
    color: var(--color-gray-600);
    font-size: 0.95rem;
  }
  
  .form-footer a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
  }
  
  .form-footer a:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
  }
  
  /* Optional password reset link */
  .forgot-password {
    display: block;
    text-align: right;
    font-size: 0.875rem;
    color: var(--color-primary);
    margin-top: 0.5rem;
    text-decoration: none;
  }
  
  .forgot-password:hover {
    text-decoration: underline;
  }
  
  /* Responsive adjustments */
  @media (max-width: 640px) {
    .auth-card-container .card {
      padding: 1.5rem;
    }
    
    .auth-logo-icon {
      width: 36px;
      height: 36px;
    }
    
    .auth-logo-text {
      font-size: 1.25rem;
    }
    
    .auth-card-container h2 {
      font-size: 1.5rem;
    }
  }
  
  /* Custom alert for form validation */
  .auth-alert {
    background-color: #fef2f2;
    color: #ef4444;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .auth-alert svg {
    width: 16px;
    height: 16px;
    margin-top: 0.125rem;
    flex-shrink: 0;
  }
  
  /* Dark theme adjustments (optional) */
  @media (prefers-color-scheme: dark) {
    .auth-page {
      background-color: var(--color-gray-900);
    }
    
    .auth-card-container .card {
      background-color: var(--color-gray-800);
      box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
    }
    
    .auth-card-container h2,
    .auth-logo-text {
      color: white;
    }
    
    .auth-subtitle,
    .auth-label,
    .form-footer p {
      color: var(--color-gray-300);
    }
    
    .auth-input {
      background-color: var(--color-gray-700);
      border-color: var(--color-gray-600);
      color: white;
    }
    
    .auth-input::placeholder {
      color: var(--color-gray-500);
    }
    
    .form-footer {
      border-top-color: var(--color-gray-700);
    }
  }

  .custom-alert {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background-color: #fef2f2;
    color: #b91c1c;
    border-left: 4px solid #ef4444;
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    max-width: 350px;
    animation: slideIn 0.3s ease forwards;
    z-index: 9999;
  }
  
  .custom-alert.hidden {
    display: none;
  }
  
  .alert-icon {
    flex-shrink: 0;
    color: #ef4444;
  }
  
  .alert-message {
    font-size: 0.875rem;
    flex-grow: 1;
  }
  
  .alert-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: #b91c1c;
  }
  
  @keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
  }

  /* Email Confirmation Styles - Add to auth-styles.css */

/* Email confirmation success/error containers */
.email-confirmation-success,
.email-confirmation-error {
  text-align: center;
  padding: 2rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  max-width: 500px;
  margin: 0 auto;
}

.email-confirmation-success {
  border-top: 4px solid #10b981;
}

.email-confirmation-error {
  border-top: 4px solid #ef4444;
}

/* Success and error icons */
.success-icon,
.error-icon {
  margin: 0 auto 1.5rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.success-icon {
  background-color: #d1fae5;
  color: #10b981;
}

.error-icon {
  background-color: #fee2e2;
  color: #ef4444;
}

/* Email confirmation text styles */
.email-confirmation-success h2,
.email-confirmation-error h2 {
  margin: 0 0 1rem;
  font-size: 1.5rem;
  font-weight: 600;
  color: #1f2937;
}

.email-confirmation-success p,
.email-confirmation-error p {
  margin: 0.75rem 0;
  color: #6b7280;
  line-height: 1.5;
}

.email-address {
  background-color: #f3f4f6;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-family: 'Courier New', monospace;
  word-break: break-all;
  color: #374151 !important;
  margin: 1rem 0 !important;
}

/* Confirmation actions */
.confirmation-actions {
  margin: 2rem 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.confirmation-actions .auth-button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  display: inline-block;
  transition: all 0.3s ease;
  cursor: pointer;
  min-width: 150px;
}

.confirmation-actions .auth-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.resend-email-btn {
  background: #f3f4f6;
  color: #374151;
  padding: 0.75rem 1.5rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.resend-email-btn:hover {
  background: #e5e7eb;
  border-color: #9ca3af;
}

.resend-email-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.back-to-login {
  color: #6b7280;
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

.back-to-login:hover {
  color: #374151;
  text-decoration: underline;
}

/* Email note */
.email-note {
  margin-top: 1.5rem;
  padding: 1rem;
  background-color: #f9fafb;
  border-radius: 8px;
  border-left: 3px solid #fbbf24;
}

.email-note p {
  margin: 0;
  color: #92400e;
  font-size: 0.9rem;
}

/* Custom alert enhancements for different types */
.custom-alert.success {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  border-left: 4px solid #10b981;
  color: #064e3b;
}

.custom-alert.info {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  border-left: 4px solid #3b82f6;
  color: #1e3a8a;
}

.custom-alert.success .alert-icon,
.custom-alert.info .alert-icon {
  color: inherit;
}

/* Responsive design for mobile */
@media (max-width: 640px) {
  .email-confirmation-success,
  .email-confirmation-error {
    padding: 1.5rem;
    margin: 1rem;
  }
  
  .confirmation-actions {
    gap: 0.75rem;
  }
  
  .confirmation-actions .auth-button,
  .resend-email-btn {
    width: 100%;
    text-align: center;
  }
  
  .email-address {
    padding: 0.5rem;
    font-size: 0.9rem;
  }
}

/* Loading states */
.auth-button:disabled,
.resend-email-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

/* Animation for success/error appearance */
.email-confirmation-success,
.email-confirmation-error {
  animation: slideInUp 0.5s ease-out;
}

.auth-button.secondary {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.auth-button.secondary:hover {
  background: var(--color-primary);
  color: white;
  transform: translateY(-1px);
}

/* Style for the email not confirmed specific error */
.email-confirmation-error .error-icon svg {
  color: #f59e0b; /* Amber color for warning instead of red */
}

.email-confirmation-error h2 {
  color: #92400e; /* Darker amber for the title */
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}