/* Modal Authentication System Styles */

/* Initial navbar styles - clean and minimal */
.navbar-initial {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 1rem 0;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.navbar-initial .navbar-brand img {
  filter: brightness(0) invert(1);
}

.navbar-initial .auth-buttons {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.navbar-initial .btn-auth {
  border: 2px solid white;
  color: white;
  background: transparent;
  border-radius: 25px;
  padding: 0.5rem 1.5rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.navbar-initial .btn-auth:hover {
  background: white;
  color: #667eea;
  text-decoration: none;
}

.navbar-initial .btn-auth.btn-join {
  background: white;
  color: #667eea;
}

.navbar-initial .btn-auth.btn-join:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Authenticated navbar styles */
.navbar-authenticated {
  background: var(--bs-dark);
  transition: all 0.3s ease;
}

/* Modal styles */
.auth-modal .modal-dialog {
  max-width: 450px;
  margin: 2rem auto;
}

.auth-modal .modal-content {
  border: none;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}

.auth-modal .modal-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-bottom: none;
  padding: 2rem 2rem 1.5rem;
  text-align: center;
  position: relative;
}

.auth-modal .modal-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 2px;
}

.auth-modal .modal-title {
  color: white;
  font-weight: 700;
  font-size: 1.75rem;
  margin: 0;
  text-align: center;
  width: 100%;
}

.auth-modal .btn-close {
  filter: brightness(0) invert(1);
  opacity: 0.8;
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-size: 1.2rem;
}

.auth-modal .btn-close:hover {
  opacity: 1;
}

.auth-modal .modal-body {
  padding: 2.5rem;
  background: white;
}

.auth-modal .form-group {
  margin-bottom: 1.5rem;
}

.auth-modal .form-label {
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.auth-modal .form-control {
  border: 2px solid #e8ecef;
  border-radius: 12px;
  padding: 0.875rem 1.25rem;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: #f8f9fa;
}

.auth-modal .form-control:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
  background: white;
}

.auth-modal .form-control::placeholder {
  color: #9ca3af;
}

.auth-modal .btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 12px;
  padding: 0.875rem 2rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.75px;
  transition: all 0.3s ease;
  width: 100%;
  margin: 1.5rem 0 1rem;
  font-size: 1rem;
}

.auth-modal .btn-primary:hover {
  background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.35);
}

.auth-modal .btn-outline-primary {
  border: 2px solid #667eea;
  color: #667eea;
  border-radius: 12px;
  padding: 0.875rem 2rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.75px;
  transition: all 0.3s ease;
  width: 100%;
  background: transparent;
}

.auth-modal .btn-outline-primary:hover {
  background: #667eea;
  color: white;
  transform: translateY(-1px);
}

/* Toggle links */
.auth-toggle {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border-bottom: 2px solid transparent;
}

.auth-toggle:hover {
  color: #5a67d8;
  border-bottom-color: #5a67d8;
  text-decoration: none;
}

/* Social divider */
.social-divider {
  position: relative;
  margin: 2rem 0;
  text-align: center;
  color: #6c757d;
  font-size: 0.9rem;
  font-weight: 500;
}

.social-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, #e8ecef 20%, #e8ecef 80%, transparent);
  z-index: 1;
}

.social-divider span {
  background: white;
  padding: 0 1.5rem;
  position: relative;
  z-index: 2;
}

/* Error and success messages */
.error-message {
  background: linear-gradient(135deg, #fee7e7 0%, #fecaca 100%);
  color: #dc2626;
  border: 1px solid #fca5a5;
  border-radius: 10px;
  padding: 1rem;
  margin: 1rem 0;
  font-size: 0.9rem;
  font-weight: 500;
}

.success-message {
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
  color: #16a34a;
  border: 1px solid #86efac;
  border-radius: 10px;
  padding: 1rem;
  margin: 1rem 0;
  font-size: 0.9rem;
  font-weight: 500;
}

/* Loading states */
.auth-modal .btn.loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}

.auth-modal .btn.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* OTP input styling */
.otp-inputs {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 2rem 0;
}

.otp-input {
  width: 55px;
  height: 55px;
  text-align: center;
  border: 2px solid #e8ecef;
  border-radius: 12px;
  font-size: 1.5rem;
  font-weight: 700;
  background: #f8f9fa;
  transition: all 0.3s ease;
}

.otp-input:focus {
  border-color: #667eea;
  background: white;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
}

.otp-input.filled {
  background: #667eea;
  color: white;
  border-color: #667eea;
}

/* Password requirements */
.password-requirements {
  background: #f8f9fa;
  border-radius: 10px;
  padding: 1.25rem;
  margin-top: 0.75rem;
  font-size: 0.85rem;
}

.requirement {
  display: flex;
  align-items: center;
  margin: 0.5rem 0;
  color: #6c757d;
  transition: all 0.3s ease;
}

.requirement.valid {
  color: #16a34a;
}

.requirement i {
  margin-right: 0.75rem;
  font-size: 0.9rem;
  width: 16px;
}

/* Form check styling */
.auth-modal .form-check {
  margin: 1.25rem 0;
}

.auth-modal .form-check-input {
  border-radius: 6px;
  border: 2px solid #e8ecef;
  background: #f8f9fa;
}

.auth-modal .form-check-input:checked {
  background-color: #667eea;
  border-color: #667eea;
}

.auth-modal .form-check-label {
  font-size: 0.9rem;
  color: #4b5563;
  line-height: 1.5;
}

/* Animation for modal entrance */
.auth-modal.show .modal-dialog {
  animation: modalSlideIn 0.4s ease-out;
}

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

/* Mobile responsive */
@media (max-width: 576px) {
  .auth-modal .modal-dialog {
    margin: 0.5rem;
    max-width: calc(100% - 1rem);
  }
  
  .auth-modal .modal-header,
  .auth-modal .modal-body {
    padding: 1.5rem;
  }
  
  .auth-modal .modal-title {
    font-size: 1.5rem;
  }
  
  .otp-input {
    width: 45px;
    height: 45px;
    font-size: 1.25rem;
  }
  
  .navbar-initial .auth-buttons {
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
  }
  
  .navbar-initial .btn-auth {
    width: 100%;
    text-align: center;
  }
}

/* Hidden states */
.d-none-auth {
  display: none !important;
}

.d-block-auth {
  display: block !important;
}

/* Smooth transitions */
.navbar-transition {
  transition: all 0.4s ease-in-out;
}

.content-transition {
  transition: opacity 0.3s ease-in-out;
}

/* Focus states for accessibility */
.auth-modal .btn:focus,
.auth-modal .form-control:focus,
.navbar-initial .btn-auth:focus {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}

/* SweetAlert2 Custom Styles */
.swal2-toast-custom {
  font-family: inherit !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
}

.swal2-toast-custom .swal2-icon {
  margin: 0 8px 0 0 !important;
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
}

.swal2-toast-custom .swal2-title {
  font-size: 14px !important;
  line-height: 1.4 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.swal2-toast-custom .swal2-html-container {
  font-size: 14px !important;
  line-height: 1.4 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Override default SweetAlert2 toast success color to match theme */
.swal2-toast-custom.swal2-icon-success {
  background-color: #28a745 !important;
}

.swal2-toast-custom.swal2-icon-error {
  background-color: #dc3545 !important;
}

.swal2-toast-custom.swal2-icon-warning {
  background-color: #ffc107 !important;
  color: #212529 !important;
}

.swal2-toast-custom.swal2-icon-info {
  background-color: #17a2b8 !important;
}

/* Progress bar styling */
.swal2-timer-progress-bar {
  background-color: rgba(255, 255, 255, 0.6) !important;
}
