
/* ============================================================================
   TCS iON exam-console skin for the Grand Test interface.
   Measured from the real TCS iON delivery engine (cdn4.digialm.com), which is
   what NBE / NEET-PG / INI-CET actually run on. Only chrome and colour come
   from there; question content, section counts and timers stay MedVyra's.

   Palette sprite colours sampled from questions-sprite.png:
     answered            #85C624   (green shape)
     not answered        #DF4207   (red shape)
     marked for review   #76549A   (purple shape)
     not visited         #ffffff   (white, 1px #6f7376 border)
     answered+marked     #76549A + green tick
   Header #2d70b6, footer #617B8C, timer chip #102e4e.
   ========================================================================= */

#exam{ font-family:Arial,Helvetica,sans-serif; }

/* The exam is a full-screen overlay: on a real CBT nothing else is visible.
   Without this the collection page showed through the question area. */
#exam:not(.hide){ position:fixed; inset:0; z-index:900; display:flex;
  flex-direction:column; background:#fff; overflow:hidden; }
#exam.hide{ display:none !important; }

/* The old MedVyra exam chrome must not appear: TCS has no floating
   "Question Index" pill, no Note button and no rounded action cards. */
#exam #palFab,#exam .qf-pal,#exam #palRail,#exam #rvFab{ display:none !important; }
#exam .qfoot .btn{ box-shadow:none !important; border-radius:3px !important; }
#exam .qbody .note,#exam .note{ display:none !important; }
/* the action row is a flat bar, not floating cards */
#exam .qfoot{ background:#f7f9fb !important; position:static !important; }
#exam .qfoot .btn.pale{ background:#fff !important; color:#2d70b6 !important; }

/* ---- candidate / system strip (the grey band above the exam) ---- */
#exam .gtc-userinfo{ background:#666; border-bottom:1px solid #444; color:#fff;
  display:flex; align-items:center; gap:18px; padding:6px 14px; font-size:12px; }
#exam .gtc-userinfo .ui-name{ font-size:13px; font-weight:700; }
#exam .gtc-userinfo .ui-sys{ color:#fff200; font-size:13px; font-weight:700; }
#exam .gtc-userinfo .ui-right{ margin-left:auto; text-align:right; color:#fff200; font-size:13px; font-weight:700; }
#exam .gtc-userinfo .ui-pic{ width:44px; height:48px; border:1px solid #000; background:#fafbfc;
  display:flex; align-items:center; justify-content:center; color:#999; font-size:18px; }

/* ---- blue title bar with the exam name (TCS #header) ---- */
#exam .topbar{ background:#2d70b6; border-bottom:1px solid #7691a2; color:#fff;
  height:42px; display:flex; align-items:center; gap:14px; padding:0 12px; font-size:13px; }
#exam .topbar .gtc-exam-ic{ width:26px; height:26px; background:#fff; color:#2d70b6;
  border-radius:3px; display:flex; align-items:center; justify-content:center;
  font-weight:800; font-size:13px; flex:0 0 auto; }
#exam .topbar .gtc-exam-name{ font-size:15px; font-weight:700; line-height:1.1; }
#exam .topbar .gtc-exam-sub{ font-size:11px; opacity:.9; line-height:1.2; }
#exam .topbar .gtc-top-right{ margin-left:auto; display:flex; align-items:center; gap:16px; font-size:12px; }
#exam .topbar .gtc-top-right .toolbar-links{ cursor:pointer; }

/* ---- white sub bar: subject + timer ---- */
#exam .titlebar{ background:#fff; border-bottom:1px solid #e0e0e0; color:#3e5979;
  padding:6px 14px; display:flex; align-items:center; justify-content:space-between;
  gap:12px; font-size:12.5px; }
#exam .titlebar .t1{ font-weight:700; font-size:13px; color:#12304f; }
#exam .titlebar .t2{ color:#617b8c; }

/* timer chip - TCS #timeleftdiv: 85x26 dark navy, white Arial */
#exam .timer{ background:#102e4e; color:#fff; border-radius:3px; padding:0 10px;
  min-width:85px; height:26px; line-height:26px; text-align:center;
  font-size:15px; font-weight:700; font-variant-numeric:tabular-nums;
  display:inline-block; }
#exam .timer.low{ background:#b32222; }

/* ---- three-column body ---- */
#exam .mid{ display:flex; flex:1 1 auto; overflow:hidden; background:#fff; }

/* question column */
#exam .qwrap{ flex:1 1 auto; display:flex; flex-direction:column; overflow:hidden; min-width:0; }
#exam .qhead{ padding:7px 16px; border-bottom:1px solid #eceff2; font-size:13px;
  font-weight:700; color:#12304f; background:#f7f9fb; }
#exam .qbody{ flex:1 1 auto; overflow-y:auto; padding:16px 18px; font-size:14px; line-height:1.7; color:#1c2b3a; }
#exam .qbody .qtext{ margin:0 0 14px; font-weight:600; }
#exam .qbody .qimg{ max-width:100%; margin:0 0 12px; border-radius:4px; }

/* options - plain radio rows, TCS has no cards */
#exam .opts{ display:flex; flex-direction:column; gap:2px; }
#exam .opt{ display:flex; gap:8px; align-items:flex-start; padding:7px 9px;
  border:1px solid transparent; border-radius:3px; cursor:pointer;
  font-size:14px; line-height:1.55; color:#1c2b3a; background:transparent; }
#exam .opt:hover{ background:#f2f6fa; border-color:#dbe6f1; }
#exam .opt.sel{ background:#e8f2fb; border-color:#9cc4e8; }
#exam .opt input{ margin:3px 0 0; accent-color:#2d70b6; flex:0 0 auto; }
#exam .opt b{ color:#2d70b6; flex:0 0 auto; }

/* action row - TCS order: Clear Response | Mark for Review & Next | ... | Previous | Save & Next */
#exam .qfoot{ border-top:1px solid #e0e0e0; padding:8px 14px; display:flex; gap:8px;
  align-items:center; flex-wrap:wrap; flex:0 0 auto; background:#f7f9fb; }
#exam .qfoot .mid-spacer{ flex:1 1 auto; }
#exam .btn{ background:#2d70b6; color:#fff; border:1px solid #2d70b6; border-radius:3px;
  padding:7px 16px; font-size:12.5px; font-weight:700; cursor:pointer;
  font-family:Arial,Helvetica,sans-serif; }
#exam .btn:hover{ background:#1c4b80; border-color:#1c4b80; }
#exam .btn.pale{ background:#fff; color:#2d70b6; border-color:#9cc4e8; }
#exam .btn.pale:hover{ background:#eef5fc; }

/* ---- right palette (TCS .question_area) ---- */
#exam .palette{ width:290px; flex:0 0 290px; display:flex; flex-direction:column;
  overflow:hidden; background:#fff; border-left:1px solid #e0e0e0; }

/* candidate block in the palette */
#exam .pal-cand{ display:flex; gap:9px; align-items:center; padding:9px 12px;
  border-bottom:1px solid #e0e0e0; background:#f7f9fb; }
#exam .pal-cand .ph{ width:32px; height:32px; border-radius:50%; background:#dbe6f1;
  color:#2d70b6; display:flex; align-items:center; justify-content:center; flex:0 0 auto; }
#exam .pal-cand .nm{ font-size:12.5px; font-weight:700; color:#12304f; }

/* legend - the five TCS states, using TCS' own sprite cells.
   Offsets are the real background-position values lifted from their stylesheet,
   so the shapes are identical rather than approximated with clip-path. */
#exam .pal-legend{ padding:9px 12px; border-bottom:1px solid #e0e0e0; font-size:11.5px; color:#262626; }
#exam .pal-legend .row{ display:flex; gap:12px; margin-bottom:5px; }
#exam .pal-legend .row>span{ flex:1 1 0; display:flex; align-items:center; gap:5px; }
#exam .pal-legend b{ color:#12304f; }
#exam .sw{ width:29px; height:26px; flex:0 0 auto; display:inline-block;
  background-repeat:no-repeat; background-position:center; background-size:contain; }
/* the real TCS icons, cropped from their own questions-sprite.png:
     answered            = green pentagon, point UP
     not answered        = orange-red pentagon, point DOWN
     not visited         = plain grey-bordered square
     marked for review   = purple circle with a green tick
     answered + marked   = purple circle with a green list badge      */
#exam .sw-a{ background-image:url("/assets/gtc-sprite-ans.png"); }
#exam .sw-n{ background-image:url("/assets/gtc-sprite-not.png"); }
#exam .sw-v{ background-image:url("/assets/gtc-sprite-nv.png"); }
#exam .sw-m{ background-image:url("/assets/gtc-sprite-mark.png"); }
#exam .sw-am{ background-image:url("/assets/gtc-sprite-am.png"); }

/* section strip + countdown */
#exam .pal-sec{ display:flex; justify-content:space-between; align-items:center;
  padding:7px 12px; background:#2d70b6; color:#fff; font-size:12px; font-weight:700; }
#exam .pal-sec .pal-close{ cursor:pointer; opacity:.9; }

/* the grid of question buttons */
#exam .pal-grid{ flex:1 1 auto; overflow-y:auto; padding:10px 10px;
  display:grid; grid-template-columns:repeat(5,1fr); gap:7px; align-content:start; }
/* Palette buttons use the real TCS sprite cells (large "answered" row),
   stretched to fill the button. background-size is per-state, because each
   cell is a different size in the sheet. */
#exam .pal-b{ width:100%; min-height:38px; aspect-ratio:auto; border:none; background-color:transparent;
  background-repeat:no-repeat; background-position:center; background-size:100% 100%;
  color:#fff; font-family:Arial,Helvetica,sans-serif; font-size:13px; font-weight:700;
  cursor:pointer; display:flex; align-items:center; justify-content:center;
  position:relative; padding:0; text-shadow:0 1px 1px rgba(0,0,0,.35); }
#exam .pal-b.answered{ background-image:url("/assets/gtc-sprite-ans.png"); }
#exam .pal-b.notans{ background-image:url("/assets/gtc-sprite-not.png"); }
#exam .pal-b.marked{ background-image:url("/assets/gtc-sprite-mk2.png"); }
#exam .pal-b.marked.ticked{ background-image:url("/assets/gtc-sprite-am.png"); }
#exam .pal-b:not(.answered):not(.notans):not(.marked){ background-image:url("/assets/gtc-sprite-nv.png");
  color:#262626; text-shadow:none; }
#exam .pal-b.cur{ box-shadow:0 0 0 2px #2d70b6 inset; border-radius:3px; }

#exam .pal-foot{ padding:9px 12px; border-top:1px solid #e0e0e0; background:#f7f9fb; }
#exam .pal-foot .btn{ width:100%; background:#29a8df; border-color:#29a8df;
  padding:8px; font-size:13px; }

/* ---- TCS footer strip ---- */
#exam .gtc-footer{ background:#617b8c; color:#fff; font-size:11px; height:22px;
  line-height:22px; padding:0 10px; display:flex; justify-content:space-between;
  flex:0 0 auto; }

/* mobile: palette becomes a drawer, same as before */
@media (max-width:900px){
  #exam .palette{ position:fixed; top:0; right:-300px; bottom:0; width:290px;
    z-index:50; transition:right .22s ease; box-shadow:-6px 0 22px rgba(12,18,28,.3); }
  #exam.pal-open .palette{ right:0; }
  #exam .pal-grid{ grid-template-columns:repeat(4,1fr); }
}
