/* Teacher permissions panel — see app/ielts/teacher-permissions-ui.js.
 *
 * Its own sheet rather than more rules in style.css: this is teacher-only
 * chrome that most visitors never render, and the file it styles is loaded
 * beside it. */

.tperm {
  margin-top: 12px;
  padding: 14px 16px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}

.tperm-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
}

.tperm-note {
  margin: 4px 0 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: #64748b;
}

.tperm-row {
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid #e2e8f0;
}

.tperm-row:first-of-type {
  border-top: 0;
}

/* A row mid-write. Pointer events off rather than disabling each button, so a
   second click during the round trip cannot queue a write whose ordering is
   not guaranteed. */
.tperm-row--busy {
  opacity: 0.55;
  pointer-events: none;
}

.tperm-row-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.tperm-row-label {
  font-size: 0.9rem;
  font-weight: 800;
  color: #0f172a;
}

/* Says the flag cannot reach Simulation mode. Carries a title attribute with
   the reason, because the badge alone reads like a limitation rather than a
   deliberate rule. */
.tperm-tag {
  padding: 2px 8px;
  border-radius: 999px;
  background: #e0e7ff;
  color: #3730a3;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  cursor: help;
}

.tperm-row-help {
  margin: 4px 0 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: #475569;
}

/* Three segments, always all three visible. A checkbox cannot express the
   third state this model needs — see the header note in the UI file. */
.tperm-segs {
  display: inline-flex;
  margin-top: 9px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  overflow: hidden;
  background: #ffffff;
}

.tperm-seg {
  padding: 7px 14px;
  border: 0;
  border-left: 1px solid #e2e8f0;
  background: transparent;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
}

.tperm-seg:first-child {
  border-left: 0;
}

.tperm-seg:hover {
  background: #f1f5f9;
}

.tperm-seg--on {
  background: #2563eb;
  color: #ffffff;
}

.tperm-seg--on:hover {
  background: #1d4ed8;
}

.tperm-row-foot {
  margin-top: 8px;
}

.tperm-eff {
  font-size: 0.78rem;
  line-height: 1.45;
  color: #334155;
}

/* The built-in rule reads quieter than a decision somebody made. */
.tperm-eff--default {
  color: #64748b;
  font-style: italic;
}

.tperm-status {
  margin: 12px 0 0;
  min-height: 1.1em;
  font-size: 0.78rem;
  font-weight: 700;
  color: #15803d;
}

.tperm-status--err {
  color: #b91c1c;
}

@media (max-width: 560px) {
  .tperm-segs {
    width: 100%;
  }

  .tperm-seg {
    flex: 1;
    padding: 9px 6px;
    text-align: center;
  }
}
