/* CHARTS COMPONENT STYLES */
#charts-container {
  width: 100%;
}

.chart-panel-full {
  background: var(--bg-panel);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 18px 22px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  min-height: 220px;
  height: 310px;
  max-height: 600px;
  resize: vertical;
  overflow: hidden;
  position: relative;
  animation: fadeUp .5s .2s ease both;
  box-shadow: var(--card-shadow, 0 4px 12px rgba(0,0,0,0.15));
}

.chart-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.panel-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -.2px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.panel-title .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.chart-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.color-tools {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bg-alt);
  padding: 3px 8px;
  border-radius: 20px;
  border: 1px solid var(--border);
}
.color-tools-label {
  font-size: 10.5px;
  color: var(--gray);
  font-weight: 600;
  text-transform: uppercase;
  margin-right: 2px;
}
.color-swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  transition: transform .15s, border-color .15s;
  outline: none;
}
.color-swatch:hover { transform: scale(1.25); }
.color-swatch.active {
  border-color: var(--white);
  transform: scale(1.15);
  box-shadow: 0 0 6px rgba(255,255,255,.4);
}

.color-picker-label {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  width: 17px;
  height: 17px;
  margin-left: 2px;
}
.color-picker-label input[type="color"] {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
.picker-icon {
  font-size: 11px;
  filter: grayscale(0.2);
  transition: transform .15s;
}
.color-picker-label:hover .picker-icon { transform: scale(1.25); }

.chart-resize-hint {
  font-size: 10.5px;
  color: var(--gray);
  opacity: 0.75;
  user-select: none;
}

.chart-wrap {
  position: relative;
  flex: 1;
  width: 100%;
  min-height: 140px;
}

.chart-drag-handle {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 8px;
  cursor: ns-resize;
  display: flex;
  align-items: center;
  justify-content: center;
}
.chart-drag-handle::after {
  content: '';
  width: 44px;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  transition: background .2s, width .2s;
}
.chart-panel-full:hover .chart-drag-handle::after,
.chart-drag-handle:hover::after {
  background: var(--blue);
  width: 60px;
}

/* OVERRIDES MODO CLARO PARA GRÁFICOS */
body.light-theme .chart-panel-full {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
body.light-theme .color-tools {
  background: #F1F5F9;
  border-color: #CBD5E1;
}
body.light-theme .color-swatch.active {
  border-color: #0F172A;
  box-shadow: 0 0 6px rgba(15, 23, 42, 0.3);
}

/* TABLET & MOBILE RESPONSIVE */
@media (max-width: 768px) {
  .chart-panel-full {
    padding: 14px 12px;
    height: 280px;
  }
  .chart-panel-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .chart-header-right {
    width: 100%;
    justify-content: space-between;
  }
}
