:root {
  --pdf-accent:      #2B7FE8;
  --pdf-border:      #D0D7E0;
  --pdf-text:        #1A2332;
  --pdf-text-muted:  #8898A4;
  --pdf-bg-hover:    #F4F6F9;
  --pdf-bg-active:   #EBF3FD;
  --pdf-bg-list:     #FAFBFC;
  --pdf-bg-preview:  #F8F9FA;
}

/* ===== demo-container override ===== */
.demo-container {
  display: block;
  padding: 20px;
}

/* ===== 2ペインレイアウト ===== */
.pdf-viewer {
  display: flex;
  height: 520px;
  border: 1px solid var(--pdf-border);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  max-width: 900px;
  margin: 0 auto;
}

/* ===== 左ペイン：ファイルリスト ===== */
.pdf-file-list {
  width: 256px;
  flex-shrink: 0;
  border-right: 1px solid var(--pdf-border);
  overflow-y: auto;
  background: #fff;
}

.pdf-list-heading {
  margin: 0;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 700;
  color: var(--pdf-text-muted);
  background: var(--pdf-bg-list);
  border-bottom: 1px solid var(--pdf-border);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pdf-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pdf-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  cursor: pointer;
  border-bottom: 1px solid #EDF0F4;
  border-left: 3px solid transparent; /* レイアウトシフト防止 */
  transition: background 0.12s;
}

.pdf-item:hover {
  background: var(--pdf-bg-hover);
}

.pdf-item.is-active {
  background: var(--pdf-bg-active);
  border-left-color: var(--pdf-accent);
}

/* PDFバッジ */
.pdf-icon {
  flex-shrink: 0;
  background: #E53E3E;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 3px;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

.pdf-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pdf-item-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--pdf-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pdf-item-meta {
  font-size: 11px;
  color: var(--pdf-text-muted);
}

/* ===== 右ペイン：プレビューエリア ===== */
.pdf-preview-area {
  flex: 1;
  position: relative;
  background: var(--pdf-bg-preview);
  min-width: 0;
}

/* 未選択時のプレースホルダー */
.pdf-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  pointer-events: none;
}

.pdf-placeholder-icon {
  font-size: 40px;
  opacity: 0.25;
}

.pdf-placeholder p {
  color: var(--pdf-text-muted);
  font-size: 14px;
  margin: 0;
}

.pdf-frame {
  width: 100%;
  height: 100%;
  border: none;
  display: none;
}

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

.reset-btn:hover {
  background: var(--pdf-bg-hover);
  border-color: #9AA5B4;
}

/* ===== レスポンシブ ===== */
@media (max-width: 640px) {
  .pdf-viewer {
    flex-direction: column;
    height: auto;
  }

  .pdf-file-list {
    width: 100%;
    height: 180px;
    border-right: none;
    border-bottom: 1px solid var(--pdf-border);
  }

  .pdf-preview-area {
    height: 400px;
  }
}
