/* src/v070.css — AI Tutor styles (incremental, does not edit old CSS) */

/* AI Tutor pane (sits below the Mark Scheme pane in workspace) */
.ai-tutor-pane {
  display: none;
  margin-top: 12px;
  background: #fff;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 14px;
  overflow: hidden;
}
.ai-tutor-pane.show { display: block; }

.ai-tutor-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: linear-gradient(135deg, #f5f3ff, #eef2ff);
  border-bottom: 1px solid var(--line, #e2e8f0);
}
.ai-tutor-head b { font-size: 12px; color: #4c1d95; }
.ai-tutor-head .btn { padding: 2px 8px; font-size: 12px; }

.ai-tutor-body { padding: 12px 14px; max-height: 380px; overflow-y: auto; }

/* Chat messages */
.ai-chat-messages { display: grid; gap: 10px; margin-bottom: 10px; }
.ai-msg { display: grid; gap: 3px; }
.ai-role { font-size: 9px; font-weight: 800; color: var(--muted, #94a3b8); text-transform: uppercase; }
.ai-msg-user .ai-role { color: #315efb; }
.ai-bubble {
  padding: 8px 11px;
  border-radius: 10px;
  font-size: 11px;
  line-height: 1.6;
  white-space: pre-wrap;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
.ai-msg-user .ai-bubble { background: #eef2ff; border-color: #c7d2fe; }
.ai-thinking { color: var(--muted, #94a3b8); font-style: italic; }

/* Follow-up row */
.ai-followup-row { display: flex; gap: 6px; }
.ai-followup-input {
  flex: 1;
  padding: 7px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 11px;
  outline: none;
}
.ai-followup-input:focus { border-color: #315efb; box-shadow: 0 0 0 2px #dbeafe; }
.ai-followup-btn { padding: 7px 14px; font-size: 11px; white-space: nowrap; }

/* Finish-choice overlay */
.ai-finish-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: grid;
  place-items: center;
  z-index: 9999;
}
.ai-finish-card {
  background: #fff;
  border-radius: 16px;
  padding: 22px 24px;
  width: min(440px, 90vw);
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.ai-finish-card h3 { margin: 0 0 14px; font-size: 15px; }
.ai-finish-options { display: grid; gap: 10px; margin-bottom: 14px; }
.ai-finish-opt {
  text-align: left;
  padding: 14px 16px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.ai-finish-opt:hover { border-color: #315efb; box-shadow: 0 0 0 3px #dbeafe; }
.ai-finish-opt.primary { border-color: #6366f1; background: linear-gradient(135deg, #f5f3ff, #eef2ff); }
.ai-finish-opt b { display: block; font-size: 13px; margin-bottom: 3px; }
.ai-finish-opt span { font-size: 10px; color: var(--muted, #64748b); }
.ai-finish-cancel { width: 100%; padding: 8px; font-size: 11px; }

/* AI Tutor button in workspace hints row */
.ai-tutor-btn {
  margin-top: 7px;
  border: 0;
  background: #ede9fe;
  color: #5b21b6;
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}
.ai-tutor-btn:hover { background: #ddd6fe; }
