/* ─── GLOBAL ACCESSIBILITY STYLES ─────────────────────────────────────────── */
:root {
  --acc-orange: #f7941d;
  --acc-blue: #0099ff;
  --acc-easing: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Toggle Button ── */
.acc-toggle-btn {
  position: fixed;
  right: 20px;
  bottom: 180px;
  width: 44px;
  height: 44px;
  background: rgba(13, 25, 41, 0.8);
  border: 1px solid var(--acc-orange);
  border-radius: 50%;
  z-index: 990;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  box-shadow: 0 0 15px rgba(247, 148, 29, 0.3);
  transition: all 0.3s;
}
.acc-toggle-btn:hover {
  transform: scale(1.1);
  background: var(--acc-orange);
}

/* ── Panel ── */
.acc-menu-panel {
  position: fixed;
  right: 80px;
  bottom: 20px;
  transform: translateX(20px);
  width: 300px;
  max-height: 480px;
  background: rgba(6, 15, 28, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 0;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(25px);
  box-shadow: -20px 20px 50px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: all 0.4s var(--acc-easing);
}
.acc-menu-panel.active {
  opacity: 1;
  pointer-events: all;
  transform: translateX(0);
}
.acc-header {
  background: var(--acc-blue);
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 16px;
}
.acc-close {
  cursor: pointer;
  font-size: 20px;
  opacity: 0.8;
  transition: 0.2s;
}
.acc-close:hover {
  opacity: 1;
}

.acc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 15px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}
.acc-option {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  color: white;
  font-family: inherit;
}
.acc-option:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}
.acc-option.active {
  background: rgba(247, 148, 29, 0.2);
  border-color: var(--acc-orange);
  color: var(--acc-orange);
}
.acc-option svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}
.acc-label {
  font-size: 10px;
  font-weight: 600;
}
.acc-reset-btn {
  background: #d63031;
  color: white;
  border: none;
  padding: 12px;
  width: 100%;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 0.3s;
  font-size: 13px;
  font-family: inherit;
  flex-shrink: 0;
}
.acc-reset-btn:hover {
  background: #ff4757;
}

/* ── Body Classes Applied by Accessibility Features ── */
body.acc-big-text {
  font-size: 120% !important;
}
body.acc-high-contrast {
  filter: contrast(1.5);
}
body.acc-dyslexia {
  font-family: "Arial", sans-serif !important;
  letter-spacing: 0.05em !important;
  word-spacing: 0.1em !important;
}
body.acc-cursor * {
  cursor:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24'%3E%3Cpath fill='%23f7941d' d='M4 0l16 12.279-6.951 1.17 4.325 8.817-3.596 1.734-4.35-8.879-5.428 4.702z'/%3E%3C/svg%3E")
      0 0,
    auto !important;
}
body.acc-grayscale {
  filter: grayscale(100%);
}
body.acc-links a {
  text-decoration: underline !important;
  font-weight: bold !important;
}
body.acc-left-align * {
  text-align: left !important;
}

/* Reading guide */
#readingGuide {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--acc-orange);
  z-index: 9999;
  pointer-events: none;
  display: none;
}

/* Reading mask */
#readingMaskTop,
#readingMaskBottom {
  position: fixed;
  left: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9998;
  pointer-events: none;
  display: none;
}
#readingMaskTop {
  top: 0;
}
#readingMaskBottom {
  bottom: 0;
}

/* ── Mobil responsive ── */
@media (max-width: 768px) {
  .acc-toggle-btn {
    right: 12px;
    bottom: 120px;
    width: 38px;
    height: 38px;
  }

  .acc-menu-panel {
    right: 50%;
    bottom: 50%;
    transform: translateX(50%) translateY(50%) translateX(20px);
    width: 92%;
    max-width: 320px;
  }

  .acc-menu-panel.active {
    transform: translateX(50%) translateY(50%);
  }
}
