/* File: assets/css/a11y-widget.css */
#zoom-wrapper {
  position: relative;
  z-index: 99999;
}

#accessibility-toggle {
  position: relative !important;
  z-index: 1000;
  margin-left: 20px;
  display: inline-flex;
  align-items: center;
}

#accessibility-toggle button {
  width: 50px;
  height: 50px;
  background: #007A5C;
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  transition: transform 0.2s ease, background 0.2s ease;
}

#accessibility-toggle button:hover {
  background: #005a44;
  transform: scale(1.1);
}

#accessibility-toggle button:focus,
#accessibility-toggle button:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 2px;
}


#accessibility-panel {
  display: none;
  position: fixed;
  top: 180px;
  right: 20px;
  z-index: 99999;
  background: #ffffff;
  color: #1a1a1a;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 20px;
  width: 280px;
  font-family: inherit;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  max-height: calc(100vh - 200px);
  overflow-y: auto;
}

.a11y-section-label {
  margin-bottom: 12px;
  font-size: 14px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
}

.a11y-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.a11y-tile {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 10px 5px;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  font-size: 18px;
  transition: all 0.2s ease;
}

.a11y-tile:hover {
  background: #e9ecef;
  border-color: #ced4da;
}

.a11y-tile[aria-pressed="true"] {
  background: #e8f3f1;
  border-color: #007A5C;
  color: #007A5C;
  box-shadow: inset 0 0 0 1px #007A5C;
}

.a11y-title {
  font-size: 11px;
  font-weight: 500;
  color: #444;
}

.a11y-tile[aria-pressed="true"] .a11y-title {
  color: #007A5C;
}

.a11y-footer {
  margin-top: 10px;
  border-top: 1px solid #eee;
  padding-top: 15px;
}

.a11y-reset-btn {
  width: 100%;
  background: #dc3545;
  color: white;
  border: none;
  padding: 10px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.a11y-reset-btn:hover {
  background: #c82333;
}

body.contrast-invert #a11y-filter-wrapper,
body.contrast-invert header {
  filter: invert(1) hue-rotate(180deg) !important;
}

/* Dropdown Hover Bridge - Fixes "About Us" disappearing on move */
.navigation > li.menu-item-has-children {
  position: relative;
}

.navigation > li.menu-item-has-children:hover::after {
  content: "";
  position: absolute;
  top: 80%; /* Start inside the parent to ensure connection */
  bottom: -40px; /* Extend deep into the dropdown */
  left: 0;
  right: 0;
  background: transparent;
  z-index: 1; /* Stay below links but keep hover active */
}

/* Ensure sub-menu stays above most things but below widget */
.navigation > li .sub-menu {
  z-index: 1000 !important;
}

/* Base styles for the wrapper to ensure it doesn't break layout */
#a11y-filter-wrapper {
  width: 100%;
  min-height: 100%;
  position: relative; /* Maintain layout context for absolute children */
}

/* Ensure images and media look normal when inverted */
body.contrast-invert #a11y-filter-wrapper img,
body.contrast-invert #a11y-filter-wrapper video,
body.contrast-invert #a11y-filter-wrapper .objective-image img,
body.contrast-invert header img {
  filter: invert(1) hue-rotate(180deg) !important;
}

/* Set body background to handle the "outside" areas */
body.contrast-invert {
  background-color: #000 !important;
}

/* High Contrast Black & White */
body.contrast-bw #a11y-filter-wrapper,
body.contrast-bw header {
  filter: grayscale(100%) !important;
}

/* Ensure the header is always clickable and above everything else */
/* Ensure the header is always clickable and above everything else */
header, 
.tg-header__area,
.tgmenu__wrap {
  z-index: 100001 !important;
  position: relative;
}

#sticky-header {
  z-index: 100001 !important;
}

#zoom-wrapper {
  pointer-events: auto;
  position: static;
}

#accessibility-toggle, 
#accessibility-panel {
  pointer-events: auto !important;
  z-index: 100002 !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}