/* ============================================================
   Finike Belediyesi — Erişilebilirlik Paneli CSS v2
   ============================================================ */

/* ── Skip-to-content (WCAG 2.4.1) ─────────────────────── */
.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
.skip-link:focus {
    position: fixed;
    left: 16px;
    top: 16px;
    width: auto;
    height: auto;
    padding: 12px 24px;
    background: #fd7e14;
    color: #fff;
    border-radius: 8px;
    z-index: 99999;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(0,0,0,.25);
}

/* ── Focus görünürlüğü (WCAG 2.4.7) ───────────────────── */
:focus-visible {
    outline: 2.5px solid #fd7e14 !important;
    outline-offset: 3px !important;
    border-radius: 3px;
}

/* ── Tetikleyici buton ─────────────────────────────────── */
#acc-trigger-btn {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 56px;
    height: 56px;
    background: #0b1c3a;
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10003;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: transform 0.2s, background 0.2s;
    padding: 0;
}
#acc-trigger-btn:hover { background: #1a4175; transform: scale(1.05); }
#acc-trigger-btn i { font-size: 1.8rem; line-height: 1; }
#acc-trigger-btn .acc-trigger-label { display: none; }

/* ── Odak Maskesi (ADHD Dostu Profil için) ─────────────── */
#acc-reading-mask {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9988;
    background: rgba(0, 0, 0, 0.6);
    /* JS will update the custom properties to track mouse Y */
    clip-path: polygon(
        0% 0%, 100% 0%, 
        100% calc(var(--mask-y, 50vh) - 60px), 
        0% calc(var(--mask-y, 50vh) - 60px),
        0% calc(var(--mask-y, 50vh) + 60px), 
        100% calc(var(--mask-y, 50vh) + 60px), 
        100% 100%, 0% 100%
    );
}
body.acc-reading-mask-active #acc-reading-mask {
    display: block;
}

/* ── Overlay ───────────────────────────────────────────── */
#acc-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.35);
    z-index: 10004;
    backdrop-filter: blur(2px);
}
#acc-overlay.open { display: block; }

/* ── Panel gövdesi ─────────────────────────────────────── */
#acc-panel {
    position: fixed;
    right: -390px;
    top: 0;
    width: 370px;
    height: 100vh;
    background: #fff;
    font-family: inherit;
    z-index: 10005;
    display: flex;
    flex-direction: column;
    box-shadow: -8px 0 40px rgba(0,0,0,.18);
    transition: right .33s cubic-bezier(.4,0,.2,1), visibility .33s;
    overflow: hidden;
    border-radius: 12px 0 0 12px;
    visibility: hidden;
}
#acc-panel.open { right: 0; visibility: visible; }

/* Panel header */
.acc-panel-header {
    background: linear-gradient(135deg,#1a4175,#2a5aa0);
    color: #fff;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}
.acc-panel-header h2 {
    font-size: .95rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.acc-panel-header h2 i { font-size: 1.1rem; }
#acc-close-btn {
    background: rgba(255,255,255,.15);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
    flex-shrink: 0;
}
#acc-close-btn:hover { background: rgba(255,255,255,.3); }

/* Kaydırılabilir alan */
.acc-panel-body {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 90px;
}
.acc-panel-body::-webkit-scrollbar { width: 4px; }
.acc-panel-body::-webkit-scrollbar-track { background: #f1f3f6; }
.acc-panel-body::-webkit-scrollbar-thumb { background: #c0c8d8; border-radius: 4px; }

/* Bölüm başlıkları */
.acc-section-title {
    font-size: .7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #6b7280;
    padding: 14px 18px 7px;
    border-bottom: 1px solid #f1f3f6;
    display: flex;
    align-items: center;
    gap: 7px;
}
.acc-section-title i { font-size: .85rem; color: #1a4175; }

/* ── Profil kartları ───────────────────────────────────── */
.acc-profiles-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
    padding: 10px 14px;
}
.acc-profile-card {
    background: #f8faff;
    border: 2px solid #e8edf5;
    border-radius: 10px;
    padding: 11px 8px;
    cursor: pointer;
    text-align: center;
    transition: all .2s;
    user-select: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.acc-profile-card:hover { border-color: #1a4175; background: #eef3fb; transform: translateY(-1px); }
.acc-profile-card.active { border-color: #fd7e14; background: #fff5ec; box-shadow: 0 2px 10px rgba(253,126,20,.2); }
.acc-profile-card .profile-icon {
    font-size: 1.4rem;
    color: #1a4175;
    line-height: 1;
}
.acc-profile-card.active .profile-icon { color: #fd7e14; }
.acc-profile-card .profile-name {
    font-size: .7rem;
    font-weight: 700;
    color: #374151;
    line-height: 1.3;
}

/* ── Toggle satırları ──────────────────────────────────── */
.acc-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 18px;
    border-bottom: 1px solid #f1f3f6;
}
.acc-row-label {
    font-size: .84rem;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 9px;
    flex: 1;
    padding-right: 10px;
}
.acc-row-label i { font-size: 1rem; color: #64748b; width: 18px; text-align: center; flex-shrink: 0; }

/* ── iOS Toggle ────────────────────────────────────────── */
.acc-ios-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 30px;
    flex-shrink: 0;
    cursor: pointer;
}
.acc-ios-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.acc-ios-slider {
    position: absolute;
    inset: 0;
    background: #cdd1d9;
    border-radius: 34px;
    transition: background .27s cubic-bezier(.4,0,.2,1);
}
.acc-ios-slider::before {
    content: "";
    position: absolute;
    width: 24px;
    height: 24px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform .27s cubic-bezier(.4,0,.2,1);
    box-shadow: 0 2px 6px rgba(0,0,0,.22);
}
.acc-ios-toggle input:checked + .acc-ios-slider { background: #34c759; }
.acc-ios-toggle input:checked + .acc-ios-slider::before { transform: translateX(20px); }
.acc-ios-toggle input:focus + .acc-ios-slider { outline: 2px solid #34c75980; outline-offset: 2px; }

/* ── Boyut kontrolleri ─────────────────────────────────── */
.acc-size-control { display: flex; align-items: center; gap: 5px; flex-shrink: 0; }
.acc-size-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid #e8edf5;
    background: #f8faff;
    font-weight: 700;
    font-size: .82rem;
    cursor: pointer;
    transition: all .18s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.acc-size-btn:hover { border-color: #1a4175; color: #1a4175; background: #eef3fb; }
.acc-size-display { font-size: .75rem; font-weight: 700; color: #6b7280; min-width: 40px; text-align: center; }

/* ── Segment buton ─────────────────────────────────────── */
.acc-segment { display: flex; border: 2px solid #e8edf5; border-radius: 8px; overflow: hidden; flex-shrink: 0; }
.acc-seg-btn {
    flex: 1;
    padding: 7px 6px;
    font-size: .72rem;
    font-weight: 700;
    border: none;
    background: #f8faff;
    cursor: pointer;
    transition: all .18s;
    white-space: nowrap;
    color: #374151;
}
.acc-seg-btn + .acc-seg-btn { border-left: 1px solid #e8edf5; }
.acc-seg-btn.active { background: #1a4175; color: #fff; }
.acc-seg-btn:hover:not(.active) { background: #eef3fb; }

/* ── Renk seçici ───────────────────────────────────────── */
.acc-color-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-bottom: 1px solid #f1f3f6;
}
.acc-color-label { font-size: .82rem; font-weight: 600; color: #374151; flex: 1; display: flex; align-items: center; gap: 7px; }
.acc-color-label i { color: #64748b; }
.acc-color-input { width: 34px; height: 34px; border: none; border-radius: 8px; cursor: pointer; padding: 2px; background: none; }
.acc-color-reset { background: none; border: 1px solid #e8edf5; border-radius: 6px; padding: 4px 8px; font-size: .7rem; cursor: pointer; color: #6b7280; transition: all .18s; flex-shrink: 0; }
.acc-color-reset:hover { border-color: #e74c3c; color: #e74c3c; }

/* ── Sabit alt çubuk ───────────────────────────────────── */
.acc-panel-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 2px solid #f1f3f6;
    padding: 12px 14px;
    display: flex;
    gap: 8px;
}
.acc-reset-btn {
    flex: 1;
    padding: 10px;
    background: #f1f3f6;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: .83rem;
    cursor: pointer;
    color: #374151;
    transition: all .2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.acc-reset-btn:hover { background: #e74c3c; color: #fff; }
.acc-statement-btn {
    padding: 10px 12px;
    background: #1a4175;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: .76rem;
    cursor: pointer;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background .2s;
    flex-shrink: 0;
    white-space: nowrap;
}
.acc-statement-btn:hover { background: #fd7e14; color: #fff; }

/* ── Body sınıf efektleri (filter olmayan) ─────────────── */
body.acc-stop-motion *,
body.acc-stop-motion *::before,
body.acc-stop-motion *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
}

body.acc-hide-images img,
body.acc-hide-images video,
body.acc-hide-images figure { visibility: hidden !important; }

body.acc-dyslexia-font,
body.acc-dyslexia-font * {
    font-family: 'OpenDyslexic','Arial',sans-serif !important;
    letter-spacing: .05em !important;
    word-spacing: .15em !important;
}

body.acc-link-highlight a,
body.acc-link-highlight a * {
    outline: 3px solid #ff69b4 !important;
    background: #fff0f6 !important;
    color: #000 !important;
    outline-offset: 2px;
    border-radius: 2px;
}

body.acc-link-highlight a:focus,
body.acc-link-highlight a:focus-visible,
body.acc-link-highlight a:focus *,
body.acc-link-highlight a:focus-visible * {
    outline: 4px solid #000 !important;
    background: #ffeb3b !important;
    color: #000 !important;
}

body.acc-heading-highlight h1,
body.acc-heading-highlight h2,
body.acc-heading-highlight h3,
body.acc-heading-highlight h4,
body.acc-heading-highlight h5,
body.acc-heading-highlight h1 *,
body.acc-heading-highlight h2 *,
body.acc-heading-highlight h3 *,
body.acc-heading-highlight h4 *,
body.acc-heading-highlight h5 * {
    background: #fffde7 !important;
    color: #000 !important;
}
body.acc-heading-highlight h1,
body.acc-heading-highlight h2,
body.acc-heading-highlight h3,
body.acc-heading-highlight h4,
body.acc-heading-highlight h5 {
    border-left: 4px solid #f39c12 !important;
    padding-left: 8px !important;
}

body.acc-readable * {
    line-height: 1.85 !important;
    letter-spacing: .04em !important;
    word-spacing: .12em !important;
}

body.acc-large-cursor,
body.acc-large-cursor * {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath fill='%23000' d='M0 0l8 24 5-5 5 8 3-2-5-8 7-1z'/%3E%3C/svg%3E") 0 0, auto !important;
}

/* Mobil */
@media (max-width: 480px) {
    #acc-panel { width: 100vw; border-radius: 0; }
}
