@font-face {
  font-family: "OpenDyslexic";
  src: url("./fonts/OpenDyslexic-Bold.woff2") format("woff2");
  font-weight: bold;
  font-style: normal;
}

@font-face {
  font-family: "Raleway";
  src: url("./fonts/Raleway.ttf") format("truetype");
  font-weight: bold;
  font-style: normal;
}

:root {
  --bo-primary: #7a34f2;
  --access-color: #0b41cd;
  --hover-color: #2957cd;
}

html,
body {
  transform: none !important;
  overflow: visible !important;
  will-change: auto !important;
  perspective: none !important;
  backface-visibility: visible !important;
}

/* ==========================
   BASE / EFFECTS (site)
   ========================== */

.dyslexia-font {
  font-family: "OpenDyslexic", sans-serif;
  letter-spacing: -1px;
}

/* Efekti */
.no-contrast {
  filter: none !important;
  position: fixed !important;
  z-index: 9999 !important;
}

.invert-mode {
  filter: invert(1) hue-rotate(180deg);
  -webkit-filter: invert(100%);
}

body.invert-mode {
  background: #000;
}

.invert-mode img {
  filter: invert(1) hue-rotate(180deg);
}

#page-wrapper.dark-contrast {
  background: #000;
  color: #fff;
}

body.dark-contrast {
  background-color: #000000 !important;
  color: #ffff00 !important;
}

.dark-contrast a {
  color: #ffff00 !important;
  text-decoration: underline;
}

.dark-contrast h1,
.dark-contrast h2,
.dark-contrast h3,
.dark-contrast h4,
.dark-contrast h5,
.dark-contrast h6 {
  color: #ffff00 !important;
}

.dark-contrast p {
  color: #00ffcc !important;
}

.dark-contrast button {
  background-color: #222222;
  border: 2px solid #ffff00;
  color: #ffff00;
}

.dark-contrast button:hover {
  background-color: #333333;
}

.dark-contrast img {
  filter: brightness(0.8) contrast(1.2);
}

#page-wrapper.light-contrast {
  background: #fff;
  color: #000;
}

/* ==========================
   WIDGET (UI)
   ========================== */

/* Toggle dugme */
#accessibility-widget {
  position: fixed !important;
  z-index: 2147483647 !important;
}

/* bottom right (default) */
#accessibility-widget.bo-pos-bottom-right {
  bottom: 24px !important;
  right: 24px !important;
}

/* bottom left */
#accessibility-widget.bo-pos-bottom-left {
  bottom: 24px;
  left: 24px;
}

/* top right */
#accessibility-widget.bo-pos-top-right {
  top: 24px;
  right: 24px;
}

/* top left */
#accessibility-widget.bo-pos-top-left {
  top: 24px;
  left: 24px;
}

#accessibility-toggle {
  background: var(--bo-primary);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  width: 45px;
  height: 45px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  position: relative;
}

#accessibility-toggle:hover {
  transform: scale(1.07);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

#accessibility-toggle img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 0;
}

#accessibility-toggle .active-check img {
  width: 17px;
  height: 17px;
}

/* Glavni meni */
#accessibility-menu {
  position: fixed !important;
  top: 0 !important;
  width: 480px;
  height: 100vh !important;
  max-height: 100vh !important;
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  z-index: 2147483646 !important;
  overflow-x: visible !important;
  overflow-y: auto !important;
  /* pozicija se postavlja dinamicki iz JS-a */
}

#accessibility-safe-top {
  display: none;
}

/* Desna strana (default) */
#accessibility-menu.bo-menu-right {
  right: -120% !important;
  left: auto !important;
  border-radius: 8px 0 0 8px;
  transition: right 0.5s;
}
#accessibility-menu.bo-menu-right.open {
  right: 0 !important;
}

/* Leva strana */
#accessibility-menu.bo-menu-left {
  left: -120% !important;
  right: auto !important;
  border-radius: 0 8px 8px 0;
  transition: left 0.5s;
}
#accessibility-menu.bo-menu-left.open {
  left: 0 !important;
}

/* Header */
#accessibility-header {
  background: var(--bo-primary);
  color: #fff;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex: 0 0 auto;
  gap: 8px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.accessibility-title {
  margin: 0;
  flex: 1;
}

.accessibility-close {
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
  transition: opacity 0.2s;
}

.accessibility-close:hover {
  background: transparent;
  opacity: 0.8;
}

.close-btn {
  width: 30px;
  height: 30px;
}

/* ==========================
   SUBHEADER (Language / Profiles / XL)
   ========================== */

#accessibility-subheader {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  flex: 0 0 auto;
}

.bo-sub-row {
  display: flex;
  align-items: center;
  padding: 11px 14px;
  gap: 8px;
  border-bottom: 1px solid #f3f4f6;
  cursor: pointer;
  transition: background 0.15s;
}

.bo-sub-row:last-child {
  border-bottom: none;
}

.bo-sub-row:hover {
  background: #f9fafb;
}

.bo-sub-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.bo-sub-label {
  font-size: 15px;
  color: #000;
  font-weight: 500;
  flex: 1;
}

.bo-sub-xl-label {
  font-weight: 700;
  font-size: 15px;
  color: #111827;
}

.bo-sub-arrow {
  font-size: 10px;
  color: #9ca3af;
}

.bo-sub-close {
  background: #e5e7eb;
  border: none;
  color: #6b7280;
  cursor: pointer;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  flex-shrink: 0;
  transition: background 0.15s;
  padding: 0;
}

.bo-sub-close:hover {
  background: #d1d5db;
}

/* Toggle switch (XL Oversized Widget) */
.bo-toggle-switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 22px;
  flex-shrink: 0;
}

.bo-toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.bo-toggle-slider {
  position: absolute;
  inset: 0;
  background: #d1d5db;
  border-radius: 22px;
  cursor: pointer;
  transition: background 0.2s;
}

.bo-toggle-slider::before {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}

.bo-toggle-switch input:checked + .bo-toggle-slider {
  background: var(--bo-primary);
}

.bo-toggle-switch input:checked + .bo-toggle-slider::before {
  transform: translateX(16px);
}

/* XL menu mode */
#accessibility-menu.bo-xl-menu {
  width: 550px;
}

/* Move Widget row */
.bo-move-widget-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 2px;
  color: #374151;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  border-top: 1px solid #e5e7eb;
  margin-top: 8px;
  transition: color 0.15s;
}

.bo-move-widget-row:hover {
  color: var(--bo-primary);
}

.bo-move-arrow {
  margin-left: auto;
  width: 18px;
  height: 18px;
  color: #9ca3af;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    transform 0.2s ease,
    color 0.2s ease;
  flex-shrink: 0;
}

.bo-move-widget-row:hover .bo-move-arrow {
  color: var(--bo-primary);
}

.bo-move-arrow svg {
  display: block;
  width: 16px;
  height: 16px;
}

.bo-move-widget-row.open .bo-move-arrow {
  transform: rotate(90deg);
}

.bo-move-widget-panel {
  display: none;
  margin-top: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #f9fafb;
  padding: 18px 18px 10px;
}

.bo-move-widget-panel.open {
  display: block;
}

.bo-move-widget-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid #d1d5db;
  cursor: pointer;
}

.bo-move-widget-option:last-child {
  border-bottom: 1px solid #d1d5db;
}

.bo-move-widget-option-text {
  font-size: 15px;
  font-weight: 500;
  color: #374151;
}

.bo-move-widget-radio {
  appearance: none;
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border: 1.5px solid #9ca3af;
  border-radius: 50%;
  background: #fff;
  display: inline-grid;
  place-items: center;
  margin: 0;
  cursor: pointer;
}

.bo-move-widget-radio::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bo-primary);
  transform: scale(0);
  transition: transform 0.15s ease;
}

.bo-move-widget-radio:checked {
  border-color: var(--bo-primary);
}

.bo-move-widget-radio:checked::before {
  transform: scale(1);
}

/* ==========================
   LANGUAGE PANEL
   ========================== */

#accessibility-subheader {
  position: relative;
}

#bo-lang-panel {
  display: none;
  flex-direction: column;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  max-height: 260px;
  overflow: hidden;
  position: absolute;
  top: 48px;
  left: 0;
  right: 0;
  z-index: 100;
}

#bo-lang-panel.open {
  display: flex;
}

.bo-lang-search-wrap {
  position: relative;
  padding: 10px 14px;
  border-bottom: 1px solid #f3f4f6;
  flex-shrink: 0;
}

.bo-lang-search {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 8px 36px 8px 12px;
  font-size: 14px;
  color: #374151;
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s;
}

.bo-lang-search:focus {
  border-color: var(--bo-primary);
}

.bo-lang-search-icon {
  position: absolute;
  right: 26px;
  top: 37%;
  transform: translateY(-50%);
  pointer-events: none;
}

.bo-lang-list {
  overflow-y: auto;
  flex: 1;
}

.bo-lang-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid #f9fafb;
}

.bo-lang-item:hover {
  background: #f3f4f6;
}

.bo-lang-item.active {
  background: #ede9fe;
}

.bo-lang-flag {
  font-size: 20px;
  flex-shrink: 0;
  width: 28px;
  text-align: center;
}

.bo-lang-name {
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  flex: 1;
}

.bo-lang-item.active .bo-lang-name {
  color: var(--bo-primary);
  font-weight: 600;
}

.bo-lang-check {
  color: var(--bo-primary);
  flex-shrink: 0;
}

/* Opcije */
#accessibility-options {
  display: grid;
  background: #f3f4f6;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px;
  overflow: visible;
  flex: 0 0 auto;
  align-content: start;
}

#accessibility-options.bo-cols-2 {
  grid-template-columns: 1fr 1fr;
}

#accessibility-options.bo-cols-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

/* Footer */
#accessibility-footer {
  position: static;
  background: #fff;
  border-top: 1px solid #e5e7eb;
  padding: 12px 12px;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-sizing: border-box;
  width: 100%;
}

/* Reset dugme (nije fixed) */
#accessibility-reset {
  background: var(--bo-primary);
  color: #fff;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  padding: 13px 16px;
  font-size: 15px;
  cursor: pointer;
  width: 100% !important;
  min-width: 0;
  box-sizing: border-box !important;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: filter 0.2s;
}

#accessibility-reset:hover {
  filter: brightness(1.1);
}

/* Brand (fiksno u footeru) */
.accessibility-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  bottom: 0;
  z-index: 20;
  background: #fff;
  border-top: 1px solid #e5e7eb;
  padding: 12px;
  box-sizing: border-box;
  width: 100%;
  margin-top: auto;
}

.bo-manage-btn {
  background: #f3f4f6;
  color: #374151;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.15s;
}

.bo-manage-btn:hover {
  background: #e5e7eb;
}
#accessibility-widget img,
#accessibility-menu img {
  border-radius: 0 !important;
}

/* Option cards */
.accessibility-option {
  background: #fff;
  border-radius: 12px;
  border: 1.5px solid #e5e7eb;
  text-align: center;
  cursor: pointer;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 110px;
  padding: 12px 6px;
}

.accessibility-option:hover {
  border-color: var(--bo-primary);
  box-shadow: 0 0 0 1px var(--bo-primary);
}

.accessibility-option.active-option {
  border-color: var(--bo-primary);
  box-shadow: 0 0 0 1px var(--bo-primary);
}

.accessibility-icon img {
  width: 36px;
}

.accessibility-label {
  font-size: 14px;
  color: #000;
  font-weight: 700;
  line-height: 1.2;
}

/* XL mode - vece kartice, 3 kolone */
#accessibility-menu.bo-xl-menu #accessibility-options {
  grid-template-columns: 1fr 1fr 1fr !important;
}

#accessibility-menu.bo-xl-menu .accessibility-option {
  height: 135px;
  gap: 10px;
}

#accessibility-menu.bo-xl-menu .accessibility-icon img {
  width: 46px;
}

#accessibility-menu.bo-xl-menu .accessibility-label {
  font-size: 16px;
}

.accessibility-steps {
  display: flex;
  gap: 3px;
  justify-content: center;
  margin-top: 2px;
}

.accessibility-steps .step {
  width: 8px;
  height: 3px;
  border-radius: 2px;
  background: #d1d5db;
}

.accessibility-steps .step.active {
  background: var(--bo-primary);
}

/* Reset message */
.reset-message {
  position: sticky;
  top: 68px;
  width: calc(100% - 24px);
  margin: 12px auto;
  text-align: center !important;
  transform: none;
  background: #014e4e;
  font-weight: 700;
  color: #fff;
  padding: 15px 20px;
  border-radius: 20px;
  font-size: 14px;
  z-index: 19;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: opacity 0.3s ease;
}

.reset-message.hide {
  opacity: 0;
}

/* Link highlight / hide bg */
.highlighted-link {
  background: #000 !important;
  color: #ffff00 !important;
}

.hide-backgrounds * {
  background-image: none !important;
}

/* Pause animations */
.pause-animations [style*="animation"],
.pause-animations [style*="transition"],
.pause-animations [data-aos],
.pause-animations [data-sr-id],
.pause-animations .aos-init,
.pause-animations .aos-animate {
  animation-play-state: paused !important;
  transition: none !important;
  opacity: 1 !important;
}

.pause-animations * {
  transition: none !important;
}

.aos-paused {
  opacity: 1 !important;
  transform: none !important;
}

/* ==========================
   Brand One FIX (do not affect widget)
   ========================== */

#__next.bo-a11y-invert,
#bo-a11y-wrapper.bo-a11y-invert {
  filter: invert(1) hue-rotate(180deg) !important;
}

#__next.bo-a11y-sat-low,
#bo-a11y-wrapper.bo-a11y-sat-low {
  filter: saturate(50%) !important;
}

#__next.bo-a11y-sat-high,
#bo-a11y-wrapper.bo-a11y-sat-high {
  filter: saturate(150%) !important;
}

#__next.bo-a11y-sat-gray,
#bo-a11y-wrapper.bo-a11y-sat-gray {
  filter: grayscale(100%) !important;
}

#__next.bo-a11y-dyslexia,
#bo-a11y-wrapper.bo-a11y-dyslexia,
#__next.dyslexia-font,
#bo-a11y-wrapper.dyslexia-font {
  font-family: "OpenDyslexic", sans-serif !important;
  letter-spacing: -1px !important;
}

/* ✅ Never let widget inherit dyslexia/lineheight/spacing etc */
#accessibility-widget,
#accessibility-menu,
#accessibility-widget *,
#accessibility-menu * {
  filter: none !important;
  font-family: "Raleway" !important;
  letter-spacing: normal !important;
  line-height: normal !important;
  /*text-align: initial !important;*/
  mix-blend-mode: normal !important;
  backdrop-filter: none !important;
}

/* ==========================
   Big Cursor (SITE ONLY)
   ========================== */

.bo-a11y-big-cursor,
.bo-a11y-big-cursor * {
  cursor:
    url("./icons/big-cursor.png") 16 16,
    auto !important;
}

/* Sakrij system cursor SVUDA (ceo sajt + widget) */
html.bo-a11y-big-cursor,
html.bo-a11y-big-cursor * {
  cursor: none !important;
}

/* Overlay iznad svega */
#bo-a11y-big-cursor {
  z-index: 2147483647 !important;
}

/* ==========================
   ACCESSIBILITY PROFILES
   ========================== */

#bo-profiles-panel {
  display: none;
  flex-direction: column;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  padding: 12px;
  position: absolute;
  top: 96px;
  left: 0;
  right: 0;
  z-index: 100;
}

#bo-profiles-panel.open {
  display: flex;
}

.bo-profiles-title {
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  padding: 0 2px;
}

.bo-profiles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.bo-profile-card {
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.bo-profile-card:hover {
  border-color: var(--bo-primary);
  box-shadow: 0 0 0 1px var(--bo-primary);
}

.bo-profile-card.active {
  border-color: var(--bo-primary);
  background: #ede9fe;
  box-shadow: 0 0 0 1px var(--bo-primary);
}

.bo-profile-icon {
  color: #374151;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bo-profile-card.active .bo-profile-icon {
  color: var(--bo-primary);
}

.bo-profile-label {
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  text-align: center;
  line-height: 1.3;
}

.bo-profile-card.active .bo-profile-label {
  color: var(--bo-primary);
}

@media (max-width: 768px) {
  #accessibility-menu {
    --bo-safe-top: env(safe-area-inset-top, 0px);
    top: 0 !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    width: min(100vw, 420px);
    box-sizing: border-box;
  }

  #accessibility-safe-top {
    display: block;
    position: sticky;
    top: 0;
    height: var(--bo-safe-top);
    min-height: var(--bo-safe-top);
    background: #fff;
    z-index: 21;
    flex: 0 0 auto;
  }

  #accessibility-header {
    top: var(--bo-safe-top);
  }

  #accessibility-options,
  #accessibility-options.bo-cols-3 {
    grid-template-columns: 1fr 1fr !important;
  }

  .accessibility-option {
    height: 110px;
    padding: 8px 4px;
  }

  .accessibility-icon img {
    width: 32px;
  }

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

  .bo-sub-row--xl {
    display: none !important;
  }
}

@media (max-width: 385px) {
  #accessibility-menu {
    width: 100%;
  }
}
