/* ทัวร์แนะนำแถบ a11y สำหรับผู้เรียน — ใช้ร่วมกับ a11y-student-toolbar-tour.js */

.dots-a11y-tour-root {
  position: fixed;
  inset: 0;
  z-index: 100000;
  pointer-events: none;
}

.dots-a11y-tour-dim {
  position: absolute;
  pointer-events: auto;
  background: rgba(15, 23, 42, 0.82);
  border: 0;
  padding: 0;
  margin: 0;
}

/* ใช้ px ไม่ใช้ rem — rem ตามขนาดฟ้อนท์ที่ html จะทำให้เคอร์เซอร์โตผิดปกติเมื่อขยายตัวอักษร */
.dots-a11y-tour-cursor {
  position: fixed;
  width: 24px;
  height: 24px;
  z-index: 100002;
  pointer-events: none;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.dots-a11y-tour-cursor svg {
  display: block;
  width: 100%;
  height: 100%;
}

html[data-a11y-contrast='high'] .dots-a11y-tour-cursor {
  color: var(--hc-accent) !important;
}

@media (prefers-reduced-motion: reduce) {
  .dots-a11y-tour-cursor {
    transition: none;
  }
}

.dots-a11y-tour-panel {
  position: fixed;
  left: 50%;
  bottom: max(1rem, env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  width: min(100vw - 1.5rem, 28rem);
  max-height: min(45vh, 22rem);
  overflow: auto;
  z-index: 100003;
  pointer-events: auto;
  background: #fff;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  border-radius: 0.75rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  padding: 1rem 1.1rem;
}

.dots-a11y-tour-panel:focus {
  outline: none;
}

.dots-a11y-tour-panel:focus-visible {
  outline: 3px solid #0ea5e9;
  outline-offset: 2px;
}

.dots-a11y-tour-title {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.35;
  color: #0f172a;
}

.dots-a11y-tour-body {
  margin: 0 0 0.75rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: #334155;
}

.dots-a11y-tour-meta {
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
  color: #64748b;
}

.dots-a11y-tour-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.dots-a11y-tour-actions .dots-a11y-tour-btn-primary {
  margin-left: auto;
}

.dots-a11y-tour-btn {
  font: inherit;
  cursor: pointer;
  border-radius: 0.5rem;
  padding: 0.45rem 0.85rem;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #0f172a;
}

.dots-a11y-tour-btn:hover {
  background: #f1f5f9;
}

.dots-a11y-tour-btn:focus {
  outline: none;
}

.dots-a11y-tour-btn:focus-visible {
  outline: 2px solid #0ea5e9;
  outline-offset: 2px;
}

.dots-a11y-tour-btn-primary {
  background: #0ea5e9;
  border-color: #0284c7;
  color: #fff;
}

.dots-a11y-tour-btn-primary:hover {
  background: #0284c7;
}

.dots-a11y-tour-sound {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  color: #475569;
  cursor: pointer;
  user-select: none;
}

.dots-a11y-tour-sound input {
  width: 1rem;
  height: 1rem;
  accent-color: #0ea5e9;
}

/* โหมดความคมชัดสูง — แผงทัวร์ */
html[data-a11y-contrast='high'] .dots-a11y-tour-dim {
  background: rgba(0, 0, 0, 0.88) !important;
}

html[data-a11y-contrast='high'] .dots-a11y-tour-panel {
  background: var(--hc-card) !important;
  color: var(--hc-fg) !important;
  border-color: var(--hc-border-strong) !important;
}

html[data-a11y-contrast='high'] .dots-a11y-tour-title {
  color: var(--hc-accent) !important;
}

html[data-a11y-contrast='high'] .dots-a11y-tour-body {
  color: var(--hc-fg) !important;
}

html[data-a11y-contrast='high'] .dots-a11y-tour-meta {
  color: var(--hc-muted) !important;
}

html[data-a11y-contrast='high'] .dots-a11y-tour-btn {
  background: var(--hc-hover) !important;
  color: var(--hc-fg) !important;
  border-color: var(--hc-border-strong) !important;
}

html[data-a11y-contrast='high'] .dots-a11y-tour-btn:hover {
  background: var(--hc-sunk) !important;
}

html[data-a11y-contrast='high'] .dots-a11y-tour-btn-primary {
  background: var(--hc-accent-dark) !important;
  border-color: var(--hc-accent) !important;
  color: #000 !important;
}

html[data-a11y-contrast='high'] .dots-a11y-tour-btn-primary:hover {
  background: var(--hc-accent) !important;
}

html[data-a11y-contrast='high'] .dots-a11y-tour-panel:focus-visible {
  outline-color: var(--hc-accent) !important;
}

html[data-a11y-contrast='high'] .dots-a11y-tour-sound {
  color: var(--hc-muted) !important;
}
