/* NADLAB Accessibility Panel */

.nadlab-a11y-launcher {
  position: fixed;
  z-index: 99990;
  inset-inline-start: 18px;
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 999px;
  background: #e11d2f;
  color: #ffffff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.24);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  font: inherit;
}

.nadlab-a11y-launcher:focus-visible {
  outline: 3px solid #f59e0b;
  outline-offset: 4px;
}

.nadlab-a11y-launcher svg {
  width: 28px;
  height: 28px;
  display: block;
}

.nadlab-a11y-backdrop {
  position: fixed;
  z-index: 99991;
  inset: 0;
  background: rgba(15, 23, 42, 0.46);
  display: none;
  padding: 18px;
}

.nadlab-a11y-backdrop.is-open {
  display: grid;
  place-items: center;
}

.nadlab-a11y-dialog {
  width: min(520px, 100%);
  max-height: min(760px, calc(100vh - 36px));
  overflow: auto;
  border-radius: 24px;
  background: #ffffff;
  color: #111827;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.32);
  border: 1px solid #e5e7eb;
}

.nadlab-a11y-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 22px 22px 16px;
  border-bottom: 1px solid #e5e7eb;
}

.nadlab-a11y-title {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.nadlab-a11y-subtitle {
  margin: 7px 0 0;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.5;
}

.nadlab-a11y-close {
  width: 38px;
  height: 38px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #ffffff;
  color: #111827;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.nadlab-a11y-body {
  padding: 18px 22px 22px;
}

.nadlab-a11y-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.nadlab-a11y-action {
  min-height: 78px;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  background: #ffffff;
  color: #111827;
  padding: 12px;
  text-align: start;
  cursor: pointer;
  font: inherit;
  transition:
    border-color .16s ease,
    background .16s ease,
    transform .16s ease;
}

.nadlab-a11y-action:hover {
  border-color: rgba(225, 29, 47, 0.42);
  background: rgba(225, 29, 47, 0.045);
}

.nadlab-a11y-action:focus-visible,
.nadlab-a11y-close:focus-visible {
  outline: 3px solid #f59e0b;
  outline-offset: 3px;
}

.nadlab-a11y-action.is-active {
  border-color: #e11d2f;
  background: rgba(225, 29, 47, 0.08);
}

.nadlab-a11y-action strong {
  display: block;
  font-size: 15px;
  line-height: 1.25;
}

.nadlab-a11y-action span {
  display: block;
  margin-top: 5px;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.35;
}

.nadlab-a11y-reset {
  width: 100%;
  min-height: 46px;
  margin-top: 14px;
  border: 0;
  border-radius: 14px;
  background: #111827;
  color: #ffffff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.nadlab-a11y-reset:focus-visible {
  outline: 3px solid #f59e0b;
  outline-offset: 3px;
}

/* Active accessibility adjustments */

html.nadlab-a11y-font-1 body,
html.nadlab-a11y-font-1 button,
html.nadlab-a11y-font-1 input,
html.nadlab-a11y-font-1 select,
html.nadlab-a11y-font-1 textarea {
  font-size: 108% !important;
}

html.nadlab-a11y-font-2 body,
html.nadlab-a11y-font-2 button,
html.nadlab-a11y-font-2 input,
html.nadlab-a11y-font-2 select,
html.nadlab-a11y-font-2 textarea {
  font-size: 116% !important;
}

html.nadlab-a11y-contrast body {
  background: #000000 !important;
  color: #ffffff !important;
}

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

html.nadlab-a11y-contrast button,
html.nadlab-a11y-contrast input,
html.nadlab-a11y-contrast select,
html.nadlab-a11y-contrast textarea {
  border-color: #ffffff !important;
}

html.nadlab-a11y-links a {
  text-decoration: underline !important;
  text-decoration-thickness: 2px !important;
  text-underline-offset: 3px !important;
}

html.nadlab-a11y-readable body,
html.nadlab-a11y-readable button,
html.nadlab-a11y-readable input,
html.nadlab-a11y-readable select,
html.nadlab-a11y-readable textarea {
  font-family: Arial, Helvetica, sans-serif !important;
  letter-spacing: 0.01em;
}

html.nadlab-a11y-spacing body,
html.nadlab-a11y-spacing p,
html.nadlab-a11y-spacing li {
  line-height: 1.95 !important;
  letter-spacing: 0.035em !important;
  word-spacing: 0.08em !important;
}

html.nadlab-a11y-grayscale {
  filter: grayscale(1);
}

html.nadlab-a11y-reduce-motion *,
html.nadlab-a11y-reduce-motion *::before,
html.nadlab-a11y-reduce-motion *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}

html.nadlab-a11y-focus *:focus,
html.nadlab-a11y-focus *:focus-visible {
  outline: 3px solid #f59e0b !important;
  outline-offset: 3px !important;
}

@media (max-width: 640px) {
  .nadlab-a11y-launcher {
    width: 48px;
    height: 48px;
    inset-inline-start: -20px;
    top: 60%;
    bottom: auto;
    transform: translateY(-50%);
  }
  
  .nadlab-a11y-launcher svg {
    width: 20px;
    height: 20px;
    margin-right: -10px;
  }
  
  html[dir="rtl"] .nadlab-a11y-launcher svg {
    width: 20px;
    height: 20px;
	margin-right: 0;
    margin-left: -10px;
  }

  .nadlab-a11y-grid {
    grid-template-columns: 1fr;
  }

  .nadlab-a11y-header,
  .nadlab-a11y-body {
    padding-left: 18px;
    padding-right: 18px;
  }
}
