/* ═══ Content Insights + Video Feedback + Deep Dives ═══
   v1.0 — Pr\u00fcfer, Invisible Form, Deep Dive on Demand */

/* ─── Content Insights Dashboard (Admin) ───────────── */
.ci-dashboard { padding: 16px; max-width: 900px; margin: 0 auto; }
.ci-loading { text-align: center; padding: 40px; color: #999; }
.ci-header { margin-bottom: 24px; }
.ci-header h2 { font-size: 20px; margin: 0 0 4px; }
.ci-header p { color: #888; font-size: 13px; margin: 0 0 12px; }
.ci-analyze-btn {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff; border: none; padding: 10px 20px;
  border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 600;
}
.ci-analyze-btn:disabled { opacity: .6; }
.ci-section { margin-bottom: 28px; }
.ci-section h3 { font-size: 15px; margin: 0 0 12px; }
.ci-empty { text-align: center; padding: 32px; background: #f0fdf4; border-radius: 12px; }

/* Cluster Cards */
.ci-clusters { display: flex; flex-direction: column; gap: 12px; }
.ci-cluster-card {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 10px;
  padding: 14px; box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.ci-cluster-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ci-sev {
  font-size: 10px; text-transform: uppercase; color: #fff;
  padding: 2px 8px; border-radius: 4px; font-weight: 700;
}
.ci-count { margin-left: auto; font-size: 12px; color: #6b7280; }
.ci-cluster-meta { font-size: 12px; color: #9ca3af; margin: 6px 0; }
.ci-samples { margin: 8px 0; padding-left: 18px; font-size: 13px; color: #4b5563; }
.ci-samples li { margin-bottom: 4px; }
.ci-suggestion {
  background: #eff6ff; border-radius: 6px; padding: 8px 10px;
  font-size: 13px; color: #1d4ed8; margin-top: 8px;
}
.ci-cluster-actions { display: flex; gap: 8px; margin-top: 10px; }
.ci-cluster-actions button {
  font-size: 12px; padding: 6px 12px; border-radius: 6px;
  border: 1px solid #d1d5db; background: #fff; cursor: pointer;
}
.ci-resolve-btn:hover { background: #f0fdf4; border-color: #86efac; }
.ci-detail-btn:hover { background: #eff6ff; border-color: #93c5fd; }
.ci-back-btn {
  background: none; border: none; color: #6366f1; cursor: pointer;
  font-size: 13px; margin-bottom: 12px; padding: 0;
}

/* Hot Videos */
.ci-hot-list { display: flex; flex-direction: column; gap: 8px; }
.ci-hot-item {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  background: #fff; border: 1px solid #e5e7eb; border-radius: 8px;
  font-size: 13px; flex-wrap: wrap;
}
.ci-hot-meta { color: #9ca3af; font-size: 12px; }
.ci-hot-stats { margin-left: auto; color: #f59e0b; font-size: 12px; font-weight: 600; }
.ci-hot-item button { flex-shrink: 0; }

/* Feedback Stats */
.ci-feedback-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.ci-feedback-card {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; padding: 12px;
}
.ci-sentiment-bar {
  height: 6px; background: #fee2e2; border-radius: 3px; margin: 8px 0; overflow: hidden;
}
.ci-sb-pos { height: 100%; background: #22c55e; border-radius: 3px; transition: width .3s; }
.ci-fb-nums { font-size: 12px; color: #6b7280; }
.ci-recent-fb { display: flex; flex-direction: column; gap: 6px; }
.ci-fb-item { font-size: 13px; padding: 8px; background: #f9fafb; border-radius: 6px; }

/* ─── Member: Feedback Input ───────────────────────── */
.gl-feedback-input-wrap {
  display: flex; flex-direction: column; gap: 8px;
  padding: 12px; margin: 8px 0;
}
.gl-feedback-ta {
  width: 100%; padding: 10px; border: 1px solid #d1d5db;
  border-radius: 8px; font-size: 14px; resize: vertical;
  font-family: inherit; min-height: 50px;
}
.gl-feedback-ta:focus { outline: none; border-color: #6366f1; }
.gl-feedback-send {
  align-self: flex-end; padding: 8px 16px; font-size: 13px;
}

/* ─── Deep Dive: Admin Editor ──────────────────────── */
.dd-section { border-top: 1px solid #e5e7eb; padding-top: 12px; margin-top: 16px; }
.dd-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.dd-empty { color: #9ca3af; font-size: 13px; text-align: center; padding: 16px; }
.dd-item {
  background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 8px; padding: 10px;
}
.dd-item-head { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.dd-time {
  background: #6366f1; color: #fff; padding: 2px 8px;
  border-radius: 4px; font-size: 11px; font-weight: 600;
}
.dd-type { margin-left: auto; font-size: 11px; color: #9ca3af; }
.dd-item-preview { font-size: 12px; color: #6b7280; margin: 6px 0; }
.dd-item-actions { display: flex; gap: 6px; }
.dd-item-actions button {
  font-size: 11px; padding: 4px 10px; border: 1px solid #d1d5db;
  border-radius: 6px; background: #fff; cursor: pointer;
}
.dd-add-btn {
  width: 100%; padding: 10px; border: 2px dashed #d1d5db;
  border-radius: 8px; background: none; cursor: pointer;
  font-size: 13px; color: #6366f1;
}
.dd-add-btn:hover { border-color: #6366f1; background: #f5f3ff; }

/* Deep Dive Modal */
.dd-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.5); display: flex;
  align-items: center; justify-content: center; padding: 16px;
}
.dd-modal {
  background: #fff; border-radius: 12px; padding: 24px;
  width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto;
}
.dd-modal h3 { margin: 0 0 16px; font-size: 16px; }
.dd-modal label { display: block; font-size: 12px; color: #6b7280; margin: 10px 0 4px; }
.dd-modal input, .dd-modal textarea, .dd-modal select {
  width: 100%; padding: 10px; border: 1px solid #d1d5db;
  border-radius: 8px; font-size: 14px; font-family: inherit;
  box-sizing: border-box;
}
.dd-modal textarea { resize: vertical; min-height: 80px; }
.dd-modal-actions { display: flex; gap: 8px; margin-top: 16px; justify-content: flex-end; }
.dd-save-btn {
  background: #6366f1; color: #fff; border: none; padding: 10px 20px;
  border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 600;
}
.dd-cancel-btn {
  background: #f3f4f6; border: 1px solid #d1d5db; padding: 10px 20px;
  border-radius: 8px; cursor: pointer; font-size: 13px;
}

/* ─── Mobile ───────────────────────────────────────── */
@media (max-width: 640px) {
  .ci-dashboard { padding: 12px; }
  .ci-cluster-head { font-size: 13px; }
  .ci-feedback-grid { grid-template-columns: 1fr; }
  .ci-hot-item { flex-direction: column; align-items: flex-start; }
  .ci-hot-stats { margin-left: 0; }
  .dd-modal { padding: 16px; max-width: 100%; }
  .dd-modal-actions { flex-direction: column; }
  .dd-modal-actions button { width: 100%; }
}
