/**
 * Lokale Barrierefreiheits-Hilfen (HfM Saar) – Ersatz Eye-Able-Widget
 */

/* Legacy Eye-Able (falls noch per Layout/CMS eingebunden oder CDN) */
#eyeAble,
#eye-able,
.eyeAble,
[id^="eyeAble"]:not([id^="eyeAbleSkip"]),
eye-able {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.hfm-floating-action--a11y,
#hfm-a11y-toolbar {
  position: fixed;
  z-index: 101;
}

/* Nur der Button ist sichtbar – loses Icon aus dem CMS-HTML-Feld */
#hfm-a11y-toolbar > img,
.mod_html:has(#hfm-a11y-toolbar) > img[src*="barriere-icon"],
.mod_html:has(#hfm-a11y-toolbar) > a > img[src*="barriere-icon"] {
  display: none !important;
}

.hfm-a11y-toolbar__toggle {
  display: block;
  width: var(--hfm-floating-size, 50px);
  height: var(--hfm-floating-size, 50px);
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent url('../img/barriere-icon.svg') center / contain no-repeat;
  box-shadow: 0 0 25px 0 rgba(0, 0, 0, 0.12);
  cursor: pointer;
  line-height: 0;
  overflow: hidden;
}

.hfm-a11y-toolbar__toggle:focus-visible {
  outline: 3px solid #804200;
  outline-offset: 3px;
}

.hfm-a11y-toolbar__panel {
  position: absolute;
  left: calc(100% + 10px);
  bottom: 0;
  width: min(280px, calc(100vw - 90px));
  max-height: min(70vh, 420px);
  overflow: auto;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #e4e4e4;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  color: #1a1a1a;
  font-size: 0.95rem;
}

.hfm-a11y-toolbar__panel[hidden] {
  display: none !important;
}

.hfm-a11y-toolbar__title {
  margin: 0 0 10px;
  font-weight: 700;
  font-size: 1rem;
}

.hfm-a11y-toolbar__actions {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
}

.hfm-a11y-toolbar__actions li {
  margin: 0 0 6px;
}

.hfm-a11y-toolbar__btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #f8f8f8;
  color: #1a1a1a;
  cursor: pointer;
  font: inherit;
}

.hfm-a11y-toolbar__btn:hover {
  background: #eee;
  border-color: #ccc;
}

.hfm-a11y-toolbar__btn[aria-pressed="true"] {
  background: #804200;
  border-color: #804200;
  color: #fff;
}

.hfm-a11y-toolbar__btn--reset {
  margin-top: 4px;
  font-weight: 600;
}

.hfm-a11y-toolbar__footer {
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px solid #eee;
  font-size: 0.9rem;
}

.hfm-a11y-toolbar__footer a {
  color: #804200;
}

/* --- Wirkung auf die Seite (Klassen am <html>) --- */

html.hfm-a11y-font-1 {
  font-size: 112.5%;
}

html.hfm-a11y-font-2 {
  font-size: 125%;
}

html.hfm-a11y-font-3 {
  font-size: 140%;
}

/*
 * Hoher Kontrast: helles Schema – Text bleibt dunkel, keine Weißfärbung von schwarzem Text
 */
html.hfm-a11y-contrast {
  --accentColor: #000 !important;
  --secondColor: #000 !important;
  --a11y-link-color: #0000a8;
}

html.hfm-a11y-contrast body {
  background: #fff !important;
  color: #000 !important;
}

html.hfm-a11y-contrast body #contentwrapper,
html.hfm-a11y-contrast body #wrapper,
html.hfm-a11y-contrast body #container,
html.hfm-a11y-contrast body #main,
html.hfm-a11y-contrast body .mod_article,
html.hfm-a11y-contrast body .inside,
html.hfm-a11y-contrast body #header,
html.hfm-a11y-contrast body #footer,
html.hfm-a11y-contrast body #slider,
html.hfm-a11y-contrast body #breadcrumb {
  background-color: #fff !important;
  color: #000 !important;
}

html.hfm-a11y-contrast body p,
html.hfm-a11y-contrast body li,
html.hfm-a11y-contrast body span,
html.hfm-a11y-contrast body td,
html.hfm-a11y-contrast body th,
html.hfm-a11y-contrast body label {
  color: #000 !important;
}

html.hfm-a11y-contrast body h1,
html.hfm-a11y-contrast body h2,
html.hfm-a11y-contrast body h3,
html.hfm-a11y-contrast body h4,
html.hfm-a11y-contrast body h5,
html.hfm-a11y-contrast body h6,
html.hfm-a11y-contrast body .headline,
html.hfm-a11y-contrast body .ce_headline {
  color: #000 !important;
}

html.hfm-a11y-contrast body a {
  color: #0000a8 !important;
  text-decoration: underline !important;
  text-decoration-thickness: 2px !important;
  font-weight: 600 !important;
}

html.hfm-a11y-contrast body a:visited {
  color: #4a0080 !important;
}

html.hfm-a11y-contrast body #header,
html.hfm-a11y-contrast body #footer {
  border-color: #000 !important;
  box-shadow: inset 0 -2px 0 0 #000;
}

html.hfm-a11y-contrast body button,
html.hfm-a11y-contrast body .btn,
html.hfm-a11y-contrast body input[type="submit"] {
  border: 2px solid #000 !important;
  color: #000 !important;
}

/* Akzent-/Theme-Farben im Kontrastmodus neutralisieren (Orange, --accentColor, Slider) */
html.hfm-a11y-contrast body a[href],
html.hfm-a11y-contrast nav.megamenu-landmark a,
html.hfm-a11y-contrast .mod_pct_megamenu a {
  color: #0000a8 !important;
  -webkit-text-fill-color: #0000a8 !important;
}

html.hfm-a11y-contrast body [class*="txt-color-accent"],
html.hfm-a11y-contrast body [class*="color-accent"],
html.hfm-a11y-contrast body .txt-color-accent,
html.hfm-a11y-contrast body .ce_revolutionslider_text,
html.hfm-a11y-contrast body .tp-caption,
html.hfm-a11y-contrast body #slider .caption {
  color: #000 !important;
  -webkit-text-fill-color: #000 !important;
}

html.hfm-a11y-contrast body .bg-accent,
html.hfm-a11y-contrast body .date.bg-accent,
html.hfm-a11y-contrast body .bg-lightgray,
html.hfm-a11y-contrast body .bg-white {
  background-color: #fff !important;
  color: #000 !important;
  border: 2px solid #000 !important;
}

html.hfm-a11y-contrast body .date.bg-accent .day,
html.hfm-a11y-contrast body .date.bg-accent .month,
html.hfm-a11y-contrast body .date.bg-accent .year {
  color: #000 !important;
}

html.hfm-a11y-contrast nav.megamenu-landmark,
html.hfm-a11y-contrast nav.megamenu-landmark .mod_pct_megamenu,
html.hfm-a11y-contrast nav.megamenu-landmark .item,
html.hfm-a11y-contrast nav.megamenu-landmark .ce_text,
html.hfm-a11y-contrast nav.megamenu-landmark .ce_text *:not(a) {
  background: #fff !important;
  color: #000 !important;
  -webkit-text-fill-color: #000 !important;
}

html.hfm-a11y-contrast body .ce_text {
  color: #000 !important;
}

html.hfm-a11y-dark {
  --accentColor: #3a3a3a !important;
  --bgColorLightGray: #1a1a1a !important;
  --bgColorGray: #1e1e1e !important;
  --bgColorDarkGray: #141414 !important;
}

/* Dunkelmodus: breite Flächen + häufige helle Theme-Bereiche */
html.hfm-a11y-dark body,
html.hfm-a11y-dark body .body,
html.hfm-a11y-dark body #contentwrapper,
html.hfm-a11y-dark body #fix-wrapper,
html.hfm-a11y-dark body #top-wrapper,
html.hfm-a11y-dark body #wrapper,
html.hfm-a11y-dark body #container,
html.hfm-a11y-dark body #main,
html.hfm-a11y-dark body .mod_article,
html.hfm-a11y-dark body .inside,
html.hfm-a11y-dark body section,
html.hfm-a11y-dark body .column,
html.hfm-a11y-dark body .autogrid_row,
html.hfm-a11y-dark body .ce_text,
html.hfm-a11y-dark body .ce_box,
html.hfm-a11y-dark body .content,
html.hfm-a11y-dark body #slider,
html.hfm-a11y-dark body #breadcrumb,
html.hfm-a11y-dark body #top,
html.hfm-a11y-dark body table,
html.hfm-a11y-dark body th,
html.hfm-a11y-dark body td {
  background-color: #141414 !important;
  color: #e8e8e8 !important;
  border-color: #444 !important;
}

html.hfm-a11y-dark body #header,
html.hfm-a11y-dark body #header .header,
html.hfm-a11y-dark body #stickyheader .header,
html.hfm-a11y-dark body #stickyheader {
  background-color: #1c1c1c !important;
  color: #f2f2f2 !important;
}

html.hfm-a11y-dark body #footer,
html.hfm-a11y-dark body #footer .inside,
html.hfm-a11y-dark body #bottom {
  background-color: #181818 !important;
  color: #e0e0e0 !important;
}

html.hfm-a11y-dark body a {
  color: #ffcc80 !important;
}

html.hfm-a11y-dark body h1,
html.hfm-a11y-dark body h2,
html.hfm-a11y-dark body h3,
html.hfm-a11y-dark body h4,
html.hfm-a11y-dark body h5,
html.hfm-a11y-dark body h6 {
  color: #fff !important;
}

html.hfm-a11y-dark body input,
html.hfm-a11y-dark body textarea,
html.hfm-a11y-dark body select {
  background-color: #2a2a2a !important;
  color: #f0f0f0 !important;
  border-color: #666 !important;
}

html.hfm-a11y-dark body .bg-white,
html.hfm-a11y-dark body .color-white,
html.hfm-a11y-dark body [class*="bg-custom"],
html.hfm-a11y-dark body [class*="bg-white"],
html.hfm-a11y-dark body .ce_fancybox .overlay,
html.hfm-a11y-dark body .newslist-v3 .content,
html.hfm-a11y-dark body .mod_newslist,
html.hfm-a11y-dark body .mod_eventlist,
html.hfm-a11y-dark body .ce_contentbox,
html.hfm-a11y-dark body .featurebox {
  background-color: #1e1e1e !important;
  color: #e8e8e8 !important;
}

/* Inline-Hintergründe aus dem Theme (häufig #fff / hellgrau) */
html.hfm-a11y-dark body [style*="background-color:#fff"],
html.hfm-a11y-dark body [style*="background-color: #fff"],
html.hfm-a11y-dark body [style*="background-color:#ffffff"],
html.hfm-a11y-dark body [style*="background-color: #ffffff"],
html.hfm-a11y-dark body [style*="background-color: rgb(255, 255, 255)"],
html.hfm-a11y-dark body [style*="background-color: rgb(245, 245, 245)"],
html.hfm-a11y-dark body [style*="background-color:#f5f5f5"],
html.hfm-a11y-dark body [style*="background-color: #f5f5f5"] {
  background-color: #1e1e1e !important;
  color: #e8e8e8 !important;
}

/* Eclipse-Theme: Container, Events, Colorbox, Hintergrundbilder, Mega-Menü */
html.hfm-a11y-dark body .container,
html.hfm-a11y-dark body .item-inside,
html.hfm-a11y-dark body .item.block,
html.hfm-a11y-dark body .ce_colorbox,
html.hfm-a11y-dark body .ce_colorbox_inside,
html.hfm-a11y-dark body .bg-lightgray,
html.hfm-a11y-dark body .bg-white,
html.hfm-a11y-dark body .bg-second,
html.hfm-a11y-dark body .ce_bgimage,
html.hfm-a11y-dark body .ce_bgimage-image,
html.hfm-a11y-dark body .boxed-content,
html.hfm-a11y-dark body .attributes,
html.hfm-a11y-dark body .isotope-item {
  background-color: #1a1a1a !important;
  color: #e8e8e8 !important;
}

html.hfm-a11y-dark body .bg-accent,
html.hfm-a11y-dark body .date.bg-accent {
  background-color: #2d2d2d !important;
  color: #fff !important;
}

html.hfm-a11y-dark nav.megamenu-landmark,
html.hfm-a11y-dark nav.megamenu-landmark .mod_pct_megamenu,
html.hfm-a11y-dark nav.megamenu-landmark .item,
html.hfm-a11y-dark nav.megamenu-landmark .autogrid_row,
html.hfm-a11y-dark nav.megamenu-landmark .ce_text {
  background-color: #1a1a1a !important;
  color: #e8e8e8 !important;
}

html.hfm-a11y-dark #hfm-a11y-toolbar .hfm-a11y-toolbar__panel {
  background: #f5f5f5 !important;
  color: #1a1a1a !important;
}

/* Bilder ausblenden: img, Slider, CSS-Hintergrundbilder (ohne Barriere-Icon) */
html.hfm-a11y-hide-images body img:not(#hfm-a11y-toolbar img):not(.hfm-a11y-toolbar img),
html.hfm-a11y-hide-images body picture img,
html.hfm-a11y-hide-images body video,
html.hfm-a11y-hide-images body svg image,
html.hfm-a11y-hide-images body #slider img,
html.hfm-a11y-hide-images body .rev-slidebg,
html.hfm-a11y-hide-images body .rs-img,
html.hfm-a11y-hide-images body .tp-bgimg,
html.hfm-a11y-hide-images body .ce_bgimage-image {
  opacity: 0.06 !important;
  filter: grayscale(1) !important;
}

html.hfm-a11y-hide-images body .ce_bgimage-image,
html.hfm-a11y-hide-images body .ce_bgimage .ce_bgimage-image,
html.hfm-a11y-hide-images body .tp-bgimg,
html.hfm-a11y-hide-images body .rs-bgimg,
/* Teaser-Kacheln (Fancybox mit inline background-image) */
html.hfm-a11y-hide-images body .ce_fancybox[style*="background-image"] {
  background-image: none !important;
}

html.hfm-a11y-hide-images body .ce_fancybox[style*="background-image"] {
  background-color: #3a3a3a !important;
}

/* Bilder entfärben: inkl. Hintergrundflächen und Revolution Slider */
html.hfm-a11y-grayscale-images body img:not(#hfm-a11y-toolbar img):not(.hfm-a11y-toolbar img),
html.hfm-a11y-grayscale-images body picture img,
html.hfm-a11y-grayscale-images body video,
html.hfm-a11y-grayscale-images body svg image,
html.hfm-a11y-grayscale-images body #slider img,
html.hfm-a11y-grayscale-images body .rev-slidebg,
html.hfm-a11y-grayscale-images body .rs-img,
html.hfm-a11y-grayscale-images body .tp-bgimg,
html.hfm-a11y-grayscale-images body .ce_bgimage-image,
html.hfm-a11y-grayscale-images body .tp-bgimg,
html.hfm-a11y-grayscale-images body .rs-bgimg,
html.hfm-a11y-grayscale-images body .ce_fancybox[style*="background-image"] {
  filter: grayscale(1) !important;
}

html.hfm-a11y-hide-images.hfm-a11y-grayscale-images body img:not(#hfm-a11y-toolbar img) {
  filter: grayscale(1) !important;
}

html.hfm-a11y-large-cursor,
html.hfm-a11y-large-cursor * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cpath fill='%23000' stroke='%23fff' stroke-width='2' d='M6 6l12 32 5-11 22-9z'/%3E%3C/svg%3E") 8 8, auto !important;
}

@media only screen and (max-width: 767px) {
  .hfm-a11y-toolbar__panel {
    left: 0;
    bottom: calc(100% + 10px);
  }
}

@media print {
  .hfm-a11y-toolbar {
    display: none !important;
  }
}