/* public/css/mission-studio.css
 * Mission Studio UI — minimal scoped styles. Reuses lesson-plan.css where
 * overlapping (p-card, lesson-plan-detail are generic). Only adds what's new.
 */

.ms-quota-pill {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  background: rgba(0,240,255,.12);
  color: #00f0ff;
  border: 1px solid rgba(0,240,255,.3);
  padding: 5px 12px;
  border-radius: 99px;
}

.ms-wizard { max-width: 920px; margin-top: 12px; }
.ms-wiz-card {
  background: linear-gradient(180deg,#0d1117,#0a0e16);
  border: 1px solid rgba(0,240,255,.25);
  border-radius: 12px;
  padding: 24px;
  color: #c9d1d9;
}
.ms-wiz-row {
  display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 16px;
}
.ms-field {
  display: flex; flex-direction: column; gap: 6px;
}
.ms-field > span {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; color: #94a3b8;
}
.ms-field input, .ms-field select, .ms-field textarea {
  background: #0a0e16;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  color: #f1f5f9;
  padding: 9px 12px;
  font-size: 14px;
  font-family: inherit;
}
.ms-field input:focus, .ms-field select:focus, .ms-field textarea:focus {
  outline: 2px solid rgba(0,240,255,.4); outline-offset: 1px;
}
.ms-standards-grid {
  display: flex; flex-wrap: wrap; gap: 8px;
  max-height: 220px; overflow-y: auto;
  padding: 10px; border: 1px solid rgba(255,255,255,.08); border-radius: 8px;
  background: rgba(255,255,255,.02);
}
.ms-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 10px; border-radius: 99px;
  background: rgba(124,58,237,.12); border: 1px solid rgba(124,58,237,.35);
  font-size: 12px; color: #d8d4f8;
  cursor: pointer;
}
.ms-chip input { margin-right: 4px; }

.ms-wiz-actions {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-top: 4px;
}
.ms-generate-btn {
  background: linear-gradient(135deg,#00f0ff,#7c3aed);
  color: #0d1117;
  border: none;
  border-radius: 8px;
  padding: 12px 22px;
  font-size: 14px; font-weight: 700;
  display: inline-flex; align-items: center; gap: 8px;
  cursor: pointer;
}
.ms-generate-btn:disabled { opacity: .55; cursor: progress; }
.ms-generate-btn.ms-loading::after {
  content: '';
  display: inline-block; width: 12px; height: 12px; margin-left: 8px;
  border: 2px solid rgba(0,0,0,.25); border-top-color: rgba(0,0,0,.85);
  border-radius: 50%;
  animation: ms-spin 0.9s linear infinite;
}
@keyframes ms-spin { to { transform: rotate(360deg); } }
.ms-generate-status { font-size: 13px; color: #94a3b8; }

.ms-empty { color: #64748b; font-size: 13px; padding: 12px 0; }

.ms-draft-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr));
  gap: 12px;
}
.ms-draft-card {
  display: block;
  background: #ffffff; border: 1px solid #e2e8f0;
  border-radius: 10px; padding: 14px;
  text-decoration: none; color: #0f172a;
  position: relative;
}
.ms-draft-card-published { border: 1px solid rgba(34,197,94,.4); background: linear-gradient(180deg,#f0fdf4,#ffffff); }
.ms-draft-card-status {
  display: inline-block; font-size: 10px; font-weight: 700; text-transform: uppercase;
  color: #7c3aed; letter-spacing: .05em; margin-bottom: 4px;
}
.ms-draft-card-published .ms-draft-card-status { color: #16a34a; }
.ms-draft-card-title { font-size: 14px; font-weight: 700; margin-bottom: 4px; line-height: 1.3; }
.ms-draft-card-meta { font-size: 12px; color: #64748b; }
.ms-draft-card-v { position: absolute; top: 14px; right: 14px; font-size: 11px; color: #94a3b8; }

/* ── Editor ─────────────────────────────────────────── */
.ms-editor { margin-top: 12px; }
.ms-header-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px 22px;
  margin-bottom: 16px;
}
.ms-status-pill {
  display: inline-block;
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .05em;
  padding: 3px 10px; border-radius: 99px;
  background: #fef3c7; color: #b45309; border: 1px solid #fde68a;
}
.ms-header-meta { font-size: 13px; color: #475569; margin-top: 6px; }
.ms-chip-readonly {
  display: inline-block; padding: 4px 10px;
  background: #f1f5f9; border: 1px solid #e2e8f0;
  border-radius: 99px; font-size: 12px; color: #475569;
}
.ms-title-input {
  width: 100%; margin-top: 14px;
  border: 1px solid transparent; background: transparent;
  font-size: 26px; font-weight: 700; color: #0f172a;
  padding: 6px 10px; border-radius: 6px; font-family: inherit;
}
.ms-title-input:focus { background: #f8fafc; border-color: #cbd5e1; outline: 2px solid #6366f1; outline-offset: 2px; }
.ms-description-input {
  width: 100%;
  border: 1px solid #e2e8f0; border-radius: 8px;
  padding: 10px 12px; font-family: inherit; font-size: 14px;
  color: #1e293b; margin-top: 6px;
  resize: vertical;
}

.ms-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px;
  border-radius: 8px;
  font-size: 13px; font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer; font-family: inherit;
}
.ms-btn:disabled { opacity: .55; cursor: not-allowed; }
.ms-btn-primary {
  background: linear-gradient(135deg,#00f0ff,#7c3aed);
  color: #0d1117;
  border-color: transparent;
}
.ms-btn-secondary {
  background: #ffffff; border-color: #cbd5e1; color: #1e293b;
}
.ms-btn-secondary:hover { background: #f8fafc; }
.ms-btn-ghost {
  background: transparent; color: #475569;
}

.ms-tabs {
  display: flex; gap: 4px; border-bottom: 1px solid #e2e8f0;
  background: #ffffff; border-radius: 10px 10px 0 0;
  padding: 8px 8px 0 8px;
  overflow-x: auto;
}
.ms-tab {
  border: none; background: transparent;
  padding: 10px 14px; font-size: 13px;
  font-weight: 600; color: #64748b;
  cursor: pointer; border-radius: 6px 6px 0 0;
  white-space: nowrap; font-family: inherit;
}
.ms-tab:hover { background: #f1f5f9; color: #1e293b; }
.ms-tab.active {
  color: #0f172a;
  background: #f8fafc;
  border-bottom: 2px solid #6366f1;
  margin-bottom: -1px;
}

.ms-tab-panels {
  background: #ffffff;
  border: 1px solid #e2e8f0; border-top: none;
  border-radius: 0 0 10px 10px;
  padding: 22px;
}
.ms-panel { display: none; }
.ms-panel.active { display: block; }
.ms-panel-title { font-size: 14px; font-weight: 700; color: #0f172a; margin: 0 0 10px; }

.ms-field input, .ms-field select, .ms-field textarea {
  background: #ffffff; color: #0f172a;
  border: 1px solid #cbd5e1;
}
.ms-choices-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin-top: 8px;
}
.ms-feedback-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin-top: 8px;
}
@media (max-width: 720px) {
  .ms-choices-grid, .ms-feedback-grid { grid-template-columns: 1fr; }
}
.ms-choice-field .ms-correct-radio {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: #475569; margin-top: 4px;
}
.ms-correct-radio input { margin: 0; }

.ms-cards-list { display: flex; flex-direction: column; gap: 12px; }
.ms-scene-card, .ms-quiz-card, .ms-mentor-card, .ms-rubric-card {
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px;
  padding: 14px;
}
.ms-card-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #475569; margin-bottom: 8px; }
.ms-scene-key { font-size: 11px; color: #7c3aed; margin-left: 6px; }

.ms-save-row {
  display: flex; align-items: center; gap: 12px; margin-top: 14px;
}
.ms-save-status { font-size: 13px; color: #64748b; }
.ms-save-status.ms-saving { color: #6366f1; }
.ms-save-status.ms-saved { color: #16a34a; }
.ms-save-status.ms-save-err { color: #dc2626; }

.ms-big-textarea {
  width: 100%; min-height: 240px;
  border: 1px solid #cbd5e1; border-radius: 8px;
  padding: 12px 14px; font-family: inherit; font-size: 14px;
  color: #0f172a; line-height: 1.5; resize: vertical;
}
.ms-big-textarea:focus { outline: 2px solid rgba(99,102,241,.4); outline-offset: 1px; border-color: #6366f1; }

.ms-lo-row { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.ms-lo-input { flex: 1; border: 1px solid #cbd5e1; border-radius: 6px; padding: 8px 10px; font-family: inherit; font-size: 13px; resize: vertical; }

.ms-error {
  background: #fef2f2; border: 1px solid #fca5a5; border-radius: 8px;
  padding: 12px 16px; color: #b91c1c; font-size: 13px; margin-top: 14px;
}

/* student preview */
.ms-preview-panel { margin-top: 18px; }
.ms-preview-card {
  background: linear-gradient(180deg,#0a0e16,#0d1117);
  color: #f1f5f9;
  border-radius: 12px;
  border: 1px solid rgba(0,240,255,.3);
  padding: 26px;
}
.ms-preview-card h2 { font-size: 22px; font-weight: 700; margin: 0 0 6px; }
.ms-preview-desc { font-size: 14px; color: #94a3b8; margin-bottom: 16px; }
.ms-preview-narrative p { font-size: 14px; line-height: 1.6; color: #c9d1d9; margin: 0 0 12px; }
.ms-preview-h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: #94a3b8; margin: 20px 0 10px; }
.ms-preview-scene {
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px; padding: 12px 16px; margin-bottom: 10px;
}
.ms-preview-scene-num { font-size: 11px; font-weight: 700; text-transform: uppercase; color: #00f0ff; margin-bottom: 4px; }
.ms-preview-scene-prompt { font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.ms-preview-choices { padding-left: 22px; font-size: 13px; color: #c9d1d9; }
.ms-preview-choices li { margin-bottom: 4px; }

/* publish modal */
.ms-modal {
  border: none; border-radius: 14px;
  padding: 0;
  max-width: 560px; width: 96%;
  background: #ffffff;
}
.ms-modal::backdrop { background: rgba(15,23,42,.55); }
.ms-modal-inner { padding: 22px 24px; }
.ms-modal-title { font-size: 18px; font-weight: 700; margin: 0 0 6px; color: #0f172a; }
.ms-modal-sub { font-size: 13px; color: #64748b; margin: 0 0 14px; }
.ms-classroom-list {
  display: flex; flex-direction: column; gap: 8px;
  max-height: 240px; overflow-y: auto;
  background: #f8fafc; border: 1px solid #e2e8f0;
  border-radius: 8px; padding: 10px;
  margin-bottom: 14px;
}
.ms-classroom-row {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px;
  padding: 6px 8px;
  border-radius: 6px;
}
.ms-classroom-row:hover { background: #ffffff; }
.ms-modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.ms-modal-err {
  background: #fef2f2; border: 1px solid #fca5a5; border-radius: 8px;
  padding: 10px 12px; color: #b91c1c; font-size: 13px; margin-bottom: 12px;
}
