/* ============================================
   POUSADA VIVA — ADS AI MANAGER
   Chart Styles
   ============================================ */

/* Chart Containers */
.chart-container {
  position: relative;
  width: 100%;
  height: 300px;
}

.chart-container-sm {
  height: 260px;
}

.chart-container-lg {
  height: 400px;
}

.chart-container canvas {
  width: 100% !important;
  height: 100% !important;
}

/* Chart wrapper for responsive behavior */
.chart-responsive-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
}

/* Custom Chart Legends */
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  padding: 12px 0 0;
}

.chart-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

.chart-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Chart placeholder when no data */
.chart-no-data {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  font-size: 14px;
  flex-direction: column;
  gap: 8px;
}

.chart-no-data i {
  font-size: 32px;
  opacity: 0.5;
}

/* Chart loading overlay */
.chart-loading {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(22, 33, 62, 0.8);
  border-radius: var(--radius);
  z-index: 10;
}

/* Doughnut chart center label */
.doughnut-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
}

.doughnut-center-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.doughnut-center-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Responsive chart adjustments */
@media screen and (max-width: 768px) {
  .chart-container {
    height: 250px;
  }

  .chart-container-sm {
    height: 220px;
  }

  .chart-container-lg {
    height: 300px;
  }

  .chart-legend {
    gap: 10px;
  }

  .chart-legend-item {
    font-size: 12px;
  }
}
