/* Estilos específicos para el componente de gráfico de medidas */
.chart-medidas-component {
  width: 100%;
  height: 100%;
}

.chart-medidas-container {
  background: white;
  /* border: 1px solid #e1e8ed; */
  border-radius: 8px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  min-height: 500px;
}

/* Estilos base del gráfico - reutilizables */
.chart-canvas {
  width: 100%;
  height: 500px;
  min-height: 500px;
}

.chart-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 500px;
  color: #6c757d;
  font-size: 1.1rem;
  gap: 0.5rem;
}

.chart-loading i {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Estilos para el título del gráfico */
.chart-title-section {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: #f8f9fa;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  gap: 2rem;
}

.chart-title-content {
  flex: 1;
}

.chart-title-content .title--slab {
  margin: 0 0 0.5rem 0;
  color: #2c3e50;
  font-size: 1.5rem;
}

.chart-subtitle {
  margin: 0;
  color: #6c757d;
  font-size: 0.95rem;
  font-style: italic;
}

.chart-title-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-shrink: 0;
}

/* Botones específicos del gráfico de medidas */
.btn-view-measure {
  background: #28a745;
  color: white;
  text-decoration: none;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.btn-view-measure:hover {
  background: #218838;
  color: white;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.btn-view-measure i {
  font-size: 0.875rem;
}

.btn-clear-selection {
  background: #e74c3c;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-clear-selection:hover {
  background: #c0392b;
}

.btn-clear-selection i {
  font-size: 0.875rem;
}

/* Responsivo */
@media (max-width: 768px) {
  .chart-title-section {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }
  
  .chart-title-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }
  
  .btn-view-measure {
    justify-content: center;
  }
  
  .chart-medidas-container {
    padding: 1rem;
  }
}

/* Animaciones */
@keyframes fadeIn {
  from { 
    opacity: 0;
    transform: translateY(20px);
  }
  to { 
    opacity: 1;
    transform: translateY(0);
  }
}

.chart-medidas-component {
  animation: fadeIn 0.4s ease-out;
}