/**
 * RKMovies Admin Dashboard — Reveal SVG Charts
 * Strictly Soft White & Warm Amber curves, NO blue, NO purple.
 */

.chart-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 2rem;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: var(--shadow-glass);
  position: relative;
}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.chart-legend {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.legend-dot.dot-white { background-color: #ffffff; box-shadow: 0 0 10px rgba(255, 255, 255, 0.6); }
.legend-dot.dot-amber { background-color: var(--accent-amber); box-shadow: 0 0 10px var(--accent-amber); }
.legend-dot.dot-emerald { background-color: var(--accent-emerald); box-shadow: 0 0 10px var(--accent-emerald); }
.legend-dot.dot-rose { background-color: var(--accent-rose); box-shadow: 0 0 10px var(--accent-rose); }

.chart-container {
  width: 100%;
  height: 300px;
  position: relative;
  overflow: visible;
}

.chart-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* Grid & Axes */
.chart-gridline {
  stroke: rgba(255, 255, 255, 0.05);
  stroke-dasharray: 4, 6;
  stroke-width: 1;
}

.chart-axis {
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 1;
}

.chart-axis-label {
  fill: var(--text-muted);
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 500;
}

/* Lines & Fills (White Visits, Amber Downloads) */
.chart-line-white {
  fill: none;
  stroke: #ffffff;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.45));
}

.chart-area-white {
  fill: url(#whiteGradient);
  opacity: 0.25;
}

.chart-line-amber {
  fill: none;
  stroke: var(--accent-amber);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.5));
}

.chart-area-amber {
  fill: url(#amberGradient);
  opacity: 0.25;
}

/* Data Dots */
.chart-dot {
  cursor: pointer;
  transition: r 180ms ease, stroke-width 180ms ease, filter 180ms ease;
}

.chart-dot:hover {
  r: 6.5;
  stroke-width: 3.5;
  filter: drop-shadow(0 0 10px #fff);
}

.chart-dot-white {
  fill: #000000;
  stroke: #ffffff;
  stroke-width: 2.5;
}

.chart-dot-amber {
  fill: #000000;
  stroke: var(--accent-amber);
  stroke-width: 2.5;
}

/* Bars */
.chart-bar-white {
  fill: #ffffff;
  rx: 2;
  transition: opacity var(--transition-fast);
}

.chart-bar-white:hover {
  opacity: 0.8;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.6));
}

.chart-bar-amber {
  fill: var(--accent-amber);
  rx: 2;
  transition: opacity var(--transition-fast);
}

.chart-bar-amber:hover {
  opacity: 0.8;
  filter: drop-shadow(0 0 6px var(--accent-amber));
}

/* Tooltip */
.chart-tooltip {
  position: absolute;
  pointer-events: none;
  background-color: rgba(18, 18, 24, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-md);
  padding: 0.75rem 1.1rem;
  font-size: 0.8rem;
  color: var(--text-primary);
  box-shadow: var(--shadow-glass);
  z-index: 40;
  display: none;
  transform: translate(-50%, -125%);
  white-space: nowrap;
}

.tooltip-title {
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-muted);
  margin-bottom: 0.45rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.25rem;
}

.tooltip-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.25rem;
}
