/* Link wrapper for clickable section */
.containerLink {
  text-decoration: none;
  display: block;
  transition: opacity 0.15s ease;
}

.containerLink:hover {
  opacity: 0.9;
}

.containerLink:hover .viewMore {
  color: #60a5fa;
}

/* Container is now just content, not a card (outer card provides styling) */
.container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #fff;
  margin: 0;
}

/* Compact admin-support note shown when an admin views this widget while
   supporting a dealer whose plan doesn't include analytics. */
.adminNote {
  font-size: 0.75rem;
  font-weight: 500;
  color: #fbbf24;
  margin: 4px 0 0;
}

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.5rem;
}

.periodLabel {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
}

.metricsGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  gap: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
}

.spinner {
  width: 2rem;
  height: 2rem;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--color-primary-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  gap: 0.75rem;
  color: #ef4444;
  text-align: center;
}

.retryButton {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #0f172a;
  background: var(--color-primary-accent);
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.retryButton:hover {
  background: #6cd2ff;
}

.upgradePrompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  gap: 1rem;
  text-align: center;
}

.upgradeText {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
  margin: 0;
  max-width: 300px;
}

.upgradeButton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: #0f172a;
  background: var(--color-primary-accent);
  border: none;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.upgradeButton:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px -10px rgba(14, 165, 233, 0.8);
}

/* View More Link */
.viewMore {
  font-size: 0.875rem;
  color: var(--color-primary-accent);
  transition: color 0.15s ease;
}
