/* The guided tour (tour.js): a dimmed page, a cut-out round the target, a caption beside it. Self-contained, so it
   reads the same on the student pages and on Majordomo's own pages (Bootstrap, its own z-index layers, a dark theme):
   it sets its own font, colours and buttons and sits above the sidebar (1040), the top bar (1030) and its backdrop. */

:root {
  --tour-bg: #fff;
  --tour-text: #1d2125;
  --tour-muted: #5c636a;
  --tour-primary: #a6192e;
  --tour-primary-hover: #8a1526;
  --tour-line: #6c757d;
  --tour-dim: rgba(29, 33, 37, .62);
  --tour-ring: #fff;
  --tour-focus: rgba(166, 25, 46, .75);
}
[data-bs-theme="dark"] {
  --tour-bg: #22262c;
  --tour-text: #f3f4f6;
  --tour-muted: #b8bec6;
  --tour-primary: #e0566b;
  --tour-primary-hover: #ea7a8b;
  --tour-line: #9ca3af;
  --tour-dim: rgba(0, 0, 0, .7);
  --tour-ring: #f3f4f6;
  --tour-focus: rgba(234, 122, 139, .85);
}

.tour-shield { position: fixed; inset: 0; z-index: 2000; background: transparent; touch-action: none; }
.tour-spot {
  position: fixed; z-index: 2001; pointer-events: none;
  border-radius: .5rem;
  box-shadow: 0 0 0 3px var(--tour-ring), 0 0 0 200vmax var(--tour-dim);
  transition: top .2s ease, left .2s ease, width .2s ease, height .2s ease;
}
.tour-caption {
  position: fixed; z-index: 2002; box-sizing: border-box; width: min(23rem, calc(100vw - 2rem));
  padding: 1rem 1rem .875rem;
  border-radius: .5rem; background: var(--tour-bg); color: var(--tour-text);
  box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .3);
  font: 400 1rem/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans",
        "Liberation Sans", sans-serif;
  text-align: left;
  transition: top .2s ease, left .2s ease;
}
.tour-count { margin: 0 0 .25rem; color: var(--tour-muted); font-size: .875rem; }
.tour-title { margin: 0 0 .375rem; color: var(--tour-text); font-size: 1.25rem; font-weight: 700; line-height: 1.25; }
.tour-title:focus { outline: none; }
.tour-body { margin: 0 0 .875rem; }
.tour-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.tour-btn {
  display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box;
  min-height: 44px; padding: .5rem 1rem; margin: 0;
  border: 1px solid transparent; border-radius: .375rem;
  font: inherit; line-height: 1.25; cursor: pointer;
}
.tour-btn:focus-visible { outline: 3px solid var(--tour-focus); outline-offset: 2px; }
.tour-skip { margin-right: auto; padding-left: 0; background: transparent; color: var(--tour-primary); }
.tour-skip:hover { color: var(--tour-primary-hover); text-decoration: underline; }
.tour-back { background: transparent; border-color: var(--tour-line); color: var(--tour-text); }
.tour-back:hover { border-color: var(--tour-text); }
.tour-next { background: var(--tour-primary); border-color: var(--tour-primary); color: #fff; font-weight: 700; }
[data-bs-theme="dark"] .tour-next { color: #1d1f23; }
.tour-next:hover { background: var(--tour-primary-hover); border-color: var(--tour-primary-hover); }

/* The teacher dashboard's "Show me around", in the showcase's read-only banner (styled by teacher.css): a quiet link
   look in the slim bar, with a 44 px touch area that does not make the bar taller. */
.showcase-banner .showcase-tour-start {
  position: relative; display: inline; margin: 0; padding: 0; border: 0; background: transparent;
  color: inherit; font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer;
}
.showcase-banner .showcase-tour-start::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: max(100%, 44px); height: 44px;
  transform: translate(-50%, -50%);
}
.showcase-banner .showcase-tour-start:focus-visible { outline: 3px solid currentColor; outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .tour-spot, .tour-caption { transition: none; }
}
