/* ==========================================================================
   MathMaster – ProctoringEngine stiliai (žr. static/js/proctoring.js)
   ========================================================================== */

/* Teksto žymėjimo blokavimas visame puslapyje, kol egzaminas aktyvus. */
html.mm-proctor-active,
html.mm-proctor-active * {
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}
/* Įvesties laukeliai (atsakymo laukas, skaičiuotuvo klaviatūra) turi likti
   redaguojami – be šios išimties mokinys negalėtų net įrašyti atsakymo. */
html.mm-proctor-active input,
html.mm-proctor-active textarea,
html.mm-proctor-active math-field,
html.mm-proctor-active [contenteditable] {
  -webkit-user-select: text;
  -moz-user-select: text;
  user-select: text;
}

/* Skaidrus sluoksnis virš kiekvienos KaTeX formulės – žr. JS komentarą, kodėl
   `pointer-events: auto`, o ne `none`. */
.mm-formula-shield {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: transparent;
  cursor: default;
  pointer-events: auto;
}

/* Pažeidimo / nutraukimo perdanga. Beveik nepermatoma (95%) + suliejimas,
   kad NIEKAS iš egzamino turinio (uždavinio sąlyga, skaičiai) nebūtų
   įskaitomas, kol mokinys nesugrįžo – žr. modulio komentarą apie
   `window.blur`/`!document.hasFocus()` aptikimą. Perejimo trukmė sąmoningai
   labai trumpa (ne 0), kad skydas atrodytų AKIMIRKSNIU atsiradęs, o ne
   dingęs be jokio vaizdinio signalo. */
#mm-proctor-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 6, 23, 0.95);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.06s ease;
}
#mm-proctor-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}
.mm-proctor-box {
  width: min(420px, 90vw);
  padding: 28px 26px;
  border-radius: 16px;
  background: #1c1e26;
  border: 2px solid #ef4444;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  text-align: center;
  color: #f4f4f6;
}
#mm-proctor-overlay.terminated .mm-proctor-box {
  border-color: #7f1d1d;
}
.mm-proctor-title {
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.4;
  margin-bottom: 10px;
}
.mm-proctor-sub {
  font-size: 0.92rem;
  line-height: 1.5;
  color: #cbd5e1;
  margin-bottom: 16px;
}
.mm-proctor-count {
  font-size: 2.4rem;
  font-weight: 900;
  color: #ef4444;
  margin-bottom: 16px;
  font-variant-numeric: tabular-nums;
}
.mm-proctor-restore {
  border: none;
  border-radius: 10px;
  padding: 12px 20px;
  font-size: 0.95rem;
  font-weight: 700;
  background: #ef4444;
  color: #fff;
  cursor: pointer;
}
.mm-proctor-restore:hover { background: #dc2626; }

/* Egzamino pradžios mygtukas (naudojamas exam_simulator puslapyje). */
.mm-proctor-start-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 12px;
  border: none;
  background: #16a34a;
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
}
.mm-proctor-start-btn:hover { background: #15803d; }
