/* ActivityChart.css */

.activity-chart-container {
  background-color: var(--navbar-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

.time-period-selector {
  display: flex;
  justify-content: center;
  margin-bottom: 15px;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 90%;
  margin-left: auto;
  margin-right: auto;
}

.time-period-button {
  background-color: var(--navbar-bg);
  color: var(--text);
  border: 1px solid var(--card-border);
  border-radius: 4px;
  padding: 8px 10px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  flex: 1;
  min-width: 90px;
  white-space: nowrap;
}

.time-period-button:hover {
  border-color: var(--button-bg);
}

.time-period-button.active {
  background-color: var(--button-bg);
  color: var(--button-text);
  border-color: var(--button-bg);
}

.chart-container {
  height: 300px;
  position: relative;
}

.chart-summary {
  margin-top: 15px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text);
  opacity: 0.8;
}

.activity-chart-empty,
.activity-chart-loading {
  height: 300px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--text);
  opacity: 0.7;
  border: 1px dashed var(--card-border);
  border-radius: 6px;
  margin: 15px 0;
}

.activity-chart-loading {
  flex-direction: column;
}

.chart-loading-note {
  font-size: 0.8rem;
  opacity: 0.7;
  margin-top: 5px;
}

.chart-loading-spinner {
  border: 3px solid rgba(var(--button-bg-rgb), 0.3);
  border-radius: 50%;
  border-top: 3px solid var(--button-bg);
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
  margin-bottom: 10px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@media (max-width: 768px) {
  .time-period-selector {
    flex-direction: column;
    align-items: stretch;
  }
  
  .time-period-button {
    width: 100%;
  }
}