/* Widget accesibilitate avansat — Școala Brâncoveni Giurgiu */

@import url('https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible:ital,wght@0,400;0,700;1,400;1,700&display=swap');

html {
  font-size: calc(100% * var(--a11y-font-scale, 1));
}

body {
  line-height: calc(1.65 * var(--a11y-line-height, 1));
  letter-spacing: var(--a11y-letter-spacing, 0);
}

.a11y-live {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.a11y-widget {
  position: fixed;
  right: 1rem;
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
  z-index: 9999;
  font-family: var(--font-body, system-ui, sans-serif);
}

.a11y-widget__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 48px;
  padding: 0.55rem 0.9rem;
  border: 0;
  border-radius: 999px;
  background: #0d2430;
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(13, 36, 48, 0.28);
}

.a11y-widget__toggle:hover,
.a11y-widget__toggle:focus-visible {
  background: #173848;
  outline: 2px solid #7ec8d1;
  outline-offset: 2px;
}

.a11y-widget__icon {
  display: inline-flex;
}

.a11y-widget__panel {
  position: absolute;
  right: calc(100% + 0.65rem);
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
  width: min(23rem, calc(100vw - 5rem));
  max-height: min(78vh, 40rem);
  overflow: auto;
  padding: 0.85rem;
  border: 1px solid rgba(13, 36, 48, 0.14);
  border-radius: 0.75rem;
  background: #fff;
  color: #1d3038;
  box-shadow: 0 18px 40px rgba(13, 36, 48, 0.22);
}

.a11y-widget__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.a11y-widget__title {
  margin: 0;
  font-weight: 700;
  font-size: 1.05rem;
}

.a11y-widget__close {
  border: 0;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: inherit;
  padding: 0.15rem 0.35rem;
}

.a11y-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.25rem;
  margin-bottom: 0.75rem;
}

.a11y-tabs [role="tab"] {
  border: 1px solid rgba(13, 36, 48, 0.14);
  background: #eef3f4;
  color: inherit;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.45rem 0.2rem;
  border-radius: 0.35rem;
  cursor: pointer;
}

.a11y-tabs [role="tab"].is-active,
.a11y-tabs [role="tab"][aria-selected="true"] {
  background: #0e5560;
  border-color: #0e5560;
  color: #fff;
}

.a11y-widget__label {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #4f646c;
}

.a11y-widget__hint {
  margin: 0 0 0.65rem;
  font-size: 0.82rem;
  color: #4f646c;
  line-height: 1.45;
}

.a11y-widget__group {
  margin-bottom: 0.7rem;
}

.a11y-widget__row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.35rem;
  align-items: center;
}

.a11y-widget__row button,
.a11y-widget__actions button,
.a11y-widget__reset {
  border: 1px solid rgba(13, 36, 48, 0.16);
  background: #f3f6f7;
  color: inherit;
  font: inherit;
  font-weight: 600;
  font-size: 0.86rem;
  padding: 0.55rem 0.6rem;
  border-radius: 0.4rem;
  cursor: pointer;
  text-align: left;
}

.a11y-widget__row button {
  text-align: center;
}

.a11y-widget__value {
  text-align: center;
  font-weight: 700;
  min-width: 3.2rem;
  font-size: 0.9rem;
}

.a11y-widget__actions {
  display: grid;
  gap: 0.35rem;
}

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

.a11y-widget__actions button.is-active,
.a11y-contrast-grid button.is-active {
  background: #0e5560;
  border-color: #0e5560;
  color: #fff;
}

.a11y-widget__footer {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(13, 36, 48, 0.1);
}

.a11y-widget__reset {
  width: 100%;
  text-align: center;
  margin-bottom: 0.45rem;
}

.a11y-widget__note {
  margin: 0;
  font-size: 0.82rem;
  text-align: center;
}

.a11y-widget__note a {
  color: #0e5560;
}

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

/* Reading helpers */
.a11y-reading-guide {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  height: 2.4rem;
  margin-top: -1.2rem;
  background: rgba(255, 230, 0, 0.28);
  border-top: 2px solid #c9a000;
  border-bottom: 2px solid #c9a000;
  pointer-events: none;
  z-index: 9998;
}

.a11y-reading-mask {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9997;
  background:
    linear-gradient(#000c, #000c) 0 0 / 100% calc(var(--a11y-mask-y, 50%) - 3.2rem) no-repeat,
    linear-gradient(#000c, #000c) 0 calc(var(--a11y-mask-y, 50%) + 3.2rem) / 100% 100% no-repeat;
}

.a11y-reading-mask__window {
  display: none;
}

/* Content modes */
html.a11y-underline a {
  text-decoration: underline !important;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 0.1em;
}

html.a11y-highlight-links a {
  background: #ffe566 !important;
  color: #000 !important;
  padding: 0 0.15em;
  border-radius: 0.15em;
}

html.a11y-highlight-headings h1,
html.a11y-highlight-headings h2,
html.a11y-highlight-headings h3,
html.a11y-highlight-headings h4 {
  outline: 3px solid #0e5560;
  outline-offset: 3px;
  background: rgba(14, 85, 96, 0.08);
}

html.a11y-readable body {
  word-spacing: 0.14em;
  line-height: calc(1.85 * var(--a11y-line-height, 1)) !important;
}

html.a11y-dyslexia body,
html.a11y-dyslexia button,
html.a11y-dyslexia input,
html.a11y-dyslexia textarea,
html.a11y-dyslexia select {
  font-family: "Atkinson Hyperlegible", "Comic Sans MS", Verdana, sans-serif !important;
}

html.a11y-text-align p,
html.a11y-text-align li,
html.a11y-text-align h1,
html.a11y-text-align h2,
html.a11y-text-align h3,
html.a11y-text-align h4 {
  text-align: left !important;
  max-width: 42rem;
}

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

html.a11y-stop-motion .reveal {
  opacity: 1 !important;
  transform: none !important;
}

html.a11y-filter-on body {
  filter: var(--a11y-filter, none);
}

html.a11y-filter-on .a11y-widget {
  filter: none;
}

html.a11y-hide-images img,
html.a11y-hide-images video,
html.a11y-hide-images iframe,
html.a11y-hide-images svg:not(.a11y-widget__icon svg) {
  opacity: 0 !important;
  visibility: hidden !important;
}

html.a11y-big-cursor,
html.a11y-big-cursor * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' stroke='%23fff' stroke-width='1.2' d='M4 3l7 17 2-7 7-2z'/%3E%3C/svg%3E") 4 4, auto !important;
}

html.a11y-focus-outline *:focus {
  outline: 3px solid #ffbf00 !important;
  outline-offset: 3px !important;
}

html.a11y-focus-outline *:focus:not(:focus-visible) {
  outline: 3px solid #ffbf00 !important;
}

/* Contrast profiles */
html.a11y-contrast-dark,
html.a11y-contrast-dark body {
  background: #000 !important;
  color: #fff !important;
}

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

html.a11y-contrast-dark .site-header,
html.a11y-contrast-dark .site-footer,
html.a11y-contrast-dark .panel,
html.a11y-contrast-dark .contact-form,
html.a11y-contrast-dark .mission,
html.a11y-contrast-dark .list-board article,
html.a11y-contrast-dark .a11y-widget__panel,
html.a11y-contrast-dark .topbar {
  background: #111 !important;
  color: #fff !important;
  border-color: #fff !important;
}

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

html.a11y-contrast-light a { color: #0000ee !important; }

html.a11y-contrast-light .site-header,
html.a11y-contrast-light .site-footer,
html.a11y-contrast-light .panel,
html.a11y-contrast-light .contact-form,
html.a11y-contrast-light .mission,
html.a11y-contrast-light .a11y-widget__panel,
html.a11y-contrast-light .topbar {
  background: #fff !important;
  color: #000 !important;
  border-color: #000 !important;
}

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

html.a11y-contrast-yellow a { color: #fff !important; text-decoration: underline !important; }

html.a11y-contrast-yellow .site-header,
html.a11y-contrast-yellow .site-footer,
html.a11y-contrast-yellow .panel,
html.a11y-contrast-yellow .contact-form,
html.a11y-contrast-yellow .mission,
html.a11y-contrast-yellow .a11y-widget__panel,
html.a11y-contrast-yellow .topbar {
  background: #111 !important;
  color: #ffe566 !important;
  border-color: #ffe566 !important;
}

html.a11y-contrast-blue,
html.a11y-contrast-blue body {
  background: #001a33 !important;
  color: #e8f4ff !important;
}

html.a11y-contrast-blue a { color: #9fd4ff !important; }

html.a11y-contrast-blue .site-header,
html.a11y-contrast-blue .site-footer,
html.a11y-contrast-blue .panel,
html.a11y-contrast-blue .contact-form,
html.a11y-contrast-blue .mission,
html.a11y-contrast-blue .a11y-widget__panel,
html.a11y-contrast-blue .topbar {
  background: #00264d !important;
  color: #e8f4ff !important;
  border-color: #7eb6e8 !important;
}

@media (max-width: 640px) {
  .a11y-widget__toggle-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .a11y-widget__toggle {
    width: 52px;
    height: 52px;
    justify-content: center;
    padding: 0;
    border-radius: 50%;
  }

  .a11y-widget__panel {
    right: 0;
    left: auto;
    top: auto;
    bottom: calc(100% + 0.65rem);
    transform: none;
    width: min(23rem, calc(100vw - 1.5rem));
  }

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