/* auth.css - Authentication Page Specific Styles */

/* =============================================================================
   AUTH CONTAINER & LAYOUT
   ============================================================================= */

.auth-container {
  max-width: 500px;
  margin: 50px auto;
  padding: 40px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border: 1px solid #e1e5e9;
}

/* =============================================================================
   TAB NAVIGATION
   ============================================================================= */

.tab-container {
  display: flex;
  margin-bottom: 30px;
  border-bottom: 2px solid #f0f0f0;
  border-radius: 8px 8px 0 0;
  overflow: hidden;
}

.tab-button {
  flex: 1;
  padding: 16px 20px;
  background: #f8f9fa;
  border: none;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  color: #6c757d;
  border-bottom: 3px solid transparent;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tab-button:first-child {
  border-right: 1px solid #e1e5e9;
}

.tab-button.active {
  background: white;
  color: #007bff;
  border-bottom-color: #007bff;
  transform: translateY(2px);
}

.tab-button:hover:not(.active) {
  background-color: #e9ecef;
  color: #495057;
}

/* =============================================================================
   TAB CONTENT
   ============================================================================= */

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease-in;
}

.tab-content.active {
  display: block;
}

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

/* =============================================================================
   FORM STYLES
   ============================================================================= */

.auth-container .form-group {
  margin-bottom: 24px;
}

.auth-container .form-group:last-of-type {
  margin-bottom: 30px;
}

.auth-container .form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #2c3e50;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.auth-container .form-group input,
.auth-container .form-group select {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  font-size: 16px;
  background-color: #fafbfc;
  transition: all 0.3s ease;
  box-sizing: border-box;
  font-family: inherit;
}

.auth-container .form-group input:focus,
.auth-container .form-group select:focus {
  outline: none;
  border-color: #007bff;
  background-color: white;
  box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.1);
  transform: translateY(-1px);
}

.auth-container .form-group input::placeholder {
  color: #adb5bd;
  font-style: italic;
}

.auth-container .form-group select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 16px;
  padding-right: 48px;
  appearance: none;
}

/* =============================================================================
   BUTTONS (AUTH SPECIFIC)
   ============================================================================= */

.auth-container .btn {
  width: 100%;
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.auth-container .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 123, 255, 0.3);
}

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

.auth-container .btn:disabled {
  background-color: #adb5bd;
  color: white;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.auth-container .btn:disabled:hover {
  transform: none;
  box-shadow: none;
}

/* =============================================================================
   MESSAGES & FEEDBACK
   ============================================================================= */

#message-container {
  margin-bottom: 20px;
  min-height: 20px;
}

.message {
  padding: 14px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  animation: slideInDown 0.3s ease;
}

.message-error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f1aeb5;
  border-left: 4px solid #dc3545;
}

.message-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  border-left: 4px solid #28a745;
}

.message-loading {
  background-color: #cce7f0;
  color: #055160;
  border: 1px solid #9eeaf9;
  border-left: 4px solid #17a2b8;
}

@keyframes slideInDown {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* =============================================================================
   LOADING SPINNER
   ============================================================================= */

.loading-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 10px;
  vertical-align: middle;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* =============================================================================
   NAVIGATION LINKS
   ============================================================================= */

.back-home {
  display: block;
  text-align: center;
  margin-top: 24px;
  padding: 12px;
  color: #6c757d;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.back-home:hover {
  color: #007bff;
  background-color: #f8f9fa;
  text-decoration: none;
}

/* =============================================================================
   RESPONSIVE DESIGN
   ============================================================================= */

@media (max-width: 576px) {
  .auth-container {
    margin: 15px;
    padding: 25px 18px;
    border-radius: 8px;
  }

  .tab-button {
    padding: 14px 12px;
    font-size: 14px;
    min-height: 48px;
  }

  .auth-container .form-group input,
  .auth-container .form-group select {
    padding: 14px;
    font-size: 16px; /* Prevents zoom on iOS */
    min-height: 48px;
  }

  .auth-container .btn {
    padding: 16px 20px;
    font-size: 15px;
    min-height: 48px;
  }
}

/* =============================================================================
   FOCUS ACCESSIBILITY
   ============================================================================= */

.tab-button:focus,
.auth-container input:focus,
.auth-container select:focus,
.auth-container .btn:focus {
  outline: 2px solid #007bff;
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .auth-container {
    border: 2px solid #000;
  }
  
  .tab-button.active {
    background: #000;
    color: #fff;
  }
}