.at-accessibility-wrapper {
  position: fixed;
  /* mirrors the offset of the sticky side nav so both rails line up */
  right: MIN(1%, 20px);
  bottom: MIN(2%, 24px);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transition: var(--baseTransition, all 0.3s ease);
  z-index: 9999;
}

/* Adjust position when sidenav is open */
.sticky-sidenav-open.active + .at-accessibility-wrapper {
  right: 300px; /* Move left when sidenav is open */
}

.at-accessibility-btn {
  position: relative;
  width: 64px;
  height: 64px;
  background: var(--main-color, black);
  color: #ffffff;
  border: 1px solid var(--main-color, black);
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--baseTransition, all 0.3s ease);
  box-shadow: 0 4px 25px 0 rgba(0, 0, 0, 0.15);
}
.at-accessibility-btn svg {
  width: 28px;
  height: auto;
  fill: #fff;
}
.at-accessibility-btn-close {
  position: absolute;
  right: 0;
  top: 0;
  border-radius: 0 20px 0 21px;
  padding: 14px 20px;
  border: 0;
  color: #fff;
  background: var(--main-color, black);
  transition: var(--baseTransition, all 0.3s ease);
  cursor: pointer;
  font-size: 16px !important;
  line-height: 1 !important;
  height: auto !important;
  min-height: 48px !important;
}
.accesibility_title {
  font-weight: 600;
  margin-bottom: 20px;
  line-height: 120% !important;
  font-size: 18px !important;
}
.at-accessibility-btn:hover,
.at-accessibility-btn:focus {
  filter: brightness(0.9);
  transform: scale(1.05);
}
.at-accessibility-btn-close:hover,
.at-accessibility-btn-close:focus {
  filter: brightness(0.9);
}

.at-accessibility-btn .at-icon {
  font-size: 24px;
  line-height: 1;
  display: flex;
}

.at-accessibility-toolbar {
  position: absolute;
  right: 0;
  /* sits above the round trigger instead of behind it */
  bottom: calc(100% + 16px);
  background-color: #ffffff;
  padding: 70px 30px 30px 30px;
  border-radius: 20px;
  box-shadow: 0 4px 25px 0 rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  min-width: 350px;
  max-width: calc(100vw - 32px);
  max-height: 60vh;
  overflow-y: auto;
  will-change: opacity, visibility;
}

.at-accessibility-toolbar:not([aria-hidden="true"]) {
  opacity: 1;
  visibility: visible;
}

.at-toolbar-items {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.at-toolbar-item {
  margin: 0;
  &.disable-animations{
    @media (prefers-reduced-motion: reduce) {
      display: none;
    }
  }
}

.at-toolbar-link {
  width: 100%;
  padding: 12px;
  background: none;
  border: 1px solid var(--main-color, black);
  color: var(--fontColor, black);
  font-size: 16px !important;
  line-height: 120% !important;
  cursor: pointer;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  transition: all 0.2s ease;
}

.at-toolbar-link:hover,
.at-toolbar-link:focus {
  background-color: var(--main-color, black);
  color: #ffffff;
  outline: none;
}

.at-toolbar-link .at-icon {
  font-size: 18px;
  line-height: 1;
}

.reset_all button {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 50px;
  font-weight: 600;
  font-size: var(--baseFontSize, 16px);
  background-size: 100%;
  overflow: hidden;
  line-height: inherit;
  cursor: pointer;
  padding: 10px 25px;
  position: relative;
  background: transparent;
  color: var(--main-color, black);
  border: 2px solid var(--main-color, black);
  transition: var(--baseTransition, all 0.3s ease);
  z-index: 1;
  margin-top: 20px;
}
.reset_all button:before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  background: var(--mainGradient, black);
  z-index: -1;
  transition: var(--baseTransition, all 0.3s ease);
}
.reset_all button svg {
  width: 16px;
  margin-top: 1px;
}
.reset_all button:hover {
  color: #fff;
  background: transparent;
}

.reset_all button:hover:before,
.reset_all button:focus:before {
  opacity: 1;
  background: var(--mainGradient, black);
}
.reset_all button:hover svg,
.reset_all button:focus svg {
  filter: brightness(0) invert(1);
}

/* Accessibility Features */
.grayscale > *
{
  filter: grayscale(100%) !important;
}

.high-contrast {
  --main-color: #a52600 !important; /* Dark slate for primary elements */
  --primary-light: #96420b !important; /* Slightly lighter slate for secondary */
  --second-color: #694400 !important; /* Very dark slate for banners */
  --primaryHover: #400f00 !important; /* Very dark slate for light elements */
  --primaryActive: #400f00 !important; /* Very dark slate gradient start */
  --fl-frame-cibgbox: #96420b !important;
  --grey: #bcbcbc !important;
  --wp--preset--color--main-color: #a52600 !important;
  .image-teaser-single .item .overlay {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.9) 70%);
  }

  .px-textonimage .image::after {
        background: linear-gradient(180deg, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.9) 70%);
  }

  .foot {
    .wp-block-button.is-style-phone-icon::before, .wp-block-button.is-style-mail-icon::before, .wp-block-button.is-style-time-icon::before, .wp-block-button.is-style-location-icon::before {
      background-color: #fff;
    }
  }

  .px-banner.layout-split .trustelements .trust-slider-container .trust-title {
    color: #000;
  }
}

.underline-links a {
  text-decoration: underline !important;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
  .at-accessibility-wrapper {
    top: auto;
    right: 12px;
    bottom: 12px;
  }
  .at-accessibility-btn {
    width: 52px;
    height: 52px;
  }
  .at-accessibility-btn svg {
    width: 24px;
  }
  .at-accessibility-toolbar {
    min-width: 300px;
    padding-left: 20px;
    padding-right: 20px;
    max-height: 65vh;
    top: auto;
    bottom: calc(100% + 12px);
  }
}

/* Focus Styles */
.at-accessibility-btn:focus-visible,
.at-toolbar-link:focus-visible {
  outline: 2px solid var(--secondColor, black);
  outline-offset: 2px;
}

/* Active States */
.at-toolbar-link[aria-pressed="true"],
.at-toolbar-link:hover {
  background-color: var(--main-color, black);
  color: #ffffff;
}
.at-toolbar-link[aria-pressed="true"] svg,
.at-toolbar-link:hover svg,
.at-toolbar-link:focus-within svg {
  filter: brightness(0) invert(1);
}
/* --------------------------------------------------
   Video play/pause control (WCAG 2.2.2 "Pause, Stop, Hide")
   The button is injected by accessibility-toolbar.js for every
   autoplaying video that has no native controls.
   -------------------------------------------------- */
.hph-video-holder {
  position: relative;
}

.hph-video-toggle {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 3;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--main-color, black);
  border-radius: 50%;
  background: var(--main-color, black);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 25px 0 rgba(0, 0, 0, 0.15);
  transition: var(--baseTransition, all 0.3s ease);
}

.hph-video-toggle:hover,
.hph-video-toggle:focus {
  filter: brightness(0.9);
  transform: scale(1.05);
}

.hph-video-toggle:focus-visible {
  outline: 2px solid var(--secondColor, black);
  outline-offset: 2px;
}

.hph-video-toggle svg {
  width: 16px;
  height: 16px;
  display: block;
  fill: currentColor;
  pointer-events: none;
}

.hph-video-toggle .at-icon-play,
.hph-video-toggle .at-icon-pause {
  display: none;
}

.hph-video-toggle[data-state="playing"] .at-icon-pause,
.hph-video-toggle[data-state="paused"] .at-icon-play {
  display: block;
}

@media screen and (max-width: 768px) {
  .hph-video-toggle {
    width: 40px;
    height: 40px;
    right: 8px;
    bottom: 8px;
  }
}

/* Screen Reader Only */
.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;
}
