.analytics-interactive-chart {
  min-width: 0;
  overflow: hidden;
}

.analytics-chart-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.analytics-chart-header h2 {
  margin: 0;
  color: #102f52;
  font-size: 18px;
  line-height: 1.3;
}

.analytics-chart-header p,
.analytics-chart-hint {
  margin: 5px 0 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}

.analytics-chart-controls {
  display: flex;
  flex: 0 0 auto;
  align-items: end;
  gap: 7px;
}

.analytics-chart-controls label {
  display: grid;
  gap: 4px;
  color: #52657a;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.analytics-chart-controls select,
.analytics-chart-reset {
  height: 32px;
  border: 1px solid #cfdeee;
  border-radius: 7px;
  background: #fff;
  color: #102f52;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
}

.analytics-chart-controls select {
  min-width: 112px;
  padding: 0 26px 0 9px;
}

.analytics-chart-reset {
  min-width: 58px;
  padding: 0 9px;
  cursor: pointer;
}

.analytics-chart-reset:hover,
.analytics-chart-reset:focus-visible,
.analytics-chart-controls select:focus-visible {
  border-color: #0d3b66;
  outline: 2px solid rgba(13, 59, 102, .16);
  outline-offset: 1px;
}

.analytics-chart-stage {
  position: relative;
  min-height: 270px;
  border: 1px solid #e2ebf4;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.analytics-chart-canvas {
  display: block;
  width: 100%;
  height: 300px;
  cursor: crosshair;
  outline: none;
}

.analytics-chart-canvas:focus-visible {
  box-shadow: inset 0 0 0 2px #d4a72c;
}

.analytics-chart-tooltip {
  position: absolute;
  z-index: 2;
  min-width: 156px;
  max-width: 240px;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 7px;
  background: #0d3156;
  box-shadow: 0 10px 22px rgba(15, 37, 63, .22);
  color: #fff;
  font-size: 12px;
  line-height: 1.4;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .12s ease, transform .12s ease;
}

.analytics-chart-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.analytics-chart-tooltip b {
  display: block;
  margin-bottom: 2px;
  color: #fff;
}

.analytics-chart-tooltip span {
  color: #d7e8fa;
}

.analytics-chart-data-summary {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.analytics-interactive-chart .analytics-chart-hint {
  margin-top: 8px;
}

@media (max-width: 800px) {
  .analytics-chart-header {
    display: grid;
  }

  .analytics-chart-controls {
    width: 100%;
    flex-wrap: wrap;
  }

  .analytics-chart-controls label {
    flex: 1 1 124px;
  }

  .analytics-chart-controls select {
    width: 100%;
  }
}
