/* Theme Overrides - Ensure all components respect dark/light mode */

/* ============================================
   TOPBAR - Dark/Light Mode Support
   ============================================ */
.topbar {
  background: var(--bs-body-bg) !important;
  color: var(--bs-body-color) !important;
  border-bottom: 1px solid var(--bs-border-color) !important;
}

.topbar .navbar-nav .nav-link {
  color: var(--bs-heading-color) !important;
}

.topbar .navbar-nav .nav-link:hover {
  color: var(--bs-primary) !important;
}

.topbar iconify-icon {
  color: var(--bs-heading-color) !important;
}

.topbar .navbar-brand,
.topbar h1, .topbar h2, .topbar h3,
.topbar h4, .topbar h5, .topbar h6 {
  color: var(--bs-heading-color) !important;
}

/* ============================================
   DROPDOWNS - Dark/Light Mode Support
   ============================================ */
.dropdown-menu {
  background-color: var(--bs-body-bg) !important;
  border: 1px solid var(--bs-border-color) !important;
  color: var(--bs-body-color) !important;
}

.dropdown-item {
  color: var(--bs-body-color) !important;
}

.dropdown-item:hover,
.dropdown-item:focus {
  background-color: var(--bs-secondary-bg) !important;
  color: var(--bs-heading-color) !important;
}

.dropdown-item.active {
  background-color: var(--bs-primary) !important;
  color: var(--bs-white) !important;
}

/* Dropdown headers */
.dropdown-header {
  color: var(--bs-secondary-color) !important;
}

/* Dropdown dividers */
.dropdown-divider {
  border-top-color: var(--bs-border-color) !important;
}

/* ============================================
   NAVIGATION HOVER BACKGROUNDS
   ============================================ */
.nav-icon-hover-bg:hover {
  background-color: var(--bs-secondary-bg) !important;
}

/* ============================================
   MEGA MENU DROPDOWN
   ============================================ */
.dropdown-menu-nav {
  background-color: var(--bs-body-bg) !important;
  border: 1px solid var(--bs-border-color) !important;
}

.dropdown-menu-nav h6,
.dropdown-menu-nav .h6 {
  color: var(--bs-heading-color) !important;
}

.dropdown-menu-nav span,
.dropdown-menu-nav .fs-11 {
  color: var(--bs-body-color) !important;
}

.dropdown-menu-nav a:hover {
  background-color: var(--bs-secondary-bg) !important;
}

/* ============================================
   PROFILE DROPDOWN
   ============================================ */
.profile-dropdown {
  background-color: var(--bs-body-bg) !important;
  border: 1px solid var(--bs-border-color) !important;
}

.profile-dropdown h5,
.profile-dropdown .h5,
.profile-dropdown h6,
.profile-dropdown .h6 {
  color: var(--bs-heading-color) !important;
}

.profile-dropdown p,
.profile-dropdown .text-dark {
  color: var(--bs-body-color) !important;
}

.profile-dropdown .border-bottom {
  border-bottom-color: var(--bs-border-color) !important;
}

.profile-dropdown .dropdown-item:hover {
  background-color: var(--bs-secondary-bg) !important;
}

/* ============================================
   NOTIFICATIONS DROPDOWN
   ============================================ */
.content-dd {
  background-color: var(--bs-body-bg) !important;
  border: 1px solid var(--bs-border-color) !important;
}

.content-dd h5,
.content-dd .h5,
.content-dd h6,
.content-dd .h6 {
  color: var(--bs-heading-color) !important;
}

.content-dd .text-truncate,
.content-dd .fs-11 {
  color: var(--bs-body-color) !important;
}

.content-dd .dropdown-item:hover {
  background-color: var(--bs-secondary-bg) !important;
}

/* ============================================
   LANGUAGE DROPDOWN
   ============================================ */
.dropdown-menu-end {
  background-color: var(--bs-body-bg) !important;
  border: 1px solid var(--bs-border-color) !important;
}

.dropdown-menu-end .dropdown-item p {
  color: var(--bs-body-color) !important;
}

/* ============================================
   MOBILE OFFCANVAS
   ============================================ */
.offcanvas {
  background-color: var(--bs-body-bg) !important;
  color: var(--bs-body-color) !important;
}

.offcanvas .sidebar-item a {
  color: var(--bs-body-color) !important;
}

.offcanvas h6,
.offcanvas .h6 {
  color: var(--bs-heading-color) !important;
}

.offcanvas .btn-close {
  filter: var(--bs-btn-close-color);
}

/* Dark theme specific close button */
[data-bs-theme="dark"] .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}
