/* === デモ: セレクトボックス 3 — 動的リスト生成 === */

/* デモコンテナ: 縦並びで各パターンを表示する */
.demo-container {
  flex-direction: column;
  align-items: stretch;
  padding: 24px;
}

/* ========== データセット切り替え ========== */
.fs3-switcher {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
}
.fs3-switcher-label {
  font-size: 13px;
  font-weight: 700;
  color: #1A2332;
  white-space: nowrap;
}
.fs3-switcher-btn {
  padding: 6px 14px;
  font-size: 13px;
  color: #5A6A7A;
  background: #fff;
  border: 1.5px solid #D0D7E0;
  border-radius: 20px;
  cursor: pointer;
  font-family: sans-serif;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.fs3-switcher-btn:hover { background: #F4F6F9; border-color: #9AA5B4; }
.fs3-switcher-btn.active {
  background: #2B7FE8;
  border-color: #2B7FE8;
  color: #fff;
}

/* ========== パターン共通 ========== */
.fs3-pattern { max-width: 520px; }
.fs3-pattern + .fs3-pattern { margin-top: 32px; }
.fs3-pattern-label {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  color: #2B7FE8;
  letter-spacing: 0.04em;
}

/* ========== Pattern 1: ドロップダウン ========== */
.fs3-select-label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #1A2332;
}
.fs3-p1-row {
  display: flex;
  gap: 10px;
  align-items: center;
}
.fs3-select {
  flex: 1;
  max-width: 280px;
  height: 40px;
  padding: 0 10px;
  font-size: 14px;
  color: #1A2332;
  background: #fff;
  border: 1.5px solid #D0D7E0;
  border-radius: 8px;
  outline: none;
  font-family: sans-serif;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}
.fs3-select:focus {
  border-color: #2B7FE8;
  box-shadow: 0 0 0 3px rgba(43, 127, 232, 0.12);
}

/* ========== Pattern 2: グリッドリスト ========== */
.fs3-grid-label {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
  color: #1A2332;
}
.fs3-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 0;
  margin-bottom: 12px;
}
.fs3-grid-item { width: 160px; }
.fs3-grid-item label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #1A2332;
  cursor: pointer;
  padding: 4px 0;
}
.fs3-grid-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #2B7FE8;
  flex-shrink: 0;
  cursor: pointer;
}

/* ========== 共通: 決定ボタン ========== */
.fs3-submit-btn {
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: #2B7FE8;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-family: sans-serif;
  transition: background 0.15s;
  flex-shrink: 0;
}
.fs3-submit-btn:hover { background: #1a6fd1; }

/* Pattern 2 の決定ボタンは上マージンで grid と区切る */
#fs3-grid-submit { margin-top: 4px; }

/* ========== 共通: 結果エリア ========== */
.fs3-result { margin-top: 14px; }
.fs3-result.has-value {
  padding: 12px 16px;
  border: 1.5px solid #D0D7E0;
  border-radius: 8px;
  background: #fff;
}
.fs3-result.has-error {
  font-size: 13px;
  color: #E65100;
  padding: 4px 0;
}
.fs3-result-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 13px;
  color: #1A2332;
  line-height: 1.9;
}
.fs3-result-list code {
  font-family: monospace;
  background: #E8EDF4;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 12px;
  color: #1A2332;
}

/* 更新日 */
.updated-at { font-size: 12px; color: #9AA5B4; }

/* ソースヒント */
.source-hint {
  margin: 0 0 16px;
  padding: 10px 14px;
  font-size: 13px;
  color: #5A6A7A;
  background: #F4F6F9;
  border-left: 3px solid #2B7FE8;
  border-radius: 0 6px 6px 0;
  line-height: 1.7;
}
.source-hint code {
  font-family: monospace;
  background: #E8EDF4;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 12px;
}

/* プロンプト補足（注意・ヒント） */
.prompt-notes {
  margin-bottom: 20px;
  padding: 14px 16px;
  background: #F4F6F9;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.7;
}
.prompt-note-caution { margin: 0 0 8px; color: #E65100; }
.prompt-note-tip { margin: 0; color: #5A6A7A; }

/* プロンプトブロック（複数パターン） */
.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;
}

/* リセットボタン */
.demo-controls {
  display: flex;
  justify-content: flex-end;
  max-width: 520px;
  margin-top: 24px;
}
.reset-btn {
  padding: 6px 16px;
  font-size: 13px;
  color: #5A6A7A;
  background: #fff;
  border: 1.5px solid #D0D7E0;
  border-radius: 6px;
  cursor: pointer;
  font-family: sans-serif;
  transition: background 0.15s, border-color 0.15s;
}
.reset-btn:hover { background: #F4F6F9; border-color: #9AA5B4; }

/* ========== レスポンシブ ========== */
@media (max-width: 480px) {
  .demo-container { padding: 16px; }
  .fs3-pattern { max-width: 100%; }
  .fs3-grid-item { width: calc(50% - 4px); }
  .demo-controls { max-width: 100%; }
}
