/* ============================================================
   Bar Chart Filter — Tool-specific styles
   ============================================================ */

/* ── Layout overrides: allow vertical scroll in main area ── */

.dvz-app {
  overflow: hidden !important;
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  height: auto !important;
  margin-top: 0 !important;
}

#main-area {
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

#dvz-chart {
  display: block !important;
  overflow: visible;
  min-height: auto;
}

#chart-area {
  overflow: visible !important;
  min-height: 0;
  height: auto !important;
}

#chart-area > #chart-container {
  width: 100%;
  height: auto !important;
  min-height: 200px;
}

#chart-area #chart-container > svg,
#chart-area #chart-container svg {
  width: auto !important;
  height: auto !important;
  max-height: none !important;
}

#chart-area .empty-state {
  height: auto;
  min-height: 320px;
}

/* ── SVG template (dvz-template-svg) ────────────────────── */

.dvz-template-svg {
  position: relative;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  overflow: hidden;
}
.dvz-template-svg svg { width: 100%; height: auto; display: block; }

/* ── Empty state ────────────────────────────────────────── */

.empty-state {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; min-height: 400px;
  color: #999; font-size: 15px; gap: 12px;
}
.empty-state .icon { font-size: 48px; opacity: 0.4; }

/* ── Bar Chart Filter styles ────────────────────────────── */

.dashboard-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px;
}
.chart-card, .table-card {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05); padding: 14px;
}
.chart-card-head, .table-card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px;
}
.chart-card-title { margin: 0; color: #6b7280; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.chart-slot { min-height: 180px; }
.table-scroll { overflow-x: auto; }
.table-paging { margin-top: 12px; display: flex; justify-content: flex-end; gap: 8px; }
div.dc-chart { float: none !important; }
.dc-chart g.row text {
  fill: #FFF !important;
  font-weight: 800;
  font-size: 11px;
  stroke: #000 !important;
  stroke-width: 1px;
  stroke-linejoin: round;
  paint-order: stroke fill;
}
.dc-chart g.row rect { rx: 2; }
.dc-data-table thead th { text-align: left; padding: 0.5rem 0.75rem; border-bottom: 2px solid #e5e7eb; font-size: 0.75rem; font-weight: 700; color: #6b7280; text-transform: uppercase; }
.dc-data-table tbody td { padding: 0.5rem 0.75rem; border-bottom: 1px solid #f3f4f6; }
.dc-data-table tbody tr:hover td { background-color: #eff6ff; }
.dc-data-table .dc-table-group td { background-color: #f3f4f6; font-weight: 700; font-size: 0.75rem; color: #6b7280; }
.reset {
  display: inline-flex; align-items: center; padding: 0.25rem 0.625rem;
  font-size: 0.6875rem; color: #4f81bd; background: #eff6ff; border: 1px solid #bfdbfe;
  border-radius: 9999px; cursor: pointer; transition: background-color 0.15s;
}
.reset:hover { background: #dbeafe; }
.reset.hidden { display: none; }
.btn-reset-all {
  display: inline-block; margin-left: 0.5rem; padding: 0.3rem 0.875rem;
  font-size: 0.75rem; font-weight: 600; color: #fff; background: #4f81bd;
  border: none; border-radius: 0.375rem; cursor: pointer;
}
.btn-reset-all:hover { background: #3b6da1; }
.btn-paging {
  display: inline-block; padding: 0.375rem 1rem; font-size: 0.75rem; font-weight: 600;
  color: #374151; background: #f9fafb; border: 1px solid #d1d5db;
  border-radius: 0.375rem; cursor: pointer;
}
.btn-paging:hover { background: #f3f4f6; }
.btn-paging[disabled] { opacity: 0.45; cursor: not-allowed; }

.bcf-column-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.bcf-column-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 0.3rem 0.7rem; font-size: 0.75rem; font-weight: 600;
  color: #374151; background: #fff; border: 1px solid #d1d5db;
  border-radius: 9999px; cursor: pointer; transition: all 0.15s;
}
.bcf-column-chip:hover:not([disabled]) { border-color: #9ca3af; background: #f9fafb; }
.bcf-column-chip.is-active {
  color: #fff; background: #4f81bd; border-color: #4f81bd;
}
.bcf-column-chip[disabled] { opacity: 0.4; cursor: not-allowed; }
.bcf-column-chip .bcf-column-count {
  font-size: 0.65rem; font-weight: 500; opacity: 0.8;
}
.bcf-column-help { margin-top: 6px; font-size: 0.65rem; color: #9ca3af; }
