/* Login Page Specific Styles */

/* Hero Section for Login Page */
.hero-login {
  position: relative;
  width: 100vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding: 0 !important;
  overflow: hidden;
  z-index: 1;
}

/* Override any Bootstrap container padding */
.hero-login .container,
.hero-login .container-fluid {
  padding: 0 !important;
  margin: 0 !important;
  max-width: none !important;
  width: 100% !important;
}

/* Hero image styling - full width */
.hero-login .hero-image {
  width: 100%;
  height: 35vh; /* Same as signup */
  object-fit: cover;
  object-position: center;
  display: block;
  filter: brightness(0.6);
  background-color: #090933;
  margin: 0 !important;
  padding: 0 !important;
}

/* Hero content overlay */
.hero-login .hero-content {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  z-index: 2;
  padding: 2rem;
  background: rgba(9, 9, 51, 0.4);
  margin: 0 !important;
}

/* Login hero text styling */
.hero-login .hero-title {
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  line-height: 1.2;
}

.hero-login .hero-subtitle {
  font-size: 1.1rem;
  font-weight: 400;
  margin-bottom: 0;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Form Container - Same style as signup but narrower for login */
.login-form-container {
  max-width: 600px; /* Narrower than signup since login has fewer fields */
  margin: 0 auto;
  padding: 3rem 2rem;
  background: white;
  border-radius: 1rem;
  box-shadow: 0 10px 30px rgba(9, 9, 51, 0.15);
  margin-top: 3rem;
  margin-bottom: 3rem;
}

/* Form styling - single column for login */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.login-form .form-group {
  display: flex;
  flex-direction: column;
}

.login-form .form-label {
  font-weight: 600;
  color: #090933;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.login-form .form-control {
  border: 2px solid #e9ecef;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.login-form .form-control:focus {
  border-color: #090933;
  box-shadow: 0 0 0 0.2rem rgba(9, 9, 51, 0.25);
  transform: translateY(-1px);
}

.login-form .form-control::placeholder {
  color: #6c757d;
  opacity: 0.8;
}

/* Password toggle button styling */
.login-form .input-group .btn-outline-navy {
  border-left: none;
  border-color: #e9ecef;
  padding: 0.75rem 1rem;
  background-color: transparent;
  color: #090933;
  border: 2px solid #e9ecef;
  border-left: none;
}

.login-form .input-group .btn-outline-navy:hover {
  background-color: #090933;
  color: white;
  border-color: #090933;
}

.login-form .input-group .form-control:focus + .btn-outline-navy {
  border-color: #090933;
}

.login-form .input-group .form-control {
  border-right: none;
}

/* Form buttons */
.login-form .btn-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.login-form .btn {
  padding: 0.75rem 2rem;
  font-weight: 600;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  font-size: 1.1rem;
}

.login-form .btn-navy {
  background-color: #090933 !important;
  border: 2px solid #090933 !important;
  color: white !important;
}

.login-form .btn-navy:hover {
  background-color: #262c83 !important;
  border-color: #262c83 !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Security notice styling */
.login-security-notice {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-left: 4px solid #090933;
  padding: 1rem 1.5rem;
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  color: #495057;
}

/* Links styling */
.login-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e9ecef;
}

.login-links a {
  color: #090933;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.login-links a:hover {
  color: #262c83;
  text-decoration: underline;
}

/* Form validation styling */
.login-form .is-invalid {
  border-color: #dc3545 !important;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

.login-form .is-valid {
  border-color: #28a745 !important;
  box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25) !important;
}

.login-form .invalid-feedback {
  font-size: 0.875rem;
  margin-top: 0.25rem;
  color: #dc3545;
}

/* Alert styling */
.login-form .alert {
  border-radius: 0.5rem;
  border: none;
  font-weight: 500;
}

.login-form .alert-danger {
  background-color: #f8d7da;
  color: #721c24;
  border-left: 4px solid #dc3545;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
  .login-form-container {
    max-width: 500px;
    padding: 2.5rem 1.5rem;
  }
  
  .hero-login .hero-image {
    height: 32vh;
  }
  
  .hero-login .hero-title {
    font-size: 2.4rem;
  }
  
  .hero-login .hero-subtitle {
    font-size: 1rem;
  }
}

@media (max-width: 767.98px) {
  .login-form-container {
    margin: 2rem 1rem;
    padding: 2rem 1.5rem;
  }
  
  .hero-login .hero-image {
    height: 28vh;
  }
  
  .hero-login .hero-title {
    font-size: 2rem;
  }
  
  .hero-login .hero-subtitle {
    font-size: 0.95rem;
  }
  
  .hero-login .hero-content {
    padding: 1rem;
  }
  
  .login-form .btn {
    font-size: 1rem;
  }
}

@media (max-width: 575.98px) {
  .login-form-container {
    margin: 1rem 0.5rem;
    padding: 1.5rem 1rem;
  }
  
  .hero-login .hero-image {
    height: 25vh;
  }
  
  .hero-login .hero-title {
    font-size: 1.8rem;
  }
}

/* Loading state for login button */
.login-form .btn-navy.loading {
  position: relative;
  color: transparent !important;
}

.login-form .btn-navy.loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}