/* =====================================================
   CBT OVERLAYS — HIDDEN BY DEFAULT (CRITICAL FIX)
   ===================================================== */

.cbt-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 999;
}

.cbt-overlay-content {
  background: #ffffff;
  max-width: 420px;
  margin: 80px auto;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
}

.cbt-overlay-close {
  margin-top: 16px;
  padding: 10px 18px;
  border-radius: 20px;
  border: none;
  background: #fbbf24;
  font-weight: 600;
  cursor: pointer;
}

/* =====================================================
   CIVITAS CBT — EXAM-GRADE UI
   ===================================================== */

* {
  box-sizing: border-box;
}

/* =====================================================
   ROOT
   ===================================================== */

#civitas-cbt-root {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f5f5f2;
  padding: 14px;
  min-height: 100vh;
}

/* =====================================================
   START SCREEN
   ===================================================== */

#cbt-start-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
}

#cbt-start-btn {
  padding: 16px 48px;
  font-size: 18px;
  font-weight: 700;
  background: #fbbf24;
  color: #1f2937;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#cbt-start-btn:hover {
  background: #f59e0b;
  transform: translateY(-2px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

#cbt-start-btn:active {
  transform: translateY(0);
}

#cbt-start-btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
  transform: none;
}

/* =====================================================
   TEST SCREEN (HIDDEN BY DEFAULT)
   ===================================================== */

#cbt-test-screen {
  display: none;
}

/* =====================================================
   TIMER (HIDDEN FOR NOW)
   ===================================================== */

#civitas-cbt-timer {
  display: none;
}

/* =====================================================
   QUESTION PALETTE (DESKTOP)
   ===================================================== */

#cbt-palette {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 6px;
  margin-bottom: 16px;
  border-bottom: 1px solid #ddd;
}

.cbt-p-dot {
  min-width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #cfcfcf;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  cursor: pointer;
  background: #ffffff;
  color: #333;
  flex-shrink: 0;
}

.cbt-p-dot:hover {
  border-color: #9ca3af;
  transform: scale(1.05);
}

.cbt-p-dot.attempted {
  background: #2f6f4e;
  border-color: #2f6f4e;
  color: #ffffff;
}

.cbt-p-dot.marked {
  background: #f59e0b;
  border-color: #f59e0b;
  color: #1f2933;
}

.cbt-p-dot.current {
  outline: 3px solid #2563eb;
  outline-offset: 2px;
}

/* =====================================================
   QUESTION AREA
   ===================================================== */

#cbt-question-area {
  background: #ffffff;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
}

#cbt-qno {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  color: #1f2937;
}

#cbt-question-text {
  font-size: 16.5px;
  font-weight: 500;
  line-height: 1.65;
  margin-bottom: 20px;
  color: #111827;
}

/* Format lists in questions properly */
#cbt-question-text ol,
#cbt-question-text ul {
  margin: 12px 0;
  padding-left: 24px;
}

#cbt-question-text li {
  margin: 6px 0;
  line-height: 1.6;
}

#cbt-question-text p {
  margin: 8px 0;
}

#cbt-question-text br {
  display: block;
  margin: 4px 0;
  content: "";
}

/* =====================================================
   OPTIONS
   ===================================================== */

#cbt-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.cbt-option {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 10px;
  border: 2px solid #d1d5db;
  cursor: pointer;
  background: #ffffff;
  transition: all 0.15s ease;
}

.cbt-option:hover {
  border-color: #9ca3af;
  background: #f9fafb;
}

.cbt-option.selected {
  border-color: #2f6f4e;
  background: #e6f4ec;
}

.cbt-opt-label {
  font-weight: 800;
  min-width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #2f6f4e;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
}

.cbt-option.selected .cbt-opt-label {
  background: #1b5e20;
}

.cbt-opt-text {
  font-size: 15.5px;
  line-height: 1.55;
  color: #111827;
  flex: 1;
}

/* =====================================================
   MARK FOR REVIEW
   ===================================================== */

#cbt-mark {
  margin-top: 16px;
  background: #ffffff;
  border: 2px dashed #d1a800;
  color: #7a6000;
  padding: 12px;
  width: 100%;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

#cbt-mark:hover {
  background: #fffbeb;
}

#cbt-mark.active {
  background: #fff6d6;
  border-color: #f59e0b;
  color: #92400e;
}

/* =====================================================
   NAVIGATION
   ===================================================== */

.cbt-nav {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

#cbt-prev,
#cbt-next {
  flex: 1;
  padding: 14px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 6px;
  border: none;
  background: #1f1f1f;
  color: #ffffff;
  cursor: pointer;
  transition: all 0.2s;
}

#cbt-prev:hover:not(:disabled),
#cbt-next:hover:not(:disabled) {
  background: #111111;
  transform: translateY(-1px);
}

#cbt-prev:active:not(:disabled),
#cbt-next:active:not(:disabled) {
  transform: translateY(0);
}

#cbt-prev:disabled,
#cbt-next:disabled {
  background: #9ca3af;
  cursor: not-allowed;
  opacity: 0.6;
}

/* =====================================================
   SUBMIT
   ===================================================== */

#civitas-cbt-submit {
  margin-top: 22px;
  width: 100%;
  padding: 16px;
  font-size: 17px;
  font-weight: 700;
  background: #dc2626;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

#civitas-cbt-submit:hover:not(:disabled) {
  background: #b91c1c;
  transform: translateY(-1px);
}

#civitas-cbt-submit:active:not(:disabled) {
  transform: translateY(0);
}

#civitas-cbt-submit:disabled {
  background: #9ca3af;
  cursor: not-allowed;
  opacity: 0.6;
}

/* =====================================================
   MOBILE — BOTTOM DOCK (PREPARED)
   ===================================================== */

@media (max-width: 768px) {

  #cbt-palette {
    display: none;
  }

  #civitas-cbt-root {
    padding: 10px;
    padding-bottom: 80px;
  }

  #cbt-question-area {
    padding: 16px;
  }

  .cbt-mobile-dock {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 1px solid #ddd;
    padding: 12px;
    z-index: 100;
  }

  #cbt-start-btn {
    padding: 14px 36px;
    font-size: 16px;
  }
}

/* =====================================================
   DESKTOP CONSTRAINT
   ===================================================== */

@media (min-width: 1024px) {
  #civitas-cbt-root {
    max-width: 860px;
    margin: 0 auto;
  }
}

/* =====================================================
   SCROLLBAR STYLING (PALETTE)
   ===================================================== */

#cbt-palette::-webkit-scrollbar {
  height: 6px;
}

#cbt-palette::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

#cbt-palette::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 3px;
}

#cbt-palette::-webkit-scrollbar-thumb:hover {
  background: #555;
}
/* =====================================================
   ARENA OVERRIDES — DISABLE CBT SEMANTICS
   ===================================================== */

/* Disable CBT overlays entirely */
.cbt-overlay,
.cbt-overlay-content,
.cbt-overlay-close {
  display: none !important;
}

/* Remove "mark for review" concept */
#cbt-mark {
  display: none !important;
}

/* Palette should never show "marked" state in Arena */
.cbt-p-dot.marked {
  display: none !important;
}

/* Neutralise selected option colour (not 'correct') */
.cbt-option.selected {
  border-color: #2563eb;       /* neutral blue */
  background: #eff6ff;
}

.cbt-option.selected .cbt-opt-label {
  background: #2563eb;
}

/* Optional: soften submit danger-red for Arena */
#civitas-cbt-submit {
  background: #2563eb;
}

#civitas-cbt-submit:hover:not(:disabled) {
  background: #1d4ed8;
}
.arena-lb-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}

.arena-lb-table th,
.arena-lb-table td {
  padding: 8px;
  border: 1px solid #ddd;
  text-align: center;
}

.arena-lb-row.placeholder {
  color: #999;
  background: #f7f7f7;
}

.arena-lb-row.me {
  background: #e6f7ec;
  font-weight: bold;
}

.arena-lb-status {
  margin: 12px 0;
  padding: 10px;
  border-radius: 6px;
}

.arena-lb-status.success {
  background: #e6f7ec;
}

.arena-lb-status.neutral {
  background: #f1f1f1;
}

.arena-lb-status .hint {
  font-size: 13px;
  color: #666;
}

.you {
  font-size: 12px;
  color: #2e7d32;
}
.arena-explain,
.arena-explain-error {
  padding: 16px;
}
