/* Floating Accessibility Panel */
#accessibility-panel {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    background: white;
    padding: 15px;
    border-radius: 12px;
    border: 2px solid #000;
    z-index: 9999;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column; /* Stack vertically */
    align-items: center;
    gap: 10px; /* Spacing between buttons */
    width: 220px;
}

/* Accessibility Buttons */
#accessibility-panel button {
    background: white;
    color: black;
    border: 1px solid #000;
    padding: 8px;
    cursor: pointer;
    font-size: 14px;
    border-radius: 5px;
    width: 100%; /* Make buttons fill panel */
}

#accessibility-panel button:hover {
    background: #eee;
}

body.high-contrast {
    background: black !important;
    color: yellow !important;
}

body.large-text {
    font-size: 1.5em !important;
}

/* Floating Bubble */
#accessibility-bubble {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    background: #00a6ed;
    color: white;
    font-size: 26px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    z-index: 9999;
}

/* responsive adjustments fot mobile */
@media (max-width: 600px) {
    #accessibility-panel, #accessibility-bubble {
        right: 10px;
    }
    #accessibility-panel {
        width: 180px;
    }
}

/* Accessibility: Large Text */
body.large-text p,
body.large-text h1,
body.large-text h2,
body.large-text h3,
body.large-text li {
    font-size: 1.5em; /* or adjust as needed */
}

/* Accessibility: High Contrast */
body.high-contrast {
    background: black !important;
    color: yellow !important;
}

body.high-contrast p,
body.high-contrast h1,
body.high-contrast h2,
body.high-contrast h3,
body.high-contrast li,
body.high-contrast a {
    color: yellow !important;
}
body.high-contrast h3,
body.high-contrast h2 {
    color: black !important; /* Set to black for readability */
    background: yellow !important; /* Optional: to ensure high contrast */
    padding: 4px 8px; /* Optional: Add some padding if you want */
    border-radius: 4px; /* Optional: Rounded corners for better UI */
}

body.high-contrast a {
    text-decoration: underline !important;
}

body.high-contrast button {
    background: yellow !important;
    color: black !important;
    border: 2px solid white !important;
}

/* Ensure Accessibility Widget is readable in High Contrast Mode */
body.high-contrast #accessibility-panel {
    background: black !important;
    color: white !important;
    border: 2px solid white !important;
}

body.high-contrast #accessibility-panel button {
    background: yellow !important;
    color: black !important;
    border: 1px solid white !important;
}

/* Ensure title inside panel remains readable */
body.high-contrast #accessibility-panel div {
    color: white !important;
}

#accessibility-panel, #accessibility-panel button {
    transition: background 0.3s, color 0.3s, border 0.3s;
}

/* Prevent accessibility widget from being affected */
body.high-contrast #accessibility-panel,
body.large-text #accessibility-panel {
    font-size: initial !important;
    filter: none !important;
}

body.high-contrast #accessibility-bubble,
body.large-text #accessibility-bubble {
    filter: none !important;
}

/* Ensure the title and button colors remain accessible */
body.high-contrast #accessibility-panel {
    background: black !important;
    color: white !important;
    border: 2px solid white !important;
}

body.high-contrast #accessibility-panel button {
    background: yellow !important;
    color: black !important;
    border: 1px solid white !important;
}

/* GREYSCALE */
body.grayscale {
    filter: grayscale(100%) !important;
}

/* Panel Default */
#accessibility-panel {
    position: fixed;
    background: white;
    z-index: 9999;
    width: 220px;
    display: none; /* Start hidden */
    cursor: move;
}

/* Buttons */
#accessibility-panel button {
    background: white;
    color: black;
    border: 1px solid #000;
    padding: 8px;
    cursor: pointer;
    font-size: 14px;
    border-radius: 5px;
    width: 100%;
}