/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */
@keyframes blink-winner-keyframes {
  0% { background-color: transparent; }
  50% { background-color: var(--blink-color, rgba(255, 0, 0, 0.25)); }
  100% { background-color: transparent; }
}
.blink-winner {
  animation: blink-winner-keyframes 1s linear infinite;
}

.blink-live {
  animation: blink-live-keyframes 2s linear infinite;
}

@keyframes blink-live-keyframes {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  display: inline-block;
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fade-in 0.8s ease-out;
}

.marquee-container {
  overflow: hidden;
  white-space: nowrap;
  padding: 1rem 1.5rem;
}

.marquee-content {
  display: inline-block;
  animation: smooth-marquee 20s linear infinite;
}

.marquee-text {
  display: inline-block;
}

@keyframes smooth-marquee {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* For smaller screens, slightly faster animation */
@media (max-width: 640px) {
  .marquee-content {
    animation-duration: 20s;
  }
}

.object-fit-inherit {
  object-fit: inherit;
}

[data-slider-target="dot"] {
  min-height: 1.75rem;
  min-width: 1.75rem;
}

/* Table layout fixes for pigeon leaderboard */
.leaderboard-table {
  table-layout: auto;
}

.leaderboard-table td {
  vertical-align: top;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.leaderboard-table .name-column {
  min-width: 200px;
  max-width: 250px;
  width: auto;
}

.leaderboard-table .rank-column {
  min-width: 60px;
  width: 80px;
}

.leaderboard-table .time-column {
  min-width: 80px;
  width: 100px;
}

.leaderboard-table .total-column {
  min-width: 100px;
  width: 120px;
}

/* Pigeon columns auto-squeeze based on available space */
.leaderboard-table th[style*="min-width: 35px"],
.leaderboard-table td[style*="min-width: 35px"] {
  flex: 1;
  min-width: 35px;
  max-width: 60px;
}

/* Responsive table container */
.table-responsive {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 70vh;
  scrollbar-color: #94a3b8 #f1f5f9;
}

.table-responsive::-webkit-scrollbar {
  height: 6px;
  width: 6px;
}

.table-responsive::-webkit-scrollbar-track {
  background: #f1f5f9;
}

.table-responsive::-webkit-scrollbar-thumb {
  background: #94a3b8;
  border-radius: 3px;
}

/* Sticky header */
.sticky-header thead th {
  background-color: #f8fafc;
}

/* Fix for long Urdu text in names */
.urdu-text {
  line-height: 1.4;
  word-break: break-word;
  hyphens: auto;
}

/* Sticky header for better navigation */
.sticky-header thead {
  position: sticky;
  top: 0;
  z-index: 10;
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .leaderboard-table {
    font-size: 0.75rem;
  }
  
  .leaderboard-table .avatar {
    width: 30px;
    height: 30px;
  }
  
  .leaderboard-table th,
  .leaderboard-table td {
    padding: 0.25rem 0.5rem;
  }
}
