/* ===== レイアウト（固定ナビ/フッター分の余白） ===== */
:root{
  --navbar-height: 56px;
  --navbar-height-lg: 64px;
  --footer-height: 64px;
}

/* fixed-top で隠れないように上余白、fixed-bottom 分の下余白 */
body{
  padding-top: var(--navbar-height);
  padding-bottom: var(--footer-height);
}
@media (min-width: 992px){
  body{ padding-top: var(--navbar-height-lg); }
}

/* コンテンツの下側に十分なスペース（ページ下端の密着防止） */
main.container{
  padding-bottom: 1.5rem;
}

/* ===== ユーティリティ ===== */
.min-width-100{ min-width: 100px; }
.min-width-50{ min-width: 50px; }
.no-wrap{ white-space: nowrap; }
.z-1080{ z-index: 1080; }

/* 背景の薄いグラデーション */
.bg-gradient-primary{
  background-image: linear-gradient(to bottom, #ffffff, #efffff);
}

/* スクロールバーの見た目（WebKit系のみ） */
::-webkit-scrollbar{ width: 8px; background-color: #f5f5f5; }
::-webkit-scrollbar-thumb{ background-color: #888; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover{ background-color: #555; }

/* ピンク系ボタン */
.btn-pink{ background-color:#ff1493; color:#fff; }
.btn-pink:hover{ background-color:#ff85c8; }
.btn-outline-pink{ color:#000; border:2px solid #ff1493; background-color:transparent; }
.btn-outline-pink:hover{ color:#fff; background-color:#ff85c8; }

/* シンプルなツールチップ（CSS版） */
.tooltip-inline{ position:relative; cursor:pointer; }
.tooltip-inline .tooltip-text{
  visibility:hidden; width:200px; background:#333; color:#fff;
  text-align:center; border-radius:5px; padding:5px; position:absolute; z-index:1;
  bottom:125%; left:50%; transform:translateX(-50%); opacity:0; transition:opacity .3s;
}
.tooltip-inline:hover .tooltip-text{ visibility:visible; opacity:1; }

/* トーストを少し大きめに */
.toast.toast-big{ min-width:420px; }
@media (min-width: 992px){ .toast.toast-big{ min-width:520px; } }

/* ===== テーブル（既存ルール＋sticky thead） ===== */
ul{ list-style-type:none; padding:0; }
li{ padding:3px; }

.table-sm td,.table-sm th{ padding:.2rem; font-size:14px; }
table{ border-collapse:collapse; width:100%; }
th,td{ border:1px solid #ddd; padding:8px; position:relative; }

/* ダブルクリックヒント（必要なときだけ .hint-dblclick を付与） */
.hint-dblclick th:hover::after, .hint-dblclick td:hover::after{
  content:"ダブルクリックで詳細が表示されます";
  position:absolute; bottom:100%; left:50%; transform:translateX(-50%);
  background:#333; color:#fff; padding:5px; border-radius:5px; white-space:nowrap;
  z-index:1; opacity:1; transition:opacity .3s;
}

/* 縦スクロールの小型テーブル */
.table-responsive.mini-y-scroll{ max-height:var(--mini-table-max,420px); overflow-y:auto !important; }
.table-responsive.mini-y-scroll thead th{
  position:sticky; top:0; z-index:2;
  background-color:var(--mini-thead-bg, var(--bs-table-bg, #fff));
  color:var(--mini-thead-color, var(--bs-table-color, inherit));
}

/* --- KV（ラベル:値）カード --- */
.kv-grid{ display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:.25rem .75rem; }
.kv-pair{ display:flex; align-items:baseline; gap:.25rem; white-space:nowrap; }
.kv-label{ color:var(--bs-secondary-color,#6c757d); font-weight:600; font-size:.95rem; }
.kv-label::after{ content:"："; margin-left:.125rem; }
.kv-value{ font-weight:600; font-size:1rem; }

/* 共通フォームスタイル調整 */
/* TextInput 系 (form-control) */
.form-control { font-size: 18px; border-radius: 8px; }
/* Select 系 (form-select) */
.form-select { font-size: 20px; border-radius: 6px; }

/* === 勤怠一覧: スイッチ/チェックの見た目拡大（共通化） === */
.form-switch.form-switch-lg .form-check-input { transform: scale(1.3); }
.form-check-input-lg { transform: scale(1.3); margin-right: .5rem; }

/* === Digitacho Chart: Loading Overlay / Spinner === */
.chart-wrapper { min-height: 360px; }

.loading-overlay{
  position: absolute;
  inset: 0;
  display: none; /* 初期は非表示。JSで .is-active を付与して表示 */
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
}
.loading-overlay.is-active{ display: flex; }

.spinner{
  width: 40px;
  height: 40px;
  border: 4px solid #fff;
  border-top: 4px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* 既存 keyframes 名と衝突しない想定（なければそのまま） */
@keyframes spin{
  0%{ transform: rotate(0deg); }
  100%{ transform: rotate(360deg); }
}

/* ===== detail 用（detail.html から移設した最低限のみ） ===== */
.detail-header{
  display:flex;
  font-weight:bold;
  height:25px;
  align-items:center;
  justify-content:center;
  text-shadow:-1px -1px 0 #fff, 1px -1px 0 #fff, -1px 1px 0 #fff, 1px 1px 0 #fff;
}
.detail-body{
  display:flex;
  font-weight:bold;
  height:40px;
  align-items:center;
  justify-content:center;
}

/* 金額ブロックの区切り線用：右側だけ太線 */
.table-partition-right{
  border-right:2px solid #000 !important;
}

/* 住所ピッカー用地図だけカーソルを矢印にする */
.address-picker-map.leaflet-container,
.address-picker-map .leaflet-grab,
.address-picker-map .leaflet-dragging,
.address-picker-map .leaflet-interactive {
  cursor: default !important;
}

/* 地図マーカーの営業回数ラベル */
.leaflet-tooltip.map-marker-count{
  background: #fff;
  border: 1px solid #333;
  border-radius: 3px;
  color: #111;
  font-size: 12px;
  font-weight: 700;
  padding: 1px 4px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.25);
}
