/* ========================================
   display-tab-1.css   タブ切り替え
======================================== */

:root {
  --tb-primary: #2B7FE8;
  --tb-border:  #E5E9EF;
  --tb-radius:  8px;
}

/* ===== デモコンテナ上書き ===== */
.demo-container {
  flex-direction: column;
  align-items: stretch;
  padding: 24px;
  max-width: 640px;
}

/* ===== パターンブロック ===== */
.tb-pattern { margin-bottom: 32px; }
.tb-pattern:last-of-type { margin-bottom: 0; }

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

/* ===== タブルート ===== */
.tb-root {
  border: 1.5px solid var(--tb-border);
  border-radius: var(--tb-radius);
  overflow: hidden;
  background: #fff;
  max-width: 480px;
}

/* ===== タブナビゲーション ===== */
.tb-nav {
  display: flex;
  border-bottom: 1.5px solid var(--tb-border);
  background: #F8FAFC;
}

/* ===== タブボタン ===== */
.tb-btn {
  flex: 1;
  padding: 11px 12px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  font-size: 13px;
  font-family: sans-serif;
  color: #5A6A7A;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}

.tb-btn:hover { color: var(--tb-primary); }

.tb-btn.active {
  color: var(--tb-primary);
  border-bottom-color: var(--tb-primary);
  font-weight: 700;
  background: #fff;
}

/* ===== バッジ（件数） ===== */
.tb-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: #E5E9EF;
  color: #5A6A7A;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.tb-btn.active .tb-badge {
  background: #DBEAFE;
  color: var(--tb-primary);
}

.tb-badge--new { background: #FEE2E2; color: #991B1B; }
.tb-btn.active .tb-badge--new { background: #FEE2E2; color: #991B1B; }

/* ===== タブパネル ===== */
.tb-panel { display: none; padding: 20px; }
.tb-panel.active { display: block; }

/* ===== プロフィール ===== */
.tb-profile { display: flex; align-items: center; gap: 16px; }

.tb-avatar {
  width: 52px; height: 52px; border-radius: 50%;
  background: #DBEAFE;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; flex-shrink: 0;
}

.tb-profile-name { font-size: 15px; font-weight: 700; margin: 0 0 4px; color: #1A2332; }
.tb-profile-sub  { font-size: 12px; color: #5A6A7A; margin: 0; }

/* ===== 投稿リスト ===== */
.tb-post-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }

.tb-post-item {
  padding: 10px 12px;
  background: #F8FAFC;
  border-radius: 6px;
  font-size: 13px;
  color: #1A2332;
}

.tb-post-title { margin: 0 0 3px; font-weight: 600; font-size: 13px; }
.tb-post-date  { font-size: 11px; color: #9AA5B4; margin: 0; }

/* ===== フォロワーリスト ===== */
.tb-follower-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }

.tb-follower-item { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #1A2332; }

.tb-follower-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex-shrink: 0;
}

/* ===== メッセージリスト ===== */
.tb-msg-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }

.tb-msg-item {
  padding: 10px 12px;
  background: #F8FAFC;
  border-left: 3px solid #E5E9EF;
  border-radius: 0 6px 6px 0;
}

.tb-msg-item--unread { background: #EFF6FF; border-left-color: var(--tb-primary); }

.tb-msg-title   { font-weight: 600; color: #1A2332; margin: 0 0 2px; font-size: 13px; }
.tb-msg-preview { color: #5A6A7A; margin: 0; font-size: 12px; }

/* 空状態 */
.tb-empty { text-align: center; padding: 24px 0; color: #9AA5B4; font-size: 14px; margin: 0; }

/* ===== リセットボタン ===== */
.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;
}

.demo-controls { margin-top: 20px; text-align: right; }

/* ===== スマホ対応 ===== */
@media (max-width: 480px) {
  .tb-btn { font-size: 12px; padding: 10px 8px; }
  .tb-profile { flex-direction: column; text-align: center; }
}
