/* /learn: Professor Orlo's class (app/views/teacher/show.html.erb, worlds/teacher.js).
   The world fills the window as on a world's page (worlds.css's .wd, .wd-stage,
   .wd-world and .wd-cover); over it a small bar at the top, her captions, and
   the box to ask her in at the bottom. */
.tc-bar { position: absolute; top: 0; left: 0; right: 0; z-index: 5; display: flex; align-items: center; gap: 8px; padding: 12px; pointer-events: none; }
.tc-bar > * { pointer-events: auto; }
.tc-pill { display: inline-flex; align-items: center; gap: 6px; box-sizing: border-box; height: 32px; margin: 0; padding: 0 12px; border: 0; border-radius: 999px;
  background: rgba(20, 22, 28, 0.55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: rgba(255, 255, 255, 0.85);
  font: 600 12.5px system-ui, -apple-system, sans-serif; text-decoration: none; white-space: nowrap; }
a.tc-pill:hover, button.tc-pill:hover { background: rgba(20, 22, 28, 0.85); color: #fff; }
.tc-pill:focus-visible { outline: 2px solid var(--wd-focus); outline-offset: 2px; }
.tc-name { color: #fff; font-size: 13.5px; }
.tc-name a { color: inherit; text-decoration: none; }
.tc-sound, .tc-share { cursor: pointer; }
.tc-share[hidden], .tc-asked[hidden], .tc-play[hidden] { display: none; }
/* the question she's answering, between the name and the buttons */
.tc-bar-mid { flex: 1; min-width: 0; display: flex; justify-content: center; }
.tc-asked { display: block; max-width: 640px; min-width: 0; overflow: hidden; text-overflow: ellipsis; line-height: 32px; color: #fff; font-size: 13.5px; pointer-events: auto; }
/* History: the visitor's answers, newest first */
.tc-history-wrap { position: relative; }
.tc-history { position: absolute; top: 40px; right: 0; z-index: 6; box-sizing: border-box; width: min(380px, calc(100vw - 24px)); max-height: min(60vh, 520px); overflow: auto; padding: 6px;
  border-radius: 14px; background: rgba(20, 22, 28, 0.95); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4); }
.tc-history[hidden] { display: none; }
.tc-history ol { margin: 0; padding: 0; list-style: none; }
.tc-history li { display: flex; align-items: center; gap: 2px; }
.tc-history li a { flex: 1; min-width: 0; display: grid; gap: 2px; padding: 8px 10px; border-radius: 10px; color: #fff; font: 600 13.5px/1.3 system-ui, -apple-system, sans-serif; text-decoration: none; overflow-wrap: anywhere; }
.tc-history li a:hover { background: rgba(255, 255, 255, 0.08); }
.tc-history li a[aria-current] { background: rgba(255, 209, 102, 0.16); }
.tc-history time { color: rgba(255, 255, 255, 0.5); font: 500 11.5px system-ui, -apple-system, sans-serif; }
.tc-copy { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: rgba(255, 255, 255, 0.7); cursor: pointer; }
.tc-copy:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.tc-copy.tc-copied { color: #7be38f; }
.tc-copy:focus-visible, .tc-history li a:focus-visible { outline: 2px solid var(--wd-focus); outline-offset: -2px; }
.tc-history-empty { margin: 0; padding: 10px 12px; color: rgba(255, 255, 255, 0.7); font: 500 13px/1.4 system-ui, -apple-system, sans-serif; }
.tc-sound .tc-sound-off, .tc-sound[aria-pressed="false"] .tc-sound-on { display: none; }
.tc-sound[aria-pressed="false"] .tc-sound-off { display: block; }
/* off stands out, so it isn't missed */
.tc-sound[aria-pressed="false"], .tc-sound[aria-pressed="false"]:hover { background: #ffd166; color: #1b1d24; }

/* just above the box (its height is --tc-dock, which worlds/teacher.js keeps up to date): Pause, and under it the captions */
.tc-over { position: absolute; left: 50%; bottom: calc(var(--tc-dock, 120px) + 14px); z-index: 4; transform: translateX(-50%); box-sizing: border-box;
  width: max-content; max-width: min(860px, calc(100% - 32px)); display: flex; flex-direction: column; align-items: center; gap: 10px; pointer-events: none; }
.tc-over .tc-pause { pointer-events: auto; }
/* the captions: a line or two of what she's saying, the words said so far bright and the rest of the line faint */
.tc-captions { box-sizing: border-box; max-width: 100%; padding: 8px 16px; border-radius: 12px; background: rgba(12, 13, 17, 0.76);
  color: #fff; font: 600 clamp(17px, 2.3vmin, 24px)/1.4 system-ui, -apple-system, sans-serif; text-align: center; text-wrap: balance;
  opacity: 0; transition: opacity 0.25s; pointer-events: none; }
.tc-captions.tc-on { opacity: 1; }
.tc-captions .tc-later { color: rgba(255, 255, 255, 0.38); }

/* the box, and ideas over it until the first question */
.tc-dock { position: absolute; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); z-index: 5; transform: translateX(-50%); width: min(720px, calc(100% - 24px)); display: grid; gap: 8px; }
.tc-ideas { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.tc-ideas[hidden] { display: none; }
.tc-idea { padding: 7px 12px; border: 0; border-radius: 999px; background: rgba(20, 22, 28, 0.62); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: #fff; font: 600 13px system-ui, -apple-system, sans-serif; cursor: pointer; }
.tc-idea:hover { background: rgba(20, 22, 28, 0.88); }
.tc-idea:focus-visible { outline: 2px solid var(--wd-focus); outline-offset: 2px; }
/* Pause while she talks: big and plain, over her captions */
.tc-pause { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 10px 22px; border: 0; border-radius: 999px;
  background: #ffffff; color: #1b1d24; font: 700 16px/1.2 system-ui, -apple-system, sans-serif; cursor: pointer; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35); }
.tc-pause[hidden] { display: none; }
.tc-pause:hover { background: #f1f3f6; }
.tc-pause:focus-visible { outline: 2px solid var(--wd-focus); outline-offset: 2px; }
.tc-pause .tc-resume-icon, .tc-pause[aria-pressed="true"] .tc-pause-icon { display: none; }
.tc-pause[aria-pressed="true"] .tc-resume-icon { display: block; }
.tc-pause[aria-pressed="true"] { background: var(--wd-accent); color: var(--wd-accent-ink); }
/* an answer opened from a link: hear her give it */
.tc-play { justify-self: center; display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 9px 18px; border: 0; border-radius: 999px;
  background: var(--wd-accent); color: var(--wd-accent-ink); font: 700 15px/1.2 system-ui, -apple-system, sans-serif; cursor: pointer; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35); }
.tc-play:hover { filter: brightness(1.06); }
.tc-play:focus-visible { outline: 2px solid var(--wd-focus); outline-offset: 2px; }
.tc-muted { justify-self: center; display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 7px 14px; border: 0; border-radius: 999px;
  background: #ffd166; color: #1b1d24; font: 600 13.5px/1.2 system-ui, -apple-system, sans-serif; cursor: pointer; }
.tc-muted[hidden] { display: none; }
.tc-muted-on { text-decoration: underline; text-underline-offset: 2px; }
.tc-muted:focus-visible { outline: 2px solid var(--wd-focus); outline-offset: 2px; }
.tc-note { justify-self: center; margin: 0; padding: 7px 14px; border-radius: 10px; background: rgba(20, 22, 28, 0.82); color: #ffe9b0; font: 600 13.5px/1.4 system-ui, -apple-system, sans-serif; text-align: center; }
.tc-note[hidden] { display: none; }
.tc-signup { margin-left: 8px; color: var(--wd-accent); font-weight: 700; }
.tc-signup[hidden] { display: none; }
.tc-compose { display: flex; align-items: flex-end; gap: 8px; margin: 0; padding: 6px 6px 6px 16px; border-radius: 22px; background: rgba(20, 22, 28, 0.8);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25); }
.tc-compose textarea { flex: 1; min-width: 0; max-height: 120px; padding: 8px 0; border: 0; resize: none; background: transparent; color: #fff;
  font: 500 16px/1.4 system-ui, -apple-system, sans-serif; outline: none; }
.tc-compose textarea::placeholder { color: #9aa0ab; }
.tc-compose-signup, .tc-compose-signup textarea { cursor: pointer; }
.tc-compose-signup { align-items: center; }
.tc-send { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--wd-accent); color: var(--wd-accent-ink);
  font: 700 18px/1 system-ui, -apple-system, sans-serif; cursor: pointer; }
.tc-send:disabled { opacity: 0.45; cursor: default; }
.tc-send:focus-visible { outline: 2px solid var(--wd-focus); outline-offset: 2px; }
/* nothing to ask until the classroom's there */
.wd-stage:has(.wd-cover:not(.wd-gone)) .tc-dock { display: none; }
@media (max-width: 600px) {
  .tc-name { display: none; }
  .tc-share span { display: none; }
  .tc-idea { font-size: 12.5px; padding: 6px 10px; }
}
