html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main-content {
  flex: 1;
  display: block;
}

.hero-section {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  color: white;
  padding: 0.5rem 0;
  flex-shrink: 0;
}

.hero-section h1 {
  font-size: 1.1rem;
  margin-bottom: 0;
  line-height: 1.3;
}

.hero-section .hero-line-2 {
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

.donor-table {
  margin-bottom: 0;
}

.donor-table td {
  vertical-align: middle;
  padding: 0.75rem;
}

.donor-icon-col {
  width: 2rem;
}

.donor-name-col {
  min-width: 200px;
}

.donated-badge-col {
  width: 120px;
}

.donor-song-col {
  min-width: 150px;
}

.donor-comment-col {
  min-width: 150px;
}

.donor-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 1;
  min-width: 0;
}

.donated-badge-col {
  white-space: nowrap;
}

.donor-song-col {
  min-width: 0;
  max-width: 200px;
}

.donor-song-link {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.donor-comment-col {
  min-width: 0;
  max-width: 250px;
}

.donor-comment {
  cursor: pointer;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.donor-comment.expanded {
  white-space: normal;
  overflow: visible;
}

.donor-comment.expanded .comment-text {
  white-space: normal;
}

.donor-song-link {
  color: var(--bs-primary);
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s ease;
}

.donor-song-link:hover {
  color: var(--bs-danger);
  text-decoration: underline !important;
}

/* Popover styling for song player */
.song-popover-content {
  min-width: 300px;
  max-width: 400px;
}

.song-popover-header {
  text-align: center;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.song-popover-header strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.song-popover-header small {
  font-size: 0.875rem;
}

.song-popover-player {
  width: 100%;
}

.song-popover-player iframe {
  border-radius: 4px;
  min-height: 200px;
}

@media (max-width: 576px) {
  .song-popover-content {
    min-width: 280px;
    max-width: 320px;
  }
  
  .song-popover-player iframe {
    min-height: 180px;
  }
}

@media (max-width: 576px) {
  .donor-row {
    flex-wrap: wrap;
  }
  
  .donor-name-col {
    flex: 1 1 100%;
    order: 1;
  }
  
  .donor-comment-col {
    flex: 1 1 100%;
    max-width: 100%;
    order: 2;
    margin-top: 0.25rem;
  }
  
  .donor-song-link {
    font-size: 0.875rem;
  }
}

/* Stat card styles are imported from templates/core/shared.css during build */

/* Thermometer styles are now in templates/core/thermometer.css - imported during build */

footer {
  flex-shrink: 0;
  margin-top: 2rem;
  padding: 0.5rem 0;
}

.footer-content {
  font-size: 0.8rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  position: relative;
}

.footer-text {
  text-align: center;
}

.footer-links {
  display: flex;
  gap: 0.5rem;
}

.footer-meta {
  font-size: 0.75rem;
  color: #6c757d;
  white-space: nowrap;
  position: absolute;
  right: 0;
}

.timestamp-toggle {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.timestamp-expanded {
  margin-left: 0.5rem;
  display: none;
}

.timestamp-expanded.show {
  display: inline;
}

.content-wrapper {
  min-height: 0;
}


.donors-section {
  min-height: 0;
}

.drive-photo {
  max-width: 400px !important;
  max-height: 400px !important;
  width: auto !important;
  height: auto;
  object-fit: contain;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Empty state icon */
.empty-state-icon {
  font-size: 2rem;
}

@media (max-width: 576px) {
  /* Mobile thermometer styles are in templates/core/thermometer.css - do not duplicate here */

  .drive-photo {
    max-width: 300px !important;
    max-height: 300px !important;
    height: auto;
  }
}


/* Shared styles from static/core/css/shared.css */
/* Shared CSS styles used by both core (front-end) and staticsite */

/* Stat card styles */
.stat-card {
  border-left: 4px solid;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.stat-card.donated {
  border-color: #8b5cf6;
}

.stat-card.pledged {
  border-color: #3b82f6;
}

.text-donated {
  color: #8b5cf6 !important;
}

.text-pledged {
  color: #3b82f6 !important;
}

.bg-donated {
  background-color: #8b5cf6 !important;
}

.bg-pledged {
  background-color: #3b82f6 !important;
}



/* Thermometer styles from static/core/css/thermometer.css */
/* Shared thermometer styles - used by both core and static templates */

.thermometer-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  padding-bottom: 0;
  width: 80px; /* Wide enough for thermometer with graduation marks */
  min-width: 80px;
  overflow: visible; /* Ensure heart isn't clipped */
}

.thermometer {
  position: relative;
  width: 80px;
  height: 220px;
  margin: 0 auto;
  margin-bottom: 0;
}

.thermometer-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.thermometer-glass {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 100%;
  background: #ffffff; /* White background */
  border: 2px solid #c0c0c0; /* Gray border for tube sides */
  border-radius: 12px 12px 0 0;
  overflow: hidden;
  z-index: 2;
}

.thermometer-glass::after {
  display: none; /* Fills now extend to bottom, no need for white bottom overlay */
}

.fill-donated,
.fill-pledged {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  transition: height 0.5s ease;
  border-radius: 0 0 10px 10px; /* Slightly smaller to account for border */
  z-index: 1; /* Above glass background */
}

.fill-donated {
  background: linear-gradient(to top, #8b5cf6, #a78bfa);
}

.fill-pledged {
  background: linear-gradient(to top, #ffc107, #ffd54f); /* Gold/yellow to match Bootstrap warning color (text-warning) */
}

.thermometer-heart {
  position: absolute;
  bottom: -10px; /* Negative value moves heart down - adjust this to lower it more */
  left: 50%;
  transform: translateX(-50%) rotate(-45deg); /* Keep heart aligned with tube center */
  width: 50px;
  height: 45px;
  background: #dc3545;
  border-radius: 10px;
  z-index: 0;
}

.thermometer-heart::before,
.thermometer-heart::after {
  content: "";
  position: absolute;
  width: 50px;
  height: 45px;
  background: #dc3545;
  border-radius: 50%;
}

.thermometer-heart::before {
  top: -18px;
  left: 0;
  z-index: 1;
}

.thermometer-heart::after {
  left: 18px;
  top: 0;
}

@media (max-width: 576px) {
  .thermometer-wrapper {
    padding-bottom: 26px; /* Account for smaller heart on mobile */
    width: 50px; /* Smaller width for mobile heart (40px) */
    min-width: 50px;
  }

  .thermometer {
    margin-bottom: 0;
  }

  .thermometer-glass {
    width: 18px;
    border-width: 1.5px;
    border-radius: 9px 9px 0 0;
  }

  .thermometer-glass::after {
    display: none; /* Hide the red bottom on mobile - fill covers it */
  }
  
  .fill-donated,
  .fill-pledged {
    border-radius: 0 0 7px 7px; /* Slightly smaller to account for border */
  }

  .thermometer-heart {
    width: 40px;
    height: 36px;
    bottom: -8px; /* Negative value for mobile - adjust to lower it more */
    transform: translateX(-50%) rotate(-45deg); /* Keep aligned with tube */
  }

  .thermometer-heart::before,
  .thermometer-heart::after {
    width: 40px;
    height: 36px;
  }

  .thermometer-heart::before {
    top: -18px;
  }

  .thermometer-heart::after {
    left: 18px;
  }
}



/* Song player styles from static/core/css/song_player.css */
/* Song Player Modal Styles */
.song-player-container {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  position: relative;
}

.song-player-container iframe {
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  width: 100%;
  min-height: 352px;
  border: none;
}

/* Plyr player styling */
#songPlayerPlyrContainer {
  width: 100%;
  min-height: 352px;
}

#songPlayerPlyr {
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  width: 100%;
  height: 352px;
}

/* Ensure Plyr player matches iframe dimensions */
#songPlayerPlyrContainer .plyr {
  border-radius: 8px;
}

#songPlayerPlyrContainer .plyr__video-embed {
  border-radius: 8px;
}

/* Hide Plyr container by default, show when needed */
#songPlayerPlyrContainer.d-none {
  display: none !important;
}

/* Responsive adjustments for Plyr */
@media (max-width: 768px) {
  #songPlayerPlyr {
    min-height: 300px;
    height: 300px;
  }
}

.song-player-modal .modal-header.bg-primary {
  border-bottom: 2px solid var(--bs-primary);
}

.song-player-modal .modal-title {
  font-weight: 600;
}

.song-player-info {
  margin-bottom: 1.5rem;
}

.song-player-info .lead {
  margin-bottom: 0.5rem;
}

.song-player-sources {
  margin-top: 1rem;
}

.song-player-sources .badge {
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
}

.song-player-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 352px;
  color: #6c757d;
}

.song-player-loading i {
  font-size: 2rem;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Song source link badges with platform colors */
.song-source-link {
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Ensure badges have proper contrast - override Bootstrap defaults */
a.badge.song-source-link,
a.badge.text-decoration-none.song-source-link {
  color: white !important;
  font-weight: 500;
  padding: 0.375rem 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.song-source-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  opacity: 0.9;
}

/* Platform-specific badge colors - ensure high contrast */
/* Use very specific selectors to override Bootstrap 5 defaults */
a.badge.song-source-link.song-source-spotify,
a.badge.text-decoration-none.song-source-link.song-source-spotify {
  background-color: #1DB954 !important;
  background: #1DB954 !important;
  color: white !important;
  border-color: #1DB954 !important;
}

a.badge.song-source-link.song-source-spotify:hover,
a.badge.text-decoration-none.song-source-link.song-source-spotify:hover {
  background-color: #1ed760 !important;
  background: #1ed760 !important;
  color: white !important;
}

a.badge.song-source-link.song-source-youtube,
a.badge.text-decoration-none.song-source-link.song-source-youtube {
  background-color: #FF0000 !important;
  background: #FF0000 !important;
  color: white !important;
  border-color: #FF0000 !important;
}

a.badge.song-source-link.song-source-youtube:hover,
a.badge.text-decoration-none.song-source-link.song-source-youtube:hover {
  background-color: #ff3333 !important;
  background: #ff3333 !important;
  color: white !important;
}

a.badge.song-source-link.song-source-tidal,
a.badge.text-decoration-none.song-source-link.song-source-tidal {
  background-color: #000000 !important;
  background: #000000 !important;
  color: white !important;
  border-color: #000000 !important;
}

a.badge.song-source-link.song-source-tidal:hover,
a.badge.text-decoration-none.song-source-link.song-source-tidal:hover {
  background-color: #333333 !important;
  background: #333333 !important;
  color: white !important;
}

a.badge.song-source-link.song-source-soundcloud,
a.badge.text-decoration-none.song-source-link.song-source-soundcloud {
  background-color: #FF5500 !important;
  background: #FF5500 !important;
  color: white !important;
  border-color: #FF5500 !important;
}

a.badge.song-source-link.song-source-soundcloud:hover,
a.badge.text-decoration-none.song-source-link.song-source-soundcloud:hover {
  background-color: #ff7733 !important;
  background: #ff7733 !important;
  color: white !important;
}

a.badge.song-source-link.song-source-apple_music,
a.badge.text-decoration-none.song-source-link.song-source-apple_music {
  background-color: #FA243C !important;
  background: #FA243C !important;
  color: white !important;
  border-color: #FA243C !important;
}

a.badge.song-source-link.song-source-apple_music:hover,
a.badge.text-decoration-none.song-source-link.song-source-apple_music:hover {
  background-color: #fb4d60 !important;
  background: #fb4d60 !important;
  color: white !important;
}

a.badge.song-source-link.song-source-other,
a.badge.text-decoration-none.song-source-link.song-source-other {
  background-color: #6c757d !important;
  background: #6c757d !important;
  color: white !important;
  border-color: #6c757d !important;
}

a.badge.song-source-link.song-source-other:hover,
a.badge.text-decoration-none.song-source-link.song-source-other:hover {
  background-color: #5a6268 !important;
  background: #5a6268 !important;
  color: white !important;
}

.song-source-badge {
  cursor: pointer;
}

/* Tooltip width fix for long URLs */
.tooltip {
  max-width: 500px !important;
}

.tooltip-inner {
  max-width: 500px !important;
  word-break: break-all !important;
  white-space: normal !important;
  text-align: left !important;
  padding: 8px 12px !important;
}

/* Action buttons styling - minimal custom CSS, mostly using Bootstrap utilities */
.song-action-btn {
  transition: all 0.2s ease;
}

.song-action-btn:hover {
  transform: translateY(-1px);
}

.song-action-btn.btn-success {
  background-color: #198754;
}

.song-action-btn.btn-success:hover {
  background-color: #157347;
}

.song-action-btn.btn-primary {
  background-color: #0d6efd;
}

.song-action-btn.btn-primary:hover {
  background-color: #0b5ed7;
}

.song-action-btn.btn-danger {
  background-color: #dc3545;
}

.song-action-btn.btn-danger:hover {
  background-color: #bb2d3b;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .song-player-container {
    padding: 15px;
  }
  
  .song-player-container iframe {
    min-height: 300px;
  }
}

