/* Stratus Exams — Dark Corporate Theme (patched input styling)
   This version ensures inputs WITHOUT a type attribute are styled correctly,
   and improves readability/autofill in dark mode.
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

:root{
  --bg: #0c0f14;
  --panel: #141a22;
  --panel-alt: #0f131a;
  --border: rgba(255,255,255,0.08);
  --border-2: rgba(255,255,255,0.12);

  --text: #e5e7eb;
  --muted: #9aa4b2;

  --primary: #08a6ff;
  --primary-700: #0b86cf;
  --primary-900: #0a5c8f;

  --success: #22c55e;
  --error: #ef4444;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.5);
  --shadow-md: 0 8px 30px rgba(0,0,0,.45);

  --radius: 14px;
  --radius-sm: 10px;
  --gap: 12px;
}

*{ box-sizing:border-box; }
html{ font-size:16px; }
body{
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 800px at 10% -10%, #122033 0%, #0c0f14 40%) fixed, var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a{ color: var(--primary); text-decoration: none; }
a:hover{ text-decoration: underline; }

.container{ max-width: 1024px; margin: 28px auto; padding: 0 16px; }

.card{
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

h1,h2,h3,h4{ margin: .2em 0 .6em; line-height:1.25; color: var(--text); }
h1{ font-size: 1.8rem; font-weight:700; letter-spacing:.2px; }
h2{ font-size: 1.35rem; font-weight:700; color: #f1f5f9; }
h3{ font-size: 1.1rem; font-weight:600; color: #d8dee9; }
h4{ font-size: 1rem; font-weight:600; color: var(--muted); }

.badge{
  display:inline-block;
  padding: 5px 10px;
  font-size:.85rem;
  border-radius: 999px;
  background: rgba(8,166,255,.12);
  color: #cfe9ff;
  border: 1px solid rgba(8,166,255,.25);
}

.proctor-alerts{
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: min(420px, calc(100vw - 24px));
  max-height: min(70vh, 520px);
  display: none;
  background: #101a26;
  border: 1px solid rgba(239,68,68,.45);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  z-index: 2600;
  overflow: hidden;
}
.proctor-alerts.is-visible{
  display: block;
}
.proctor-alerts-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(239,68,68,.12);
  border-bottom: 1px solid rgba(239,68,68,.25);
}
.proctor-alerts-count{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-weight: 700;
  font-size: .85rem;
  background: rgba(239,68,68,.28);
  color: #ffe2e2;
}
.proctor-alerts-list{
  padding: 10px;
  max-height: min(62vh, 430px);
  overflow-y: auto;
}
.proctor-alert-item{
  display: grid;
  gap: 8px;
  padding: 10px;
  margin-bottom: 10px;
  border: 1px solid var(--border-2);
  border-radius: 10px;
  background: rgba(255,255,255,0.02);
}
.proctor-alert-item:last-child{
  margin-bottom: 0;
}
.proctor-alert-message{
  color: #ffdada;
  font-weight: 700;
}
.proctor-alert-meta{
  color: #b5c2d1;
  font-size: .88rem;
}
.proctor-alert-note-wrap{
  margin: 2px 0 0;
  font-size: .82rem;
  font-weight: 700;
  color: #ffd0d0;
}
.proctor-alert-note{
  width: 100%;
  margin-top: 2px;
}
.proctor-alert-actions{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.proctor-alert-actions .btn{
  width: auto;
}

.row{ display:flex; flex-wrap:wrap; gap: var(--gap); }
.col{ flex:1 1 260px; min-width:240px; }
.actions-stack{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.actions-cell{
  width: 1%;
  white-space: nowrap;
}
.actions-menu{
  position: relative;
  display: inline-block;
}
.actions-menu summary{
  list-style: none;
  cursor: pointer;
}
.actions-menu summary::-webkit-details-marker{
  display: none;
}
.actions-menu summary.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 110px;
}
.actions-caret::before{
  content: "▼";
  font-size: .8rem;
  line-height: 1;
}
.actions-menu[open] .actions-caret::before{
  content: "▲";
}
.actions-menu-list{
  position: fixed;
  left: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: max-content;
  min-width: 220px;
  max-width: min(320px, calc(100vw - 16px));
  padding: 8px;
  border: 1px solid var(--border-2);
  border-radius: 12px;
  background: #0f1822;
  box-shadow: var(--shadow-md);
  z-index: 2000;
}
.actions-menu-list a{
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: #cfe9ff;
}
.actions-menu-list a:hover{
  background: rgba(8,166,255,.12);
  text-decoration: none;
}

.table{
  width:100%; border-collapse:separate; border-spacing:0;
  margin-top:10px; font-size:.95rem;
  background: var(--panel-alt);
  border:1px solid var(--border);
  border-radius: var(--radius);
  overflow:hidden;
}
.table th, .table td{ padding: 12px 14px; border-bottom: 1px solid var(--border); }
.table th{
  text-align:left; font-size:.8rem; text-transform:uppercase; letter-spacing:.06em;
  color: var(--muted);
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.00));
}
.table tr:hover td{ background: rgba(255,255,255,0.02); }
.table tr:last-child td{ border-bottom: none; }
.table-wrap{ width:100%; overflow-x:auto; }

.attempt-group{
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 12px 0;
  background: var(--panel-alt);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.attempt-group summary{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap: 12px;
  padding: 12px 16px;
  cursor:pointer;
  list-style:none;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
}
.attempt-group summary::-webkit-details-marker{ display:none; }
.attempt-group summary::marker{ content:''; display:none; }
.attempt-group[open] summary{ border-bottom: 1px solid var(--border); }
.attempt-group .table{
  margin:0;
  border:0;
  border-radius:0;
}

.exam-question{
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.exam-question.exam-question-missing{
  border-color: rgba(239,68,68,.75);
  background: linear-gradient(180deg, rgba(239,68,68,.12), rgba(239,68,68,.05));
  box-shadow: 0 0 0 2px rgba(239,68,68,.15);
}
.exam-question.exam-question-missing .answer-option-card{
  border-color: rgba(239,68,68,.55);
}
.answer-option{
  display: block;
  margin: 0;
  cursor: pointer;
}
.answer-option input{
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.answer-option-card{
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border-2);
  border-radius: 12px;
  background: #0e131a;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease, transform .02s ease;
}
.answer-option:hover .answer-option-card{
  border-color: rgba(8,166,255,.45);
  background: #101925;
}
.answer-option input:focus-visible + .answer-option-card{
  outline: 3px solid rgba(8,166,255,.5);
  outline-offset: 2px;
}
.answer-option input:checked + .answer-option-card{
  border-color: rgba(8,166,255,.9);
  background: rgba(8,166,255,.16);
  box-shadow: 0 0 0 3px rgba(8,166,255,.18);
}
.answer-option-label{
  flex: 0 0 auto;
  min-width: 38px;
  font-weight: 700;
  color: #cfe9ff;
}
.answer-option-text{
  color: var(--text);
}

/* --------------------
   FORM CONTROLS (FIX)
   -------------------- */
label{ font-weight:600; display:block; margin:10px 0 6px; color:#dfe6ee; }

/* Style ANY text-like input (even if the type="" attribute is missing) */
input:not([type]):not([type="radio"]):not([type="checkbox"]):not([type="submit"]):not([type="button"]),
input[type="text"],
input[type="email"],
input[type="search"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="password"],
input[type="file"],
textarea,
select{
  width:100%;
  padding:12px 14px;
  border:1px solid var(--border-2);
  border-radius: var(--radius-sm);
  background: #0e131a;
  color: var(--text);
  outline:none;
  transition: box-shadow .15s ease, border-color .15s ease, background .15s ease;
  caret-color: var(--primary);
  color-scheme: dark;
  background-clip: padding-box;
}

textarea{ min-height:120px; resize:vertical; }

/* Placeholder visibility */
input::placeholder, textarea::placeholder{ color: #6b7785; opacity: 1; }

/* Focus state */
input:focus, textarea:focus, select:focus{
  border-color: rgba(8,166,255,.65);
  box-shadow: 0 0 0 3px rgba(8,166,255,.18);
  background: #0c1218;
}

/* Radios & checkboxes keep default size, but with accent color */
input[type="radio"], input[type="checkbox"]{ accent-color: var(--primary); }

/* Autofill in Chrome/Safari (dark mode readable) */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus{
  -webkit-text-fill-color: var(--text);
  box-shadow: 0 0 0px 1000px #0e131a inset;
  caret-color: var(--primary);
  transition: background-color 9999s ease-out 0s;
}

/* File input tweaks */
input[type="file"]{ color: var(--muted); background: #0e131a; }

/* Buttons */
.btn, button{
  display:inline-block;
  padding: 11px 16px;
  border-radius: 12px;
  border:1px solid var(--border-2);
  font-weight:700;
  letter-spacing:.2px;
  cursor:pointer;
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-700) 100%);
  color: #07131e;
  text-shadow: 0 1px 0 rgba(255,255,255,.2);
  box-shadow: 0 4px 14px rgba(8,166,255,.2), inset 0 1px 0 rgba(255,255,255,.25);
  transition: transform .02s ease, filter .15s ease, box-shadow .2s ease, background .15s ease;
}
.btn:hover, button:hover{ filter:brightness(1.05); text-decoration:none; }
.btn:active, button:active{ transform: translateY(1px); }
.btn.secondary{
  background: #0f1822;
  color: #cfe9ff;
  border-color: var(--border-2);
}

.status-ok{ color: var(--success); font-weight:700; }
.status-bad{ color: var(--error); font-weight:700; }
.lockout-panel{
  border-color: rgba(239,68,68,.45);
  background: linear-gradient(180deg, rgba(239,68,68,.12), rgba(239,68,68,.04));
}

img.q, .qimg{
  display:block;
  max-width:min(100%, 560px);
  height:auto;
  margin:10px 0;
  border-radius: 10px;
  border:1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

hr{ border:0; height:1px; background: var(--border); margin: 16px 0; }

:where(a,button,.btn,input,textarea,select):focus-visible{
  outline: 3px solid rgba(8,166,255,.5);
  outline-offset: 2px;
  border-radius: 12px;
}

@media (max-width: 560px){
  .container{ margin: 20px auto; }
  .col{ min-width: 100%; }
  .table th, .table td{ padding: 10px 12px; }
  h1{ font-size: 1.5rem; }
  .btn, button{ width:100%; text-align:center; }
  .proctor-alert-actions{ display: grid; grid-template-columns: 1fr; }
  .proctor-alert-actions .btn{ width: 100%; }
  .actions-stack{ flex-direction:column; width:100%; }
  .actions-menu{ width: 100%; }
}


/* === Input size bump for readability === */
input:not([type]):not([type="radio"]):not([type="checkbox"]):not([type="submit"]):not([type="button"]),
input[type="text"],
input[type="email"],
input[type="search"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="password"],
input[type="file"],
textarea,
select{
  font-size: 18px;       /* bigger text */
  line-height: 1.4;      /* more comfortable line height */
}

input::placeholder,
textarea::placeholder{
  font-size: 0.95em;     /* scale with the input size */
}
