/* Accessibility Widget Container */
.accessibility-widget-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000; /* Ensure it's above other content */
    font-family: Arial, sans-serif;
}

/* Accessibility Icon Button */
.accessibility-icon {
    background-color: #007bff; /* Primary blue */
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.accessibility-icon:hover {
    background-color: #0056b3; /* Darker blue on hover */
    transform: scale(1.05);
}

.accessibility-icon:focus {
    outline: 2px solid #0056b3;
    outline-offset: 2px;
}

/* Accessibility Menu */
.accessibility-menu {
    display: none; /* Hidden by default */
    position: absolute;
    bottom: 60px; /* Position above the icon */
    right: 0;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    padding: 10px;
    min-width: 200px;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.accessibility-menu.active {
    display: flex; /* Show when active */
    opacity: 1;
    transform: translateY(0);
}

/* Accessibility Option Buttons */
.accessibility-option {
    background-color: #f8f9fa;
    color: #333;
    border: 1px solid #e0e0e0;
    padding: 10px 15px;
    text-align: left;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.accessibility-option:hover {
    background-color: #e9ecef;
    border-color: #ced4da;
}

.accessibility-option:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.accessibility-option i {
    margin-left: 8px;
    font-size: 16px;
}

.accessibility-option.reset-button {
    background-color: #dc3545; /* Red for reset */
    color: white;
    border-color: #dc3545;
    margin-top: 10px;
}

.accessibility-option.reset-button:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

/* Accessibility Feature Styles (applied to body) */

/* Font Size */
body.font-size-large {
    font-size: 1.15em; /* Adjust as needed */
}
body.font-size-larger {
    font-size: 1.3em; /* Adjust as needed */
}

/* Grayscale */
body.grayscale {
    filter: grayscale(100%);
}

/* High Contrast */
body.high-contrast {
    background-color: black !important;
    color: white !important;
}
body.high-contrast a {
    color: yellow !important;
    text-decoration: underline !important;
}
body.high-contrast button,
body.high-contrast input[type="submit"],
body.high-contrast .accessibility-icon {
    background-color: yellow !important;
    color: black !important;
    border-color: yellow !important;
}
body.high-contrast .accessibility-menu {
    background-color: black !important;
    border-color: yellow !important;
}
body.high-contrast .accessibility-option {
    background-color: #333 !important;
    color: white !important;
    border-color: #666 !important;
}
body.high-contrast .accessibility-option:hover {
    background-color: #555 !important;
}
body.high-contrast .accessibility-option.reset-button {
    background-color: #800000 !important; /* Darker red for contrast */
    color: white !important;
    border-color: #800000 !important;
}


/* Invert Colors */
body.invert-colors {
    filter: invert(100%);
    background-color: white; /* Prevent double inversion on background */
}

/* Light Background */
body.light-background {
    background-color: #f8f8f8 !important; /* Very light grey */
    color: #333 !important;
}

/* Readable Font */
body.readable-font {
    font-family: 'Arial', 'Verdana', sans-serif !important;
}

/* Highlight Links */
body.highlight-links a {
    background-color: yellow !important;
    color: black !important;
    padding: 2px 4px;
    border-radius: 3px;
    text-decoration: underline !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .accessibility-widget-container {
        bottom: 10px;
        right: 10px;
    }
    .accessibility-icon {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
    .accessibility-menu {
        bottom: 55px;
        min-width: 180px;
        padding: 8px;
    }
    .accessibility-option {
        padding: 8px 12px;
        font-size: 13px;
    }
}