/* Accessibility toolbar (text-to-speech, text size, zoom, brightness)
   Floating widget on the public site. RTL aware via [dir="rtl"]. */

/* Fixed to the bottom-right corner in every language, matching the helper hub
   that opens it (the chat widget owns the bottom-left corner). */
.a11y-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 2147483000; /* above chatbot widgets and modals */
    font-family: "Poppins", sans-serif;
}

/* Launcher button */
.a11y-toggle {
    width: 56px;
    height: 56px;
    border: none;
    border-radius: 50%;
    background: #90CCA6;
    color: #fff;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background 0.2s;
}

.a11y-toggle:hover {
    background: #76b88f;
    transform: scale(1.06);
}

.a11y-toggle:focus-visible,
.a11y-btn:focus-visible,
.a11y-icon-btn:focus-visible {
    outline: 3px solid #1c4532;
    outline-offset: 2px;
}

/* Panel */
.a11y-panel {
    position: absolute;
    bottom: 68px;
    right: 0;
    width: 300px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    padding: 0 0 8px 0;
}

.a11y-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #90CCA6;
    color: #fff;
    border-radius: 10px 10px 0 0;
}

.a11y-panel-title {
    font-weight: 600;
    font-size: 15px;
}

.a11y-panel-title i {
    margin-right: 6px;
}

html[dir="rtl"] .a11y-panel-title i {
    margin-right: 0;
    margin-left: 6px;
}

.a11y-icon-btn {
    border: none;
    background: transparent;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    min-width: 32px;
    min-height: 32px;
}

/* Sections */
.a11y-section {
    padding: 10px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.a11y-section:last-child {
    border-bottom: none;
}

.a11y-section-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.a11y-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.a11y-btn {
    border: 1px solid #90CCA6;
    background: #fff;
    color: #2f6846;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    min-height: 40px;
    min-width: 40px;
    transition: background 0.2s, color 0.2s;
}

.a11y-btn:hover:not(:disabled) {
    background: #90CCA6;
    color: #fff;
}

.a11y-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.a11y-btn-block {
    width: 100%;
}

.a11y-stepper {
    justify-content: space-between;
}

.a11y-value {
    font-size: 14px;
    font-weight: 700;
    color: #333;
    min-width: 56px;
    text-align: center;
}

.a11y-note {
    margin: 8px 0 0;
    font-size: 12px;
    color: #b54545;
}

.a11y-footer {
    padding-top: 12px;
}

/* Brightness overlay: dims (black) or brightens (white) the page without
   breaking position:fixed layout the way a filter on <html> would. */
#a11y-brightness-overlay {
    position: fixed;
    inset: 0;
    z-index: 2147482000; /* below the widget so controls stay usable */
    pointer-events: none;
    opacity: 0;
}

/* Highlight the sentence currently being read aloud */
.a11y-reading-highlight {
    outline: 3px solid #90CCA6;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .a11y-toggle,
    .a11y-btn {
        transition: none;
    }
}

@media (max-width: 480px) {
    .a11y-widget {
        bottom: 16px;
        right: 16px;
    }
}
