/* Activity Rings CSS - Apple Watch Style */

.activity-rings-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
}

.activity-rings-container:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  transform: translateY(-2px);
}

/* SVG Container */
.activity-rings-svg {
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

/* Ring animations */
.activity-rings-svg circle {
  transition: stroke-dashoffset 0.3s ease;
}

/* Center text styling */
.ring-center-text text {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Legend styling */
.activity-rings-legend {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e7eb;
}

.ring-legend-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  border-radius: 8px;
  transition: background-color 0.2s ease;
}

.ring-legend-item:hover {
  background-color: #f9fafb;
}

.ring-legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.ring-legend-label {
  flex: 1;
  font-size: 0.875rem;
  font-weight: 500;
  color: #4b5563;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ring-legend-value {
  font-size: 0.875rem;
  font-weight: 700;
  color: #1f2937;
  min-width: 60px;
  text-align: right;
}

/* Mobile responsive */
@media (max-width: 767px) {
  .activity-rings-container {
    padding: 1rem;
  }
  
  .activity-rings-legend {
    margin-top: 1rem;
    padding-top: 1rem;
    gap: 0.5rem;
  }
  
  .ring-legend-item {
    padding: 0.375rem;
  }
  
  .ring-legend-label {
    font-size: 0.8125rem;
  }
  
  .ring-legend-value {
    font-size: 0.8125rem;
    min-width: 50px;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .activity-rings-container {
    background: #1f2937;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  }
  
  .activity-rings-container:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
  }
  
  .activity-rings-legend {
    border-top-color: #374151;
  }
  
  .ring-legend-item:hover {
    background-color: #111827;
  }
  
  .ring-legend-label {
    color: #d1d5db;
  }
  
  .ring-legend-value {
    color: #f9fafb;
  }
  
  .ring-center-text .ring-date {
    fill: #e5e7eb !important;
  }
  
  .ring-center-text .ring-status {
    fill: #9ca3af !important;
  }
}

/* Loading state */
.activity-rings-container.loading {
  position: relative;
  min-height: 300px;
}

.activity-rings-container.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border: 3px solid #e5e7eb;
  border-top-color: #5d5fef;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Integration with dashboard */
.dashboard-activity-rings {
  grid-column: span 1;
}

@media (min-width: 768px) {
  .dashboard-activity-rings {
    grid-column: span 2;
  }
}

@media (min-width: 1024px) {
  .dashboard-activity-rings {
    grid-column: span 1;
  }
}

/* Light Mode Text Visibility Fixes for Activity Rings */
body:not([data-theme="dark"]) .activity-rings-container {
  background: #ffffff !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
}

body:not([data-theme="dark"]) .ring-legend-label {
  color: #4b5563 !important;
}

body:not([data-theme="dark"]) .ring-legend-value {
  color: #1f2937 !important;
}

body:not([data-theme="dark"]) .activity-rings-legend {
  border-top-color: #e5e7eb !important;
}

body:not([data-theme="dark"]) .ring-legend-item:hover {
  background-color: #f9fafb !important;
}

/* Fix center text in activity rings */
body:not([data-theme="dark"]) .ring-center-text text {
  fill: #1f2937 !important;
}

body:not([data-theme="dark"]) .ring-center-text .ring-date {
  fill: #1f2937 !important;
}

body:not([data-theme="dark"]) .ring-center-text .ring-status {
  fill: #6b7280 !important;
}