/* Sociedade Tolkien Brasileira - Accessibility System */

.stb-accessibility-button {
  position: fixed;
  left: 16px;
  top: calc(50% + 118px);
  z-index: 9999;
  width: 72px;
  height: 72px;
  border: none;
  padding: 0;
  background: transparent url("/accessibility/accessibility-button.png") center / contain no-repeat;
  cursor: pointer;
  transition: all .3s ease;
}

.stb-accessibility-button:hover {
  transform: translateY(-4px);
}

.stb-accessibility-button::before {
  content: "";
  position: absolute;
  top: -18px;
  left: 12px;
  width: 48px;
  height: 1px;
  background: rgba(214, 181, 109, 0.65);
}

.stb-accessibility-panel {
  position: fixed;
  left: 86px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9999;
  width: 420px;
  max-width: calc(100vw - 110px);
  max-height: 82vh;
  overflow-y: auto;
  padding: 18px;
  border-radius: 18px;
  background: rgba(18, 18, 18, 0.96);
  border: 1px solid rgba(201, 174, 106, 0.45);
  color: #f5f1e8;
  box-shadow: 0 20px 50px rgba(0,0,0,0.55);
  font-family: Arial, sans-serif;
  display: none;
}

.stb-accessibility-panel.active {
  display: block;
}

.stb-accessibility-panel h3 {
  margin: 0 0 14px;
  color: #d6b56d;
  font-size: 17px;
  font-weight: 600;
}

.stb-accessibility-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stb-accessibility-panel button {
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(214,181,109,0.35);
  background: #1c1c1c;
  color: #f5f1e8;
  cursor: pointer;
  font-size: 13px;
  text-align: left;
}

.stb-accessibility-panel button:hover {
  background: #2a2418;
  color: #d6b56d;
}

.stb-accessibility-panel button[data-reset="true"] {
  grid-column: 1 / -1;
  text-align: center;
  color: #d6b56d;
}

.stb-accessibility-button,
.stb-accessibility-panel {
  filter: none !important;
}

/* Accessibility Modes */

body.stb-font-large {
  font-size: 120% !important;
}

body.stb-font-xlarge {
  font-size: 140% !important;
}

body.stb-readable-font,
body.stb-readable-font * {
  font-family: Arial, Verdana, sans-serif !important;
}

body.stb-high-contrast {
  background: #000 !important;
  color: #fff !important;
}

body.stb-high-contrast * {
  background-color: #000 !important;
  color: #fff !important;
  border-color: #fff !important;
}

body.stb-light-mode {
  background: #fff !important;
  color: #111 !important;
}

body.stb-light-mode * {
  background-color: #fff !important;
  color: #111 !important;
}

body.stb-link-highlight a {
  color: #ffd76a !important;
  background: rgba(255, 215, 106, 0.18) !important;
  text-decoration: underline !important;
  font-weight: bold !important;
}

body.stb-spacing {
  letter-spacing: 0.08em !important;
  line-height: 1.8 !important;
}

body.stb-no-animations *,
body.stb-no-animations *::before,
body.stb-no-animations *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}

body.stb-big-cursor,
body.stb-big-cursor * {
  cursor: pointer !important;
}

/* Escala de cinza sem afetar widgets flutuantes */

body.stb-grayscale main,
body.stb-grayscale section,
body.stb-grayscale header,
body.stb-grayscale footer,
body.stb-grayscale article,
body.stb-grayscale .container,
body.stb-grayscale .content {
  filter: grayscale(100%) !important;
}


body.stb-grayscale .stb-social-floating,
body.stb-grayscale .stb-social-floating *,
body.stb-grayscale .stb-accessibility-button,
body.stb-grayscale .stb-accessibility-panel,
body.stb-grayscale .stb-accessibility-panel *,
body.stb-grayscale .stb-translation-button,
body.stb-grayscale .stb-translation-panel,
body.stb-grayscale .stb-translation-panel * {
  filter: none !important;
}

@media (max-width: 700px) {
  .stb-accessibility-button {
    left: 10px;
    top: auto;
    bottom: 18px;
    width: 58px;
    height: 58px;
  }

  .stb-accessibility-button::before {
    top: -13px;
    left: 10px;
    width: 38px;
  }

  .stb-accessibility-panel {
    left: 66px;
    right: 12px;
    bottom: 18px;
    top: auto;
    transform: none;
    width: auto;
    max-width: none;
    max-height: 72vh;
  }

  .stb-accessibility-options {
    grid-template-columns: 1fr;
  }
}