/* Reset body styles */
body {
  background-color: #f8f9fa;
  color: #212529;
  font-size: 1rem;
  padding: 0;
}

/* Ensure text is visible in features section */
#how-it-works {
  color: #212529;
}

#how-it-works h4,
#how-it-works p {
  color: inherit;
}

/* Main Styles */
:root {
  /* Align with AdminDashboard palette */
  --primary-color: #00a0b0; /* teal */
  --secondary-color: #ed3f34; /* red accent */
  --light-color: #e8f7f9;
  --dark-color: #007d8a; /* darker teal */
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  min-height: 100%;
}

body {
  background-color: #f8f9fa !important;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  min-height: 100vh;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    rgba(0, 160, 176, 0.75) 100%
  );
  color: white;
  padding: 5rem 0;
  margin-bottom: 3rem;
}

/* Login Cards */
.login-card {
  border: none;
  border-radius: 15px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  overflow: hidden;
  margin-bottom: 2rem;
  height: 100%;
}

.login-card:hover {
  transform: translateY(-5px);
}

.login-card .card-body {
  padding: 2.5rem;
}

.login-icon {
  font-size: 3rem;
  margin-bottom: 1.5rem;
}

/* Buttons */
.btn-login {
  background-color: var(--secondary-color);
  border: none;
  color: #fff;
  font-weight: 600;
  padding: 0.6rem 2rem;
  border-radius: 25px;
  transition: all 0.3s ease;
}

.btn-login:hover {
  background-color: #c3342b; /* darker red/orange */
  color: #fff;
  transform: translateY(-2px);
}

/* Navbar login buttons */
.navbar .btn-login-primary {
  background-color: var(--primary-color);
}

.navbar .btn-login-primary:hover {
  background-color: var(--dark-color);
}

.navbar .btn-login-secondary {
  background-color: var(--secondary-color);
}

.navbar .btn-login-secondary:hover {
  background-color: #c3342b;
}

/* Reusable accent button (navbar Sign Up) */
.btn-accent {
  background-color: var(--secondary-color);
  border: none;
  color: #fff;
  font-weight: 600;
}
.btn-accent:hover {
  background-color: #c3342b;
  color: #fff;
}

/* Features Section */
.feature-icon {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.login-icon-donor {
  color: #e91e63;
}

.login-icon-recipient {
  color: #4caf50;
}

.feature-icon-heart {
  color: #e91e63;
}

/* Navbar brand logo styling */
.brand-logo {
  height: 48px;
  width: auto;
  background: #fff;
  border-radius: 6px;
  padding: 4px 6px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05) inset;
}

/* Brand text colors to match AdminDashboard */
.brand-text .brand-primary {
  color: #00a0b0;
}
.brand-text .brand-accent {
  color: #ed3f34;
}

/* Footer */
.footer {
  background-color: #343a40;
  color: white;
  padding: 2rem 0;
  margin-top: 3rem;
}

.footer .footer-divider {
  border-color: rgba(255, 255, 255, 0.1);
}

#toastContainer {
  z-index: 1100;
}

.modal.auth-modal .modal-dialog {
  max-width: 520px;
  transition: max-width 0.3s ease;
}

.modal.auth-modal.register-expanded .modal-dialog {
  max-width: 900px;
}

#authTabs .nav-link {
  padding: 0.75rem 1.25rem;
}

#registerDetailsWrapper {
  position: relative;
  overflow: hidden;
}

#registerOrgStep,
#registerRepStep {
  display: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

#registerOrgStep .form-label,
#registerRepStep .form-label {
  display: block;
  margin-bottom: 0.4rem;
  line-height: 1.2;
}

#registerRepStep .register-name-row .form-label {
  min-height: 2.75rem;
  display: flex;
  align-items: flex-end;
  gap: 0.25rem;
}

#registerRepStep .register-name-row .form-label span {
  display: inline-flex;
  align-items: center;
}

#registerOrgStep .form-label .text-nowrap,
#registerRepStep .form-label .text-nowrap {
  white-space: nowrap;
}

#registerOrgStep.active,
#registerRepStep.active {
  display: block;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

#registerOrgStep.leaving,
#registerRepStep.leaving {
  display: block;
  opacity: 0;
  transform: translateY(-12px);
}

/* Error tooltip style */
.is-invalid-tooltip {
  --bs-tooltip-bg: #dc3545; /* Bootstrap danger */
  --bs-tooltip-color: #fff;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .hero-section {
    padding: 3rem 0;
  }

  .login-card .card-body {
    padding: 1.5rem;
  }

  .feature-icon {
    font-size: 2rem;
  }

  #registerDetailsWrapper {
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 0.5rem;
  }

  #registerOrgStep,
  #registerRepStep {
    width: 100%;
  }
}

#authTabs {
  .nav-link {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--header-text-color);
    border: none;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;

    &:hover {
      color: var(--primary-color);
      border-bottom: 2px solid var(--primary-color);
      cursor: pointer;
    }

    &.active {
      color: var(--primary-color);
      background-color: transparent;
      border-bottom: 2px solid var(--primary-color);
    }
  }
}
