/* Loading indicator spinner fallback for environments without Tailwind */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

#loading-indicator .animate-spin {
  display: inline-block;
  animation: spin 1s linear infinite;
}

#loading-indicator {
  font-size: 1.1rem;
  color: #1DB954;
}



/* Dual Range Slider Styling */
#min-year-slider,
#max-year-slider {
  -webkit-appearance: none;
  appearance: none;
  height: 8px;
  border-radius: 5px;
  outline: none;
  opacity: 0.7;
  transition: opacity 0.2s;
  pointer-events: auto;
}

#min-year-slider:hover,
#max-year-slider:hover {
  opacity: 1;
}

#min-year-slider::-webkit-slider-thumb,
#max-year-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #1DB954;
  cursor: pointer;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  transition: all 0.2s;
  pointer-events: auto;
}

#min-year-slider::-webkit-slider-thumb:hover,
#max-year-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

#min-year-slider::-moz-range-thumb,
#max-year-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #1DB954;
  cursor: pointer;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  transition: all 0.2s;
  pointer-events: auto;
}

#min-year-slider::-moz-range-thumb:hover,
#max-year-slider::-moz-range-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* Dark mode adjustments for dual range sliders */
.dark #min-year-slider::-webkit-slider-thumb,
.dark #max-year-slider::-webkit-slider-thumb {
  border-color: #1f2937;
}

.dark #min-year-slider::-moz-range-thumb,
.dark #max-year-slider::-moz-range-thumb {
  border-color: #1f2937;
}

/* Slider track and range styling */
#slider-track {
  pointer-events: none;
}

#slider-range {
  pointer-events: none;
  transition: all 0.2s ease;
}

/* Spotify logged-in button styling */
#logged-in-msg {
  position: relative;
  transition: all 0.3s ease;
}

#logged-in-msg .checkmark {
  color: #16a34a; /* Green-600 for good contrast in light mode */
  font-weight: bold;
  transition: all 0.3s ease;
}

.dark #logged-in-msg .checkmark {
  color: #22c55e; /* Green-500 for better contrast in dark mode */
}

#logged-in-msg:hover {
  background-color: #dc2626 !important; /* Red-600 for hover */
  color: white !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

#logged-in-msg:hover .checkmark {
  color: white !important;
}

/* Tags Modal Styling */
#tags-modal-overlay {
  backdrop-filter: blur(4px);
  transition: opacity 0.3s ease;
}

#tags-modal {
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

#tags-modal .bg-white,
#tags-modal .dark\\:bg-gray-800 {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Tags button styling */
.tags-button {
  transition: all 0.2s ease;
}

.tags-button:hover {
  transform: scale(1.1);
}

/* Autocomplete suggestions styling */
#autocompleteSuggestions span {
  transition: all 0.2s ease;
}

#autocompleteSuggestions span:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Tag chips styling */
#tagsList span {
  transition: all 0.2s ease;
  animation: tagSlideIn 0.2s ease-out;
}

@keyframes tagSlideIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

#tagsList span:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Modal close button */
#close-tags-modal {
  transition: all 0.2s ease;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

#close-tags-modal:hover {
  background-color: rgba(0, 0, 0, 0.1);
  transform: scale(1.1);
}

/* Streamgraph Styling */
#streamgraph-container {
  transition: all 0.3s ease;
}

#streamgraph {
  position: relative;
  overflow: visible;
}

.streamgraph-path {
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.streamgraph-path:hover {
  opacity: 0.8;
}

.streamgraph-tooltip {
  position: absolute;
  z-index: 1000;
  display: none;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid #1DB954;
  border-radius: 8px;
  padding: 10px 14px;
  color: #374151;
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(29, 185, 84, 0.3);
  text-align: left;
  backdrop-filter: blur(8px);
  white-space: nowrap;
}

.dark .streamgraph-tooltip {
  background: rgba(31, 41, 55, 0.95);
  border-color: #4b5563;
  color: #f9fafb;
}

.streamgraph-legend-item {
  display: inline-flex;
  align-items: center;
  margin: 4px 8px;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid #e5e7eb;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 12px;
  font-weight: 500;
}

.dark .streamgraph-legend-item {
  background: rgba(31, 41, 55, 0.8);
  border-color: #4b5563;
  color: #f9fafb;
}

.streamgraph-legend-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.streamgraph-legend-item.hidden {
  opacity: 0.3;
  text-decoration: line-through;
  visibility: visible !important; /* Keep it visible and clickable */
  pointer-events: all; /* Ensure it can be clicked */
}

.streamgraph-legend-item.focused {
  background: rgba(29, 185, 84, 0.2);
  border-color: #1DB954;
  box-shadow: 0 0 8px rgba(29, 185, 84, 0.3);
  transform: scale(1.05);
}

.dark .streamgraph-legend-item.focused {
  background: rgba(29, 185, 84, 0.3);
  border-color: #1DB954;
  box-shadow: 0 0 8px rgba(29, 185, 84, 0.4);
}

.streamgraph-legend-color {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  margin-right: 6px;
  display: inline-block;
}

/* Streamgraph loading animation */
#streamgraph.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  font-size: 16px;
}

#streamgraph.loading::before {
  content: "🔄";
  margin-right: 8px;
  animation: spin 1s linear infinite;
}

/* Streamgraph axis styling */
#streamgraph .axis text {
  fill: #374151;
  font-size: 11px;
  font-family: inherit;
}

.dark #streamgraph .axis text {
  fill: #f9fafb;
}

#streamgraph .axis path,
#streamgraph .axis line {
  stroke: #9ca3af;
  stroke-width: 1;
}

.dark #streamgraph .axis path,
.dark #streamgraph .axis line {
  stroke: #6b7280;
}

/* Datamaps tooltip styling */
/*.hoverinfo {
  position: absolute;
  z-index: 1000;
  display: block;
  pointer-events: none;
  background: rgba(255,255,255,0.95);
  border: 1px solid #888;
  border-radius: 4px;
  padding: 8px 12px;
  color: #23272f;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  min-width: 120px;
  max-width: 240px;
  text-align: left;
} */