body {
  font-family: Arial, sans-serif;
  padding-top: 35px;
}

#svg-container svg {
  width: 100%;
  height: auto;
  max-height: 580px;
}

.offcanvas{
    --bs-offcanvas-zindex: 1045;
    --bs-offcanvas-width: 1100px;
    --bs-offcanvas-height: 100vh;
    --bs-offcanvas-padding-x: 3rem;
    --bs-offcanvas-padding-y: 2rem;
    --bs-offcanvas-color: black;
    --bs-offcanvas-bg: #fff;
    --bs-offcanvas-border-width: 3px;
    --bs-offcanvas-border-color: black;
    --bs-offcanvas-box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}


.hover-label {
  font-weight: bold;
  cursor: pointer;
  color: #333;
  padding: 4px 8px;
  border-radius: 4px;
  border: 1px solid #ccc;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.hover-label:hover,
.hover-label.active-hover {
  color: white;
  text-decoration: underline;
  background-color: black;
}

button.dropdown-toggle::after {
  content: none;
}

/* genomic  */
#slider .noUi-connect {
	background: #5dade2;
}

#slider .noUi-tooltip {
    display: none;
}
#slider .noUi-active .noUi-tooltip {
    display: block;
}

#slider-value {
  text-align: center;
  font-weight: bold;
  white-space: nowrap;
}

/* AF 滑桿與上方選單同一列，不要過長 */
#slider {
  margin: 0 10px;
}

#variantInput {
  cursor: pointer;         /* 滑鼠游標變成 pointer */
  caret-color: transparent; /* 不顯示文字輸入游標 */
}

/* 國家 */
#svgTooltip {
    position: absolute;
    pointer-events: none;
    padding: 6px 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    display: none;
    z-index: 1000;
}

/* info */
.icon-btn svg {
  color: #000000;   /* 預設黑色 */
  transition: color 0.3s;
}
.icon-btn:hover svg {
  color: #0d6efd;   /* hover 變藍色 */
}

/* globe */
.globe-icon-btn svg {
  color: #000000;   /* 預設黑色 */
  transition: color 0.3s;
}
.globe-icon-btn:hover svg {
  color: #6e7f97;   /* hover 變灰色 */
}


#checkboxGrid {
  max-height: 400px;      /* SNV 多時可捲動 */
  overflow-y: auto;
}

.list-group-item {
  font-size: 14px;
}


.ranking-title {
  background-color: #F5F5F4;
  padding: 6px 0;
  border-radius: 6px; /* 可選 */
}


.radar-wrap {
  width: 100%;
  height: clamp(160px, 25vw, 300px);          /* 桌機預設 */
}

/* 平板 */
@media (max-width: 992px) {
  .radar-wrap {
    height: 50px;
  }
}

/* 手機 */
@media (max-width: 576px) {
  .radar-wrap {
    height: 240px;
  }
}

.card-body canvas {
  width: 100%;
  height:  clamp(160px, 25vw, 200px); /* 或改成 clamp(160px, 25vw, 215px) 更 RWD */
  display: block;
}

/* ── 國家 Modal：四張圖固定為相同大小 ── */
#countryModal .row > [class*="col-"] {
  min-width: 0;                 /* 防止 Chart.js canvas 撐壞 Bootstrap 欄寬 */
}

.chart-cell {
  position: relative;
  width: 100%;
  height: 270px;                /* 四圖同高；想更大可改 290px / 300px */
  min-width: 0;
  overflow: hidden;
  background: #fff;
}

.chart-cell canvas,
#countryModal #world1,
#countryModal #world2,
#countryModal #world3,
#countryModal #world4 {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
}

/* Modal 本身限制最大高度可捲動 */
#countryModal .modal-body {
  max-height: 78vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px;
}

/* 手機：上下排各佔全寬 */
@media (max-width: 576px) {
  #countryModal .col-6,
  #countryModal .col-4 {
    flex: 0 0 100%;
    max-width: 100%;
  }
  .chart-cell {
    height: 230px;
  }
}

/* =============================================
   VOC offcanvas 排版
   加到 tracking.css
============================================= */

/* =============================================
   VOC offcanvas 排版  ── 加到 tracking.css
============================================= */

/* offcanvas 本體可捲動 */
#voc .offcanvas-body {
  overflow-y: auto;
  overflow-x: hidden;
}

/* 所有 canvas 填滿父容器 */
#voc canvas {
  width:  100% !important;
  height: 100% !important;
  display: block;
}

/* ── legend 捲動區 ── */
.voc-legend-box {
  max-height: 110px;
  overflow-y: auto;
  overflow-x: hidden;
  border-top: 1px solid #e9ecef;
  padding-top: 6px;
  font-size: 11px;
}
/* =============================================
   滿版 offcanvas（start/end/top/bottom 通用）
============================================= */
.offcanvas.offcanvas-fullscreen {
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  border: 0;
}
.offcanvas.offcanvas-fullscreen .offcanvas-body {
  overflow-y: auto;
  padding-top: 1rem;
}

/* 標題列（含右上角關閉鍵）不要太高，並統一加上灰色分隔線 */
.offcanvas.offcanvas-fullscreen .offcanvas-header {
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid #dee2e6;
}

/* six type 與 genomic 的內容起始位置往下一點 */
#six .offcanvas-body,
#gene .offcanvas-body {
  padding-top: 1.5rem;
}
.offcanvas.offcanvas-fullscreen .offcanvas-title {
  font-size: 1.1rem;
  margin-bottom: 0;
}

/* =============================================
   Six Strain Types offcanvas 排版
============================================= */
.six-main-title {
  display: block;
  width: 100%;
  text-align: center !important;
}

.six-country-select {
  width: 340px;
  max-width: 100%;
}

/* 左右兩張圖等高對齊（six type 與 genomic 共用） */
.chart-box {
  position: relative;
  height: 38vh;
  min-height: 240px;
}
/* 下半部（雷達圖／直方圖）用比較小的高度 */
.chart-box.chart-box-sm {
  height: 28vh;
  min-height: 200px;
}
.chart-box > canvas {
  width:  100% !important;
  height: 100% !important;
  display: block;
}

/* 面板標題與下載鍵（同 css.html 樣式） */
.panel-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f172a;
}
.panel-download {
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 4px;
  opacity: 0.55;
  transition: opacity 0.18s;
}
.panel-download:hover { opacity: 1; }
/* =============================================
   圖表配對排版：橫向螢幕並排、直向螢幕上下堆疊
   （six type 與 genomic 共用）
============================================= */
.chart-pair > .chart-pair-col {
  flex: 0 0 auto;
  min-width: 0;              /* 防止 canvas 撐壞欄寬 */
}

@media (orientation: landscape) {
  .chart-pair > .chart-pair-col { width: 50%; }
}

@media (orientation: portrait) {
  .chart-pair > .chart-pair-col { width: 100%; }
  /* 上下堆疊時單張圖不要太高 */
  .chart-box {
    height: 26vh;
    min-height: 190px;
  }
  .chart-box.chart-box-sm {
    height: 20vh;
    min-height: 165px;
  }
}