/* ==========================================================================
   HIZLI İŞLER — GELİŞMİŞ ERİŞİLEBİLİRLİK & YÜZDELİ (%) ÖLÇEKLEME SİSTEMİ
   ========================================================================== */

/* 0. Header Kolay Kullanım Butonu */
.header-a11y-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    background: #F8FAFC !important;
    color: #0F172A !important;
    border: 1px solid #CBD5E1 !important;
    border-radius: 999px !important;
    padding: 8px 15px !important;
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    outline: none !important;
    text-decoration: none !important;
    line-height: 1 !important;
}

.header-a11y-btn .a11y-btn-icon {
    font-size: 15px !important;
    line-height: 1 !important;
}

.header-a11y-btn:hover,
.header-a11y-btn:focus-visible {
    background: #EFF6FF !important;
    border-color: #93C5FD !important;
    color: #2563EB !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.15) !important;
}

@media (max-width: 767px) {
    .header-a11y-btn .a11y-btn-text {
        display: none !important;
    }
    .header-a11y-btn {
        padding: 6px 8px !important;
        width: 36px !important;
        height: 36px !important;
    }
}

/* 1. Sabit Tetikleyici Buton (Floating Accessibility Button) */
.hia-a11y-trigger {
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 48px;
    height: 48px;
    background: #2563EB;
    color: #FFFFFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.4);
    cursor: pointer;
    z-index: 9999999;
    border: 2px solid #FFFFFF;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
}

.hia-a11y-trigger:hover,
.hia-a11y-trigger:focus-visible {
    transform: scale(1.1);
    background: #1D4ED8;
    box-shadow: 0 6px 25px rgba(37, 99, 235, 0.55);
    outline: 3px solid #60A5FA;
}

.hia-a11y-trigger svg {
    width: 26px;
    height: 26px;
    fill: currentColor;
}

.hia-a11y-trigger-tooltip {
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%) translateX(-8px);
    background: #0F172A;
    color: #FFFFFF;
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
    font-size: 12.5px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.hia-a11y-trigger-tooltip::before {
    content: '';
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: transparent #0F172A transparent transparent;
}

.hia-a11y-trigger:hover .hia-a11y-trigger-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

/* 2. Erişilebilirlik Paneli (Modal / Drawer) */
.hia-a11y-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 99999990;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
}

.hia-a11y-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

.hia-a11y-panel {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    max-width: 420px;
    background: #FFFFFF !important;
    z-index: 99999999;
    box-shadow: 10px 0 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif !important;
    color: #0F172A !important;
}

.hia-a11y-panel.is-active {
    transform: translateX(0);
}

/* Panel Header */
.hia-a11y-header {
    padding: 18px 22px;
    background: #F8FAFC !important;
    border-bottom: 1px solid #E2E8F0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hia-a11y-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hia-a11y-header-icon {
    width: 36px;
    height: 36px;
    background: #EFF6FF !important;
    color: #2563EB !important;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.hia-a11y-title {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #0F172A !important;
    margin: 0;
    line-height: 1.2;
}

.hia-a11y-subtitle {
    font-size: 12px !important;
    color: #64748B !important;
    margin: 2px 0 0 0;
}

.hia-a11y-header-reset-btn {
    background: #FFFFFF !important;
    border: 1px solid #CBD5E1 !important;
    color: #475569 !important;
    padding: 6px 12px !important;
    border-radius: 8px !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
}

.hia-a11y-header-reset-btn:hover {
    background: #FEE2E2 !important;
    border-color: #FCA5A5 !important;
    color: #DC2626 !important;
}

.hia-a11y-close-btn {
    background: transparent;
    border: none;
    color: #64748B;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.15s ease;
}

.hia-a11y-close-btn:hover {
    background: #E2E8F0;
    color: #0F172A;
}

/* Panel Body */
.hia-a11y-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: #FFFFFF !important;
}

.hia-a11y-card-block {
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: 14px;
    padding: 16px;
}

.hia-a11y-section-title {
    font-size: 12.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #475569;
    margin-bottom: 12px;
}

.hia-a11y-percent-badge {
    background: #2563EB;
    color: #FFFFFF;
    font-size: 12px;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 6px;
    letter-spacing: normal;
}

/* YÜZDE STEPPER KONTROLÜ */
.hia-a11y-stepper-wrap {
    display: grid;
    grid-template-columns: 75px 1fr 75px;
    gap: 8px;
    align-items: center;
    margin-bottom: 12px;
}

.hia-a11y-step-btn {
    background: #FFFFFF;
    border: 1.5px solid #CBD5E1;
    border-radius: 10px;
    padding: 8px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    cursor: pointer;
    color: #0F172A;
    font-weight: 800;
    font-size: 18px;
    transition: all 0.15s ease;
    line-height: 1;
}

.hia-a11y-step-btn:hover {
    background: #EFF6FF;
    border-color: #2563EB;
    color: #2563EB;
}

.hia-a11y-step-display {
    background: #FFFFFF;
    border: 1.5px solid #E2E8F0;
    border-radius: 10px;
    padding: 6px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
}

/* HIZLI YÜZDE BUTONLARI GRİDİ */
.hia-a11y-percent-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.hia-a11y-pct-btn {
    background: #FFFFFF;
    border: 1px solid #CBD5E1;
    border-radius: 8px;
    padding: 8px 4px;
    font-size: 12px;
    font-weight: 700;
    color: #334155;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s ease;
}

.hia-a11y-pct-btn:hover {
    background: #EFF6FF;
    border-color: #93C5FD;
    color: #2563EB;
}

.hia-a11y-pct-btn.is-active {
    background: #2563EB !important;
    border-color: #2563EB !important;
    color: #FFFFFF !important;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35) !important;
}

/* 2 Sütunlu Araç Butonları Grid */
.hia-a11y-tools-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.hia-a11y-tool-btn {
    background: #FFFFFF;
    border: 1px solid #CBD5E1;
    border-radius: 10px;
    padding: 10px 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-align: center;
    transition: all 0.18s ease;
    user-select: none;
    color: #1E293B;
}

.hia-a11y-tool-btn:hover {
    background: #EFF6FF;
    border-color: #BFDBFE;
}

.hia-a11y-tool-btn.is-active {
    background: #EFF6FF !important;
    border-color: #2563EB !important;
    color: #2563EB !important;
    box-shadow: inset 0 0 0 1.5px #2563EB !important;
}

.hia-a11y-tool-icon {
    font-size: 18px;
    line-height: 1;
}

.hia-a11y-tool-name {
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.3;
}

/* Panel Footer: Büyük Varsayılana Dön Butonu */
.hia-a11y-footer {
    padding: 16px 22px;
    background: #F8FAFC !important;
    border-top: 1px solid #E2E8F0;
    display: flex;
    gap: 10px;
}

.hia-a11y-reset-btn {
    flex: 1;
    background: #FFFFFF !important;
    border: 1.5px solid #FCA5A5 !important;
    border-radius: 10px;
    padding: 12px;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    color: #DC2626 !important;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.hia-a11y-reset-btn:hover {
    background: #DC2626 !important;
    border-color: #DC2626 !important;
    color: #FFFFFF !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.25);
}

/* Toast Bildirimi */
.hia-a11y-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(40px);
    background: #0F172A;
    color: #FFFFFF;
    padding: 10px 20px;
    border-radius: 999px;
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    z-index: 9999999999;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.hia-a11y-toast.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   3. ERİŞİLEBİLİRLİK MODİFİYERLERİ
   ========================================================================== */

/* Yüksek Kontrast (High Contrast) */
body.a11y-high-contrast {
    filter: contrast(180%) brightness(95%) !important;
    background: #000000 !important;
}

/* Gri Tonlama (Monochrome / Grayscale) */
body.a11y-grayscale {
    filter: grayscale(100%) !important;
}

/* Ters Renkler (Inverted Colors / Dark Mode) */
body.a11y-invert {
    filter: invert(100%) hue-rotate(180deg) !important;
    background: #000000 !important;
}
body.a11y-invert img,
body.a11y-invert video,
body.a11y-invert #hiaA11yRoot {
    filter: invert(100%) hue-rotate(180deg) !important;
}

/* Sarı - Siyah Yüksek Görünürlük (Yellow on Black) */
body.a11y-yellow-black {
    background-color: #000000 !important;
    color: #FFFF00 !important;
}
body.a11y-yellow-black *:not(#hiaA11yRoot):not(#hiaA11yRoot *) {
    background-color: #000000 !important;
    color: #FFFF00 !important;
    border-color: #FFFF00 !important;
}
body.a11y-yellow-black a:not(#hiaA11yRoot a) {
    color: #00FFFF !important;
    text-decoration: underline !important;
}

/* Bağlantıları Vurgula (Highlight Links) */
body.a11y-highlight-links a {
    background: #FEF08A !important;
    color: #0F172A !important;
    text-decoration: underline !important;
    font-weight: 800 !important;
    box-shadow: 0 0 0 2px #EAB308 !important;
    border-radius: 4px !important;
    padding: 1px 4px !important;
}

/* Güçlü Odak Çerçevesi (Enhanced Focus Outline) */
body.a11y-strong-focus *:focus,
body.a11y-strong-focus *:focus-visible {
    outline: 4px solid #2563EB !important;
    outline-offset: 3px !important;
    box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.4) !important;
}

/* Disleksi Dostu Yazı Tipi */
body.a11y-dyslexic * {
    font-family: "Comic Sans MS", "Arial Rounded MT Bold", sans-serif !important;
    letter-spacing: 0.04em !important;
    word-spacing: 0.08em !important;
}

/* Geniş Satır & Harf Aralığı */
body.a11y-spacing * {
    line-height: 1.85 !important;
    letter-spacing: 0.06em !important;
    word-spacing: 0.12em !important;
}

/* Animasyonları Durdur (Reduce Motion) */
body.a11y-stop-anim *,
body.a11y-stop-anim *::before,
body.a11y-stop-anim *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
}

/* Büyük İmleç */
body.a11y-big-cursor,
body.a11y-big-cursor * {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36' viewBox='0 0 24 24' fill='%23000000' stroke='%23ffffff' stroke-width='1.5'%3E%3Cpath d='M3 3l7 18 3-7 7-3L3 3z'/%3E%3C/svg%3E"), auto !important;
}

/* Okuma Çizgisi / Cetveli (Reading Ruler) */
.hia-a11y-ruler {
    position: fixed;
    left: 0;
    right: 0;
    height: 38px;
    background: rgba(254, 240, 138, 0.4);
    border-top: 2px solid #EAB308;
    border-bottom: 2px solid #EAB308;
    pointer-events: none;
    z-index: 999999999;
    display: none;
    transform: translateY(-50%);
}

body.a11y-ruler-active .hia-a11y-ruler {
    display: block;
}

/* Sesli Okuma İşareti */
.hia-a11y-speaking {
    outline: 3px solid #10B981 !important;
    background: rgba(16, 185, 129, 0.15) !important;
}

@media (max-width: 767px) {
    .hia-a11y-trigger {
        display: none !important;
    }
}
