/* Erişilebilirlik Widget CSS */

/* Sağ alt köşedeki yuvarlak buton */
.accessibility-widget-button {
    position: fixed;
    bottom: 150px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: #1f4f5c;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0, 193, 222, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.accessibility-widget-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 193, 222, 0.6);
}

.accessibility-widget-button svg {
    width: 30px;
    height: 30px;
    fill: white;
}

/* Modal Panel */
.accessibility-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    transition: right 0.3s ease;
    overflow-y: auto;
}

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

/* Panel Header */
.accessibility-panel-header {
    background: #1f4f5c;
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1;
}

.accessibility-panel-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.accessibility-panel-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.accessibility-panel-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Panel Content */
.accessibility-panel-content {
    padding: 20px;
}

.accessibility-option {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
}

.accessibility-option:hover {
    border-color: #1f4f5c;
    background: #f0fbfd;
    transform: translateX(-5px);
}

.accessibility-option.active {
    background: #e6f7fb;
    border-color: #1f4f5c;
}

.accessibility-option-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.accessibility-option-content {
    flex: 1;
}

.accessibility-option-title {
    font-weight: 600;
    font-size: 16px;
    color: #333;
    margin-bottom: 4px;
}

.accessibility-option-desc {
    font-size: 13px;
    color: #666;
}

/* Toggle Switch */
.accessibility-toggle {
    width: 50px;
    height: 26px;
    background: #ccc;
    border-radius: 13px;
    position: relative;
    transition: background 0.3s;
}

.accessibility-option.active .accessibility-toggle {
    background: #1f4f5c;
}

.accessibility-toggle::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: left 0.3s;
}

.accessibility-option.active .accessibility-toggle::after {
    left: 26px;
}

/* Overlay */
.accessibility-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    display: none;
}

.accessibility-overlay.visible {
    display: block;
}

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

    .accessibility-widget-button {
        width: 50px;
        height: 50px;
        bottom: 350px;
        right: 15px;
    }

    .accessibility-widget-button svg {
        width: 24px;
        height: 24px;
    }
}

/* ==================== ERİŞİLEBİLİRLİK ÖZELLİKLERİ ==================== */

/* 1. Yüksek Kontrast Modu */
body.high-contrast {
    background: #000 !important;
    color: #fff !important;
    filter: contrast(150%) !important;
}

body.high-contrast .wp-site-blocks,
body.high-contrast main,
body.high-contrast article,
body.high-contrast section {
    background: #000 !important;
    color: #fff !important;
}

body.high-contrast header,
body.high-contrast nav,
body.high-contrast footer {
    background: #1a1a1a !important;
    color: #fff !important;
}

body.high-contrast a {
    color: #ffff00 !important;
    text-decoration: underline !important;
    background: transparent !important;
}

body.high-contrast button,
body.high-contrast .wp-block-button__link {
    background: #333 !important;
    color: #fff !important;
    border: 2px solid #fff !important;
}

body.high-contrast img {
    filter: contrast(150%) brightness(90%) !important;
    opacity: 0.9 !important;
}

body.high-contrast h1,
body.high-contrast h2,
body.high-contrast h3,
body.high-contrast h4,
body.high-contrast h5,
body.high-contrast h6 {
    color: #fff !important;
}

body.high-contrast p,
body.high-contrast span,
body.high-contrast div {
    color: #fff !important;
}

/* 2. Büyük Metin */
body.large-text {
    font-size: 110% !important;
}

body.large-text p,
body.large-text span,
body.large-text a,
body.large-text li,
body.large-text div,
body.large-text h1,
body.large-text h2,
body.large-text h3,
body.large-text h4,
body.large-text h5,
body.large-text h6 {
    font-size: 110% !important;
    line-height: 1.5 !important;
}

body.large-text button,
body.large-text input,
body.large-text select {
    font-size: 105% !important;
}

/* 3. Metin Boşluğu */
body.text-spacing * {
    letter-spacing: 0.12em !important;
    word-spacing: 0.16em !important;
}

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

/* 5. Resimleri Gizle */
body.hide-images img {
    opacity: 0.3 !important;
    filter: grayscale(100%) !important;
}

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

/* 7. Metin Hizalama - Sol */
body.text-align-left * {
    text-align: left !important;
}

/* 8. Büyük İmleç */
body.large-cursor,
body.large-cursor * {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><path d="M4 4 L4 28 L12 20 L16 28 L20 26 L16 18 L28 18 Z" fill="black" stroke="white" stroke-width="2"/></svg>') 2 2, auto !important;
}

/* 9. Animasyonları Durdur */
body.stop-animations * {
    animation: none !important;
    transition: none !important;
}

/* 10. Doygunluk Azaltma */
body.low-saturation * {
    filter: saturate(0.5) !important;
}

/* Reset butonu için */
.accessibility-reset {
    background: #dc3545;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    font-size: 16px;
    font-weight: 600;
    margin-top: 20px;
    transition: background 0.3s;
}

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

/* Widget'in kendisi için istisna (kontrast modunda düzgün görünsün) */
body.high-contrast .accessibility-panel,
body.high-contrast .accessibility-panel * {
    background-color: #1a1a1a !important;
    color: #fff !important;
}

body.high-contrast .accessibility-panel-header {
    background-color: #1f4f5c !important;
}

body.high-contrast .accessibility-option {
    background: #2a2a2a !important;
    border-color: #1f4f5c !important;
}

/* ==================== YENİ ÖZELLİKLER ==================== */

/* Bölüm Başlığı */
.accessibility-section-title {
    font-size: 13px;
    font-weight: 700;
    color: #1f4f5c;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 25px 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e9ecef;
}

/* 11. Sesli Okuma (TTS) */
body.text-to-speech p,
body.text-to-speech h1,
body.text-to-speech h2,
body.text-to-speech h3,
body.text-to-speech h4,
body.text-to-speech h5,
body.text-to-speech h6,
body.text-to-speech li,
body.text-to-speech td,
body.text-to-speech th,
body.text-to-speech span,
body.text-to-speech a,
body.text-to-speech blockquote,
body.text-to-speech figcaption,
body.text-to-speech label {
    cursor: pointer !important;
}

body.text-to-speech p:hover,
body.text-to-speech h1:hover,
body.text-to-speech h2:hover,
body.text-to-speech h3:hover,
body.text-to-speech h4:hover,
body.text-to-speech h5:hover,
body.text-to-speech h6:hover,
body.text-to-speech li:hover,
body.text-to-speech blockquote:hover {
    outline: 2px dashed #00c1de !important;
    outline-offset: 2px;
}

.tts-highlight {
    background: #ffeb3b !important;
    color: #000 !important;
    outline: 3px solid #f9a825 !important;
    outline-offset: 2px;
    transition: background 0.2s;
}

/* TTS Kontrol Barı */
.tts-control-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1f4f5c;
    color: white;
    z-index: 9997;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.2);
    animation: tts-slide-up 0.3s ease;
}

@keyframes tts-slide-up {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.tts-control-bar-inner {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.tts-label {
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
}

.tts-buttons {
    display: flex;
    gap: 8px;
}

.tts-buttons button {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.tts-buttons button:hover {
    background: rgba(255, 255, 255, 0.3);
}

.tts-rate-btn {
    width: auto !important;
    padding: 0 12px !important;
    border-radius: 18px !important;
    font-size: 13px !important;
    font-weight: 700;
}

.tts-status {
    font-size: 13px;
    opacity: 0.8;
    flex: 1;
    text-align: right;
}

@media (max-width: 768px) {
    .tts-control-bar-inner {
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px 15px;
    }

    .tts-label {
        font-size: 13px;
    }

    .tts-status {
        width: 100%;
        text-align: center;
        font-size: 12px;
    }
}

/* 12. Okuma Kılavuzu */
.reading-guide-line {
    position: fixed;
    left: 0;
    right: 0;
    height: 40px;
    background: rgba(255, 235, 59, 0.15);
    border-top: 2px solid rgba(0, 193, 222, 0.6);
    border-bottom: 2px solid rgba(0, 193, 222, 0.6);
    z-index: 9990;
    pointer-events: none;
    transition: top 0.05s linear;
}

/* 13. Disleksi Dostu Font */
body.dyslexia-font,
body.dyslexia-font * {
    font-family: 'Atkinson Hyperlegible', sans-serif !important;
}

/* 14. Odak Modu */
body.focus-mode .wp-block-baun-blocks-baun-header,
body.focus-mode .wp-block-baun-blocks-baun-top-menu,
body.focus-mode .wp-block-baun-blocks-baun-header-utility-menu,
body.focus-mode footer,
body.focus-mode .wp-block-baun-blocks-baun-footer-menu,
body.focus-mode .wp-block-baun-blocks-baun-cta-bar,
body.focus-mode .wp-block-baun-blocks-baun-hero__slider-controls,
body.focus-mode .accessibility-widget-button {
    opacity: 0.15 !important;
    transition: opacity 0.3s;
}

body.focus-mode .wp-block-baun-blocks-baun-header:hover,
body.focus-mode .wp-block-baun-blocks-baun-top-menu:hover,
body.focus-mode .wp-block-baun-blocks-baun-header-utility-menu:hover,
body.focus-mode footer:hover,
body.focus-mode .wp-block-baun-blocks-baun-footer-menu:hover,
body.focus-mode .wp-block-baun-blocks-baun-cta-bar:hover,
body.focus-mode .accessibility-widget-button:hover {
    opacity: 1 !important;
}

/* Yüksek kontrast modunda yeni özellikler */
body.high-contrast .tts-control-bar {
    background: #000 !important;
    border-top: 2px solid #fff;
}

body.high-contrast .tts-highlight {
    background: #ffff00 !important;
    color: #000 !important;
}

body.high-contrast .reading-guide-line {
    background: rgba(255, 255, 0, 0.2);
    border-color: #ffff00;
}

body.high-contrast .accessibility-section-title {
    color: #00c1de !important;
    border-color: #444 !important;
}