/* ========================================
   농수산 - 차트/SVG 스타일
   ======================================== */

.chart-container {
  width: 100%;
  padding: 10px 0;
}

.chart-container svg {
  width: 100%;
  height: auto;
  display: block;
}

/* SVG 텍스트 기본 */
.chart-container text {
  font-family: var(--font-family);
  fill: var(--text-secondary);
}

/* 축 라인 */
.chart-axis line,
.chart-grid line {
  stroke: var(--border-color);
  stroke-width: 1;
}

.chart-grid line {
  stroke-dasharray: 3, 3;
  opacity: 0.5;
}

/* 차트 라인 */
.chart-line {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 데이터 포인트 */
.chart-dot {
  cursor: pointer;
  transition: r 0.15s;
}
.chart-dot:hover {
  r: 5;
}

/* 범례 */
.chart-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px 16px;
  padding: 8px 0;
  font-size: 13px;
  color: var(--text-secondary);
  flex-wrap: wrap;
}

.chart-legend-item,
.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.chart-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.legend-line {
  display: inline-block;
  width: 20px;
  height: 2px;
}
.legend-line.dashed {
  background: none !important;
  border-top: 2px dashed;
  border-color: inherit;
}

/* 기간 선택 버튼 */
.period-btns {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
}
.period-btns button {
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  padding: 4px 12px;
  font-size: 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.period-btns button:hover {
  border-color: var(--accent-primary);
}
.period-btns button.active {
  background: var(--accent-primary);
  color: #fff;
  border-color: var(--accent-primary);
}

/* 스파크라인 (미니 차트) */
.sparkline {
  display: inline-block;
  vertical-align: middle;
}
.sparkline svg {
  width: 60px;
  height: 20px;
}
.sparkline polyline {
  fill: none;
  stroke-width: 1.5;
}

/* 히트맵 셀 */
.hm-cell rect {
  rx: 2;
  ry: 2;
}
.hm-cell text {
  font-size: 11px;
  text-anchor: middle;
  dominant-baseline: central;
}

/* 바 차트 */
.bar-rect {
  rx: 2;
  ry: 2;
  transition: opacity 0.15s;
}
.bar-rect:hover {
  opacity: 0.8;
}

/* 지도 */
.map-container {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}
.map-container svg {
  width: 100%;
  height: auto;
}
.map-region {
  stroke: var(--bg-primary);
  stroke-width: 1;
  cursor: pointer;
  transition: opacity 0.15s;
}
.map-region:hover {
  opacity: 0.8;
  stroke-width: 2;
}

/* 반응형 */
@media (max-width: 640px) {
  .trend-svg .chart-label {
    font-size: 22px !important;
  }
  .trend-svg .chart-label-sm {
    font-size: 14px !important;
  }
  .trend-svg .chart-dot {
    r: 6;
  }
}
