/* Основен бутон – само иконка, по-голяма */
#euwa-accessibility-button {
    position: fixed;
    z-index: 99999;
    bottom: 20px; /* override от JS с offsetY */
    right: 20px;  /* override от JS с offsetX и позиция */
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 999px;
    background-color: #0073aa;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(0,0,0,0.18);
    border: none;
    transform: translateY(0);
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

#euwa-accessibility-button.euwa-pos-left {
    left: 20px;
    right: auto;
}

#euwa-accessibility-button:hover,
#euwa-accessibility-button:focus {
    opacity: 0.96;
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.22);
}

#euwa-accessibility-button img.euwa-icon {
    width: 24px;
    height: 24px;
    display: block;
}

/* Панел */
#euwa-accessibility-panel {
    position: fixed;
    z-index: 99999;
    bottom: 70px;
    right: 20px;
    width: 320px;
    max-width: 90vw;
    background: #ffffff;
    color: #111;
    border-radius: 20px;
    box-shadow: 0 18px 40px rgba(0,0,0,0.25);
    font-size: 14px;
    display: none;
    overflow: hidden;
}

#euwa-accessibility-panel.euwa-pos-left {
    left: 20px;
    right: auto;
}

#euwa-accessibility-panel header {
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.18);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #0073aa; /* override с inline стил според настройката */
    color: #fff;
}

#euwa-accessibility-panel header h2 {
    margin: 0;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

#euwa-accessibility-panel header h2 img.euwa-icon {
    width: 18px;
    height: 18px;
}

#euwa-accessibility-panel header button {
    border: none;
    background: rgba(0,0,0,0.08);
    cursor: pointer;
    font-size: 18px;
    color: inherit;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Тяло */
#euwa-accessibility-panel .euwa-body {
    padding: 10px 16px 14px;
    max-height: 60vh;
    overflow-y: auto;
}

#euwa-accessibility-panel .euwa-feature {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    gap: 8px;
}

#euwa-accessibility-panel .euwa-feature-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

#euwa-accessibility-panel .euwa-feature-label img.euwa-icon {
    width: 18px;
    height: 18px;
}

#euwa-accessibility-panel .euwa-feature button {
    border-radius: 999px;
    border: 1px solid #e0e0e0;
    padding: 4px 10px;
    font-size: 13px;
    cursor: pointer;
    background: #f7f7f7;
    min-width: 40px;
    text-align: center;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

#euwa-accessibility-panel .euwa-feature button.euwa-active {
    background: #0073aa;
    border-color: #0073aa;
    color: #fff;
}

/* Footer */
#euwa-accessibility-panel .euwa-footer {
    padding: 8px 16px 12px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

#euwa-accessibility-panel .euwa-reset-btn {
    border-radius: 999px;
    border: 1px solid #ddd;
    padding: 4px 12px;
    font-size: 13px;
    cursor: pointer;
    background: #f7f7f7;
}

#euwa-accessibility-panel .euwa-statement-link {
    font-size: 12px;
    text-decoration: underline;
    cursor: pointer;
}

/* Класове за достъпност */

/* Висок контраст */
body.euwa-high-contrast {
    background-color: #000 !important;
    color: #fff !important;
}

body.euwa-high-contrast a {
    color: #ffff00 !important;
}

/* Инверсия на цветовете и черно-бяло чрез филтри */
html.euwa-invert-colors {
    filter: invert(100%) hue-rotate(180deg);
}

html.euwa-grayscale {
    filter: grayscale(100%);
}

/* Маркиране на заглавия и линкове */
body.euwa-highlight-headings h1,
body.euwa-highlight-headings h2,
body.euwa-highlight-headings h3,
body.euwa-highlight-headings h4,
body.euwa-highlight-headings h5,
body.euwa-highlight-headings h6 {
    outline: 2px solid #ff9900;
    padding: 2px 3px;
}

body.euwa-highlight-links a {
    outline: 2px dashed #0073aa;
    padding: 1px 2px;
}

/* Увеличено разстояние между редове */
body.euwa-extra-spacing {
    line-height: 1.8 !important;
}

/* Удебелен текст */
body.euwa-bold-text {
    font-weight: 600;
}

/* Четлив шрифт */
body.euwa-dyslexia-font {
    font-family: "Comic Sans MS", "Verdana", "Tahoma", sans-serif !important;
}

/* Спиране на анимации */
body.euwa-stop-animations *,
body.euwa-stop-animations *::before,
body.euwa-stop-animations *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
}

/* Малки екрани */
@media (max-width: 480px) {
    #euwa-accessibility-panel {
        width: 94vw;
        bottom: 80px;
    }
}

/* Ред за контрол на размера на шрифта: [-] 100% [+] */
#euwa-accessibility-panel .euwa-font-controls {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

#euwa-accessibility-panel .euwa-font-controls button {
    border-radius: 999px;
    border: 1px solid #e0e0e0;
    padding: 3px 9px;
    font-size: 13px;
    cursor: pointer;
    background: #f7f7f7;
    min-width: 28px;
    text-align: center;
    transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

#euwa-accessibility-panel .euwa-font-controls button:hover {
    background: #e9e9e9;
}

#euwa-accessibility-panel .euwa-font-value {
    min-width: 48px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}
