/* Accessibility toolbar (dlrleisure.ie-style options) */
.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-toolbar {
  position: relative;
  z-index: 99998;
}

.a11y-toolbar__trigger {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 99998;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin: 0;
  padding: 0;
  border: 1.5px solid #1e7ab9;
  border-radius: 50%;
  background: #fff;
  color: #1e7ab9;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.a11y-toolbar__trigger:hover,
.a11y-toolbar__trigger:focus {
  background: #1e7ab9;
  color: #fff;
  border-color: #1e7ab9;
  outline: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}

.a11y-toolbar__trigger[aria-expanded='true'] {
  background: #1e7ab9;
  color: #fff;
  border-color: #1e7ab9;
}

.a11y-toolbar__trigger-icon {
  display: block;
  width: 36px;
  height: 36px;
}

.a11y-toolbar__panel {
  position: fixed;
  left: 20px;
  bottom: 88px;
  z-index: 99998;
  width: min(340px, calc(100vw - 2rem));
  max-height: min(70vh, 520px);
  overflow: auto;
  background: #fff;
  border: 2px solid rgb(0, 124, 178);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
  font-family: 'Montserrat', sans-serif;
  color: #060606;
}

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

.a11y-toolbar__panel.is-open {
  display: block;
}

.a11y-toolbar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #e5e7eb;
  background: rgb(0, 124, 178);
  color: #fff;
}

.a11y-toolbar__title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
  text-transform: none;
}

.a11y-toolbar__close {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #fff;
  line-height: 1;
  cursor: pointer;
}

.a11y-toolbar__close .material-icons {
  font-size: 24px;
}

.a11y-toolbar__close:hover,
.a11y-toolbar__close:focus {
  background: rgba(255, 255, 255, 0.2);
  outline: none;
}

.a11y-toolbar__options {
  list-style: none;
  margin: 0;
  padding: 0.35rem 0;
}

.a11y-toolbar__option {
  margin: 0;
  border-bottom: 1px solid #eceff3;
}

.a11y-toolbar__option:last-child {
  border-bottom: 0;
}

.a11y-toolbar__label {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.35;
}

.a11y-toolbar__label:hover {
  background: #f4f5f7;
}

.a11y-toolbar__icon {
  flex: 0 0 auto;
  font-size: 24px;
  line-height: 1;
  color: #1e7ab9;
}

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

.a11y-toolbar__checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.a11y-toolbar__switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.a11y-toolbar__switch-ui {
  position: absolute;
  inset: 0;
  background: #cbd5e1;
  border-radius: 999px;
  transition: background 0.2s ease;
}

.a11y-toolbar__switch-ui::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.a11y-toolbar__checkbox:checked + .a11y-toolbar__switch-ui {
  background: rgb(0, 124, 178);
}

.a11y-toolbar__checkbox:checked + .a11y-toolbar__switch-ui::after {
  transform: translateX(20px);
}

.a11y-toolbar__checkbox:focus-visible + .a11y-toolbar__switch-ui {
  outline: 2px solid rgb(142, 83, 141);
  outline-offset: 2px;
}

/* Applied accessibility modes */
html.a11y-keyboard :focus-visible {
  outline: 3px solid #ffbf47 !important;
  outline-offset: 2px !important;
}

html.a11y-no-animations *,
html.a11y-no-animations *::before,
html.a11y-no-animations *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
  scroll-behavior: auto !important;
}

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

html.a11y-contrast #main,
html.a11y-contrast #main p,
html.a11y-contrast #main li,
html.a11y-contrast #main h1,
html.a11y-contrast #main h2,
html.a11y-contrast #main h3,
html.a11y-contrast #main h4,
html.a11y-contrast #main h5,
html.a11y-contrast #main h6 {
  color: #fff !important;
}

html.a11y-contrast a {
  color: #ffeb3b !important;
}

html.a11y-text-larger {
  font-size: 19px;
}

html.a11y-text-smaller {
  font-size: 15px;
}

html.a11y-readable-font body,
html.a11y-readable-font #main,
html.a11y-readable-font #footer {
  font-family: Arial, Helvetica, sans-serif !important;
}

html.a11y-mark-titles h1,
html.a11y-mark-titles h2,
html.a11y-mark-titles h3,
html.a11y-mark-titles h4,
html.a11y-mark-titles h5,
html.a11y-mark-titles h6 {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

html.a11y-underline-links a,
html.a11y-underline-links button,
html.a11y-underline-links .uk-button {
  text-decoration: underline !important;
  text-underline-offset: 2px;
}

html.a11y-underline-links .a11y-toolbar__trigger,
html.a11y-underline-links .a11y-toolbar__close,
html.a11y-underline-links .a11y-toolbar__label {
  text-decoration: none !important;
}

html.a11y-contrast .a11y-toolbar__icon,
html.a11y-contrast .a11y-toolbar__close .material-icons {
  color: #ffeb3b !important;
}

@media (max-width: 639px) {
  .a11y-toolbar__trigger {
    left: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    width: 52px;
    height: 52px;
  }

  .a11y-toolbar__trigger-icon {
    width: 32px;
    height: 32px;
  }

  .a11y-toolbar__panel {
    left: 12px;
    bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    width: calc(100vw - 24px);
  }
}

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