/* Classroom controls share one baseline, with the code anchored to the bar center. */
body.ui-teacher .topbar.classroom-toolbar {
  height: 48px;
  min-height: 48px;
  flex: 0 0 48px;
  padding: 0 20px;
  gap: 16px;
  flex-wrap: nowrap;
}
body.ui-teacher .classroom-toolbar .tb-context {
  border: 0;
  padding: 0;
  gap: 12px;
  max-width: calc(50% - 120px);
  flex: 0 1 auto;
}
body.ui-teacher .classroom-toolbar .tb-context-copy { gap: 10px; }
body.ui-teacher .classroom-toolbar #tb-title { font-size: 16px; line-height: 24px; }
body.ui-teacher .classroom-toolbar #tb-topic { border: 0; padding: 0; white-space: nowrap; }
body.ui-teacher .classroom-toolbar #canvas-autosave-hint { font-size: 11px; white-space: nowrap; }
body.ui-teacher .classroom-toolbar .network-quality { flex: 0 0 auto; }
body.ui-teacher .classroom-toolbar .tb-actions {
  margin-left: auto;
  gap: 16px;
  flex: 0 0 auto;
  flex-wrap: nowrap;
}
body.ui-teacher .classroom-toolbar #tb-code-block {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  gap: 0;
}
body.ui-teacher .classroom-toolbar #tb-code-block #tb-code {
  font: 650 20px/26px system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: 1px;
}
body.ui-teacher .classroom-toolbar .class-code-label {
  position: absolute;
  right: calc(100% + 9px);
  white-space: nowrap;
}
.class-code-qr {
  position: absolute;
  left: calc(100% + 9px);
  width: 28px;
  height: 30px;
  display: grid;
  place-items: center;
  padding: 4px;
  border: 0;
  border-radius: 7px;
  color: var(--text-2);
  background: transparent;
  cursor: pointer;
}
.class-code-qr svg, .classroom-more-panel svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
#teacher-recording-host { display: flex; align-items: center; }
body.ui-teacher .classroom-toolbar .recording-status-widget {
  flex-wrap: nowrap;
  min-height: 36px;
  max-width: none;
  white-space: nowrap;
  box-shadow: none;
}
.classroom-more { position: relative; flex: 0 0 auto; }
.classroom-more summary {
  display: grid;
  place-items: center;
  list-style: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: var(--text-2);
  cursor: pointer;
}
.classroom-more summary::-webkit-details-marker { display: none; }
.classroom-more summary svg { width: 20px; height: 20px; fill: currentColor; }
.classroom-more summary:hover, .class-code-qr:hover { background: var(--primary-soft); }
.classroom-more-panel {
  position: absolute;
  right: 0;
  top: 40px;
  width: 180px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface, white);
  box-shadow: 0 6px 24px #25293822;
}
.classroom-more-panel button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.classroom-more-panel button:hover { background: var(--primary-soft); }
.classroom-more summary:focus-visible, .class-code-qr:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}
@media (max-width: 1250px) {
  body.ui-teacher .classroom-toolbar #canvas-autosave-hint { display: none; }
  body.ui-teacher .classroom-toolbar .tb-actions { gap: 8px; }
}
@media (max-width: 1000px) {
  body.ui-teacher .classroom-toolbar .recording-status-widget [data-health] { display: none; }
  body.ui-teacher .classroom-toolbar .network-quality { display: none; }
}

/* Respond to the actual toolbar width, including an expanded sidebar. */
body.ui-teacher .topbar.classroom-toolbar { container-type: inline-size; }
@container (max-width: 1050px) {
  body.ui-teacher .classroom-toolbar #canvas-autosave-hint,
  body.ui-teacher .classroom-toolbar .recording-status-widget [data-health] { display: none; }
  body.ui-teacher .classroom-toolbar .tb-actions { gap: 8px; }
}
@container (max-width: 700px) {
  body.ui-teacher .classroom-toolbar #tb-topic,
  body.ui-teacher .classroom-toolbar .network-quality,
  body.ui-teacher .classroom-toolbar .class-code-label { display: none; }
  body.ui-teacher .classroom-toolbar .tb-context { max-width: calc(50% - 100px); }
  body.ui-teacher .classroom-toolbar #tb-code-block #tb-code { font-size: 18px; letter-spacing: .5px; }
}
@container (max-width: 520px) {
  body.ui-teacher .classroom-toolbar .class-code-qr { display: none; }
  body.ui-teacher .classroom-toolbar .tb-context { max-width: calc(50% - 75px); }
  body.ui-teacher .classroom-toolbar .recording-status-widget [data-label] { font-size: 0; }
  body.ui-teacher .classroom-toolbar .recording-status-widget [data-label]::before { font-size: 12px; margin: 0; }
  body.ui-teacher .classroom-toolbar .recording-status-widget { gap: 5px; padding-inline: 6px; }
}
@container (max-width: 420px) {
  body.ui-teacher .classroom-toolbar .recording-status-widget [data-time] { display: none; }
  body.ui-teacher .classroom-toolbar #tb-title { font-size: 13px; }
}
