/* ═══════════════════════════════════════════
   Lesson Importer — Styles
═══════════════════════════════════════════ */

/* ── Drop zone ───────────────────────────── */
.imp-dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--r);
  background: var(--bg2);
  padding: 32px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  user-select: none;
}

.imp-dropzone:hover,
.imp-dropzone.drag-over {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--bg2));
}

.imp-dropzone.drag-over {
  border-style: solid;
}

.imp-drop-icon {
  font-size: 36px;
  margin-bottom: 8px;
}

.imp-drop-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text2);
}

.imp-drop-sub {
  font-size: 12px;
  color: var(--text4);
  margin-top: 4px;
}

/* ── File chips ─────────────────────────── */
.imp-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg2);
  font-size: 12px;
  color: var(--text2);
}

/* ── Spinner ────────────────────────────── */
.imp-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: imp-spin 0.7s linear infinite;
  margin-right: 6px;
  vertical-align: middle;
}

@keyframes imp-spin {
  to { transform: rotate(360deg); }
}

/* ── Page cards ─────────────────────────── */
.imp-page-card {
  overflow: hidden;
}

.imp-page-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
}

.imp-page-num {
  background: var(--accent);
  color: #fff;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.imp-page-title-input {
  font-size: 14px !important;
  font-weight: 600 !important;
  padding: 4px 8px !important;
  height: auto !important;
}

.imp-exercises-list {
  display: flex;
  flex-direction: column;
}

/* ── Exercise rows ──────────────────────── */
.imp-ex-row {
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
  transition: background 0.1s;
}

.imp-ex-row:last-child {
  border-bottom: none;
}

.imp-ex-row:hover {
  background: var(--bg2);
}

.imp-ex-row.imp-ex-needs-ai {
  background: color-mix(in srgb, #f59e0b 5%, var(--bg));
  border-left: 3px solid #f59e0b;
}

.imp-ex-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.imp-ex-type-badge {
  font-size: 11px;
  font-weight: 700;
  background: var(--bg3, var(--bg2));
  color: var(--text3);
  border-radius: 4px;
  padding: 2px 7px;
  border: 1px solid var(--border);
  white-space: nowrap;
}

.imp-ai-badge {
  font-size: 11px;
  color: #92400e;
  background: #fef3c7;
  border-radius: 4px;
  padding: 2px 6px;
}

.imp-ok-badge {
  font-size: 11px;
  color: #065f46;
  background: #d1fae5;
  border-radius: 4px;
  padding: 2px 6px;
}

.imp-ex-summary {
  font-size: 12px;
  color: var(--text3);
  line-height: 1.6;
}

.imp-ex-summary strong {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border-radius: 3px;
  padding: 1px 4px;
}

/* ── Commit bar ─────────────────────────── */
#imp-commit-bar {
  background: var(--bg) !important;
  box-shadow: 0 -4px 16px rgba(0,0,0,.08);
  border-radius: var(--r) var(--r) 0 0;
  margin-top: 16px;
}

/* ── Responsive ─────────────────────────── */
@media (max-width: 640px) {
  .imp-page-header {
    flex-wrap: wrap;
  }
  .imp-page-title-input {
    max-width: 200px !important;
  }
}
