/* ── Column Chart Styles ──────────────────────────────────────────────── */

.cc-wrap {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 8px 0;
  font-family: inherit;
}

/* Header */
.cc-header {
  margin-bottom: 10px;
}

.cc-title {
  font-size: 22px;
  font-weight: 500;
  color: #111;
  line-height: 1.2;
  margin-bottom: 6px;
}

/* Tab bar */
.cc-tab-bar {
  display: flex;
  border-bottom: 1px solid #ddd;
  margin-bottom: 14px;
  gap: 0;
}

.cc-tab {
  padding: 8px 22px;
  font-size: 14px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  color: #666;
  transition:
    color 0.15s,
    border-color 0.15s;
  font-family: inherit;
  white-space: nowrap;
  border-radius: 0;
}

.cc-tab:hover {
  color: #111;
  background-color: #fff;
}

.cc-tab:focus {
  outline: none;
}

.cc-tab.active {
  color: #111;
  border-bottom-color: #111;
  font-weight: 500;
}

/* Legend */
.cc-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-bottom: 14px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.02);
  border-radius: 5px;
}

.cc-leg-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--color-text-secondary, #555);
  user-select: none;
  transition: opacity 0.2s;
}

.cc-leg-item:hover {
  opacity: 0.75;
}

.cc-leg-item.cc-leg-hidden {
  opacity: 0.35;
  text-decoration: line-through;
  text-decoration-color: #999;
}

.cc-leg-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
  display: inline-block;
}

.cc-leg-dot.cc-leg-line {
  background: transparent;
  border-top: 2px dashed;
  border-radius: 0;
  height: 0;
  width: 16px;
}

/* Chart area */
.cc-chart-area {
  position: relative;
  width: 100%;
}

.cc-canvas {
  display: block;
  width: 100%;
}

/* Tooltip */
.cc-tooltip {
  position: absolute;
  pointer-events: none;
  background: var(--color-background-primary, #fff);
  border: 1px solid var(--color-border, #e0e0e0);
  border-radius: 7px;
  padding: 10px 13px;
  font-size: 12px;
  max-width: 200px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  display: none;
  z-index: 20;
}

.cc-tt-name {
  font-weight: 600;
  font-size: 12px;
  color: #222;
  margin-bottom: 4px;
  border-bottom: 1px solid #eee;
  padding-bottom: 4px;
}

.cc-tt-series {
  font-size: 11px;
  margin-bottom: 3px;
  font-weight: 500;
}

.cc-tt-val {
  font-size: 13px;
  font-weight: 700;
  color: #333;
}

/* Description block */
.cc-description {
  margin-bottom: 18px;
  color: #333;
  font-size: 14px;
  line-height: 1.6;
}

.cc-description p {
  margin: 0;
}

.cc-description p + p {
  margin-top: 8px;
}

/* Source note */
.cc-source {
  font-size: 12px;
  color: #333;
  margin-top: 10px;
  line-height: 1.5;
  font-style: italic;
}

/* Responsive */
@media (max-width: 991px) {
  .cc-title {
    font-size: 18px;
  }
  .cc-tab,
  .cc-leg-item {
    font-size: 12px;
  }
}
@media (max-width: 600px) {
  .cc-tab {
    padding: 7px 12px;
    font-size: 12px;
  }

  .cc-title {
    font-size: 14px;
  }

  .cc-legend {
    gap: 4px 10px;
  }
}

@media print {
  .cc-tooltip {
    display: none !important;
  }

  .column-chart-wrapper {
    page-break-inside: avoid;
  }
}
