@charset "UTF-8";
:root {
  --LOGO-COLOR-PRIMARY: #CC0022;
  --LOGO-COLOR-DARK: #666666;
  --LOGO-COLOR-LIGHT: #999999;
}

[data-bs-theme=dark] {
  --LOGO-COLOR-PRIMARY: #ff4455;
  --LOGO-COLOR-DARK: #f0f0f0;
  --LOGO-COLOR-LIGHT: #cccccc;
}

.db-main-container {
  background-color: var(--bs-body-bg);
  color: var(--bs-body-color);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.db-header {
  background-color: var(--bs-tertiary-bg) !important;
  border-bottom: 1px solid var(--bs-border-color-translucent);
}

.db-header-label {
  font-size: 0.65rem;
  letter-spacing: 0.05rem;
  font-weight: 700;
}

.db-placeholder-card {
  background-color: var(--bs-secondary-bg);
  border: 1px solid var(--bs-border-color-translucent);
}

/* 設定画面用モーダルロック */
.db-modal-lock {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 1040;
  backdrop-filter: blur(2px);
}

/* =========================================
   【新規】分析中のフルスクリーンオーバーレイ
   ========================================= */
.db-analyzing-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(5px);
  z-index: 2050; /* 他のUIより手前に表示 */
  display: flex;
  align-items: center;
  justify-content: center;
}
.db-analyzing-overlay .db-analyzing-dialog {
  background-color: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 16px;
  padding: 3.5rem 4.5rem;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
  text-align: center;
  animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
.db-analyzing-overlay .db-analyzing-spinner {
  font-size: 4.5rem;
  color: var(--bs-primary);
  margin-bottom: 1.5rem;
}

@keyframes popIn {
  0% {
    transform: scale(0.9);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
/* ダークモード時の固有調整 */
[data-bs-theme=dark] .db-main-container {
  background-color: #000;
}
[data-bs-theme=dark] .db-analyzing-overlay {
  background-color: rgba(0, 0, 0, 0.7);
}

/* =========================================
   DataTables 用追加スタイル (見出し固定対応)
   ========================================= */
.analysis-table-container {
  /* 【変更】スクロール時に背景が透けないようにpaddingを0に変更 */
  padding: 0;
  background-color: var(--bs-body-bg);
  border-radius: 8px;
}

.analysis-table-container table {
  margin: 0 !important; /* コンテナの端までテーブルを広げる */
  border-collapse: collapse !important;
  table-layout: auto !important;
  width: 100% !important;
  container-type: inline-size;
}
.analysis-table-container table thead th.col-url, .analysis-table-container table tbody td.col-url {
  word-break: normal !important;
  white-space: nowrap !important;
  width: 1% !important;
  padding-right: 15px !important;
}
.analysis-table-container table thead th:not(.col-url), .analysis-table-container table tbody td:not(.col-url) {
  word-break: break-all;
  white-space: normal !important;
}
.analysis-table-container table thead th, .analysis-table-container table tbody td {
  font-size: clamp(0.4rem, 0.8cqi, 1rem);
}
.analysis-table-container table thead th {
  /* ▼▼ 見出し固定の要 ▼▼ */
  position: sticky;
  top: 0;
  z-index: 10;
  /* 背景を不透明にして、スクロールしてきた行の文字が透けるのを防ぐ */
  background-color: var(--bs-secondary-bg);
  background-clip: padding-box;
  font-weight: 600;
  padding: 12px 8px !important;
  /* border-collapse環境下でスクロール時に枠線が消えるのを防ぐトリック */
  border-bottom: 2px solid var(--bs-border-color) !important;
  box-shadow: inset 0 1px 0 var(--bs-border-color), inset 0 -2px 0 var(--bs-border-color);
}

.dataTables_wrapper .dataTables_length, .dataTables_wrapper .dataTables_filter, .dataTables_wrapper .dataTables_info, .dataTables_wrapper .dataTables_paginate {
  font-size: 0.85rem;
  color: var(--bs-secondary-color);
  margin-bottom: 0.5rem;
}
.dataTables_wrapper .form-control, .dataTables_wrapper .form-select {
  font-size: 0.85rem;
  background-color: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
}
