/* Floating Button Styling */
.fab-btn {
  position: fixed;
  bottom: 20px;
  right: 12px;
  width: 56px;
  height: 56px;
  background-color: #0d233a; /* Matches your navbar color */
  color: #ffffff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: transform 0.2s ease;
}

.fab-btn:hover {
  transform: scale(1.05);
}

/* Modal Popup Styling */
.access-modal {
  position: fixed;
  bottom: 50px;
  right: 12px;
  width: 280px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  z-index: 9999;
  font-family: sans-serif;
  overflow: hidden;
  border: 1px solid #e0e0e0;
}

.access-modal[hidden] {
  display: none;
}

.access-modal-header {
  background-color: #f5f7fa;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e0e0e0;
}

.access-modal-header h3 {
  margin: 0;
  font-size: 16px;
  color: #333;
}

#closeModalBtn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #888;
}

.access-modal-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Inside Buttons */
.menu-item-btn {
  width: 100%;
  padding: 10px 12px;
  background: #fdfdfd;
  border: 1px solid #ccc;
  border-radius: 6px;
  text-align: left;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #333;
}

.menu-item-btn:hover {
  background: #f0f4f8;
  border-color: #0d233a;
}

.status-text {
  font-weight: bold;
  color: #0d233a;
}

/* Saturation Global Filters */

/* Apply filters cleanly to the page wrapper container only */
body.sat-high #whole-page-wrapper { 
  filter: saturate(2.5); 
}

body.sat-low #whole-page-wrapper { 
  filter: saturate(0.4) !important; /* Forces the browser to scale down color depth */
}

body.sat-bw #whole-page-wrapper { 
  filter: grayscale(1); 
}

/* Keeps your fixed buttons completely independent of filter calculations */
.fab-btn, .access-modal {
  position: fixed;
  z-index: 99999;
}

/* Ensure the parent list item acts as the positioning anchor */
.submenu ul li {
  position: relative;
}

/* Hide the 3rd level menu by default and position it to the right */
.submenu ul .third-level-menu {
  position: absolute;
  top: 0;
  left: 100%; /* Positions it exactly at the right edge of the current menu */
  display: none;
  min-width: 200px; /* Adjust width as needed */
  background: #ffffff;
  box-shadow: 2px 2px 10px rgba(0,0,0,0.15);
  border-left: 1px solid #e0e0e0;
  padding: 0;
  margin: 0;
  list-style: none;
  z-index: 1000;
}

/* Show the 3rd level menu on hovering over the parent item */
.submenu ul .nested-submenu:hover .third-level-menu {
  display: block;
}

/* Optional styling to tweak spacing or indicate nested directions */
.nested-submenu > a {
  display: flex;
  justify-content: space-between;
  align-items: center;
}