.tuik-a11y {
  --toggle-btn-bg: #193CB7;
  --toggle-btn-fg: #fff;
  --toggle-btn-active-bg: #ffd700;
  --toggle-btn-active-fg: #000;

  --panel-header-bg: #435BA5;
  --panel-header-fg: #fff;

  --panel-content-bg: #eff1f5;

  --selected-bg: #385294;
  --selected-fg: #fff;
  --selected-shadow: color-mix(
    in srgb,
    var(--selected-bg) 40%,
    transparent
  );

  --option-bg: #fff;
  --option-fg: #111;

  --icon-bg: #eee;
  --border: #ccc;
  --notification-dot: #e10000;

  box-sizing: border-box;

  *,
  * * {
    box-sizing: border-box;
  }

  * {
    word-spacing: normal !important;
    letter-spacing: normal !important;
    line-height: 1.15em !important;
  }
}

.tuik-a11y-toggle {
    cursor: pointer;
    position: fixed;
    z-index: 999999;
    right: 15px;
    bottom: 15px;
    color: var(--toggle-btn-fg);
    background-color: var(--toggle-btn-bg);
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1), 0 2px 12px rgba(0, 0, 0, 0.2);
    user-select: none;
    transition: transform 200ms ease-out, box-shadow 200ms ease-out;
    transform-origin: center center;
    &:focus-visible {
    outline: 2px solid white;
    outline-offset: 2px;
    box-shadow:
      0 2px 6px rgba(0, 0, 0, 0.1),
      0 4px 16px rgba(0, 0, 0, 0.2);
  }

  &:hover {
    box-shadow:
      0 2px 6px rgba(0, 0, 0, 0.1),
      0 4px 16px rgba(0, 0, 0, 0.2);
    transform: scale(1.05);
  }

  &:active {
    transform: scale(0.97);
    transition-duration: 100ms;
  }

  /* red dot */
  &.has-active::before {
    content: '';
    position: absolute;
    top: 2px;
    right: 2px;
    width: 10px;
    height: 10px;
    border-radius: 10px;
    text-align: center;
    background-color: var(--notification-dot);
    box-shadow: 1px 2px 3px rgba(0, 0, 0, 0.25);
  }
}

.tuik-a11y-toggle-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 5px;
  width: 38px;
  height: 38px;
  border-radius: 100%;
  transition: all 0.25s;
  border: 2px solid currentColor;

  svg {
    fill: currentColor;
    padding: 1px;
  }

  &.tuik-a11y-toggle-icon-human {
    opacity: 1;
    transform: rotate(0deg);
  }

  &.tuik-a11y-toggle-icon-close {
    opacity: 0;
    transform: rotate(-90deg);
    position: absolute;
    top: 0;
    left: 0;
  }
}

.tuik-a11y-show {
  .tuik-a11y-toggle {
    background-color: var(--toggle-btn-active-bg);
  }

  .tuik-a11y-toggle-icon-human {
    opacity: 0;
    transform: rotate(90deg);
  }

  .tuik-a11y-toggle-icon-close {
    opacity: 1;
    transform: rotate(0deg);
    color: var(--toggle-btn-active-fg);
    background-color: var(--toggle-btn-active-bg);
  }
}

.tuik-a11y-offcanvas {
  position: fixed;
  z-index: 999990;
  top: 30px;
  right: 30px;
  bottom: 30px;
  width: 500px;
  max-width: 90%;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: scale(0.99) translateX(1em) translateY(1em);
  transform-origin: top;
  transition: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  visibility: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 10px;
}

.tuik-a11y-show {
  .tuik-a11y-offcanvas {
    opacity: 1;
    visibility: visible;
    transform: scale(1) translateX(0) translateY(0);
  }
}

.tuik-a11y-header {
  padding: 15px;
  color: var(--panel-header-fg);
  background-color: var(--panel-header-bg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 10px 10px 0 0;
}

.tuik-a11y-header-title {
  font-size: 18px;
  font-weight: 500;

  span {
    font-size: 13px;
    line-height: 1;
    background-color: rgba(0, 0, 0, 0.15);
    padding: 2px 5px 4px 5px;
    border-radius: 4px;
  }
}

.tuik-a11y-header-part {
  display: flex;
  grid-gap: 15px;
  justify-content: space-between;
  align-items: center;
}

.tuik-a11y-content {
  flex: 1;
  height: 100%;
  overflow-y: auto;
  background-color: var(--panel-content-bg);

  &::-webkit-scrollbar {
    width: 14px;
  }

  &::-webkit-scrollbar-track {
    background: #ddd;
  }

  &::-webkit-scrollbar-thumb {
    border: 4px solid #ddd;
    background: #aaa;
    border-radius: 10px;
  }

  &::-webkit-scrollbar-thumb:hover {
    background: #999;
  }
}

.tuik-a11y-profiles-content {
  background-color: #fff;
  box-shadow: 0 10px 30px rgba(60, 80, 160, 0.1);
  display: flex;
  flex-direction: column;
}

.tuik-a11y-profiles-toggle-inner {
  display: flex;
  grid-gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 8px;
  transition: all 0.2s;

  &:hover {
    background-color: #f7f7f7;
  }
}

.tuik-a11y-profiles-toggle {
  cursor: pointer;
  user-select: none;
  position: relative;
  overflow: hidden;
  padding: 10px;
  font-size: 16px;
  font-weight: 500;
  color: var(--option-fg);

  i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 30px;
    background-color: var(--icon-bg);
    font-style: normal;
    font-size: 14px;

    svg {
      max-width: 15px;
      max-height: 15px;
      fill: currentColor;
    }
  }

  .tuik-a11y-profiles-toggle-arrow {
    width: 10px;
    height: 10px;
    display: flex;

    &:after {
      content: '';
      display: block;
      border-left: 7px solid var(--option-fg);
      border-top: 5px solid transparent;
      border-bottom: 5px solid transparent;
    }
  }
}

.tuik-a11y-profiles-list {
  display: none;
  border-top: 1px solid var(--border);
}

.tuik-a11y-profiles-show {
  .tuik-a11y-profiles-list {
    display: block;
  }

  .tuik-a11y-profiles-toggle-arrow {
    transform: rotate(90deg);
  }
}

.tuik-a11y-profiles {
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 15px;
}

.tuik-a11y-profile {
  cursor: pointer;
  position: relative;
  padding: 10px;
  display: flex;
  grid-gap: 8px;
  align-items: center;
  border-radius: 6px;
  user-select: none;
  color: var(--option-fg);
  border: 1px solid var(--border);
  background-color: var(--option-bg);
  transition: all 0.2s;
  box-shadow: 1px 2px 3px rgba(0, 0, 0, 0.035);

  &:hover {
    border-color: var(--selected-bg);
    background-color: rgba(0, 119, 255, 0.015);
  }

  &.tuik-a11y-profile-selected {
    color: var(--selected-fg);
    border-color: var(--selected-bg);
    background-color: var(--selected-bg);

    i {
      background-color: rgba(0, 0, 0, 0.25);
    }
  }

  i {
    font-style: normal;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 30px;
    background-color: var(--icon-bg);

    svg {
      max-width: 12px;
      max-height: 12px;
      fill: currentColor;
    }
  }
}

.tuik-a11y-profile-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--option-fg);
}

.tuik-a11y-category {
  margin-bottom: 30px;

  &:last-child {
    margin-bottom: 0;
  }
}

.tuik-a11y-category-header {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.tuik-a11y-profile-title,
.tuik-a11y-category-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  color: var(--option-fg);
}

.tuik-a11y-content-options {
  padding: 15px;
}

.tuik-a11y-options {
  list-style-type: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 15px;
  padding: 15px;
  border-radius: 10px;
  background-color: var(--option-bg);
  box-shadow: 0 10px 30px rgba(60, 80, 170, 0.1);
}

.tuik-a11y-option {
  cursor: pointer;
  position: relative;
  height: 120px;
  padding: 10px;
  display: flex;
  grid-gap: 10px;
  user-select: none;
  flex-direction: column;
  text-align: center;
  justify-content: center;
  align-items: center;
  border-radius: 6px;
  color: var(--option-fg);
  border: 1px solid var(--border);
  background-color: var(--option-bg);
  transition: all 0.2s;
  box-shadow: 1px 2px 3px rgba(0, 0, 0, 0.035);

  &:hover {
    border-color: var(--selected-bg);
    background-color: rgba(0, 119, 255, 0.015);
  }
}

.tuik-a11y-option-selected {
  color: var(--selected-bg);
  border-color: var(--selected-bg);
  box-shadow: 0 0 0 3px var(--selected-shadow);
  background-color: rgba(0, 119, 255, 0.015);

  &:before {
    content: '\2714';
    position: absolute;
    z-index: 1;
    top: 5px;
    right: 5px;
    width: 14px;
    height: 14px;
    font-size: 10px;
    line-height: 14px;
    border-radius: 14px;
    text-align: center;
    color: var(--selected-fg);
    background-color: var(--selected-bg);
  }
}

.tuik-a11y-option-icon {
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;

  svg {
    max-height: 24px;
  }
}

.tuik-a11y-option-title {
  font-size: 14px;
}

.tuik-a11y-subprop-steps {
  width: 90%;
  display: flex;
  justify-content: center;
  grid-gap: 4px;

  i {
    flex: 1;
    height: 2px;
    border-radius: 8px;
    background-color: var(--border);
    transition: all 0.2s;

    &.tuik-a11y-subprop-selected {
      background-color: var(--selected-bg);
    }
  }
}

.tuik-a11y-footer {
  padding: 15px 50px 15px 15px;
  color: var(--panel-header-fg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 0 0 10px 10px;
  background-color: var(--panel-header-bg);
}

.tuik-a11y-reset {
  cursor: pointer;
  color: var(--panel-header-fg);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  grid-gap: 10px;
  justify-content: space-between;
  align-items: center;
  user-select: none;

  i {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 30px;
    color: var(--panel-header-fg);
    background-color: rgba(0, 0, 0, 0.2);
    transition: all 0.2s;
  }

  &:hover i {
    background-color: rgba(0, 0, 0, 0.5);
  }

  svg {
    fill: currentColor;
    user-select: none;
    transition: all 0.5s cubic-bezier(0.33, 0, 0, 1);
    transform-origin: center center;
    transform: rotate(0deg);
  }

  &:active svg {
    transform: rotate(180deg);
    transition: 0s;
  }
}

.tuik-a11y-close {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 30px;
  color: var(--panel-header-fg);
  background-color: rgba(0, 0, 0, 0.25);
  transition: all 0.2s;

  &:hover {
    background-color: rgba(0, 0, 0, 0.5);
  }

  svg {
    fill: currentColor;
    width: 10px;
  }
}

/* Options */
.tuik-a11y-o-monochrome,
.tuik-a11y-o-invert-colors,
.tuik-a11y-o-contrast-high,
.tuik-a11y-o-saturation-low,
.tuik-a11y-o-saturation-high {
  filter: grayscale(var(--tuik-a11y-grayscale, 0)) invert(var(--tuik-a11y-invert, 0))
    saturate(var(--tuik-a11y-saturate, 1)) contrast(var(--tuik-a11y-contrast, 100%)) !important;
}

.tuik-a11y-o-monochrome {
  --tuik-a11y-grayscale: 1;
}

.tuik-a11y-o-invert-colors {
  --tuik-a11y-invert: 100%;
}

.tuik-a11y-o-saturation-high {
  --tuik-a11y-saturate: 2;
}

.tuik-a11y-o-saturation-low {
  --tuik-a11y-saturate: 0.5;
}

.tuik-a11y-o-contrast-high {
  --tuik-a11y-contrast: 150%;
}

.tuik-a11y-o-contrast-low body:before {
  content: '';
  position: fixed;
  z-index: 99;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  user-select: none;
  pointer-events: none;
  mix-blend-mode: multiply;
  background: rgb(125, 125, 125);
}

.tuik-a11y-o-blue-light-filter-1 body:before,
.tuik-a11y-o-blue-light-filter-2 body:before {
  content: '';
  position: fixed;
  z-index: 99;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  user-select: none;
  pointer-events: none;
  mix-blend-mode: multiply;
  opacity: 0.5;
}

.tuik-a11y-o-blue-light-filter-1 body:before {
  background-color: rgb(255, 240, 75, 0.75);
}

.tuik-a11y-o-blue-light-filter-2 body:before {
  background-color: rgb(165, 155, 115);
}

/* Reading Mask */
.tuik-a11y-reading-mask {
  position: fixed;
  z-index: 999991;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  height: 150px;
  box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

/* Reading Guide */
.tuik-a11y-reading-guide {
  display: none;
  position: fixed;
  min-width: 200px;
  height: 12px;
  z-index: 999992;
  border-radius: 6px;
  border: 3px solid #fff300;
  background-color: #000;
  box-sizing: border-box;
  user-select: none;
  pointer-events: none;
  width: 50vw;
  transform: translate(-50%);
}

/* Cursor Black & White */
.tuik-a11y-o-cursor-white {
  --cursor-default: url('../icons/cursor-white.svg');
  --cursor-hover: url('../icons/cursor-white-hover.svg');
}

.tuik-a11y-o-cursor-black {
  --cursor-default: url('../icons/cursor-black.svg');
  --cursor-hover: url('../icons/cursor-black-hover.svg');
}

.tuik-a11y-o-cursor-white,
.tuik-a11y-o-cursor-black {
  &,
  & * {
    cursor: var(--cursor-default), auto !important;
  }

  a,
  label,
  input,
  select,
  button,
  textarea,
  [role='button'] {
    cursor: var(--cursor-hover), auto !important;
  }
}

/* Stop Animations */
.tuik-a11y-o-stop-animations {
  *,
  * *,
  *:before,
  * *:before {
    animation: none !important;
    transition: none !important;
  }
}

/* Hide Images */
.tuik-a11y-o-hide-images {
  img,
  picture,
  figure {
    visibility: hidden !important;
  }

  *,
  * * {
    background-size: 0 0 !important;
  }
}

/* Dyslexia Friendly */
@font-face {
  font-family: 'OpenDyslexia';
  src: url('../fonts/OpenDyslexic-Regular.woff2') format('woff2');
  font-style: normal;
  font-weight: normal;
}

@font-face {
  font-family: 'OpenDyslexia';
  src: url('../fonts/OpenDyslexic-Italic.woff2') format('woff2');
  font-style: italic;
  font-weight: normal;
}

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

@font-face {
  font-family: 'OpenDyslexia';
  src: url('../fonts/OpenDyslexic-Bold-Italic.woff2') format('woff2');
  font-weight: bold;
  font-style: italic;
}

.tuik-a11y-o-dyslexia {
  *,
  * * {
    font-family: OpenDyslexia, Arial, sans-serif !important;
  }
}

/* Screen Reader */
.tuik-a11y-screen-speaking {
  color: black !important;
  background-color: rgb(255, 255, 0, 0.75) !important;
}

/* Text Magnifier */
.tuik-a11y-text-magnifier {
  display: none;
  position: fixed;
  padding: 10px;
  border-radius: 4px;
  font-size: 36px;
  line-height: 1 !important;
  z-index: 999993;
  word-break: break-word;
  width: fit-content;
  max-width: 800px;
  color: white;
  background: black;
}

/* Highlight Titles */
.tuik-a11y-o-highlight-titles {
  h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  [role='heading'] {
    outline-width: 2px !important;
    outline-style: solid !important;
    outline-color: #0066ff !important;
    outline-offset: 5px !important;
  }
}

/* Highlight Links */
.tuik-a11y-o-highlight-links {
  a {
    color: #000 !important;
    background-color: #ff0 !important;

    &:hover {
      outline-offset: 5px;
      outline: #0066ff solid 2px;
    }
  }
}

/* Highlight Hover */
.tuik-a11y-o-outline-highlight {
  body {
    *:hover {
      outline-offset: 5px;
      outline: #000 solid 2px;

      *:hover {
        outline-color: #438da1;

        *:hover {
          outline-color: #9c0033;

          *:hover {
            outline-color: #e2c000;
          }
        }
      }
    }
  }
}

/* Larger Text */
.tuik-a11y-o-larger-text-size-1 {
  zoom: 1.2 !important;
}
.tuik-a11y-o-larger-text-size-2 {
  zoom: 1.4 !important;
}
.tuik-a11y-o-larger-text-size-3 {
  zoom: 1.6 !important;
}

/* Letter Spacing */
.tuik-a11y-o-letter-spacing-size-1 {
  word-spacing: 0.16em !important;
  letter-spacing: 0.12em !important;
}

.tuik-a11y-o-letter-spacing-size-2 {
  word-spacing: 0.32em !important;
  letter-spacing: 0.24em !important;
}

.tuik-a11y-o-letter-spacing-size-3 {
  word-spacing: 0.48em !important;
  letter-spacing: 0.36em !important;
}

/* Alignment */
.tuik-a11y-o-align-left {
  text-align: left !important;
}

.tuik-a11y-o-align-center {
  text-align: center !important;
}

.tuik-a11y-o-align-right {
  text-align: right !important;
}

.tuik-a11y-o-align-justify {
  text-align: justify !important;
}

/* Color Blindness Filters */
.tuik-a11y-color-blindness-filters {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.tuik-a11y-o-protanopia {
  filter: url(#tuik-a11y-protanopia-filter) !important;
}

.tuik-a11y-o-deuteranopia {
  filter: url(#tuik-a11y-deuteranopia-filter) !important;
}

.tuik-a11y-o-tritanopia {
  filter: url(#tuik-a11y-tritanopia-filter) !important;
}

@media (max-width: 768px) {
    .tuik-a11y-toggle {
        right: 15px !important;
        bottom: 15px !important;
        padding: 0 !important;
        width: 50px !important;
        height: 50px !important;
    }
  .tuik-a11y-toggle-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 5px;
  width: 38px;
  height: 38px;
  border-radius: 100%;
  transition: all 0.25s;
  border: 2px solid currentColor;

  svg {
    fill: currentColor;
    padding: 1px;
  }

  .tuik-a11y-offcanvas {
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    width: auto;
    max-width: 100%;
  }

  .tuik-a11y-header-title small {
    display: none;
  }

  .tuik-a11y-options {
    grid-template-columns: repeat(2, 1fr);
  }
}
