/* Base Layout Styles
   These styles are used in base.html for the main layout structure
   including the sidebar navigation and basic page structure.
*/

.wrapper {
  display: flex;
  width: 100%;
  align-items: stretch;
}

/* Sidebar Styles */
#sidebar {
  min-width: 240px;
  max-width: 240px;
  min-height: 100vh;
  background: #343a40;
  color: #fff;
  transition: all 0.3s;
}

#sidebar.active {
  margin-left: -250px;
}

#sidebar .sidebar-header {
  padding: 20px;
 
}

.grey-background {
  background-color: #2c3136;
}

.grey-text {
  background-color: #fff;
  color: #2c3136;
}

/* Fix for button hover issues with Bootstrap */
.btn.grey-background {
  background-color: #2c3136 !important;
  color: #fff !important;
  border-color: #2c3136 !important;
}

.btn.grey-background:hover,
.btn.grey-background:focus,
.btn.grey-background:active {
  background-color: #1e2126 !important; /* Slightly darker on hover */
  color: #fff !important;
  border-color: #1e2126 !important;
}

/* Dropdown styling for consistent UI */
.dropdown-item:active,
.dropdown-item:focus,
.dropdown-item:hover {
  background-color: #2c3136 !important;
  color: #fff !important;
}

/* Modal header styling for consistent UI */
.modal-header {
  background-color: #2c3136;
  color: #fff;
}

.modal-header .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}

#sidebar ul.components {
 
}

#sidebar ul li a {
  padding: 10px 20px;
  display: block;
  color: #fff;
  text-decoration: none;
}

#sidebar ul li a:hover {
  background: #2c3136;
}

#sidebar ul li.active > a {
  background: #2c3136;
}

/* Main Content Area */
#content {
  width: 100%;
  padding: 20px;
}

/* Responsive sidebar */
@media (max-width: 768px) {
  #sidebar {
    margin-left: -250px;
  }
  #sidebar.active {
    margin-left: 0;
  }
  #sidebarCollapse {
    display: block;
  }
}

/* Modal focus handling - preventing focus on hidden modals */
.modal:not(.show) {
  visibility: hidden !important;
  pointer-events: none !important;
}

.modal:not(.show) *:focus {
  outline: none !important;
  box-shadow: none !important;
}
