/*SOL ALT AÇMA BUTONU*/
#a11y-trigger-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #b4293c;
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    z-index: 999998;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background-color 0.2s ease;
    padding: 0;
}

#a11y-trigger-btn:hover {
    transform: scale(1.1);
}

#a11y-trigger-btn svg {
    width: 36px;
    height: 36px;
    fill: currentColor;
}

/* ANA PANEL */
#a11y-panel {
    position: fixed;
    bottom: 80px;
    left: 20px;
    width: 320px;
    max-width: calc(100vw - 40px);
    background-color: #ffffff;
    color: #1a1a1a;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    padding: 20px;
    z-index: 999999;
    font-family:
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        sans-serif;
    box-sizing: border-box;
    display: none;
}

#a11y-panel.a11y-panel-open {
    display: block;
}
#a11y-panel * {
    box-sizing: border-box;
}

/* KAPAT BUTONU */
#a11y-panel .a11y-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: #a31628;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#a11y-panel .a11y-close:hover {
    color: #000;
    background-color: #f0f0f0;
}

#a11y-panel h3 {
    margin: 0 0 16px 0;
    font-size: 18px;
    line-height: 1.3;
    font-weight: 700;
    color: #111;
}


/* BÖLÜM BAŞLIKLARI */
#a11y-panel .a11y-section-title {
    grid-column: 1 / -1;
    font-size: 13px;
    line-height: 1.3;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #777;
    margin-top: 10px;
    margin-bottom: 2px;
}

#a11y-panel .a11y-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

#a11y-panel .a11y-btn {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    min-height: 42px;
    padding: 10px 12px;
    background-color: #a31628;
    border: 1px solid #dcdfe6;
    border-radius: 8px;
    color: #ffffff;
    font-size: 13px;
    line-height: 1.2;
    font-weight: 500;
    cursor: pointer;
    text-align: left;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        transform 0.15s ease;
    user-select: none;
}

#a11y-panel .a11y-btn:hover {
    background-color: #3e3d3d;
    border-color: #ffffff;
}

#a11y-panel .a11y-btn:focus-visible,
#a11y-panel .a11y-close:focus-visible,
#a11y-trigger-btn:focus-visible {
    outline: 3px solid #c2a02b;
    outline-offset: 2px;
}

#a11y-panel .a11y-btn[aria-pressed="true"] {
    background-color: #c2a02b;
    color: #ffffff;
    border-color: #c2a02b;
}

#a11y-panel .a11y-btn.a11y-wide {
    grid-column: 1 / -1;
}


#a11y-panel .a11y-btn svg {
    width: 18px;
    height: 18px;
    min-width: 18px;
    flex-shrink: 0;
    fill: currentColor;
    stroke: currentColor;
    stroke-width: 0;
    transition: transform 0.15s ease;
}

#a11y-panel .a11y-btn:hover svg {
    transform: scale(1.1);
}

#a11y-panel .a11y-btn span {
    line-height: 1.2;
}


/* =========================================================
   FONT BOYUTU
   ---------------------------------------------------------
   FONT BOYUTU ARTIK CSS % İLE DEĞİL JS TARAFINDAN
   ELEMENTİN ORİJİNAL FONT BOYUTU ÜZERİNDEN HESAPLANIR.

   SEVİYELER:

   0  = %100
   1  = %105
   2  = %110
   3  = %115
   4  = %120

   -1 = %95
   -2 = %90

   KÜÇÜLTMEDE MİNİMUM 16PX.
========================================================= */

body.a11y-font-active .a11y-font-target {
    /* Font boyutu JS tarafından atanır */
}


/* DİSLEKSİ DOSTU */
body.a11y-dyslexia *:not(#a11y-panel):not(#a11y-panel *):not(#a11y-trigger-btn):not(#a11y-trigger-btn *) {
    font-family:
        "OpenDyslexic",
        "Comic Sans MS",
        sans-serif !important;
}

/* METİN ARALIĞI */
body.a11y-spacing *:not(#a11y-panel):not(#a11y-panel *):not(#a11y-trigger-btn):not(#a11y-trigger-btn *) {
    letter-spacing: 0.12em !important;
    word-spacing: 0.16em !important;
    line-height: 1.8 !important;
}


/* YÜKSEK KONTRAST*/
body.a11y-high-contrast {
    background-color: #000000 !important;
    color: #ffff00 !important;
}

body.a11y-high-contrast *:not(#a11y-panel):not(#a11y-panel *):not(#a11y-trigger-btn):not(#a11y-trigger-btn *) {
    background-color: #000000 !important;
    color: #ffff00 !important;
    border-color: #ffff00 !important;
}

body.a11y-high-contrast a {
    color: #00ffff !important;
}


/* KOYU GÖRÜNÜM */
body.a11y-dark {
    background-color: #121212 !important;
    color: #e0e0e0 !important;
}

body.a11y-dark *:not(#a11y-panel):not(#a11y-panel *):not(#a11y-trigger-btn):not(#a11y-trigger-btn *) {
    background-color: #121212 !important;
    color: #e0e0e0 !important;
    border-color: #333333 !important;
}

body.a11y-dark a {
    color: #66b3ff !important;
}


/* GRİ TONLAMA */
body.a11y-grayscale > *:not(#a11y-panel):not(#a11y-trigger-btn) {
    filter: grayscale(100%) !important;
}


/* BAĞLANTILARI VURGULA */

body.a11y-links a {
    text-decoration: underline !important;
    font-weight: bold !important;
    background-color: #fef08a !important;
    color: #000000 !important;
    padding: 0 2px !important;
}


/* BAŞLIKLARI VURGULA */

body.a11y-headings h1,
body.a11y-headings h2,
body.a11y-headings h3,
body.a11y-headings h4,
body.a11y-headings h5,
body.a11y-headings h6 {
    outline: 2px dashed #2563eb !important;
    outline-offset: 2px !important;
}


/* HAREKETLERİ DURDUR */

body.a11y-no-motion *,
body.a11y-no-motion *::before,
body.a11y-no-motion *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
}


/* BEYAZ İMLEÇ */

body.a11y-cursor-white,
body.a11y-cursor-white * {
    cursor:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24' fill='white' stroke='black' stroke-width='1.5'%3E%3Cpath d='M13.64 21.97l-3.27-7.24-4.34 4.34V2l15 11.25-6.23 1.32 3.27 7.18z'/%3E%3C/svg%3E"),
        auto !important;
}


/* SİYAH İMLEÇ */
body.a11y-cursor-black,
body.a11y-cursor-black * {
    cursor:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24' fill='black' stroke='white' stroke-width='1.5'%3E%3Cpath d='M13.64 21.97l-3.27-7.24-4.34 4.34V2l15 11.25-6.23 7.18z'/%3E%3C/svg%3E"),
        auto !important;
}


/* MOBİL */

@media (max-width: 575px) {

    #a11y-trigger-btn {
        left: 15px;
        bottom: 15px;

        width: 48px;
        height: 48px;
    }

    #a11y-panel {
        left: 15px;
        right: 15px;

        bottom: 73px;

        width: auto;
        max-width: none;

        padding: 16px;
    }

    #a11y-panel .a11y-grid {
        gap: 7px;
    }

    #a11y-panel .a11y-btn {
        padding: 9px 10px;
        font-size: 12px;
    }
}