/* Menu aksesibilitas (WCAG 2.2). Mode aktif lewat kelas html.a11y-* yang diatur accessibility-core.js.
   Aturan mode tidak berlaku di dalam .a11y-root agar panel menu tetap terbaca. */

.a11y-root {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #1f2937;
}

.a11y-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.a11y-skip-link {
  position: absolute;
  top: -100px;
  left: 8px;
  z-index: 100000;
  padding: 10px 14px;
  background: #000000;
  color: #ffffff;
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
}

.a11y-skip-link:focus {
  top: 8px;
}

.a11y-root :focus-visible {
  outline: 3px solid #0b3d91;
  outline-offset: 2px;
}

.a11y-ico {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

/* Tombol pembuka */

.a11y-launcher {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: auto;
  min-width: 76px;
  max-width: 96px;
  padding: 14px 8px;
  border: 0;
  border-radius: 14px 0 0 14px;
  background: #0b3d91;
  color: #ffffff;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  cursor: pointer;
}

.a11y-launcher .a11y-ico {
  width: 28px;
  height: 28px;
}

.a11y-launcher:hover {
  background: #0a3480;
}

.a11y-launcher[aria-expanded="true"] {
  background: #ffffff;
  color: #0b3d91;
}

.a11y-launcher:focus-visible {
  outline: 3px solid #0b3d91;
  outline-offset: 3px;
}

/* Panel */

.a11y-panel {
  position: fixed;
  right: 88px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  width: min(440px, calc(100vw - 112px));
  max-height: calc(100vh - 32px);
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.a11y-panel[hidden] {
  display: none;
}

/* Tema situs memberi header { width: 100% }; border-box mencegah padding melebarkan header. */
.a11y-panel__header {
  box-sizing: border-box;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  background: linear-gradient(135deg, #0b3d91, #1e5bc6);
  color: #ffffff;
}

.a11y-panel__heading h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
  color: #ffffff;
}

.a11y-panel__heading h2:focus {
  outline: none;
}

.a11y-panel__hint {
  margin: 4px 0 0;
  font-size: 13px;
  color: #dbe7ff;
}

.a11y-panel__hint kbd {
  padding: 0 5px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font: inherit;
  font-size: 12px;
}

.a11y-panel__header :focus-visible {
  outline-color: #ffbf47;
}

.a11y-panel__body {
  flex: 1 1 auto;
  padding: 14px 18px 4px;
  overflow-y: auto;
}

.a11y-panel__footer {
  box-sizing: border-box;
  display: flex;
  justify-content: flex-end;
  padding: 12px 18px;
  border-top: 1px solid #e5e7eb;
}

.a11y-icon-btn {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  background: transparent;
  color: #ffffff;
  cursor: pointer;
}

.a11y-icon-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.a11y-summary {
  margin: 0 0 4px;
  padding: 10px 12px;
  border-left: 4px solid #0b3d91;
  border-radius: 6px;
  background: #eef4ff;
  color: #0b2e6b;
  font-size: 14px;
}

.a11y-section {
  margin-top: 18px;
}

.a11y-section__title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
  color: #0b2e6b;
}

.a11y-hint {
  margin: 0 0 10px;
  font-size: 13px;
  color: #4b5563;
}

/* Kartu pilihan */

.a11y-grid {
  display: grid;
  gap: 8px;
}

.a11y-grid--2,
.a11y-grid--3 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.a11y-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 64px;
  padding: 10px;
  box-sizing: border-box;
  border: 2px solid #cbd5e1;
  border-radius: 12px;
  background: #ffffff;
  color: #1f2937;
  cursor: pointer;
}

.a11y-card:hover {
  border-color: #0b3d91;
}

.a11y-card:focus-within {
  outline: 3px solid #0b3d91;
  outline-offset: 2px;
}

.a11y-card__input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.a11y-card__icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #e8efff;
  color: #0b3d91;
}

.a11y-card__icon .a11y-ico {
  width: 20px;
  height: 20px;
}

.a11y-card__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.a11y-card__text strong {
  font-size: 14px;
  line-height: 1.3;
}

.a11y-card__text small {
  font-size: 12px;
  line-height: 1.35;
  color: #4b5563;
}

.a11y-card.is-on {
  border-color: #0b3d91;
  background: #eef4ff;
  box-shadow: inset 0 0 0 1px #0b3d91;
}

.a11y-card.is-on .a11y-card__icon {
  background: #0b3d91;
  color: #ffffff;
}

.a11y-card.is-on::after {
  content: "";
  position: absolute;
  top: 9px;
  right: 9px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #0b3d91;
}

.a11y-card.is-locked {
  border-style: dashed;
  cursor: default;
}

.a11y-card.is-locked::before {
  content: "Dari profil";
  position: absolute;
  top: -9px;
  right: 8px;
  padding: 0 6px;
  border-radius: 6px;
  background: #0b3d91;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
}

/* Ukuran teks */

.a11y-stepper {
  display: flex;
  align-items: center;
  gap: 12px;
}

.a11y-stepper output {
  min-width: 72px;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
}

/* Tombol dan kontrol */

.a11y-btn {
  min-height: 40px;
  min-width: 44px;
  padding: 6px 14px;
  border: 2px solid #0b3d91;
  border-radius: 8px;
  background: #ffffff;
  color: #0b3d91;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.a11y-btn:hover {
  background: #eef4ff;
}

.a11y-btn--primary {
  background: #0b3d91;
  color: #ffffff;
}

.a11y-btn--primary:hover {
  background: #0a3480;
}

.a11y-btn[aria-disabled="true"],
.a11y-btn:disabled {
  border-color: #9ca3af;
  background: #e5e7eb;
  color: #4b5563;
  cursor: not-allowed;
}

.a11y-voice {
  margin-top: 18px;
  padding: 14px;
  border: 2px solid #0b3d91;
  border-radius: 12px;
  background: #f8fbff;
}

.a11y-voice__head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.a11y-voice__head .a11y-card__icon {
  margin-top: 2px;
}

.a11y-voice__title {
  flex: 1 1 auto;
  min-width: 0;
}

.a11y-voice__title .a11y-hint {
  margin-bottom: 0;
}

.a11y-voice__controls {
  display: grid;
  gap: 10px;
  margin: 12px 0;
}

.a11y-option {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.a11y-option input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.a11y-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 14px;
}

.a11y-field select {
  min-height: 36px;
  padding: 4px 8px;
  border: 2px solid #6b7280;
  border-radius: 6px;
  background: #ffffff;
  color: #111827;
  font: inherit;
}

.a11y-field select:disabled {
  background: #e5e7eb;
  color: #4b5563;
}

.a11y-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.a11y-status {
  min-height: 1.4em;
  margin: 8px 0 0;
  font-size: 14px;
  color: #0b2e6b;
}

.a11y-switch {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.a11y-switch input {
  position: relative;
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 auto;
  width: 46px;
  height: 26px;
  margin: 0;
  border-radius: 13px;
  background: #6b7280;
  cursor: pointer;
  transition: background-color 0.15s;
}

.a11y-switch input::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  transition: transform 0.15s;
}

.a11y-switch input:checked {
  background: #0b3d91;
}

.a11y-switch input:checked::before {
  transform: translateX(20px);
}

.a11y-switch input:focus-visible {
  outline: 3px solid #0b3d91;
  outline-offset: 2px;
}

.a11y-switch__text--on {
  display: none;
}

.a11y-switch input:checked ~ .a11y-switch__text--on {
  display: inline;
}

.a11y-switch input:checked ~ .a11y-switch__text--off {
  display: none;
}

/* Elemen pendukung mode */

.a11y-line-guide {
  position: fixed;
  left: 0;
  right: 0;
  height: 2.2em;
  transform: translateY(-50%);
  background: rgba(255, 221, 0, 0.25);
  border-top: 2px solid #111111;
  border-bottom: 2px solid #111111;
  pointer-events: none;
  z-index: 99998;
}

#sub-menu #scrollingtext.a11y-ticker-paused {
  animation-play-state: paused !important;
}

::highlight(a11y-read) {
  background-color: #ffe14d;
  color: #000000;
}

/* Mode tampilan */

html.a11y-dyslexia body :not(.a11y-root):not(.a11y-root *) {
  font-family: Verdana, Tahoma, "Trebuchet MS", Arial, sans-serif !important;
  font-style: normal !important;
}

html.a11y-dyslexia body p,
html.a11y-dyslexia body li,
html.a11y-dyslexia body td,
html.a11y-dyslexia body dd,
html.a11y-dyslexia body blockquote {
  letter-spacing: 0.06em !important;
  word-spacing: 0.16em !important;
  line-height: 1.9 !important;
}

html.a11y-spacing body p,
html.a11y-spacing body li,
html.a11y-spacing body td,
html.a11y-spacing body th,
html.a11y-spacing body dd,
html.a11y-spacing body dt,
html.a11y-spacing body blockquote {
  line-height: 1.8 !important;
  letter-spacing: 0.02em !important;
  word-spacing: 0.12em !important;
}

html.a11y-left-align body :is(p, h1, h2, h3, h4, h5, h6, li, td, th, dd, dt, blockquote, label, a, span, div):not(.a11y-root *) {
  text-align: left !important;
}

html.a11y-hide-images body img:not(.a11y-root *),
html.a11y-hide-images body picture:not(.a11y-root *),
html.a11y-hide-images body svg:not(.a11y-root *) {
  visibility: hidden !important;
}

html.a11y-contrast-high body {
  background: #000000 !important;
  color: #ffffff !important;
}

html.a11y-contrast-high body *:not(.a11y-root *) {
  background-color: #000000 !important;
  background-image: none !important;
  color: #ffffff !important;
  border-color: #ffffff !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

html.a11y-contrast-high body a,
html.a11y-contrast-high body a *:not(.a11y-root *) {
  color: #ffff00 !important;
  text-decoration: underline !important;
}

html.a11y-contrast-high body button,
html.a11y-contrast-high body input,
html.a11y-contrast-high body select,
html.a11y-contrast-high body textarea {
  border: 2px solid #ffffff !important;
}

html.a11y-contrast-high .a11y-root,
html.a11y-contrast-high .a11y-root * {
  color: #ffffff !important;
}

html.a11y-contrast-high .a11y-launcher,
html.a11y-contrast-high .a11y-panel,
html.a11y-contrast-high .a11y-panel__header,
html.a11y-contrast-high .a11y-panel__footer,
html.a11y-contrast-high .a11y-card,
html.a11y-contrast-high .a11y-card__icon,
html.a11y-contrast-high .a11y-btn,
html.a11y-contrast-high .a11y-icon-btn,
html.a11y-contrast-high .a11y-summary,
html.a11y-contrast-high .a11y-voice,
html.a11y-contrast-high .a11y-field select {
  background: #000000 !important;
  border-color: #ffffff !important;
  box-shadow: none !important;
}

html.a11y-contrast-high .a11y-root h2,
html.a11y-contrast-high .a11y-root .a11y-section__title {
  color: #ffff00 !important;
}

html.a11y-contrast-high .a11y-card.is-on,
html.a11y-contrast-high .a11y-summary {
  border-color: #ffff00 !important;
  box-shadow: inset 0 0 0 2px #ffff00 !important;
}

html.a11y-contrast-high .a11y-card.is-on::after {
  background: #ffff00;
}

html.a11y-contrast-high .a11y-launcher[aria-expanded="true"] {
  background: #ffff00 !important;
  color: #000000 !important;
}

html.a11y-contrast-high .a11y-launcher[aria-expanded="true"] * {
  color: #000000 !important;
}

html.a11y-contrast-high .a11y-btn--primary {
  background: #ffff00 !important;
  color: #000000 !important;
}

html.a11y-contrast-high .a11y-root .a11y-btn--primary,
html.a11y-contrast-high .a11y-root .a11y-btn--primary * {
  color: #000000 !important;
}

html.a11y-contrast-high .a11y-switch input:checked {
  background: #ffff00;
}

html.a11y-contrast-high .a11y-switch input:checked::before {
  background: #000000;
}

html.a11y-contrast-high .a11y-line-guide,
html.a11y-line-focus .a11y-line-guide {
  border-color: #ffffff;
}

html.a11y-grayscale body > :not(.a11y-root) {
  filter: grayscale(100%);
}

html.a11y-links body a:not(.a11y-root *) {
  text-decoration: underline !important;
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
}

html.a11y-focus-strong body :focus-visible:not(.a11y-root *) {
  outline: 4px solid #ffdd00 !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 7px #000000 !important;
}

html.a11y-big-cursor,
html.a11y-big-cursor * {
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='36' height='36' viewBox='0 0 36 36'><path d='M5 2 L5 30 L12 23 L17 34 L21 32 L16 21 L26 21 Z' fill='black' stroke='white' stroke-width='2.5' stroke-linejoin='round'/></svg>") 5 2, auto !important;
}

html.a11y-big-cursor a,
html.a11y-big-cursor button,
html.a11y-big-cursor [role="button"],
html.a11y-big-cursor label {
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='36' height='36' viewBox='0 0 36 36'><path d='M13 4 L13 17 L7 17 L18 32 L29 17 L23 17 L23 4 Z' fill='black' stroke='white' stroke-width='2.5' stroke-linejoin='round'/></svg>") 18 4, pointer !important;
}

html.a11y-pause-motion *,
html.a11y-pause-motion *::before,
html.a11y-pause-motion *::after {
  transition-duration: 0.01ms !important;
  transition-delay: 0s !important;
  scroll-behavior: auto !important;
}

html.a11y-large-targets body :is(button, [type="button"], [type="submit"], select, .sf-menu a, #sub-menu a):not(.a11y-root *) {
  min-height: 44px !important;
  min-width: 44px !important;
  box-sizing: border-box;
}

html.a11y-large-targets body :is(.sf-menu a, #sub-menu a):not(.a11y-root *) {
  display: flex;
  align-items: center;
}

/* Responsif */

@media (max-width: 480px) {
  .a11y-launcher {
    top: auto;
    bottom: 16px;
    transform: none;
    flex-direction: row;
    width: auto;
    padding: 10px 14px;
    border-radius: 999px 0 0 999px;
    font-size: 14px;
  }

  .a11y-panel {
    top: 8px;
    right: 8px;
    bottom: 8px;
    left: 8px;
    width: auto;
    max-height: none;
    transform: none;
  }
}

@media (max-width: 400px) {
  .a11y-grid--2,
  .a11y-grid--3 {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* The theme's top nav uses fixed heights, fixed widths and a 0.1px line-height, which break when text is enlarged. Relax them only while the font scale is above 100%. */
html:not([data-a11y-font="100"]) header nav.navigation .sf-menu > li > a {
  height: auto;
  min-height: 40px;
  line-height: 1.3;
  white-space: normal;
}

html:not([data-a11y-font="100"]) header nav.navigation .sf-menu li ul {
  width: auto;
  min-width: 180px;
  max-width: min(360px, 90vw);
}

html:not([data-a11y-font="100"]) header nav.navigation .sf-menu li ul li a {
  height: auto;
  line-height: 1.3;
  white-space: normal;
}

html:not([data-a11y-font="100"]) header nav.navigation .sf-menu li li ul {
  left: 100%;
}

@media (prefers-reduced-motion: reduce) {
  .a11y-root *,
  .a11y-root *::before {
    transition: none !important;
  }
}
