/**
 * Erişilebilirlik Stilleri
 * Akıllı Şehirler Şube Müdürlüğü
 */

/* ===== Erişilebilirlik Araç Çubuğu ===== */
.accessibility-toggle {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 99999;
    background: var(--bs-primary, #0d6efd);
    color: white;
    border: none;
    border-radius: 0 8px 8px 0;
    padding: 12px 10px;
    cursor: pointer;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.accessibility-toggle:hover {
    padding-left: 15px;
    background: #0b5ed7;
}

.accessibility-toggle i {
    font-size: 20px;
}

.accessibility-panel {
    position: fixed;
    left: -320px;
    top: 0;
    width: 320px;
    height: 100vh;
    background: #fff;
    box-shadow: 5px 0 25px rgba(0,0,0,0.15);
    z-index: 100000;
    transition: left 0.3s ease;
    overflow-y: auto;
}

.accessibility-panel.open {
    left: 0;
}

.accessibility-panel-header {
    background: var(--bs-primary, #0d6efd);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accessibility-panel-header h5 {
    margin: 0;
    font-size: 18px;
}

.accessibility-panel-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.accessibility-panel-body {
    padding: 20px;
}

.accessibility-section {
    margin-bottom: 25px;
}

.accessibility-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #eee;
}

.accessibility-btn-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.accessibility-btn {
    flex: 1;
    min-width: 80px;
    padding: 10px 12px;
    border: 2px solid #ddd;
    background: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    font-size: 13px;
}

.accessibility-btn:hover {
    border-color: var(--bs-primary, #0d6efd);
    background: #e7f1ff;
}

.accessibility-btn.active {
    border-color: var(--bs-primary, #0d6efd);
    background: var(--bs-primary, #0d6efd);
    color: white;
}

.accessibility-btn i {
    display: block;
    font-size: 20px;
    margin-bottom: 5px;
}

.accessibility-toggle-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.accessibility-toggle-item:last-child {
    border-bottom: none;
}

.accessibility-toggle-label {
    font-size: 14px;
    color: #333;
}

.accessibility-reset {
    width: 100%;
    padding: 12px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s ease;
}

.accessibility-reset:hover {
    background: #bb2d3b;
}

.accessibility-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.accessibility-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ===== Yazı Boyutu Modları ===== */
html.font-size-small {
    font-size: 14px !important;
}

html.font-size-normal {
    font-size: 16px !important;
}

html.font-size-large {
    font-size: 18px !important;
}

html.font-size-xlarge {
    font-size: 20px !important;
}

html.font-size-xxlarge {
    font-size: 22px !important;
}

/* ===== Yüksek Kontrast Modu ===== */
html.high-contrast {
    filter: contrast(1.3);
}

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

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

html.high-contrast .btn-primary,
html.high-contrast .bg-primary {
    background: #ffff00 !important;
    color: #000 !important;
}

html.high-contrast .card,
html.high-contrast .navbar,
html.high-contrast .footer-section {
    background: #000 !important;
    border: 2px solid #fff !important;
}

html.high-contrast img {
    filter: contrast(1.2);
}

/* ===== Ters Kontrast (Koyu Mod) ===== */
html.dark-mode {
    filter: invert(1) hue-rotate(180deg);
}

html.dark-mode img,
html.dark-mode video,
html.dark-mode iframe,
html.dark-mode .no-invert {
    filter: invert(1) hue-rotate(180deg);
}

/* ===== Gri Tonlama ===== */
html.grayscale {
    filter: grayscale(100%);
}

/* ===== Disleksi Dostu Yazı Tipi ===== */
html.dyslexia-friendly * {
    font-family: 'OpenDyslexic', 'Comic Sans MS', 'Arial', sans-serif !important;
    letter-spacing: 0.1em !important;
    word-spacing: 0.2em !important;
}

/* ===== Satır Yüksekliği ===== */
html.line-height-large * {
    line-height: 2 !important;
}

/* ===== Harf Aralığı ===== */
html.letter-spacing-large * {
    letter-spacing: 0.15em !important;
}

/* ===== Bağlantı Vurgulama ===== */
html.highlight-links a {
    background: #ffff00 !important;
    color: #000 !important;
    padding: 2px 4px !important;
    text-decoration: underline !important;
    font-weight: bold !important;
}

/* ===== Okuma Kılavuzu ===== */
.reading-guide {
    position: fixed;
    left: 0;
    width: 100%;
    height: 30px;
    background: rgba(255, 255, 0, 0.3);
    pointer-events: none;
    z-index: 99998;
    display: none;
    border-top: 2px solid #ff0;
    border-bottom: 2px solid #ff0;
}

html.reading-guide-active .reading-guide {
    display: block;
}

/* ===== Büyük İmleç ===== */
html.big-cursor,
html.big-cursor * {
    cursor: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24"><path fill="%23000" stroke="%23fff" stroke-width="1" d="M4 4l16 8-7 2-2 7z"/></svg>') 0 0, auto !important;
}

/* ===== Animasyonları Durdur ===== */
html.stop-animations *,
html.stop-animations *::before,
html.stop-animations *::after {
    animation: none !important;
    transition: none !important;
}

/* ===== Odak Göstergesi ===== */
html.focus-indicator *:focus {
    outline: 4px solid #ff0 !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 6px rgba(255, 255, 0, 0.4) !important;
}

/* ===== Metin Hizalama ===== */
html.text-align-left * {
    text-align: left !important;
}

/* ===== Resim Gizleme ===== */
html.hide-images img {
    visibility: hidden !important;
}

/* ===== Form Switch Özelleştirmesi ===== */
.accessibility-panel .form-switch .form-check-input {
    width: 50px;
    height: 26px;
    cursor: pointer;
}

.accessibility-panel .form-switch .form-check-input:checked {
    background-color: var(--bs-primary, #0d6efd);
    border-color: var(--bs-primary, #0d6efd);
}

/* ===== Mobil Uyumluluk ===== */
@media (max-width: 768px) {
    .accessibility-panel {
        width: 100%;
        left: -100%;
    }

    .accessibility-toggle {
        padding: 10px 8px;
    }

    .accessibility-toggle i {
        font-size: 18px;
    }
}
