/* data-timeline-2 — チャット型タイムライン ページ固有スタイル */

.ctl-demo-wrap {
  --ctl-self-bg:   #2B7FE8;
  --ctl-other-bg:  #F1F5F9;
  --ctl-text:      #1E293B;
  --ctl-muted:     #94A3B8;
  --ctl-avatar-bg: #CBD5E1;
}

/* ---- コンテナ ---- */
.ctl-wrap {
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.ctl-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 420px;
  overflow-y: auto;
  padding: 16px;
}

.ctl-date-sep {
  text-align: center;
  font-size: 12px;
  color: var(--ctl-muted);
  margin: 12px 0 0;
}

/* ---- メッセージ行 ---- */
.ctl-msg {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.ctl-msg--self {
  flex-direction: row-reverse;
}

/* ---- アバター ---- */
.ctl-avatar {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ctl-avatar-bg);
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}

/* ---- 吹き出しラッパー（幅をここで決め、吹き出しはこれに合わせて広がる） ---- */
.ctl-body {
  max-width: 70%;
}

/* ---- 吹き出し ---- */
.ctl-bubble {
  padding: 10px 14px;
  font-size: 14px;
  line-height: 1.6;
  word-break: break-word;
}

.ctl-msg--other .ctl-bubble {
  background: var(--ctl-other-bg);
  color: var(--ctl-text);
  border-radius: 4px 16px 16px 16px;
}

.ctl-msg--self .ctl-bubble {
  background: var(--ctl-self-bg);
  color: #fff;
  border-radius: 16px 4px 16px 16px;
}

.ctl-name {
  font-size: 12px;
  color: #64748B;
  margin: 0 0 4px;
}

.ctl-time {
  display: block;
  font-size: 11px;
  color: var(--ctl-muted);
  margin-top: 4px;
}

.ctl-msg--other .ctl-time { text-align: left; }
.ctl-msg--self  .ctl-time { text-align: right; }

/* ---- 「次の新着を見る」ボタン ---- */
.ctl-reload-btn {
  padding: 6px 16px;
  font-size: 13px;
  color: var(--ctl-self-bg);
  background: #fff;
  border: 1.5px solid var(--ctl-self-bg);
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  margin-right: 8px;
  transition: background 0.15s;
}

.ctl-reload-btn:hover:not(:disabled) {
  background: #EFF6FF;
}

.ctl-reload-btn:disabled {
  color: var(--ctl-muted);
  border-color: #D8E0E8;
  background: #F4F6F9;
  cursor: not-allowed;
}

/* ---- デモ操作エリア・リセットボタン ---- */
.demo-controls {
  margin-top: 12px;
}

.reset-btn {
  padding: 6px 16px;
  font-size: 13px;
  color: #5A6A7A;
  background: #fff;
  border: 1.5px solid #D0D7E0;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s;
}

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

@media (max-width: 480px) {
  .ctl-bubble {
    max-width: 80%;
  }
}
