/* テスト用 部屋・時間帯選択グリッド (装置/貸出/部屋 の3層) */
/* スクロール領域はラッパーで完結させる。modal-body の縦スクロールに乗らないことで、
 * 横スクロールバーが常に画面内に見える状態になる。 */
.strt-grid-wrapper {
  overflow: auto;
  max-width: 100%;
  max-height: 55vh;
}

.strt-grid-table {
  border-collapse: separate;
  border-spacing: 0;
  white-space: nowrap;
  font-size: 12px;
}

/* 左上ヘッダー: 縦・横ともスクロール時に固定 */
.strt-row-header {
  position: sticky;
  left: 0;
  z-index: 3;
  background-color: #f8f9fa;
  border-top: 1px solid #dee2e6;
  border-left: 1px solid #dee2e6;
  border-bottom: 1px solid #dee2e6;
  border-right: 2px solid #adb5bd;
  padding: 4px 8px;
  min-width: 110px;
  text-align: center;
}
.strt-row-header.strt-row-header-top { top: 0; }
.strt-row-header.strt-row-header-bottom { top: 32px; }

/* 左列セル */
.strt-row-name {
  position: sticky;
  left: 0;
  z-index: 1;
  background-color: #fff;
  border-left: 1px solid #dee2e6;
  border-bottom: 1px solid #dee2e6;
  border-right: 2px solid #adb5bd;
  padding: 4px 8px;
  min-width: 110px;
  font-weight: bold;
  text-align: center;
}

/* 装置行の名前: 装置っぽい色 */
.strt-row-name.strt-souti-name {
  background-color: #fafafa;
}
/* 貸出行の名前 */
.strt-row-name.strt-rental-name {
  background-color: #fafafa;
}

/* 貸出行の下に区切り線 (装置/貸出 → 部屋 の境界、表の意味合いが切り替わるため二重線で示す)
 * 詳細度を .strt-cell より高くする必要があるため複合クラスで指定 */
.strt-row-name.strt-rental-name,
.strt-cell.strt-rental-cell {
  border-bottom: 3px double #6c757d;
}
/* 部屋行の名前 */
.strt-row-name.strt-room-name {
  background-color: #fff;
}

/* 部屋固定: 対象外の部屋名行（薄く表示） */
.strt-row-name.strt-row-name-disabled {
  background-color: #f0f0f0;
  color: #aaa;
}

/* 選択可能な行のタイトルセルを強調 (貸出=貸出行 / テスト=各部屋行)。
 * 「この行のセルをクリックして選ぶ」と分かるようにする。 */
.strt-row-name.strt-row-selectable {
  background-color: #d1e7dd;          /* 明るい緑 = ここで選択できる */
  color: #0f5132;
  box-shadow: inset 4px 0 0 #198754;  /* 左端に緑のアクセントバー */
}

/* 日付ヘッダー: 縦スクロール時に上に貼り付け */
.strt-date-header {
  position: sticky;
  top: 0;
  z-index: 2;
  background-color: #e9ecef;
  border-top: 1px solid #dee2e6;
  border-bottom: 1px solid #dee2e6;
  border-right: 1px solid #dee2e6;
  padding: 4px 2px;
  text-align: center;
  font-weight: bold;
}

/* 時間帯ヘッダー (AM/PM): 1段目ヘッダーの高さ分下にずらして貼り付け */
.strt-hour-header {
  position: sticky;
  top: 32px;  /* date-header の高さに合わせる */
  z-index: 2;
  background-color: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  border-right: 1px solid #dee2e6;
  padding: 4px 6px;
  text-align: center;
  min-width: 64px;
  width: 64px;
  font-weight: bold;
}

/* 時間帯セル (AM/PM) - 基本 */
.strt-cell {
  border-bottom: 1px solid #dee2e6;
  border-right: 1px solid #dee2e6;
  padding: 0;
  min-width: 64px;
  width: 64px;
  height: 36px;
  cursor: default;
  text-align: center;
  font-size: 11px;
  color: #555;
}

/* 装置行・貸出行のセル: クリック不可 */
.strt-cell.strt-souti-cell,
.strt-cell.strt-rental-cell {
  cursor: not-allowed;
}

/* 部屋行のセル: クリック可（未予約時） */
.strt-cell.strt-room-cell {
  cursor: pointer;
}
.strt-cell.strt-room-cell:hover:not(.strt-reserved):not(.strt-reserved-own):not(.strt-rental-blocked) {
  background-color: #e9ecef;
}
/* rental モードで貸出行がクリック可になる場合は room-cell クラスも付与される */
.strt-cell.strt-rental-cell.strt-room-cell {
  cursor: pointer;
}

/* 予約済み (薄いグレー = 他予約) */
.strt-reserved {
  background-color: #999;
  color: #fff;
  cursor: not-allowed;
}

/* 自分予約 (濃いグレー = 同テストの自前予約 – 修正時) */
.strt-reserved-own {
  background-color: #555;
  color: #fff;
  cursor: not-allowed;
}

/* 貸出ブロック (貸出行で他予約あり = 部屋行も予約不可) */
.strt-rental-blocked {
  background-color: #cccccc;
  color: #555;
  cursor: not-allowed;
}

/* 参考期間（同一テスト内のもう一方の予定/テスト日。クリック可能だが視覚的に区別） */
.strt-reference {
  background-color: #cfe2ff;
  color: #0a4a9b;
}
/* 参考期間と他予約が重なった場合: 予約済 (灰) を優先 */
.strt-reference.strt-reserved {
  background-color: #999;
  color: #fff;
}
.strt-reference.strt-reserved-own {
  background-color: #555;
  color: #fff;
}
.strt-reference.strt-rental-blocked {
  background-color: #cccccc;
  color: #555;
}

/* 選択中（部屋行のみ可能） */
.strt-selected {
  background-color: #ee5566 !important;
  color: #fff !important;
}

/* 参考期間情報ラベル (期間表示の隣) */
.strt-reference-info-wrap { margin-left: 16px; }
.strt-reference-info-label {
  display: inline-block;
  background-color: #cfe2ff;
  color: #0a4a9b;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 12px;
  margin-right: 4px;
}

/* 編集中期間の事前選択ガイド (期間表示の隣) */
.strt-edit-hint {
  margin-left: 16px;
  color: #c0392b;
  font-size: 12px;
}

/* 情報 */
.strt-info { font-size: 14px; }
