/* =====================================================
   WILDVERSE STATS COLUMN — COMPACT PLAYLIST MODE
   File: stats.css
   Load after wildverse-music-library.css
===================================================== */

/* Legacy fallback if old rows still render .wv-counts */
.wv-counts {
  display: grid;
  gap: 4px;
}

.wv-counts span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #dceeff;
  font-size: 10px;
}

.wv-counts i {
  color: var(--wv-cyan);
}

/* Stats cell */
.wv-table td[data-label="Stats"] {
  text-align: initial;
  vertical-align: middle;
}

.wv-table td[data-label="Stats"] .wv-stats-panel {
  margin-inline: auto;
}

/* Compact high-tech stats panel */
.wv-stats-panel {
  width: min(100%, 158px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 5px 7px;
  padding: 6px 8px;
  border: 1px solid rgba(127, 255, 255, 0.16);
  border-radius: 13px;
  background:
    linear-gradient(135deg, rgba(127, 255, 255, 0.08), transparent 48%),
    radial-gradient(circle at top left, rgba(127, 255, 255, 0.13), transparent 40%),
    rgba(3, 10, 18, 0.72);
  box-shadow:
    inset 0 0 12px rgba(127, 255, 255, 0.04),
    0 0 12px rgba(127, 255, 255, 0.035);
}

/* Download / like rows */
.wv-stat-row {
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 22px;
  min-width: 0;
}

.wv-stat-icon {
  width: 22px;
  height: 22px;
  min-width: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  color: #79fbff;
  background: rgba(127, 255, 255, 0.1);
  border: 1px solid rgba(127, 255, 255, 0.16);
  box-shadow: 0 0 10px rgba(127, 255, 255, 0.08);
  font-size: 10px;
}

.wv-stat-main {
  display: grid;
  gap: 0;
  min-width: 0;
}

.wv-stat-main b {
  color: #f3ffff;
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.04em;
}

.wv-stat-main small {
  color: rgba(221, 246, 255, 0.64);
  font-size: 7.5px;
  line-height: 1;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Old signal block fallback — hidden in compact mode */
.wv-stat-signal {
  display: none;
}

/* Date added compact technical line */
.wv-stat-date {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 2px;
  padding-top: 5px;
  border-top: 1px solid rgba(127, 255, 255, 0.12);
  min-width: 0;
}

.wv-stat-date > span {
  display: inline-flex;
  align-items: center;
  margin: 0;
  color: rgba(210, 226, 236, 0.68);
  font-size: 7.5px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.wv-stat-date strong {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  min-width: 0;
  color: #f5fbff;
  font-size: 10px;
  line-height: 1;
  font-weight: 900;
  white-space: nowrap;
  text-shadow: 0 0 7px rgba(255, 255, 255, 0.08);
}

/* Compact neon NEW badge */
.wv-stat-date em {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.08rem 0.42rem;
  border: 1px solid rgba(120, 247, 255, 0.55);
  border-radius: 999px;
  background:
    radial-gradient(circle at center, rgba(120, 247, 255, 0.22), rgba(120, 247, 255, 0.04) 68%),
    linear-gradient(135deg, rgba(120, 247, 255, 0.18), rgba(255, 79, 216, 0.12)),
    rgba(4, 18, 28, 0.86);
  color: #9ffcff;
  font-size: 7px;
  line-height: 1;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  box-shadow:
    0 0 8px rgba(120, 247, 255, 0.35),
    0 0 14px rgba(120, 247, 255, 0.16),
    inset 0 0 8px rgba(255, 255, 255, 0.05);
  text-shadow:
    0 0 5px rgba(120, 247, 255, 0.85),
    0 0 10px rgba(120, 247, 255, 0.45);
  animation: wvNewPulse 2.4s ease-in-out infinite;
}

/* tiny compact spark dots */
.wv-stat-date em::before,
.wv-stat-date em::after {
  content: "";
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: #78f7ff;
  box-shadow:
    0 0 6px #78f7ff,
    0 0 10px rgba(120, 247, 255, 0.75);
  animation: wvSparkFloat 1.9s ease-in-out infinite;
}

.wv-stat-date em::before {
  top: -3px;
  left: 7px;
  animation-delay: 0s;
}

.wv-stat-date em::after {
  right: 7px;
  bottom: -3px;
  animation-delay: 0.9s;
}

@keyframes wvNewPulse {
  0%, 100% {
    transform: translateY(0);
    box-shadow:
      0 0 8px rgba(120, 247, 255, 0.35),
      0 0 14px rgba(120, 247, 255, 0.16),
      inset 0 0 8px rgba(255, 255, 255, 0.05);
  }

  50% {
    transform: translateY(-1px);
    box-shadow:
      0 0 11px rgba(120, 247, 255, 0.55),
      0 0 20px rgba(255, 79, 216, 0.16),
      inset 0 0 10px rgba(255, 255, 255, 0.07);
  }
}

@keyframes wvSparkFloat {
  0%, 100% {
    transform: scale(0.85) translateY(0);
    opacity: 0.65;
  }

  50% {
    transform: scale(1.15) translateY(-2px);
    opacity: 1;
  }
}

/* Medium screens */
@media (max-width: 1120px) {
  .wv-table th:last-child,
  .wv-table td:last-child {
    width: 140px;
    min-width: 140px;
    max-width: 140px;
  }

  .wv-stats-panel {
    width: 118px;
    max-width: 118px;
    gap: 4px;
    padding: 5px 6px;
    border-radius: 12px;
  }

  .wv-stat-icon {
    width: 20px;
    height: 20px;
    min-width: 20px;
    font-size: 9px;
  }

  .wv-stat-main b {
    font-size: 11px;
  }

  .wv-stat-main small {
    display: none;
  }

  .wv-stat-date {
    gap: 4px;
  }

  .wv-stat-date > span {
    font-size: 7px;
  }

  .wv-stat-date strong {
    font-size: 9px;
  }
}

/* Mobile horizontal table mode */
@media (max-width: 760px) {
  .wv-table th:last-child,
  .wv-table td:last-child {
    width: 128px;
    min-width: 128px;
    max-width: 128px;
  }

  .wv-stats-panel {
    width: 108px;
    max-width: 108px;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    padding: 5px;
    border-radius: 12px;
    background:
      radial-gradient(circle at 50% 0%, rgba(127, 255, 255, 0.16), transparent 54%),
      rgba(3, 10, 18, 0.82);
  }

  .wv-stat-row {
    justify-content: center;
  }

  .wv-stat-icon {
    width: 22px;
    height: 22px;
    min-width: 22px;
    border-radius: 999px;
    font-size: 10px;
  }

  .wv-stat-main {
    display: none;
  }

  .wv-stat-date {
    justify-content: center;
    flex-wrap: wrap;
    gap: 3px 5px;
    padding-top: 4px;
  }

  .wv-stat-date > span {
    display: none;
  }

  .wv-stat-date strong {
    justify-content: center;
    font-size: 8.5px;
  }

  .wv-stat-date em {
    font-size: 6.5px;
    padding: 0.07rem 0.34rem;
  }
}