/* The look of the tour of the pages and of the playback of the annotations (spotlight.py, annotation_player.py, tutorial.py): one file for all the pages.
   The recorded site has it as assets/spotlight.css (the pages link to it, so a change here is not a change of the pages), and the live pages have its text in the page. */

/* --- The page dimmed, with parts of it clear and outlined, and the box of the text --- */
#tour { position: fixed; inset: 0; z-index: 100000; }
#tour svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#tour .tour-dim { fill: rgba(0, 0, 0, .46); }
.tour-ring { position: fixed; box-sizing: border-box; pointer-events: none; border-radius: 6px; z-index: 100001; }
.tour-ring.tour-button { border: 3px solid var(--mark, #ffd33d); box-shadow: 0 0 0 4px rgba(255, 211, 61, .28); }
.tour-ring.tour-view { border: 2px solid var(--tour-view, #75beff); }
/* The code that an annotation or a question is being made about (the author's page): outlined as in the playback, without the dimming. */
.mark-ring { position: fixed; box-sizing: border-box; pointer-events: none; border-radius: 6px; z-index: 50; border: 2px solid var(--tour-view, #75beff); }
:root[data-theme="light"] { --tour-view: #0969da; }
:root[data-theme="light"] #tour .tour-dim { fill: rgba(0, 0, 0, .35); }
#tour-box { position: fixed; z-index: 100002; box-sizing: border-box; width: min(430px, calc(100vw - 16px)); max-height: calc(100vh - 16px); overflow: auto; padding: 10px 16px 14px;
  border: 1px solid var(--border, #454545); border-radius: 8px; background: var(--bar, #2d2d30); color: var(--text, #d4d4d4);
  font: 14px/1.5 "Segoe UI", system-ui, sans-serif; box-shadow: 0 10px 34px rgba(0, 0, 0, .5); text-align: start; }
#tour-box .tour-count { direction: ltr; unicode-bidi: isolate; }
#tour-box h2 { margin: 4px 0 4px; font-size: 17px; font-weight: 600; }
#tour-box p { margin: 4px 0; }
#tour-box kbd { padding: 0 5px; font: 12px Consolas, "Cascadia Mono", monospace; background: rgba(128, 128, 128, .3); border-radius: 3px; }
#tour-box code { padding: 0 4px; border-radius: 3px; background: rgba(128, 128, 128, .25); font: .92em Consolas, "Cascadia Mono", monospace; direction: ltr; unicode-bidi: isolate; }
#tour-box .tour-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted, #9a9a9a); font-size: 12px; }
#tour-box .tour-languages { display: flex; direction: ltr; }
#tour-box button { font: inherit; cursor: pointer; padding: 5px 12px; color: var(--text, #d4d4d4); background: rgba(128, 128, 128, .22); border: 1px solid var(--border, #454545); border-radius: 4px; }
#tour-box button:hover { background: rgba(128, 128, 128, .38); }
#tour-box button:focus-visible { outline: 2px solid var(--mark, #ffd33d); outline-offset: 1px; }
#tour-box .tour-languages button { padding: 1px 9px; font-size: 12px; border-radius: 0; }
#tour-box .tour-languages button:first-child { border-radius: 3px 0 0 3px; }
#tour-box .tour-languages button:last-child { border-radius: 0 3px 3px 0; margin-left: -1px; }
#tour-box .tour-languages button[aria-pressed="true"] { background: #0e639c; border-color: #1a85c9; color: #fff; }
#tour-box .tour-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 8px 0 0; font-size: 12px; color: var(--muted, #9a9a9a); }
#tour-box .tour-legend span::before { content: ""; display: inline-block; width: 12px; height: 9px; margin-inline-end: 5px; border-radius: 2px; box-sizing: border-box; }
#tour-box .tour-legend .tour-button::before { border: 2px solid var(--mark, #ffd33d); }
#tour-box .tour-legend .tour-view::before { border: 2px solid var(--tour-view, #75beff); }
#tour-box .tour-actions { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
#tour-box .tour-actions .tour-spacer { flex: 1; }
/* In Hebrew the box goes from the right: Next is then at the right of Back, on the side that its arrow (the right arrow key) points to. */
#tour-box[dir="rtl"] .tour-back { order: 1; }
#tour-box .tour-actions .tour-next { background: var(--primary, #0e639c); border-color: #1a85c9; color: #fff; }
#tour-box.annotation, #tour-box.quiz { border: 3px solid var(--mark, #ffd33d); }
/* The quiz box is larger than the others (the tour, the annotations): the student reads a question and chooses an answer. */
#tour-box.quiz { width: min(580px, calc(100vw - 16px)); padding: 14px 22px 18px; font-size: 17px; }
#tour-box.quiz .quiz-answer { padding: 10px 18px; font-size: 17px; }
#tour-box.quiz .quiz-wait { font-size: 46px; }
#tour-box .annotation-text { margin: 6px 0 0; white-space: pre-wrap; }

/* --- The quiz: a question about the next line, and its answers (quiz_player.py) --- */
#tour-box .quiz-row { display: flex; align-items: flex-start; gap: 12px; margin-top: 6px; }
#tour-box .quiz-row .quiz-question { flex: 1; margin: 0; }
/* The sign that the program waits for the student: a large ? that blinks (the one of the keyboard input is a keyboard). */
#tour-box .quiz-wait { flex: none; width: 1.1em; font: 700 36px/1 "Segoe UI", system-ui, sans-serif; text-align: center; color: var(--mark, #ffd33d); animation: quiz-wait-blink 1s ease-in-out infinite; }
#tour-box .quiz-wait.answered { animation: none; color: #3fb950; }
@keyframes quiz-wait-blink { 50% { opacity: .12; } }
@media (prefers-reduced-motion: reduce) { #tour-box .quiz-wait { animation: none; } }
#tour-box .quiz-answers { display: flex; flex-direction: column; gap: 6px; margin: 10px 0 0; }
#tour-box .quiz-answer { display: flex; align-items: baseline; gap: 10px; text-align: start; }
#tour-box .quiz-answer span { flex: 1; white-space: pre-wrap; overflow-wrap: anywhere; }
#tour-box .quiz-answer.wrong { border-color: #f48771; background: rgba(244, 135, 113, .2); opacity: .75; cursor: default; }
#tour-box .quiz-answer.right { border-color: #3fb950; background: rgba(63, 185, 80, .25); opacity: 1; }
#tour-box .quiz-feedback { margin: 8px 0 0; min-height: 1.5em; }
#tour-box .quiz-feedback.right { color: #3fb950; font-weight: 600; }
#tour-box .quiz-feedback.wrong { color: #f48771; }
#tour-box [hidden] { display: none; }
#run-quiz[hidden], #question-add[hidden] { display: none; }

/* --- The playback of the annotations --- */
html.annotating .ln.current { background: transparent; box-shadow: none; }
html.annotating .ln.current .num { background: var(--bg); color: #6e7681; font-weight: 400; }
/* The room at the left of the code for the box (see reserveRoom): the page moves to the right by that much, after the button bar when the bar is at the left. It is in the shared
   style of the pages, but here: a page is not changed when the look is. */
@media (min-width: 701px) {
  html.annotating body > main { margin-left: var(--annotation-pane, 0px); }
  html.annotating[data-dock^="left"] body > main { margin-left: calc(var(--bar-width, 152px) + var(--annotation-pane, 0px)); }
}
