/* Accessibility Styles & Toolbar */

/* Focus Styles for keyboard accessibility */
:focus-visible {
  outline: 3px solid #4f46e5 !important;
  outline-offset: 3px !important;
}

/* Accessibility Toolbar Panel */
.accessibility-modal-panel {
  display: none;
  position: fixed;
  bottom: 84px;
  left: 24px;
  width: 320px;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
  border: 1px solid #e2e8f0;
  z-index: 10000;
  padding: 20px;
  animation: slideUpAcc 0.25s ease;
}

.accessibility-modal-panel.active {
  display: block;
}

@keyframes slideUpAcc {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.acc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.acc-header h3 {
  font-size: 1.1rem;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
}

.acc-close-btn {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: #64748b;
}

.acc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.acc-btn {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 10px 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #1e293b;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  text-align: center;
}

.acc-btn:hover {
  background: #eef2ff;
  border-color: #4f46e5;
  color: #4f46e5;
}

.acc-btn.active {
  background: #4f46e5;
  color: #ffffff;
  border-color: #4f46e5;
}

.acc-reset-btn {
  grid-column: span 2;
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #b91c1c;
  padding: 10px;
  border-radius: 10px;
  font-weight: 800;
  cursor: pointer;
  margin-top: 6px;
}

.acc-reset-btn:hover {
  background: #fecaca;
}

/* Accessibility State Classes applied to <body> */
body.acc-font-lg {
  font-size: 18px !important;
}

body.acc-font-xl {
  font-size: 20px !important;
}

body.acc-font-sm {
  font-size: 14px !important;
}

body.acc-high-contrast {
  background-color: #000000 !important;
  color: #ffff00 !important;
}

body.acc-high-contrast * {
  background-color: #000000 !important;
  color: #ffff00 !important;
  border-color: #ffff00 !important;
  box-shadow: none !important;
}

body.acc-high-contrast a {
  color: #00ffff !important;
  text-decoration: underline !important;
}

body.acc-inverted-colors {
  filter: invert(1) hue-rotate(180deg);
}

body.acc-grayscale {
  filter: grayscale(100%);
}

body.acc-readable-font * {
  font-family: Arial, Helvetica, sans-serif !important;
  letter-spacing: 0.03em !important;
  line-height: 1.8 !important;
}

body.acc-highlight-links a {
  background-color: #fef08a !important;
  color: #000000 !important;
  text-decoration: underline !important;
  padding: 2px 4px !important;
  border-radius: 3px !important;
}

body.acc-highlight-headings h1,
body.acc-highlight-headings h2,
body.acc-highlight-headings h3,
body.acc-highlight-headings h4 {
  background-color: #dbeafe !important;
  color: #1e3a8a !important;
  padding: 4px 8px !important;
  border-radius: 4px !important;
}
