/* Obot accessibility widget - shared across all pages. Class names are
   prefixed with a11y- so this never collides with page-specific CSS. */

.a11y-btn {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 50%;
  background: #1878fa;
  color: #fff;
  transition: transform 0.3s ease, background 0.3s ease, opacity 0.3s ease;
  cursor: pointer;
  z-index: 999999;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.a11y-btn svg {
  width: 28px;
  height: 28px;
}

.a11y-btn:hover {
  background: #0f63d6;
}

.a11y-btn:focus-visible {
  outline: 3px solid #000;
  outline-offset: 3px;
}

.a11y-btn.a11y-hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.8);
}

.a11y-overlay,
.a11y-statement-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: 0.3s;
  z-index: 99998;
}

.a11y-overlay.a11y-open,
.a11y-statement-overlay.a11y-open {
  opacity: 1;
  pointer-events: all;
}

.a11y-panel {
  position: fixed;
  top: 0;
  right: -400px;
  width: 360px;
  max-width: 90vw;
  height: 100%;
  background: #f5f5f5;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.2);
  transition: 0.3s;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  color: #1f2933;
}

.a11y-panel.a11y-open {
  right: 0;
}

.a11y-panel-header {
  background: #1878fa;
  color: #fff;
  padding: 16px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}

.a11y-close-btn {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.a11y-close-btn svg {
  width: 20px;
  height: 20px;
}

.a11y-panel-content {
  padding: 16px;
  overflow-y: auto;
  flex: 1;
}

.a11y-section {
  margin-bottom: 24px;
}

.a11y-section h3 {
  font-size: 14px;
  margin-bottom: 10px;
  color: #555;
}

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

.a11y-grid button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #eaeaea;
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-size: 14px;
  cursor: pointer;
  transition: 0.2s;
  color: inherit;
  font-family: inherit;
}

.a11y-grid button svg {
  width: 20px;
  height: 20px;
}

.a11y-grid button:hover {
  background: #dcdcdc;
}

.a11y-grid button.a11y-active {
  background: #1878fa;
  color: #fff;
}

.a11y-reset-all,
.a11y-declaration {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
}

.a11y-reset-all svg,
.a11y-declaration svg {
  width: 18px;
  height: 18px;
}

.a11y-reset-all {
  background: #f4caca;
  border: none;
  color: #a00000;
  font-weight: bold;
}

.a11y-declaration {
  background: #eaeaea;
  border: 1px solid gray;
  color: inherit;
}

.a11y-panel-footer {
  margin-top: auto;
  padding: 12px;
  text-align: center;
  font-size: 12px;
  color: #666;
  background: #f0f0f0;
  border-top: 1px solid #ddd;
  flex-shrink: 0;
}

/* ---- global page-effect states, toggled on <body> ---- */
.a11y-readable-font {
  font-family: Arial, sans-serif !important;
}

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

.a11y-invert {
  filter: invert(1);
}

.a11y-contrast {
  filter: contrast(150%);
}

.a11y-no-animations *,
.a11y-stop-flashing * {
  animation: none !important;
  transition: none !important;
}

.a11y-hide-images img {
  visibility: hidden !important;
}

.a11y-show-alt img {
  position: relative;
}

.a11y-show-alt img::after {
  content: attr(alt);
  display: block;
  background: #000;
  color: #fff;
  font-size: 12px;
  padding: 4px;
}

.a11y-highlight-links a {
  background: #ffeb3b;
  color: #000 !important;
}

.a11y-highlight-titles h1,
.a11y-highlight-titles h2,
.a11y-highlight-titles h3 {
  background: #ffeb3b;
}

.a11y-big-cursor,
.a11y-big-cursor * {
  cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 24 24"><path d="M4 2 20 12 12.5 13.5 16 21 13 22 9.5 14.7 4 19Z" fill="black" stroke="white" stroke-width="1.5"/></svg>') 4 4, auto !important;
}

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

/* ---- accessibility statement modal ---- */
.a11y-statement-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  width: 90%;
  max-width: 700px;
  max-height: 90vh;
  background: #fff;
  border-radius: 20px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: 0.3s;
  z-index: 100001;
  display: flex;
  flex-direction: column;
  color: #1f2933;
}

.a11y-statement-modal.a11y-open {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: all;
}

.a11y-statement-header {
  background: #2563eb;
  color: #fff;
  padding: 16px;
  font-weight: bold;
  text-align: center;
  position: relative;
  flex-shrink: 0;
}

.a11y-statement-body {
  padding: 20px;
  overflow-y: auto;
}

.a11y-statement-title {
  text-align: center;
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 10px;
}

.a11y-statement-text {
  text-align: center;
  color: #555;
  margin-bottom: 20px;
  line-height: 1.6;
}

.a11y-statement-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.a11y-card {
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 16px;
  background: #fff;
  width: 100%;
}

.a11y-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-weight: 600;
  font-size: 14px;
}

.a11y-card-header svg {
  width: 18px;
  height: 18px;
  color: #2563eb;
}

.a11y-card ul {
  padding-right: 18px;
  margin: 0;
}

.a11y-card li {
  font-size: 13px;
  color: #374151;
  margin-bottom: 6px;
  line-height: 1.4;
}

.a11y-section-title {
  font-weight: 700;
  font-size: 16px;
  margin-top: 24px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.a11y-section-title svg {
  width: 18px;
  height: 18px;
}

.a11y-section-text {
  color: #555;
  font-size: 14px;
  margin-bottom: 12px;
}

.a11y-keyboard-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.a11y-keyboard-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.a11y-statement-body kbd {
  background: #e5e7eb;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
  font-family: monospace;
}

.a11y-warning-box {
  background: #fff7e6;
  border: 1px solid #facc15;
  border-radius: 14px;
  padding: 14px;
  margin-top: 24px;
}

.a11y-warning-box h4 {
  color: #b45309;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 700;
}

.a11y-warning-box p {
  color: #92400e;
  font-size: 13px;
  line-height: 1.5;
}

.a11y-contact-box {
  background: #e6f0ff;
  border: 1px solid #93c5fd;
  border-radius: 14px;
  padding: 16px;
  margin-top: 16px;
}

.a11y-contact-box h4 {
  color: #1d4ed8;
  margin-bottom: 8px;
  font-size: 15px;
  font-weight: 700;
}

.a11y-contact-text {
  color: #1e3a8a;
  font-size: 13px;
  margin-bottom: 10px;
}

.a11y-contact-email {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #2563eb;
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 10px;
}

.a11y-contact-email svg {
  width: 16px;
  height: 16px;
}

.a11y-contact-note {
  font-size: 12px;
  color: #1e40af;
}

.a11y-statement-date {
  text-align: center;
  font-size: 12px;
  color: #6b7280;
  margin-top: 24px;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
}

@media (max-width: 768px) {
  .a11y-panel {
    width: 100%;
    max-width: 100%;
    height: 60%;
    bottom: -100%;
    top: auto;
    right: 0;
    border-radius: 20px 20px 0 0;
  }

  .a11y-panel.a11y-open {
    bottom: 0;
  }

  .a11y-btn {
    right: 16px;
    bottom: 80px;
    width: 44px;
    height: 44px;
  }

  .a11y-btn svg {
    width: 24px;
    height: 24px;
  }

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