/* radiq-frcr-viva.css
   ===================================================================
   FRCR 2B Viva practice simulator — visual chrome, styled to match the
   Royal College of Radiologists' own CR2B remote viva platform (per the
   candidate's reference screenshots): dark navy exam toolbar with
   icon-over-label buttons, a two-pane body (candidate case pane / blank
   "examiner" pane), a plain gray-gradient empty state, and a compact
   in-image toolbar (title, scroll counter, tool menu, reset, step,
   fullscreen, close) over a pure-black canvas once a case is open.
   See radiq-frcr-viva.js for all behavior.
   =================================================================== */

.frcr-overlay {
  position: fixed; inset: 0; z-index: 900; background: #05090f;
  display: flex; flex-direction: column; font-family: 'Manrope', -apple-system, sans-serif;
  color: #d7deeb;
}
.frcr-overlay.hidden { display: none; }

/* ---------- Exam toolbar ---------- */
.frcr-examtoolbar {
  display: flex; align-items: stretch; justify-content: space-between;
  background: #0e1c30; border-bottom: 1px solid #1c3350;
  box-shadow: 0 2px 0 0 #0a1626; flex: 0 0 auto;
}
.frcr-examtoolbar-left, .frcr-examtoolbar-right { display: flex; align-items: stretch; }
.frcr-exambtn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  background: none; border: none; color: #aab6cc; cursor: pointer; font-family: inherit;
  padding: 8px 14px; font-size: 9.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  white-space: nowrap; transition: background .12s, color .12s;
}
.frcr-exambtn svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.frcr-exambtn:hover { background: rgba(255,255,255,0.06); color: #eef2fa; }
.frcr-exambtn.active { color: #6fb2ff; }
.frcr-exambtn.active svg { stroke: #6fb2ff; }
.frcr-exambtn:disabled { opacity: .4; cursor: default; pointer-events: none; }
.frcr-exam-stat {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  padding: 8px 16px; min-width: 76px;
}
.frcr-exam-stat-val { font-size: 12.5px; font-weight: 700; color: #eef2fa; font-variant-numeric: tabular-nums; }
.frcr-exam-stat-label { font-size: 9px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #7788a3; }
.frcr-examtoolbar-right .frcr-exambtn { }

/* ---------- Body: two panes ---------- */
.frcr-body { flex: 1 1 auto; display: flex; min-height: 0; }
.frcr-pane { flex: 1 1 50%; display: flex; flex-direction: column; min-width: 0; }
.frcr-pane-candidate { border-right: 2px solid #0a1626; }
.frcr-pane-header {
  display: flex; align-items: center; justify-content: space-between;
  background: #0e1c30; color: #cfd8e8; font-size: 12.5px; padding: 7px 14px;
  flex: 0 0 auto; border-bottom: 1px solid #1c3350;
}
.frcr-pane-content {
  flex: 1 1 auto; position: relative; min-height: 0; overflow: hidden;
  background: linear-gradient(135deg, #fdfdfd, #d9dce2);
}
.frcr-theme-light .frcr-pane-content { background: linear-gradient(135deg, #ffffff, #e3e6ec); }

/* Empty "examiner" pane — a real deployment would show the examiner's
   shared screen here; this mockup is candidate-only practice, so it just
   explains that plainly rather than faking a second participant. */
.frcr-examiner-blank {
  display: flex; align-items: center; justify-content: center; padding: 32px;
}
.frcr-examiner-blank p {
  max-width: 320px; text-align: center; font-size: 13px; line-height: 1.6; color: #6b7280; margin: 0;
}

/* ---------- Upload dropzone (candidate pane, before any case) ---------- */
.frcr-upload-dropzone {
  position: absolute; inset: 24px; border: 2px dashed #b7bcc7; border-radius: 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  text-align: center; padding: 24px; cursor: pointer; transition: border-color .15s, background .15s;
}
.frcr-upload-dropzone:hover, .frcr-upload-dropzone.dragover { border-color: #4a90e2; background: rgba(74,144,226,0.06); }
.frcr-upload-dropzone svg { width: 30px; height: 30px; stroke: #8a92a3; stroke-width: 1.5; fill: none; margin-bottom: 4px; }
.frcr-upload-dropzone p { margin: 0; font-size: 13.5px; color: #3a3f4b; font-weight: 600; }
.frcr-upload-hint { font-size: 11.5px !important; color: #7a8194 !important; font-weight: 500 !important; max-width: 320px; }
.frcr-upload-dropzone.hidden { display: none; }

/* ---------- Case thumbnail card (closed state) ---------- */
.frcr-case-thumb {
  position: absolute; top: 18px; left: 18px; width: 210px; background: #f3f3f3; border: 1px solid #c7cad1;
  border-radius: 4px; padding: 10px 10px 8px; cursor: pointer; text-align: center; box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.frcr-case-thumb:hover { border-color: #4a90e2; }
.frcr-case-thumb-label { font-size: 11.5px; font-style: italic; color: #444; line-height: 1.35; margin: 0 0 8px; }
.frcr-case-thumb img { width: 100%; height: auto; display: block; border-radius: 2px; background: #000; }
.frcr-case-thumb-slices { font-size: 11px; color: #555; margin: 8px 0 0; }
.frcr-case-thumb.hidden { display: none; }

/* ---------- Image viewer (open state) ---------- */
.frcr-image-viewer { position: absolute; inset: 0; display: flex; flex-direction: column; background: #000; }
.frcr-image-viewer.hidden { display: none; }
.frcr-iv-toolbar {
  flex: 0 0 auto; display: flex; align-items: center; gap: 2px; background: #333a44; color: #e4e7ee;
  padding: 6px 10px; font-size: 12.5px;
}
.frcr-iv-title { flex: 1 1 auto; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.frcr-iv-scroll { font-size: 11.5px; color: #c2c7d1; margin-right: 8px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.frcr-iv-btn {
  background: none; border: none; color: #d7dbe4; cursor: pointer; font-size: 14px; line-height: 1;
  padding: 5px 8px; border-radius: 3px; display: flex; align-items: center; justify-content: center;
}
.frcr-iv-btn:hover { background: rgba(255,255,255,0.12); }
.frcr-iv-btn svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.frcr-iv-series-group { display: flex; align-items: center; gap: 1px; margin-right: 6px; }
.frcr-iv-series-group.hidden { display: none; }
.frcr-iv-series-btn { width: auto; gap: 5px; padding: 5px 9px; font-size: 11.5px; font-weight: 600; }
.frcr-iv-series-nav { padding: 5px 5px; }
.frcr-iv-series-nav:disabled { opacity: .35; cursor: default; pointer-events: none; }
#frcrSeriesMenu { left: auto; right: 160px; top: 38px; min-width: 220px; }
.frcr-iv-canvas-wrap { position: relative; flex: 1 1 auto; min-height: 0; background: #000; }
.frcr-iv-element { position: absolute; inset: 0; }
.frcr-iv-element canvas { outline: none; }

/* Slice scrollbar overlay (shown while the scroll tool is active) */
.frcr-iv-scrollbar {
  position: absolute; top: 14px; right: 14px; bottom: 14px; width: 34px;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  pointer-events: none; font-size: 10px; color: #8fb3e8; font-variant-numeric: tabular-nums;
}
.frcr-iv-scrollbar.hidden { display: none; }
.frcr-iv-scrollbar-track {
  position: relative; width: 2px; flex: 1 1 auto; background: #3f5c85; margin: 4px 0; pointer-events: auto; cursor: pointer;
}
.frcr-iv-scrollbar-thumb {
  position: absolute; left: 50%; width: 9px; height: 9px; border-radius: 50%; background: #6fb2ff;
  transform: translate(-50%, -50%); cursor: grab; box-shadow: 0 0 0 3px rgba(111,178,255,0.18);
}

/* ---------- Tool dropdown menu ---------- */
.frcr-tool-menu {
  position: absolute; top: 38px; left: 168px; background: #e9eaee; border: 1px solid #b7bac2; border-radius: 3px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.35); min-width: 190px; padding: 4px 0; z-index: 10; font-size: 13px;
}
.frcr-tool-menu.hidden { display: none; }
.frcr-tool-menu-item {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 6px 14px; color: #24272e; cursor: pointer; white-space: nowrap;
}
.frcr-tool-menu-item:hover { background: #dfe2ea; }
.frcr-tool-menu-item.active { background: #3f7fd8; color: #fff; }
.frcr-tool-menu-item .frcr-tool-check { width: 12px; display: inline-block; }
.frcr-tool-menu-sep { height: 1px; background: #c6c9d1; margin: 4px 0; }
.frcr-tool-menu-modality { padding: 6px 14px; color: #8a8f9c; font-size: 11.5px; }

/* ---------- Fullscreen (double-click image) ---------- */
.frcr-overlay.frcr-fullscreen .frcr-examtoolbar,
.frcr-overlay.frcr-fullscreen .frcr-pane-header,
.frcr-overlay.frcr-fullscreen .frcr-pane-examiner {
  display: none;
}
.frcr-overlay.frcr-fullscreen .frcr-pane-candidate { border-right: none; flex: 1 1 100%; }
.frcr-overlay.frcr-fullscreen .frcr-body { }

/* ---------- Notes slide-over ---------- */
.frcr-notes-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: 320px; max-width: 86vw; background: #f7f7f5;
  border-left: 1px solid #c7cad1; box-shadow: -8px 0 24px rgba(0,0,0,0.25); display: flex; flex-direction: column;
  z-index: 20;
}
.frcr-notes-panel.hidden { display: none; }
.frcr-notes-header {
  display: flex; align-items: center; justify-content: space-between; padding: 12px 14px;
  border-bottom: 1px solid #ddd; font-weight: 700; font-size: 13.5px; color: #2a2d34;
}
.frcr-notes-header button { background: none; border: none; font-size: 18px; cursor: pointer; color: #666; line-height: 1; }
.frcr-notes-panel textarea {
  flex: 1 1 auto; border: none; resize: none; padding: 14px; font-family: inherit; font-size: 13px;
  line-height: 1.6; color: #2a2d34; outline: none; background: transparent;
}

/* ---------- Finished banner ---------- */
.frcr-finished-banner {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  background: #1c3350; color: #eef2fa; font-size: 12.5px; font-weight: 700; padding: 8px 16px;
  border-radius: 999px; box-shadow: 0 4px 14px rgba(0,0,0,0.3); z-index: 15;
}
.frcr-finished-banner.hidden { display: none; }

@media (max-width: 760px) {
  .frcr-body { flex-direction: column; }
  .frcr-pane-candidate { border-right: none; border-bottom: 2px solid #0a1626; }
  .frcr-exambtn span, .frcr-exam-stat { display: none; }
  .frcr-exambtn { padding: 8px 9px; }
}
