html, body {
    max-width: 100%;
    overflow-x: hidden;
}

#wcag-panel .btn:active {
    background-image: none !important;
    box-shadow: none !important;
}
#wcag-panel .btn:focus,
#wcag-panel .btn:active:focus,
#wcag-panel .btn.active:focus,
#wcag-panel .btn.focus,
#wcag-panel .btn.hover,
#wcag-panel .btn:hover,
#wcag-panel .btn:focus,
#wcag-panel .btn:active.focus,
#wcag-panel .btn.active.focus {
    outline: none !important;
    box-shadow: none !important;
}
.wcag-flex-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
}

.wcag-flex-group button {
    flex: 0 0 48%;
    text-align: center;
    white-space: normal;
    padding-bottom: 16px;
}
#wcag-panel i {
    font-size: 16px !important;     /* domyślny rozmiar ikony */
    line-height: normal !important; /* zapobiega rozciągnięciu */
    letter-spacing: normal !important; /* brak sztucznego odstępu */
}
#wcag-panel .wcag-flex-group button > i {
    width: 40px;
    height: 40px;
    text-align: center;
    line-height: 40px;
    font-size:24px!important;
    margin-top: 10px;
}
.wcag-flex-group button span {
    display: block;
    padding-top:10px;
    opacity: 0.4;
}
.wcag-btn-label {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 24px; /* wysokość labela (napis + kropki) */
    font-size: 0.9rem;
}
#wcag-toggle-panel {
    position: fixed;
    right: 20px;
    bottom: 140px;
    z-index: 1040;
    background: blue;
    color: #fff;
    border-radius: 50%;
    display: block;
    width: 50px;
    height: 50px;
    font-size: 40px;
    padding: 0;
    margin: 0;
}
#wcag-toggle-panel i {
    display: block;
    position: absolute;
    top: -1px;
    left: 4px;
    line-height:50px!important;
}
#wcag-toggle-panel-x {
    position: absolute;
    top: 6px;
    right: 10px;
    background: #000;
    color: #fff;
    border-radius: 50%;
    display: block;
    width: 30px;
    height: 30px;
    padding: 0;
    margin: 0;
    line-height: 29px;
    text-align: center;
    cursor: pointer;
    z-index: 99;
}
#wcag-panel {
    position: fixed;
    top: 0;
    right: -500px; /* domyślnie schowany */
    width: 500px;
    height: 100%;
    background: #f9f9f9;
    z-index: 9999;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}
/* Po otwarciu panelu */
#wcag-panel.open {
    right: 0;
}

/* Bootstrap panel-heading jako nagłówek sticky */
#wcag-panel .panel-heading {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #f5f5f5;
    border-bottom: 1px solid #ddd;
}

/* panel-body jako obszar przewijany */
#wcag-panel .panel-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 15px;
}

/* Bootstrap panel-footer jako stopka sticky */
#wcag-panel .panel-footer {
    position: sticky;
    bottom: 0;
    z-index: 10;
    background-color: #f5f5f5;
    border-top: 1px solid #ddd;
}

/* Widok mobilny: panel ma 100% szerokości */
@media (max-width: 767px) {
    #wcag-panel {
        width: 100%;
        right: -100%;
    }

    #wcag-panel.open {
        right: 0;
    }
}
body.underline-links a, body.underline-links button {
    text-decoration: underline !important;
}
body.dark-mode * {
    background: #121212 !important;
    color: #f1f1f1 !important;
}
body.high-contrast * {
    background: #000 !important;
    color: #ff0 !important;
    border-color: #ff0 !important;
}
html.invert {
    filter: invert(1);
}
/*body.invert #wcag-panel {
    filter: invert(1) hue-rotate(180deg);  przywraca normalność 
}*/
html.saturation-0 {
    filter: saturate(100%);
}
html.saturation-1 {
    filter: saturate(50%);
}
html.saturation-2 {
    filter: saturate(150%);
}
html.saturation-3 {
    filter: saturate(0%);
}
html.font-0, html.font-0 label {
    font-size: 16px !important;
}
html.font-1, html.font-1 label {
    font-size: 18px !important;
}
html.font-2, html.font-2 label {
    font-size: 20px !important;
}
html.font-3, html.font-3 label {
    font-size: 22px !important;
}
body.line-0 * {
    line-height: 1.5 !important;
}
body.line-1 * {
    line-height: 1.75 !important;
}
body.line-2 * {
    line-height: 2 !important;
}
body.line-3 * {
    line-height: 2.25 !important;
}
body.letter-0 * {
    letter-spacing: 0px !important;
}
body.letter-1 * {
    letter-spacing: 1px !important;
}
body.letter-2 * {
    letter-spacing: 2px !important;
}
body.letter-3 * {
    letter-spacing: 3px !important;
}
#wcag-panel i {
    font-size: 16px !important;     /* domyślny rozmiar ikony */
    line-height: normal !important; /* zapobiega rozciągnięciu */
    letter-spacing: normal !important; /* brak sztucznego odstępu */
}