/* Custom Login Styling */

/* Form Improvements */
.form-control {
  border-radius: 0.375rem;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

.form-label {
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--bs-body-color);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
}

/* Input Groups */
.input-group-text {
  background-color: var(--bs-light-bg);
  border-color: var(--bs-border-color);
  transition: all 0.3s ease;
  cursor: pointer;
  user-select: none;
}

.input-group .form-control:focus ~ .input-group-text {
  border-color: var(--bs-primary);
  background-color: var(--bs-light-bg);
}

.input-group-text:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

/* Button Styling */
.btn-primary {
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: 0.375rem;
  transition: all 0.3s ease;
  font-size: 0.95rem;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

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

.btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Remember Me & Forgot Password */
.d-flex.justify-content-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  margin: 1.5rem 0;
}

.form-check-label {
  margin-bottom: 0;
  font-weight: 500;
}

a {
  color: var(--bs-primary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

a:hover {
  color: #0a3cbc;
  text-decoration: underline;
}

/* Alert Styling */
.alert {
  border-radius: 0.375rem;
  border: none;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  animation: slideDown 0.3s ease;
}

.alert-success {
  background-color: #e6f9f0;
  color: #0b7285;
}

.alert-danger {
  background-color: #fff5f5;
  color: #d63031;
}

.alert-container .alert ul li {
  margin-bottom: 0.25rem;
}

.alert-container .alert ul li:last-child {
  margin-bottom: 0;
}

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

/* Registration Link Styling */
.text-center {
  font-size: 0.9rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--bs-border-color);
}

.text-center span {
  color: var(--bs-body-color);
}

.text-center a {
  color: var(--bs-primary);
  font-weight: 600;
}

/* Validation feedback */
.invalid-feedback {
  display: block;
  font-size: 0.85rem;
  color: #dc3545;
  margin-top: 0.25rem;
}

.form-control.is-invalid,
.was-validated .form-control:invalid {
  border-color: #dc3545;
}

/* Icon styling */
i.bx {
  font-size: 1.125rem;
  vertical-align: middle;
}

/* Responsive adjustments */
@media (max-width: 575.98px) {
  .form-control {
    font-size: 1rem;
    padding: 0.75rem 1rem;
  }
  
  .btn-primary {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }
  
  h4 {
    font-size: 1.5rem;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .alert-success {
    background-color: rgba(11, 114, 133, 0.15);
    color: #8df4f3;
  }
  
  .alert-danger {
    background-color: rgba(214, 48, 49, 0.15);
    color: #ff6b6b;
  }
  
  .input-group-text:hover {
    background-color: rgba(255, 255, 255, 0.05);
  }
}

/* Login page: remove unwanted page scroll */
body.auth-login {
  overflow-x: hidden;
  overflow-y: hidden;
}

body.auth-login .authentication-wrapper.authentication-cover {
  block-size: 100vh;
  block-size: 100dvh;
}

body.auth-login .authentication-wrapper.authentication-cover .authentication-inner {
  block-size: 100%;
}

body.auth-login .authentication-wrapper.authentication-cover .authentication-bg {
  block-size: 100%;
}

body.auth-login .authentication-wrapper.authentication-cover .authentication-bg .w-px-400 {
  margin-block-start: 0 !important;
  padding-block-start: 0 !important;
}

body.auth-login .authentication-wrapper.authentication-cover .auth-cover-bg {
  position: relative;
  block-size: 100%;
  overflow: hidden;
  padding: clamp(1rem, 3vw, 2.5rem);
}

body.auth-login .authentication-wrapper.authentication-cover img.auth-illustration {
  position: relative;
  z-index: 1;
  inline-size: min(560px, 100%);
  block-size: auto;
  max-block-size: 75vh;
  object-fit: contain;
  margin-block: 0 !important;
  transform: scale(1.05);
}

body.auth-login .authentication-wrapper.authentication-cover img.platform-bg {
  position: absolute;
  z-index: 0;
  inset-inline: 0;
  inset-block-end: 0;
  inline-size: 100%;
  block-size: auto;
  object-fit: cover;
  opacity: 0.9;
  pointer-events: none;
}
