/* TB-1049: the Test Student banner (N5) and the "Test as student" entry.
   Self-contained so the banner renders the same on the shell (base.html) and
   on the standalone pages a Test Student meets (policy gate, reader, course
   gate, public board), none of which share one stylesheet. */
.terminal-test-student-banner {
  position: relative;
  z-index: 5;
  box-sizing: border-box;
  width: min(100%, 1180px);
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin: 0 auto 22px;
  padding: 12px 14px;
  border: 1px solid #b9a1e0;
  border-radius: 8px;
  color: #3d2a6b;
  background: #f3eefc;
  font-family: inherit;
  font-size: 0.875rem;
  line-height: 1.4;
  text-align: left;
}
.terminal-test-student-banner * { box-sizing: border-box; }
.terminal-test-student-banner .terminal-test-student-copy {
  flex: 1 1 16rem;
  min-width: 0;
}
.terminal-test-student-banner strong,
.terminal-test-student-banner small { display: block; }
.terminal-test-student-banner strong { font-size: 0.875rem; }
.terminal-test-student-banner small {
  margin-top: 2px;
  color: #4b3a78;
  font-size: 0.75rem;
}
.terminal-test-student-actions {
  flex: 0 1 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
}
.terminal-test-student-actions form { margin: 0; }
.terminal-test-student-banner button,
.terminal-test-student-reset > summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid #8f7cc0;
  border-radius: 8px;
  color: #2f1f63;
  background: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.terminal-test-student-reset { position: relative; }
.terminal-test-student-reset > summary { list-style: none; }
.terminal-test-student-reset > summary::-webkit-details-marker { display: none; }
.terminal-test-student-reset-panel {
  margin-top: 8px;
  padding: 10px 12px;
  max-width: 22rem;
  border: 1px solid #cfc4ea;
  border-radius: 8px;
  color: #1f2933;
  background: #fff;
}
.terminal-test-student-reset-panel p { margin: 0 0 8px; font-size: 0.8125rem; }
.test-student-entry {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.test-student-entry-section {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.test-student-entry { margin: 0; }
/* Inside the quiz builder's dark header, match "Preview as student". */
.qb-hact .test-student-entry-section { color: #fff; font-size: .78rem; }
.test-student-panel { display: block; margin-top: 22px; }
.test-student-panel h2 { margin: 0 0 6px; font-size: 1rem; }
.test-student-panel p { max-width: 44rem; }
.test-student-reset-list { margin-top: 12px; }
.test-student-reset-list form { margin-top: 8px; }
@media (max-width: 560px) {
  .terminal-test-student-actions,
  .terminal-test-student-actions form,
  .terminal-test-student-reset,
  .terminal-test-student-reset > summary,
  .terminal-test-student-banner button { width: 100%; }
  .terminal-test-student-reset-panel { max-width: none; }
}
