/* --- ichiran.css --- */

/* タブが画面幅に応じて折り返すように設定 */
.tabs {
  flex-wrap: wrap;
  justify-content: center;
}

/* 横スクロールを実現するためのコンテナ */
.table-scroll-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,.06);
}

/* テーブル本体のスタイル */
.ichiran-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

/* テーブルヘッダーとセルの共通スタイル */
.ichiran-table th,
.ichiran-table td {
  padding: 8px 12px;
  border: 1px solid var(--line);
  text-align: center;
  font-size: 14px;
  vertical-align: middle;
}

/* テーブルヘッダーのスタイル */
.ichiran-table thead {
  background-color: var(--thead-bg);
}

.ichiran-table th {
  font-weight: 600;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 2;
  background-color: var(--thead-bg);
}

/* シマシマ模様のスタイル */
.ichiran-table tbody tr.row-even td {
  background-color: #fff !important;
}
.ichiran-table tbody tr.row-odd td {
  background-color: var(--cell) !important;
}

.ichiran-table td {
  white-space: pre-line;
}

/* 列ごとの幅を指定 */
.ichiran-table th,
.ichiran-table td {
  width: 95px;
  min-width: 95px;
}
.ichiran-table .col-label {
  width: 130px;
  min-width: 130px;
}
.ichiran-table .col-route {
  width: 115px;
  min-width: 115px;
}
.ichiran-table .col-note {
  width: 150px;
  min-width: 150px;
}

/* 最初の列を固定 */
.ichiran-table .sticky-col {
  position: sticky;
  left: 0;
  z-index: 1;
  background-color: inherit;
  transition: box-shadow 0.2s ease-in-out;
}
.ichiran-table thead .sticky-col {
  z-index: 3;
  background-color: var(--thead-bg);
}

/* 休日行のスタイル */
.ichiran-table tr.is-holiday-row td {
  background-color: var(--holiday-cell-strong) !important;
}

/* スクロール時の影 */
.table-scroll-wrap.is-scrolled .ichiran-table .sticky-col {
  box-shadow: 4px 0 6px -2px rgba(0, 0, 0, 0.15);
}

/* [赤] タグ */
.text-red {
  color: #dc3545;
  font-weight: 600;
}

/* 運番ボタン */
.ichiran-table .route-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 36px;
}
.ichiran-table .route-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--ink);
  background: var(--pill-bg);
  border: 1px solid var(--pill-border);
  box-shadow: var(--pill-shadow);
  border-radius: 16px;
  padding: 4px 8px;
  font-size: 13px;
  font-weight: 600;
  min-width: 120px;
}
.ichiran-table tr.is-holiday-row .route-pill {
  background: var(--holiday-pill-soft);
}

/* サブグループヘッダーの区切り */
.ichiran-table .subgroup-header {
  border-top: 15px solid var(--bg);
}
.ichiran-table .subgroup-header th {
  border-bottom: 3px double var(--accent);
}

/* 特定列の二重線 */
.ichiran-table .double-border-left {
  border-left: 3px double var(--accent);
}
.ichiran-table .double-border-right {
  border-right: 3px double var(--accent);
}


/* 一覧ページ専用テーマ */
:root.theme-blue {
  --bg:#f6fbff !important; --line:#cce7ff !important; --cell:#e8f6ff !important;
  --accent:#0c5abf !important; --thead-bg:#dff4ff !important;
}
:root.theme-pink {
  --bg:#fff7f7 !important; --line:#ffd3d3 !important; --cell:#ffecec !important;
  --accent:#c91d47 !important; --thead-bg:#ffe6ea !important;
}
:root.theme-green {
  --bg:#f2fbf8 !important; --line:#c9eddf !important; --cell:#e8f8f2 !important;
  --accent:#15996b !important; --thead-bg:#dff4ec !important;
}
:root.theme-orange {
  --bg:#fffaf2 !important; --line:#ffeed9 !important; --cell:#fff3e3 !important;
  --accent:#f59e0b !important; --thead-bg:#fff8ed !important;
}