/**
 * image-viewer.css — タイミング図スクリーンショットビューアー スタイルシート
 *
 * image-viewer.js と組み合わせて使用する。
 * 生成された viewer.html から <link> で参照される。
 */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: #111;
  color: #eee;
  font-family: monospace;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── ナビゲーションバー ─────────────────────────────────────────────────── */

/* 3カラムグリッド: 左ボタン | 中央ドロップダウン | 右ボタン+リンク */
#iv-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 5px 10px;
  background: #1e1e1e;
  border-bottom: 1px solid #333;
  flex-shrink: 0;
}

.iv-bar-left  { display: flex; align-items: center; gap: 6px; }
.iv-bar-center { display: flex; align-items: center; justify-content: center; gap: 6px; }
.iv-bar-right  { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }

/* ── ナビボタン ────────────────────────────────────────────────────────── */

#iv-bar button {
  font-size: 16px;
  padding: 2px 10px;
  background: #333;
  border: 1px solid #555;
  color: #ccc;
  cursor: pointer;
  font-family: monospace;
  border-radius: 3px;
  line-height: 1.4;
}
#iv-bar button:hover:not(:disabled) { background: #444; color: #fff; }
#iv-bar button:disabled { opacity: .3; cursor: default; }

/* ── ケース選択ドロップダウン ──────────────────────────────────────────── */

#iv-case-sel {
  font-family: monospace;
  font-size: 13px;
  background: #2a2a2a;
  color: #eee;
  border: 1px solid #555;
  border-radius: 3px;
  padding: 3px 6px;
  cursor: pointer;
  min-width: 180px;
  max-width: 360px;
}
#iv-case-sel:focus { outline: 1px solid #777; }

/* ── カウンター (n / total) ──────────────────────────────────────────── */

#iv-counter { font-size: 11px; color: #555; white-space: nowrap; }

/* ── バーリンク (PNG ↗ / Gallery) ───────────────────────────────────── */

.iv-bar-link {
  font-size: 11px;
  color: #666;
  text-decoration: none;
  padding: 2px 7px;
  border: 1px solid #444;
  border-radius: 3px;
  white-space: nowrap;
}
.iv-bar-link:hover { color: #aaa; border-color: #666; }

/* ── 画像表示エリア ─────────────────────────────────────────────────── */

#iv-img-wrap {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: auto;
  background: #111;
  padding: 4px;
}
#iv-main-img { max-width: 100%; display: block; }
