/* Course builder — the DRAFT course's own pieces (Seth, 2026-10-04: a new
   course starts from a blank slate, and files attached to the chat let the
   AI draft it). Split from builder.css, which keeps the page shell, split,
   graph pane and node card.

     .cb-empty       the blank slate over an empty graph
     .cb-chip-file   an attached file in the chat's tray (builder-chat.js)
     .cb-editor      one concept's form, the right pane's second view
     .cb-toast       the AI's change to the draft, with Undo

   Tokens only (styles/variables.css). Loaded right after builder.css. */

/* A draft with no concepts yet: the blank slate. */
.cb-empty {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: min(380px, calc(100% - 48px));
  padding: 22px 22px 20px;
  transform: translate(-50%, -50%);
  color: var(--text);
  background: color-mix(in srgb, var(--panel) 92%, transparent);
  border: 1px dashed var(--border-strong);
  border-radius: 14px;
  text-align: center;
}

.cb-empty[hidden] {
  display: none;
}

.cb-empty-title {
  color: var(--white);
  font-size: 16px;
  font-weight: 700;
}

.cb-empty p {
  margin: 8px 0 16px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.5;
}

.cb-chip-icon {
  flex: none;
  font-size: 12px;
}

.cb-chip-meta {
  flex: none;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.cb-chip-file.is-reading {
  opacity: 0.7;
}

.cb-tray-note {
  flex-basis: 100%;
  color: var(--danger);
  font-size: 12px;
}

.cb-attach {
  padding: 4px 10px;
}

.cb-btn-danger {
  margin-left: auto;
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 45%, transparent);
}

.cb-btn-danger:hover:not(:disabled) {
  border-color: var(--danger);
}

.cb-editor-title {
  margin: 0 0 18px;
  color: var(--white);
  font-size: 19px;
}

.cb-field {
  display: grid;
  gap: 6px;
  margin: 0 0 16px;
  padding: 0;
  border: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.cb-field legend {
  margin-bottom: 6px;
  padding: 0;
}

.cb-field input[type="text"],
.cb-field textarea {
  padding: 9px 11px;
  color: var(--text);
  background: var(--input-bg);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.45;
}

.cb-field textarea {
  resize: vertical;
}

.cb-field input:focus,
.cb-field textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.cb-prereqs {
  max-height: 260px;
  overflow-y: auto;
}

.cb-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0;
}

.cb-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* The AI's change to the draft, with Undo. */
.cb-toast {
  position: absolute;
  bottom: 16px;
  left: 50%;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: calc(100% - 32px);
  padding: 9px 10px 9px 14px;
  transform: translateX(-50%);
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  box-shadow: 0 10px 30px var(--shadow-strong);
  font-size: 13px;
}

.cb-toast[hidden] {
  display: none;
}
