/* === Accessibility Button === */
#accessibility-button {
    position: fixed;
    /* left: 5px; */
    top: 15em;
    background-color: #faa91c;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    z-index: 9999;
}
#accessibility-button img {
    width: 30px;
    height: 30px;
}

/* === Accessibility Panel === */
#accessibility-bar {
    position: fixed;
    left: 55px;
    top: 15em;
    width: 240px;
    background-color: #ffffff !important;
    border: 2px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 0 10px #aaa;
    font-family: sans-serif;
    z-index: 9999;
}
#accessibility-bar.hidden {
    display: none;
}
#accessibility-bar .header {
    display: flex;
    justify-content: space-between;
    background: #f1f1f1;
    padding: 8px 10px;
    font-weight: bold;
}
#accessibility-bar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
#accessibility-bar li {
    padding: 10px;
    cursor: pointer;
    border-top: 1px solid #eee;
}
#accessibility-bar li:hover {
    background: #f0f0f0;
}

/* === Prevent Panel From Being Affected === */
#accessibility-bar,
#accessibility-bar * {
    font-size: initial !important;
    /* background-color: initial !important; */
	background-color: #ffffff !important;
    color: initial !important;
    border-color: initial !important;
}

/* === Bright Contrast === */
body.bright-contrast {
    background-color: #ffffff !important;
    color: #000000 !important;
}
body.bright-contrast * {
    background-color: #ffffff !important;
    color: #000000 !important;
    border-color: #000000 !important;
}
body.bright-contrast a {
    color: #0033cc !important;
    font-weight: bold;
    text-decoration: underline;
}

/* === Dark Contrast === */
body.dark-contrast {
    background-color: #121212 !important;
    color: #e0e0e0 !important;
}
body.dark-contrast * {
    background-color: #121212 !important;
    color: #e0e0e0 !important;
    border-color: #444 !important;
}

/* Override common black text colors (inline styles) */
body.dark-contrast *[style*="color:#000"],
body.dark-contrast *[style*="color:#000000"],
body.dark-contrast *[style*="color: black"] {
    color: #e0e0e0 !important;
}

/* Ensure link contrast */
body.dark-contrast a {
    color: #66ccff !important;
    text-decoration: underline;
}

/* === Underline Links Option === */
body.underline-links a:not(#accessibility-bar a):not(#accessibility-button a) {
    text-decoration: underline !important;
}

/* === Dark Contrast Fix for Menu === */
body.dark-contrast nav,
body.dark-contrast .main-menu,
body.dark-contrast .site-header,
body.dark-contrast .navbar,
body.dark-contrast .menu,
body.dark-contrast .navigation {
    background-color: #1e1e1e !important;
}

body.dark-contrast nav a,
body.dark-contrast .main-menu a,
body.dark-contrast .site-header a,
body.dark-contrast .navbar a,
body.dark-contrast .menu a,
body.dark-contrast .navigation a {
    color: #ffffff !important;
}

/* === Tool Bar View on Hover === */
.accessibility-tooltip:hover .tooltip-bubble {
    visibility: visible;
    opacity: 1;
}

.tooltip-bubble {
    visibility: hidden;
    background-color: #2f2f2f;
    color: #fff;
    text-align: left;
    padding: 6px 12px;
    border-radius: 6px;
    position: absolute;
    top: 50%;
    left: calc(100% + 10px); 
    transform: translateY(-50%);
    z-index: 9999;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tooltip-bubble::after {
    content: "";
    position: absolute;
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: transparent #2f2f2f transparent transparent;
}

