/* css/on-this-day.css */
.on-this-day-container {
  margin-bottom: 2rem;
  background-color: #ffffff !important;
  border-radius: 0.5rem;
  padding: 1.5rem;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.on-this-day-container .title {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
  color: #343a40;
  border-bottom: 1px solid #dee2e6;
  padding-bottom: 0.75rem;
}

.year-tabs .nav-tabs {
  border-bottom: 1px solid #dee2e6;
  margin-bottom: 1rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: thin;
}

.year-tabs .nav-tabs::-webkit-scrollbar {
  height: 6px;
}

.year-tabs .nav-tabs::-webkit-scrollbar-thumb {
  background-color: #dee2e6;
  border-radius: 6px;
}

.year-tabs .nav-tabs::-webkit-scrollbar-track {
  background-color: #f8f9fa;
}

.year-tabs .nav-link {
  padding: 0.5rem 1rem;
  color: #495057;
}

.year-tabs .nav-link.active {
  font-weight: bold;
  background-color: #e9ecef;
}

.year-content {
  padding: 1rem 0;
}

.year-content h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: #495057;
}

/* When in a card, ensure no extra padding/margin */
.card-body .on-this-day-container {
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
}

/* Prevent automatic scrolling */
body.prevent-scroll {
  overflow-anchor: none;
}

/* Reset scroll anchoring for all elements */
.on-this-day-container,
.year-tabs,
.chart-link a {
  overflow-anchor: none;
}

/* Fix tab styling for white background */
.on-this-day-container .year-tabs .nav-tabs .nav-link.active {
  background-color: #f8f9fa;
  border-bottom-color: #f8f9fa;
}

/* Fix table styling for white background */
.on-this-day-container .table {
  background-color: #ffffff;
}

/* Reduce artist name text size to match song title size */
.year-content table td button.artist-history {
  font-size: 0.85rem !important; /* Match song text size */
  font-weight: normal;
  text-align: left;
  padding: 0;
  margin: 0;
  line-height: 1.5;
}

/* Fix artist column alignment */
.year-content table td:nth-child(2) {
  text-align: left !important;
  vertical-align: middle !important;
}

/* Make all table text the same size */
.year-content table td {
  font-size: 0.85rem;
  vertical-align: middle !important;
}

/* Ensure proper wrapping for long artist names */
.year-content table td:nth-child(2) {
  word-break: normal;
  overflow-wrap: anywhere;
  max-width: 120px; /* Adjust as needed */
}

/* Make artist name clickable but not obvious it's a button */
.artist-history {
  text-decoration: none;
  color: #212529;
  transition: color 0.15s ease-in-out;
}

.artist-history:hover {
  color: #0d6efd;
  text-decoration: underline;
}

/* Mobile responsive rules */
@media (max-width: 768px) {
  .on-this-day-container {
    padding: 1rem;
  }
  
  .year-content h3 {
    font-size: 1.15rem;
  }
  
  .year-tabs .nav-link {
    padding: 0.4rem 0.75rem;
    font-size: 0.9rem;
  }
}