/* 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;
}

/* WhatsApp Floating Button Style */
.whatsapp-btn {
  position: fixed;
  bottom: 88px;
  /* Stacked right above the accessibility button */
  right: 20px;
  width: 56px;
  height: 56px;
  background-color: #25D366;
  /* WhatsApp Green */
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  z-index: 99999;
  transition: transform 0.2s ease;
  text-decoration: none;
}

.whatsapp-btn:hover {
  transform: scale(1.05);
  color: #ffffff;
}

/* --- Adjusted Layouts for Existing Accessibility Rules --- */

.fab-btn {
  position: fixed;
  bottom: 20px;
  /* Stays at the absolute bottom */
  right: 20px;
  z-index: 99999;
}

.access-modal {
  position: fixed;
  bottom: 158px;
  /* Shifted higher up so it clears the WhatsApp button when open */
  right: 20px;
  width: 280px;
  z-index: 99999;
}

/* BPS Profile Section Styling */
.profile-title {
  color: #006699;
  font-size: 24px;
  font-weight: bold;
  margin-bottom: 5px;
}

.profile-subtitle {
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 5px;
  color: #333;
}

.profile-header-name {
  font-size: 16px;
  font-weight: bold;
  color: #333;
  margin-bottom: 20px;
}

.profile-container {
  margin-top: 20px;
}

.profile-img {
  width: 200px;
  height: auto;
  display: block;
  margin-bottom: 25px;
  border-radius: 4px;
}

.info-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

.info-table td {
  padding: 6px 0;
  vertical-align: top;
  font-size: 16px;
}

.info-table td.label {
  font-weight: bold;
  width: 150px;
}

.info-table td.colon {
  width: 20px;
  text-align: center;
}

.section-label {
  font-weight: bold;
  font-size: 16px;
  margin-top: 25px;
  margin-bottom: 10px;
}

/* Download Buttons Section */
.download-container {
  margin-top: 40px;
  padding: 20px;
  background-color: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.download-title {
  font-size: 18px;
  font-weight: bold;
  color: #0f2c59;
  margin-top: 0;
  margin-bottom: 15px;
}

.button-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  background-color: #006699;
  color: #ffffff;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: bold;
  text-decoration: none;
  border-radius: 5px;
  transition: background-color 0.2s ease;
  border: none;
  cursor: pointer;
}

.btn-download:hover {
  background-color: #004b70;
}

.btn-download svg {
  margin-right: 8px;
  fill: currentColor;
}