/* Full-screen application and exercise viewport. Cascade order is defined in index.html. */

/* v5.5 — definitive assignment viewport + password dark modal */
body.exercise-focus #studentWorkView{
  position:fixed!important;
  inset:0!important;
  z-index:80!important;
  width:100vw!important;
  height:100dvh!important;
  min-height:0!important;
  margin:0!important;
  padding:0!important;
  background:var(--bg,#f5f7fb)!important;
  overflow:hidden!important;
}
body.exercise-focus #studentWorkView>.card{
  width:100%!important;
  height:100dvh!important;
  min-height:0!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
}
body.exercise-focus #studentPreview{
  flex:1 1 0!important;
  height:0!important;
  min-height:0!important;
  padding:0!important;
  margin:0!important;
  border:0!important;
  overflow:hidden!important;
}
body.exercise-focus #studentPreview>.exam-shell,
body.exercise-focus #studentPreview>.exam-v5{
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  max-height:none!important;
  margin:0!important;
  border-left:0!important;
  border-right:0!important;
  border-bottom:0!important;
  border-radius:0!important;
}
/* Renderer now omits exam-summary for assignments; this is a fallback. */
body.exercise-focus #studentPreview .exam-summary{display:none!important}

/* Password modal — selectors intentionally stronger than legacy .card rules. */
html[data-theme="dark"] body #passwordPanel.pw-panel.card:not(.hide),
html[data-theme="dark"] body #passwordPanel.pw-panel:not(.hide){
  background:#111827!important;
  background-color:#111827!important;
  border:1px solid #34445b!important;
  color:#e8eef7!important;
  box-shadow:0 28px 90px rgba(0,0,0,.62)!important;
}
html[data-theme="dark"] body #passwordPanel *{color:#e8eef7}
html[data-theme="dark"] body #passwordPanel label{color:#cbd5e1!important}
html[data-theme="dark"] body #passwordPanel input,
html[data-theme="dark"] body #passwordPanel input[type="password"]{
  background:#0b1320!important;
  background-color:#0b1320!important;
  color:#f8fafc!important;
  border:1px solid #42536c!important;
  -webkit-text-fill-color:#f8fafc!important;
  caret-color:#f8fafc!important;
}
html[data-theme="dark"] body #passwordPanel input::placeholder{
  color:#8795aa!important;
  -webkit-text-fill-color:#8795aa!important;
  opacity:1!important;
}
html[data-theme="dark"] body #passwordPanel button:not(.primary){
  background:#1a2638!important;
  color:#eef4fb!important;
  border-color:#3b4b62!important;
}
html[data-theme="dark"] body #passwordPanel .primary{background:#2d5eea!important;color:#fff!important}
html[data-theme="dark"] body.password-open:after{background:rgba(3,8,16,.78)!important}

@media(max-width:800px){
  body.exercise-focus #studentWorkView,
  body.exercise-focus #studentWorkView>.card{height:100dvh!important;min-height:0!important}
  body.exercise-focus #studentPreview{height:0!important;overflow:hidden!important}
}
