/* -------------------------------------------------------
   MGK ACCESSIBILITY – TOOLBAR
--------------------------------------------------------- */

#mgk-a11y-toolbar {
    position: fixed;
    top: 20px;
    right: -250px;
    width: 250px;
    height: auto;
    max-height: calc(100vh - 40px);
    margin-bottom: 20px;
    background: #fff;
    color: #222;
    padding: 22px;
    border-top: 2px solid #D40000;
    border-left: 2px solid #D40000;
    border-bottom: 2px solid #D40000;
    z-index: 99999999;
    transition: right 0.35s ease;
    overflow-y: auto;
    font-size: 12px;
}

#mgk-a11y-toolbar h3 {
    font-size: 20px;    
}

#mgk-a11y-toolbar.open {
    right: 0;
}

/* Przycisk zamykania */
#mgk-a11y-toolbar .mgk-a11y-close {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 7px 11px;
    background-color: #D40000;
    color: #fff;
    border: none;
    outline: none;
    font-size: 25px;
    font-weight: 400;
    cursor: pointer;
    line-height: 1;
    z-index: 999999999 !important;
}

/* Przycisk otwierania */
#mgk-a11y-open {
    position: fixed;
    top: 60px;
    right: 0;
    transform: translateY(-50%);
    background: #eee;
    color: #D40000;
    border-radius: 8px 0 0 8px;
    padding: 1px 12px;
    border: 1px solid #ccc;
    outline: none;
    cursor: pointer;
    z-index: 999999999;
    font-size: 30px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#mgk-a11y-open.hide {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%) translateX(100%);
}

/* Buttons */
.mgk-a11y-btn {
    width: 100%;
    display: block;
    padding: 12px;
    margin-bottom: 12px;
    background: #eee;
    border: 1px solid #ccc;
    outline: 1px solid #ccc;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    text-align: left;
}

.mgk-a11y-btn:hover {
    background: #ddd;
}

.mgk-a11y-reset {
    background: #ffefef;
    border-color: #ff7b7b;
}

/* =======================================================
   HIGH CONTRAST (A1 – Eye-Able style)
   -------------------------------------------------------
   * Czarne tła
   * Białe teksty
   * Żółte linki
   * Wyraźne obramowania
   * Obrazy NIE są negatywem
   * SVG = pełny negatyw, ALE tło transparentne
========================================================== */

html.mgk-contrast,
html.mgk-contrast body {
    background-color: #000 !important;
    color: #fff !important;
}

html.mgk-contrast * {
    background-color: #000 !important;
    color: #fff !important;
    border-color: #fff !important;
}

/* Linki */
html.mgk-contrast a,
html.mgk-contrast a * {
    color: #ffeb3b !important;
    text-decoration: underline !important;
}

/* Przyciski */
html.mgk-contrast button,
html.mgk-contrast input[type="button"],
html.mgk-contrast input[type="submit"],
html.mgk-contrast .button {
    background: #000 !important;
    color: #ffeb3b !important;
    border: 2px solid #ffeb3b !important;
}

/* Fokus */
html.mgk-contrast :focus {
    outline: 3px solid #ffeb3b !important;
    outline-offset: 2px !important;
}

/* Obrazy – wyostrzone, ale bez negatywu */
html.mgk-contrast img,
html.mgk-contrast picture,
html.mgk-contrast video {
    filter: contrast(130%) brightness(115%) !important;
    background: transparent !important;
}

/* SVG – pełny negatyw, ALE przezroczyste tło */
html.mgk-contrast img[src$=".svg"],
html.mgk-contrast svg {
    background: transparent !important;
    filter: invert(1) hue-rotate(180deg) contrast(110%) !important;
}

/* =======================================================
   DARK MODE (Eye-Able True Dark)
   -------------------------------------------------------
   * Ciemne tła
   * Jasny tekst
   * Linki niebieskie
   * Obrazki przyciemnione globalnie (JS)
   * SVG = pełny negatyw, ale bez tła
========================================================== */

html.mgk-dark,
html.mgk-dark body {
    background-color: #111 !important;
    color: #eee !important;
}

html.mgk-dark * {
    background-color: #111 !important;
    color: #eee !important;
    border-color: #555 !important;
}

/* Linki */
html.mgk-dark a,
html.mgk-dark a * {
    color: #81d4fa !important;
}

/* Obrazy – JS nakłada globalny filtr
   CSS tylko upewnia się, że tło nie przebija */
html.mgk-dark img,
html.mgk-dark picture,
html.mgk-dark video {
    background: transparent !important;
}

/* SVG – pełny negatyw (z zachowaniem przezroczystości) */
html.mgk-dark img[src$=".svg"],
html.mgk-dark svg {
    background: transparent !important;
    filter: invert(1) hue-rotate(180deg) contrast(110%) !important;
}

/* =======================================================
   TEKST: odstępy, linia, skalowanie
========================================================== */

html.mgk-letter-spacing,
html.mgk-letter-spacing * {
    letter-spacing: 0.06em !important;
}

html.mgk-line-height,
html.mgk-line-height * {
    line-height: 1.8 !important;
}

html.mgk-font-size {
    font-size: var(--mgk-font-size, 100%) !important;
}

html.mgk-font-size *,
html.mgk-font-size body {
    font-size: inherit !important;
}

/* Ikony */
html.mgk-scale-icons img,
html.mgk-scale-icons svg,
html.mgk-scale-icons i {
    width: 1em !important;
    height: 1em !important;
}

/* =======================================================
   MOBILE
========================================================== */

@media (max-width: 1024px) {
    #mgk-a11y-open {
        top: auto !important;
        bottom: 90px !important; 
        transform: none !important;
    }
}
