/* KS pristupačnost portala — gumb "Aa" + panel. Neutralno dok se ne uključi. */

/* ---------- Plutajući gumb ---------- */
#ksa11y-btn {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 99990;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid #C9A44C;
  background: #fffdf7;
  color: #082946;
  font: 700 19px/1 Georgia, serif;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(8, 41, 70, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
#ksa11y-btn:hover { background: #C9A44C; color: #3A2C05; }
#ksa11y-btn:focus-visible { outline: 3px solid #C9A44C; outline-offset: 2px; }

/* ---------- Panel ---------- */
#ksa11y-panel {
  position: fixed;
  right: 16px;
  bottom: 78px;
  z-index: 99991;
  width: min(92vw, 320px);
  background: #FBF8F1;
  color: #20180a;
  border: 1px solid #E4DCC8;
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.3);
  padding: 16px;
  display: none;
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.4;
  text-align: left;
}
#ksa11y-panel.open { display: block; }
#ksa11y-panel h2 {
  font: 700 17px/1.2 Georgia, serif;
  color: #0a294a;
  margin: 0 0 12px;
  padding: 0;
  border: none;
}
.ksa11y-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid #EEE7D7;
}
.ksa11y-row:last-of-type { border-bottom: none; }
.ksa11y-row > span { flex: 1; }
.ksa11y-seg { display: flex; gap: 6px; }
.ksa11y-seg button,
.ksa11y-toggle {
  background: #EEE3CB;
  color: #20180a;
  border: 2px solid transparent;
  border-radius: 9px;
  font: 700 14px/1 inherit;
  min-width: 42px;
  min-height: 38px;
  padding: 6px 10px;
  cursor: pointer;
}
.ksa11y-seg button:hover, .ksa11y-toggle:hover { background: #C9A44C; color: #3A2C05; }
.ksa11y-toggle[aria-pressed="true"] { background: #082946; color: #FBF8F1; }
#ksa11y-reset {
  display: block;
  width: 100%;
  margin-top: 12px;
  background: none;
  border: 1px solid #E4DCC8;
  border-radius: 9px;
  color: #736446;
  font: 600 13px/1 inherit;
  padding: 10px;
  cursor: pointer;
}
#ksa11y-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  font-size: 20px;
  line-height: 1;
  color: #736446;
  cursor: pointer;
  padding: 6px 9px;
}

/* ---------- Efekti ---------- */
/* Veličina: zoom skalira sve (moderni preglednici); rezerva preko font-size */
html.ksa11y-fs1 body { zoom: 1.08; }
html.ksa11y-fs2 body { zoom: 1.18; }
html.ksa11y-fs3 body { zoom: 1.32; }
@supports not (zoom: 1) {
  html.ksa11y-fs1 { font-size: 108%; }
  html.ksa11y-fs2 { font-size: 118%; }
  html.ksa11y-fs3 { font-size: 132%; }
}

/* Veći razmak redaka */
html.ksa11y-sp body p,
html.ksa11y-sp body li,
html.ksa11y-sp body dd,
html.ksa11y-sp body blockquote { line-height: 2 !important; }

/* Font za disleksiju */
@font-face {
  font-family: "OpenDyslexic";
  src: url("../fonts/OpenDyslexic-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "OpenDyslexic";
  src: url("../fonts/OpenDyslexic-Bold.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
html.ksa11y-dys body,
html.ksa11y-dys body * { font-family: "OpenDyslexic", Georgia, serif !important; }
html.ksa11y-dys body { letter-spacing: 0.02em; word-spacing: 0.08em; }

/* Visoki kontrast: crno + žuto, slike ostaju */
html.ksa11y-hc, html.ksa11y-hc body { background: #000 !important; }
html.ksa11y-hc body :not(img):not(svg):not(video):not(iframe) {
  background-color: #000 !important;
  color: #ffdd00 !important;
  border-color: #ffdd00 !important;
  box-shadow: none !important;
  text-shadow: none !important;
}
html.ksa11y-hc body a { color: #ffd700 !important; text-decoration: underline !important; }
html.ksa11y-hc body img { opacity: 0.95; }
html.ksa11y-hc #ksa11y-btn { background: #000; color: #ffdd00; border-color: #ffdd00; }
html.ksa11y-hc #ksa11y-panel { border-color: #ffdd00; }
html.ksa11y-hc .ksa11y-toggle[aria-pressed="true"] { background: #ffdd00 !important; color: #000 !important; }

@media (prefers-reduced-motion: reduce) { #ksa11y-panel, #ksa11y-btn { transition: none; } }
@media print { #ksa11y-btn, #ksa11y-panel { display: none !important; } }
