/* CSS Variables for easy theme customization */
:root {
  --custom-green: #2AAC32;
  --dark-green: #1e8a26;
  --hover-green: #34c43c;
  --yellow-highlight: #FFD700;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  --navbar-height: 70px;
}

/* Navbar Styling */
/* Make the header fixed at the top */
.custom-navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1030; /* Ensure it stays above other elements */
  background-color: white; /* Ensure the background is visible */
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

/* Add padding to the body to prevent content from being hidden behind the fixed header */
body {
  padding-top: var(--navbar-height); /* Adjust based on the height of your header */
  transition: all 0.3s ease;
}

.custom-navbar .navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--custom-green);
  font-weight: bold;
  font-size: 1.5rem;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s ease;
}

.custom-navbar .navbar-brand:hover {
  color: var(--hover-green);
  text-decoration: none;
  transform: translateY(-1px);
}

.custom-navbar .navbar-brand:hover img {
  transform: scale(1.05);
}

.custom-navbar .navbar-brand img {
  height: 40px;
  width: 40px;
  object-fit: cover;
}

.custom-navbar .nav-link {
  color: var(--custom-green);
  font-weight: 500;
  padding: 10px 15px;
  transition: color 0.3s ease;
}

.custom-navbar .nav-link:hover,
.custom-navbar .nav-link.active {
  color: var(--yellow-highlight);
}

.custom-navbar .navbar-toggler {
  border: none;
  color: var(--custom-green);
}

.custom-navbar .navbar-toggler:focus {
  outline: none;
  box-shadow: none;
}

/* Dropdown Menu Styling - Consolidated */
.dropdown-menu {
  background-color: #fff; 
  border: none;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
}

/* Dropdown Item Styling - Consolidated */
.dropdown-item {
  color: #333;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.dropdown-item i {
  color: var(--custom-green);
  margin-right: 8px;
}

.dropdown-item:hover {
  background-color: rgba(42, 172, 50, 0.1);
  color: var(--custom-green);
}

.dropdown-item.text-danger i {
  color: #dc3545;
}

/* Accessibility dropdown specific styling */
#accessibilityDropdown .dropdown-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#accessibilityDropdown .dropdown-item.active {
  background-color: rgba(42, 172, 50, 0.1);
  color: var(--custom-green);
  font-weight: 500;
}

#accessibilityDropdown .check-icon {
  color: var(--custom-green);
}

/* Enhanced accessibility button */
.accessibility-btn {
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(42, 172, 50, 0.1);
  transition: all 0.2s ease;
  color: var(--custom-green);
}

.accessibility-btn:hover,
.accessibility-btn:focus {
  background-color: rgba(42, 172, 50, 0.2);
  transform: scale(1.1);
}

/* Custom Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-thumb {
  background-color: var(--custom-green);
  border-radius: 4px;
}

::-webkit-scrollbar-track {
  background-color: #f1f1f1;
  border-radius: 4px;
}

/* User profile icon */
.nav-link .bi-person-circle {
  font-size: 1.2rem;
}

/* ======================================
   ACCESSIBILITY CLASSES
   ====================================== */

/* Grayscale mode */
body.grayscale {
  filter: grayscale(100%);
  -webkit-filter: grayscale(100%);
}

/* High contrast mode */
body.high-contrast {
  background-color: #000 !important;
  color: #fff !important;
}

body.high-contrast * {
  background-color: #000 !important;
  color: #fff !important;
  border-color: #fff !important;
}

body.high-contrast a, 
body.high-contrast button:not(.btn-primary),
body.high-contrast .dropdown-item {
  background-color: #000 !important;
  color: #ffff00 !important;
}

body.high-contrast .btn-primary, 
body.high-contrast .custom-navbar {
  background-color: #0000aa !important;
  color: #ffffff !important;
}

body.high-contrast .dropdown-menu {
  background-color: #000 !important;
  border: 1px solid #fff !important;
}

/* Negative contrast mode */
body.negative-contrast {
  filter: invert(100%);
  -webkit-filter: invert(100%);
}

body.negative-contrast img,
body.negative-contrast video {
  filter: invert(100%);
  -webkit-filter: invert(100%);
}

/* Light background */
body.light-background {
  background-color: #fff !important;
  color: #000 !important;
}

body.light-background .card,
body.light-background .container,
body.light-background .dropdown-menu {
  background-color: #fff !important;
  color: #000 !important;
}

body.light-background a {
  color: #0066cc !important;
}

/* Underline links */
body.underline-links a {
  text-decoration: underline !important;
}

/* Readable font */
body.readable-font,
body.readable-font * {
  font-family: Arial, Helvetica, sans-serif !important;
  line-height: 1.5 !important;
  letter-spacing: 0.12em !important;
  word-spacing: 0.16em !important;
}

/* Prevent conflicts with dark mode and other themes */
body.high-contrast,
body.negative-contrast,
body.light-background {
  transition: none !important;
}

/* Ensure dropdown items stay visible in accessibility modes */
body.high-contrast .dropdown-item:hover {
  background-color: #333 !important;
}

body.light-background .dropdown-item:hover {
  background-color: #f0f0f0 !important;
}

/* Focus indicators for accessibility */
body.high-contrast a:focus,
body.high-contrast button:focus,
body.high-contrast input:focus,
body.high-contrast textarea:focus,
body.high-contrast select:focus {
  outline: 2px solid #ffff00 !important;
  outline-offset: 2px !important;
} 