/* data-list-6: リスト — ライブラリ版並べ替え */

/* デモコンテナを縦並びにする（複数パターン） */
.demo-container {
  flex-direction: column;
  align-items: stretch;
  padding: 24px;
}

.dl6-pattern {
  max-width: 560px;
  margin-bottom: 28px;
}

.dl6-pattern:last-child {
  margin-bottom: 0;
}

.dl6-pattern-label {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  color: #2B7FE8;
  letter-spacing: 0.04em;
}

/* ====== リスト本体 ====== */
.dl6-list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.10);
  overflow: hidden;
}

/* リストアイテム */
.dl6-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #E5E9F2;
  transition: background 0.1s;
}

.dl6-item:last-child { border-bottom: none; }
.dl6-item:hover { background: #F4F7FF; }

/* SortableJSのghostClassで付与される、ドラッグ中アイテムの見た目 */
.dl6-item--ghost {
  opacity: 0.4;
}

/* ドラッグハンドル */
.dl6-handle {
  flex-shrink: 0;
  color: #CBD5E1;
  font-size: 18px;
  cursor: grab;
  padding: 0 4px;
  line-height: 1;
}

.dl6-handle:active { cursor: grabbing; }

/* アバター */
:root {
  --dl6-av1: #2B7FE8;
  --dl6-av2: #10B981;
  --dl6-av3: #F59E0B;
  --dl6-av4: #8B5CF6;
  --dl6-av5: #EF4444;
}

.dl6-avatar {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.dl6-avatar[data-color="1"] { background: var(--dl6-av1); }
.dl6-avatar[data-color="2"] { background: var(--dl6-av2); }
.dl6-avatar[data-color="3"] { background: var(--dl6-av3); }
.dl6-avatar[data-color="4"] { background: var(--dl6-av4); }
.dl6-avatar[data-color="5"] { background: var(--dl6-av5); }

/* 本文エリア */
.dl6-body {
  flex: 1;
  min-width: 0;
}

.dl6-name {
  font-size: 14px;
  font-weight: 700;
  color: #1A2332;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dl6-meta {
  font-size: 12px;
  color: #6B7280;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 保存・復元ステータス表示 */
.dl6-status {
  min-height: 18px;
  margin: 8px 0 0;
  font-size: 13px;
  color: #6B7280;
}

/* ====== ボタンエリア ====== */
.demo-controls {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* サブボタン（リロード） */
.btn-sub {
  padding: 6px 16px;
  font-size: 13px;
  font-family: sans-serif;
  color: #2B7FE8;
  background: #fff;
  border: 1.5px solid #2B7FE8;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.btn-sub:hover {
  background: #2B7FE8;
  color: #fff;
}

/* リセットボタン */
.reset-btn {
  padding: 6px 16px;
  font-size: 13px;
  font-family: sans-serif;
  color: #5A6A7A;
  background: #fff;
  border: 1.5px solid #D0D7E0;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.reset-btn:hover {
  background: #F4F6F9;
  border-color: #9AA5B4;
}

/* ====== 方式比較表 ====== */
.compare-table {
  width: 100%;
  margin: 16px 0;
  border-collapse: collapse;
  font-size: 13px;
}

.compare-table th,
.compare-table td {
  padding: 10px 12px;
  border: 1px solid #D0D7E0;
  text-align: left;
  vertical-align: top;
}

.compare-table th {
  background: #F4F6F9;
  color: #1A2332;
  font-weight: 600;
}

.compare-table td {
  color: #5A6A7A;
}

/* サンプルソースヒント */
.source-hint {
  margin: 0 0 16px;
  padding: 10px 14px;
  background: #F4F7FF;
  border-radius: 6px;
  font-size: 13px;
  color: #3D5A80;
  line-height: 1.7;
}

.source-hint code {
  font-family: monospace;
  background: #E8EDF4;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 12px;
}

/* プロンプトブロック（複数パターン） */
.prompt-block { margin-bottom: 20px; }
.prompt-block:last-child { margin-bottom: 0; }
.prompt-block-label {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  color: #2B7FE8;
  letter-spacing: 0.04em;
}

/* プロンプト補足（注意・ヒント） */
.prompt-notes {
  margin-bottom: 20px;
  padding: 14px 16px;
  background: #F9FAFB;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.7;
}

.prompt-note-caution {
  margin: 0 0 8px;
  color: #E65100;
}

.prompt-note-tip {
  margin: 0;
  color: #5A6A7A;
}

/* レスポンシブ */
@media (max-width: 480px) {
  .demo-container { padding: 16px; }
  .dl6-item { gap: 8px; padding: 10px 12px; }
  .dl6-avatar { width: 36px; height: 36px; font-size: 14px; }
  .demo-controls { flex-wrap: wrap; }
  .compare-table { font-size: 12px; }
  .compare-table th,
  .compare-table td { padding: 8px; }
}
