/* css/sheet-table.css */

#sheet-table-app {
  width: 100%;
}

.sheet-table-year-nav {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.sheet-table-year-button {
  flex: 0 0 auto;
  appearance: none;
  border: 1px solid #d8d8d8;
  border-radius: 999px;
  background: #fff;
  color: #333;
  padding: 7px 14px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.sheet-table-year-button:hover {
  background: #f5f5f5;
}

.sheet-table-year-button.is-active {
  background: #333;
  border-color: #333;
  color: #fff;
}

.sheet-table-toolbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 8px;
}

.sheet-table-current {
  font-size: 1rem;
  font-weight: 700;
}

.sheet-table-note {
  color: #777;
  font-size: .78rem;
}

.sheet-table-scroll {
  width: 100%;
  max-height: min(70vh, 720px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  border: 1px solid #ddd;
  background: #fff;
}

.sheet-table {
  border-collapse: collapse;
  table-layout: fixed;
  width: max-content;
  min-width: 100%;
  background: #fff;
  font-size: 13px;
  line-height: 1.35;
}

.sheet-table td {
  box-sizing: border-box;
  padding: 3px 6px;
  border: 1px solid #d9d9d9;
  overflow: hidden;
}

/* 2025年度以降のG〜N列・W列を中央揃えにする。 */
.sheet-table td.is-horizontally-centered {
  text-align: center !important;
}

/* 2025年度以降は冒頭2行、2024年度以前は冒頭1行を中央揃えにする。 */
.sheet-table tr.is-horizontally-centered > td {
  text-align: center !important;
}

/* 2022～2024年度は冒頭1行、2025年度以降は冒頭2行を固定する。 */
.sheet-table tr.is-sticky-header > td {
  position: sticky;
  z-index: 2;
  background-color: #fff;
}

.sheet-table tr.is-sticky-header-1 > td {
  top: 0;
  z-index: 3;
}

.sheet-table tr.is-sticky-header-2 > td {
  top: var(--sheet-table-first-header-height, 0px);
}

.sheet-table td a {
  color: inherit;
  text-decoration: underline;
}

.sheet-table-status {
  padding: 22px 12px;
  text-align: center;
  color: #666;
}

.sheet-table-status.is-error {
  color: #a40000;
  background: #fff3f3;
  border: 1px solid #f0caca;
}

@media (max-width: 700px) {
  .sheet-table-toolbar {
    display: block;
  }

  .sheet-table-note {
    margin-top: 3px;
  }

  .sheet-table {
    font-size: 12px;
  }

  .sheet-table-scroll {
    max-height: 65vh;
  }

  .sheet-table td {
    padding: 3px 5px;
  }
}
