/* === デモ: 縦並びレイアウト（3パターン） === */
.demo-container {
  flex-direction: column;
  align-items: stretch;
  padding: 24px;
}

/* 各パターンを囲むカード */
.bdg-pattern {
  margin-bottom: 16px;
  padding: 20px;
  background: #F4F6F9;
  border-radius: 8px;
  max-width: 520px;
}
.bdg-pattern:last-child { margin-bottom: 0; }

.bdg-pattern-label {
  margin: 0 0 16px;
  font-size: 11px;
  font-weight: 700;
  color: #2B7FE8;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ========== バッジ 共通 ========== */

/* バッジを右上に重ねるアンカー要素 */
.bdg-icon-wrap {
  position: relative;
  display: inline-flex;
}

/* 数字バッジ */
.bdg-count {
  position: absolute;
  top: -6px;
  right: -8px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9999px;
  background: #E53E3E;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  white-space: nowrap;
}

.bdg-count[hidden] { display: none; }

/* ドットバッジ（未読あり・件数なし） */
.bdg-dot {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #E53E3E;
  /* デモ背景と同色の縁でバッジをアイコンから分離する */
  border: 2px solid #F4F6F9;
}

/* アイコンボックス */
.bdg-icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: #fff;
  border: 1.5px solid #E5E7EB;
  border-radius: 12px;
  font-size: 22px;
}

/* アバター */
.bdg-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #2B7FE8;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
}

/* ========== Pattern 1: 数字バッジ（ナビアイコン） ========== */

.bdg-nav-bar {
  display: flex;
  gap: 16px;
}

.bdg-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.bdg-nav-label {
  font-size: 11px;
  color: #5A6A7A;
}

/* ========== Pattern 2: インタラクティブ ========== */

.bdg-interactive-demo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

/* 大きいアイコンボックス */
.bdg-icon-box--lg {
  width: 64px;
  height: 64px;
  font-size: 28px;
  border-radius: 16px;
}
.bdg-icon-wrap--lg .bdg-count {
  top: -8px;
  right: -10px;
  min-width: 22px;
  height: 22px;
  font-size: 12px;
  line-height: 22px;
}

.bdg-controls {
  display: flex;
  gap: 8px;
}

.bdg-ctrl-btn {
  padding: 8px 16px;
  border-radius: 6px;
  border: 1.5px solid #D0D7E0;
  background: #fff;
  font-size: 14px;
  cursor: pointer;
  font-family: sans-serif;
  color: #1A2332;
  transition: background 0.15s, border-color 0.15s;
}
.bdg-ctrl-btn:hover { background: #EEF2F7; border-color: #9AA5B4; }

.bdg-ctrl-btn--clear {
  color: #5A6A7A;
}

.bdg-count-display {
  font-size: 13px;
  color: #5A6A7A;
  margin: 0;
}

/* バッジ更新アニメーション */
@keyframes bdg-pop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.4); }
  100% { transform: scale(1); }
}
.bdg-count.is-popping {
  animation: bdg-pop 0.2s ease;
}

/* ========== Pattern 3: ドットバッジ ========== */

.bdg-dot-row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.bdg-dot-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.bdg-dot-label {
  font-size: 12px;
  color: #5A6A7A;
}

/* ボタン + ドットバッジ */
.bdg-btn-wrap {
  position: relative;
  display: inline-flex;
}

.bdg-btn {
  padding: 10px 16px;
  border-radius: 8px;
  border: 1.5px solid #E5E7EB;
  background: #fff;
  font-size: 14px;
  font-family: sans-serif;
  cursor: default;
  color: #1A2332;
  white-space: nowrap;
}

/* ========== 共通パーツ ========== */

.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-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: #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;
}

/* リセットボタン */
.demo-controls {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}
.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) {
  .bdg-pattern { max-width: 100%; }
  .demo-container { padding: 16px; }
  .bdg-dot-row { gap: 16px; }
}
