/* Toolbar aksesibilitas (difabel) — MTsN1 */

.mtsn-a11y-skip {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    z-index: 100000;
    padding: 12px 20px;
    background: #1e4d8c;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    border-radius: 0 0 8px 0;
}

.mtsn-a11y-skip:focus {
    left: 0;
    top: 0;
    width: auto;
    height: auto;
    overflow: visible;
    outline: 3px solid #f4c430;
    outline-offset: 2px;
}

.mtsn-a11y-widget {
    position: fixed;
    left: 12px;
    bottom: 16px;
    z-index: 99990;
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    pointer-events: none;
}

.mtsn-a11y-fab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 8px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(30, 77, 140, 0.88) 0%, rgba(0, 166, 81, 0.88) 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(30, 77, 140, 0.28);
    cursor: pointer;
    opacity: 0.72;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    pointer-events: auto;
}

.mtsn-a11y-fab:hover,
.mtsn-a11y-fab:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(30, 77, 140, 0.4);
    opacity: 1;
    outline: 2px solid #f4c430;
    outline-offset: 2px;
}

.mtsn-a11y-fab-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
}

.mtsn-a11y-fab-icon svg {
    width: 20px;
    height: 20px;
}

.mtsn-a11y-fab-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.mtsn-a11y-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: -1;
    pointer-events: auto;
}

.mtsn-a11y-panel {
    position: fixed;
    left: 12px;
    bottom: 64px;
    width: min(380px, calc(100vw - 32px));
    max-height: min(72vh, 640px);
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.28);
    border: 1px solid rgba(30, 77, 140, 0.12);
    overflow: hidden;
    pointer-events: auto;
}

.mtsn-a11y-panel[hidden],
.mtsn-a11y-backdrop[hidden] {
    display: none !important;
}

.mtsn-a11y-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 18px 14px;
    background: linear-gradient(135deg, #006838 0%, #007a3d 55%, #c9a227 100%);
    color: #fff;
}

.mtsn-a11y-panel-title {
    margin: 0 0 4px;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.25;
}

.mtsn-a11y-panel-sub {
    margin: 0;
    font-size: 12px;
    line-height: 1.45;
    opacity: 0.92;
}

.mtsn-a11y-close {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    cursor: pointer;
    font-size: 16px;
}

.mtsn-a11y-close:hover,
.mtsn-a11y-close:focus-visible {
    background: rgba(255, 255, 255, 0.35);
    outline: 2px solid #f4c430;
}

.mtsn-a11y-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 14px 14px 8px;
}

.mtsn-a11y-group {
    margin-bottom: 14px;
}

.mtsn-a11y-group h3 {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #1e4d8c;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mtsn-a11y-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.mtsn-a11y-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 72px;
    padding: 10px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    color: #1e293b;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.mtsn-a11y-btn i {
    font-size: 18px;
    color: #1e4d8c;
}

.mtsn-a11y-btn:hover,
.mtsn-a11y-btn:focus-visible {
    background: #eef4ff;
    border-color: #93b4e8;
    outline: none;
}

.mtsn-a11y-btn.is-active {
    background: #1e4d8c;
    border-color: #1e4d8c;
    color: #fff;
}

.mtsn-a11y-btn.is-active i {
    color: #fff;
}

.mtsn-a11y-btn-highlight {
    background: linear-gradient(135deg, #ecfdf5 0%, #eff6ff 100%);
    border-color: #006838;
}

.mtsn-a11y-btn-highlight i {
    color: #006838;
}

.mtsn-a11y-btn-highlight:hover,
.mtsn-a11y-btn-highlight:focus-visible {
    background: linear-gradient(135deg, #d1fae5 0%, #dbeafe 100%);
}

.mtsn-a11y-tts-hint {
    margin: 0 0 10px;
    font-size: 11px;
    line-height: 1.45;
    color: #64748b;
}

.mtsn-a11y-tts-sliders {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
    padding: 10px;
    background: #f1f5f9;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.mtsn-a11y-tts-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 11px;
    font-weight: 600;
    color: #334155;
}

.mtsn-a11y-tts-field strong {
    color: #1e4d8c;
    font-weight: 800;
}

.mtsn-a11y-tts-field input[type="range"] {
    width: 100%;
    accent-color: #1e4d8c;
    cursor: pointer;
}

.mtsn-a11y-tts-select {
    width: 100%;
    padding: 7px 8px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 12px;
    background: #fff;
    color: #1e293b;
}

.mtsn-a11y-tts-player {
    position: fixed;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    z-index: 99991;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: rgba(15, 23, 42, 0.92);
    color: #fff;
    border-radius: 999px;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.35);
    pointer-events: auto;
    max-width: calc(100vw - 24px);
}

.mtsn-a11y-tts-player[hidden] {
    display: none !important;
}

.mtsn-a11y-tts-player-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    min-width: 0;
}

.mtsn-a11y-tts-player-info span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: min(220px, 48vw);
}

.mtsn-a11y-tts-player-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.mtsn-a11y-tts-player-btn {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    cursor: pointer;
    font-size: 14px;
}

.mtsn-a11y-tts-player-btn:hover,
.mtsn-a11y-tts-player-btn:focus-visible {
    background: rgba(255, 255, 255, 0.3);
    outline: 2px solid #f4c430;
}

html.a11y-tts-hover .mtsn-a11y-tts-block {
    cursor: text;
}

html.a11y-tts-hover .mtsn-a11y-tts-block:hover {
    box-shadow: inset 0 0 0 2px rgba(30, 77, 140, 0.28);
    border-radius: 4px;
}

html.a11y-tts-focus .mtsn-a11y-tts-block:focus,
html.a11y-tts-focus .mtsn-a11y-tts-block:focus-within {
    box-shadow: inset 0 0 0 2px rgba(30, 77, 140, 0.28);
    border-radius: 4px;
}

.mtsn-a11y-tts-reading {
    background: rgba(254, 240, 138, 0.35) !important;
    box-shadow: inset 0 0 0 2px #f59e0b !important;
    border-radius: 4px;
}

.mtsn-a11y-panel-foot {
    padding: 12px 14px 14px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

.mtsn-a11y-reset {
    width: 100%;
    padding: 11px 14px;
    border: none;
    border-radius: 10px;
    background: #dc2626;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.mtsn-a11y-reset:hover,
.mtsn-a11y-reset:focus-visible {
    background: #b91c1c;
    outline: 2px solid #f4c430;
    outline-offset: 2px;
}

.mtsn-a11y-status {
    margin: 8px 0 0;
    font-size: 11px;
    color: #64748b;
    min-height: 16px;
    text-align: center;
}

@media (max-width: 480px) {
    .mtsn-a11y-panel {
        left: 8px;
        right: 8px;
        width: auto;
        bottom: 58px;
        max-height: 78vh;
    }
}

/* === Mode aksesibilitas (class pada <html>) === */

html.a11y-font-1 { font-size: 106.25%; }
html.a11y-font-2 { font-size: 112.5%; }
html.a11y-font-3 { font-size: 125%; }
html.a11y-font-4 { font-size: 137.5%; }
html.a11y-font-5 { font-size: 150%; }
html.a11y-font-6 { font-size: 162.5%; }
html.a11y-font-7 { font-size: 175%; }
html.a11y-font-8 { font-size: 187.5%; }

html.a11y-line-1 body { line-height: 1.75 !important; }
html.a11y-line-2 body { line-height: 2 !important; }
html.a11y-line-1 body p,
html.a11y-line-1 body li,
html.a11y-line-2 body p,
html.a11y-line-2 body li {
    line-height: inherit !important;
}

html.a11y-spacing-1 body { letter-spacing: 0.06em; word-spacing: 0.12em; }
html.a11y-spacing-2 body { letter-spacing: 0.1em; word-spacing: 0.18em; }

html.a11y-readable body,
html.a11y-readable body button,
html.a11y-readable body input,
html.a11y-readable body select,
html.a11y-readable body textarea {
    font-family: Verdana, "Segoe UI", Tahoma, Arial, sans-serif !important;
}

html.a11y-align-left body p,
html.a11y-align-left body li,
html.a11y-align-left body h1,
html.a11y-align-left body h2,
html.a11y-align-left body h3,
html.a11y-align-left body h4,
html.a11y-align-left body h5,
html.a11y-align-left body h6,
html.a11y-align-left body .section-title {
    text-align: left !important;
}

html.a11y-high-contrast body {
    background: #000 !important;
    color: #ffff00 !important;
}

html.a11y-high-contrast body a {
    color: #00ffff !important;
}

html.a11y-high-contrast body header,
html.a11y-high-contrast body footer,
html.a11y-high-contrast body .breadcrumb-top,
html.a11y-high-contrast body .breadcrumb-bottom,
html.a11y-high-contrast body section,
html.a11y-high-contrast body .single-blog,
html.a11y-high-contrast body .admin-card {
    background: #000 !important;
    color: #ffff00 !important;
    border-color: #ffff00 !important;
}

html.a11y-high-contrast img {
    filter: contrast(1.2);
}

html.a11y-dark body {
    background: #0f172a !important;
    color: #e2e8f0 !important;
}

html.a11y-dark body header,
html.a11y-dark body .header-top,
html.a11y-dark body .header-bottom,
html.a11y-dark body .sticky-bar,
html.a11y-dark body footer,
html.a11y-dark body .breadcrumb-bottom,
html.a11y-dark body section:not(.mtsn-a11y-widget),
html.a11y-dark body .single-blog,
html.a11y-dark body .blog-sidebar {
    background: #1e293b !important;
    color: #e2e8f0 !important;
}

html.a11y-dark body a {
    color: #7dd3fc !important;
}

html.a11y-dark body h1,
html.a11y-dark body h2,
html.a11y-dark body h3,
html.a11y-dark body h4 {
    color: #f8fafc !important;
}

html.a11y-grayscale body {
    filter: grayscale(100%);
}

html.a11y-invert body {
    filter: invert(1) hue-rotate(180deg);
}

html.a11y-invert body img,
html.a11y-invert body video,
html.a11y-invert body iframe {
    filter: invert(1) hue-rotate(180deg);
}

html.a11y-highlight-links body a {
    background: #fef08a !important;
    color: #1e3a5f !important;
    padding: 2px 4px !important;
    border-radius: 3px;
    text-decoration: underline !important;
}

html.a11y-underline-links body a {
    text-decoration: underline !important;
    text-underline-offset: 3px;
}

html.a11y-big-cursor,
html.a11y-big-cursor * {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' stroke='%23fff' stroke-width='1' d='M5 3l14 9-6 1-3 7z'/%3E%3C/svg%3E") 4 4, auto !important;
}

html.a11y-focus body a:focus-visible,
html.a11y-focus body button:focus-visible,
html.a11y-focus body input:focus-visible,
html.a11y-focus body select:focus-visible,
html.a11y-focus body textarea:focus-visible,
html.a11y-focus body [tabindex]:focus-visible {
    outline: 4px solid #f59e0b !important;
    outline-offset: 3px !important;
    box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.35) !important;
}

html.a11y-hide-images body img:not(.mtsn-a11y-widget img) {
    opacity: 0 !important;
    visibility: hidden !important;
    max-width: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
}

html.a11y-hide-images body .slider-bg-media,
html.a11y-hide-images body .blog-img,
html.a11y-hide-images body .choose-img,
html.a11y-hide-images body .site-logo-img {
    background: #cbd5e1 !important;
    min-height: 48px;
    min-width: 48px;
}

html.a11y-reduce-motion *,
html.a11y-reduce-motion *::before,
html.a11y-reduce-motion *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
}

#mtsn-main-content:focus {
    outline: 3px solid #f59e0b;
    outline-offset: 4px;
}

/* Panel, FAB & pemutar TTS tidak ikut filter mode */
html.a11y-grayscale .mtsn-a11y-widget,
html.a11y-invert .mtsn-a11y-widget,
html.a11y-grayscale .mtsn-a11y-tts-player,
html.a11y-invert .mtsn-a11y-tts-player {
    filter: none;
}

html.a11y-grayscale .mtsn-a11y-panel,
html.a11y-invert .mtsn-a11y-panel,
html.a11y-dark .mtsn-a11y-panel,
html.a11y-high-contrast .mtsn-a11y-panel {
    background: #fff !important;
    color: #1e293b !important;
}

html.a11y-high-contrast .mtsn-a11y-panel-head {
    background: #1e4d8c !important;
    color: #fff !important;
}
