/* ==========================================================================
   Love Radio — Hero Player Widget (embeddable large player)
   For use on homepage or any page via [loveradio_hero] shortcode
   ========================================================================== */

/* --- Container --- */
.lr-hero {
  position: relative;
  width: 100%;
  max-width: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: #1a1a1a;
  color: #fff;
  font-family: 'Saira Condensed', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  aspect-ratio: 16 / 7;
  min-height: 280px;
  max-height: 500px;
}

@media (max-width: 768px) {
  .lr-hero {
    aspect-ratio: auto;
    min-height: 300px;
    max-height: none;
    border-radius: 12px;
  }
}

/* --- Background (blurred cover) --- */
.lr-hero-bg {
  position: absolute;
  inset: -40px;
  background-size: cover;
  background-position: center;
  filter: blur(40px) brightness(0.4);
  transition: background-image 1s ease;
  z-index: 0;
}

.lr-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.3) 100%);
  z-index: 1;
}

/* --- Content Layout --- */
.lr-hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 40px;
  height: 100%;
}

@media (max-width: 768px) {
  .lr-hero-content {
    flex-direction: column;
    gap: 24px;
    padding: 30px 24px;
    text-align: center;
  }
}

/* --- Canvas Visualizer --- */
.lr-hero-visualizer-wrap {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.4;
}

.lr-hero-visualizer-wrap canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* --- Cover Art (large) --- */
.lr-hero-cover {
  width: 200px;
  height: 200px;
  min-width: 200px;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  position: relative;
}

.lr-hero-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.6s ease;
}

.lr-hero-cover .lr-hero-cover-glow {
  position: absolute;
  inset: -2px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(230, 0, 0, 0.4), rgba(255, 100, 100, 0.2));
  z-index: -1;
  filter: blur(12px);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.lr-hero.lr-hero-playing .lr-hero-cover-glow {
  opacity: 1;
}

@media (max-width: 768px) {
  .lr-hero-cover {
    width: 140px;
    height: 140px;
    min-width: 140px;
    border-radius: 12px;
  }
}

/* --- Track Info (large) --- */
.lr-hero-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lr-hero-station {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: rgba(255, 255, 255, 0.5);
}

.lr-hero-artist {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.15;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lr-hero-title {
  font-size: 20px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.7);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .lr-hero-artist {
    font-size: 24px;
  }
  .lr-hero-title {
    font-size: 16px;
  }
}

/* --- Hero Play Button --- */
.lr-hero-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 12px;
}

@media (max-width: 768px) {
  .lr-hero-controls {
    justify-content: center;
  }
}

.lr-hero-play-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 50%;
  background: #e60000;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 20px rgba(230, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
}

.lr-hero-play-btn:hover {
  background: #ff1a1a;
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(230, 0, 0, 0.5);
}

.lr-hero-play-btn:active {
  transform: scale(0.95);
}

.lr-hero-play-btn svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
}

.lr-hero-play-btn .lr-hero-icon-play {
  margin-left: 3px;
}

.lr-hero-play-btn .lr-hero-icon-pause {
  display: none;
}

.lr-hero-play-btn.lr-hero-btn-playing .lr-hero-icon-play {
  display: none;
}

.lr-hero-play-btn.lr-hero-btn-playing .lr-hero-icon-pause {
  display: block;
}

/* Loading */
.lr-hero-play-btn.lr-hero-btn-loading {
  pointer-events: none;
}

.lr-hero-play-btn.lr-hero-btn-loading::after {
  content: '';
  position: absolute;
  inset: 4px;
  border: 2.5px solid transparent;
  border-top-color: #fff;
  border-radius: 50%;
  animation: lr-spin 0.7s linear infinite;
}

.lr-hero-play-btn.lr-hero-btn-loading svg {
  opacity: 0.3;
}

/* --- Live Badge in Hero --- */
.lr-hero-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(230, 0, 0, 0.2);
  border: 1px solid rgba(230, 0, 0, 0.3);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #ff6666;
}

.lr-hero-live .lr-hero-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff4444;
  animation: lr-pulse 1.5s ease-in-out infinite;
}

/* --- Hero Visualizer Bars (CSS fallback) --- */
.lr-hero-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 32px;
}

.lr-hero-bars .lr-hero-bar {
  width: 4px;
  border-radius: 2px;
  background: rgba(230, 0, 0, 0.6);
}

.lr-hero-bars .lr-hero-bar:nth-child(1) { height: 12px; animation: lr-bar1 0.8s ease-in-out infinite; animation-play-state: paused; }
.lr-hero-bars .lr-hero-bar:nth-child(2) { height: 20px; animation: lr-bar2 0.6s ease-in-out infinite 0.15s; animation-play-state: paused; }
.lr-hero-bars .lr-hero-bar:nth-child(3) { height: 14px; animation: lr-bar3 0.75s ease-in-out infinite 0.3s; animation-play-state: paused; }
.lr-hero-bars .lr-hero-bar:nth-child(4) { height: 26px; animation: lr-bar4 0.65s ease-in-out infinite 0.1s; animation-play-state: paused; }
.lr-hero-bars .lr-hero-bar:nth-child(5) { height: 10px; animation: lr-bar1 0.7s ease-in-out infinite 0.2s; animation-play-state: paused; }
.lr-hero-bars .lr-hero-bar:nth-child(6) { height: 18px; animation: lr-bar3 0.85s ease-in-out infinite 0.05s; animation-play-state: paused; }

.lr-hero.lr-hero-playing .lr-hero-bars .lr-hero-bar {
  animation-play-state: running;
}
