/* ==========================================================================
   Love Radio — Persistent Sticky Player Bar
   Light glassmorphism theme, Spotify-style compact bar
   ========================================================================== */

/* --- Reset & Base --- */
.lr-player-bar *,
.lr-player-bar *::before,
.lr-player-bar *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* --- Body padding to prevent content overlap --- */
body.lr-player-active {
  padding-bottom: 68px !important;
}

@media (max-width: 480px) {
  body.lr-player-active {
    padding-bottom: 60px !important;
  }
}

/* --- Main Bar Container --- */
.lr-player-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99999;
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;

  /* Glassmorphism light */
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.06);

  /* Font */
  font-family: 'Saira Condensed', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Entry animation */
  transform: translateY(100%);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.4s ease;
}

.lr-player-bar.lr-visible {
  transform: translateY(0);
  opacity: 1;
}
.lr-player-bar button.lr-play-btn{
	padding: .7rem 1rem;
}
.lr-player-bar button.lr-volume-btn{
	padding: .3rem 1rem;
}
@media (max-width: 480px) {
  .lr-player-bar {
    height: 58px;
    padding: 0 12px;
    gap: 10px;
  }
}

/* --- Play/Pause Button --- */
.lr-play-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  min-width: 42px;
  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 2px 8px rgba(230, 0, 0, 0.25);
  position: relative;
  overflow: hidden;
}

.lr-play-btn:hover {
  background: #cc0000;
  transform: scale(1.06);
  box-shadow: 0 4px 14px rgba(230, 0, 0, 0.35);
}

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

.lr-play-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  transition: opacity 0.15s ease;
}

/* Play icon offset to center visually */
.lr-play-btn .lr-icon-play {
  margin-left: 2px;
}

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

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

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

/* Loading spinner on the play button */
.lr-play-btn.lr-loading {
  pointer-events: none;
}

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

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

@keyframes lr-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 480px) {
  .lr-play-btn {
    width: 38px;
    height: 38px;
    min-width: 38px;
  }

  .lr-play-btn svg {
    width: 16px;
    height: 16px;
  }
}

/* --- Mini Visualizer (animated bars) --- */
.lr-visualizer {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 24px;
  min-width: 18px;
}

.lr-visualizer .lr-bar {
  width: 3px;
  border-radius: 1.5px;
  background: #e60000;
  transition: height 0.1s ease;
}

.lr-visualizer .lr-bar:nth-child(1) {
  height: 8px;
  animation: lr-bar1 0.8s ease-in-out infinite;
  animation-play-state: paused;
}
.lr-visualizer .lr-bar:nth-child(2) {
  height: 16px;
  animation: lr-bar2 0.6s ease-in-out infinite 0.15s;
  animation-play-state: paused;
}
.lr-visualizer .lr-bar:nth-child(3) {
  height: 10px;
  animation: lr-bar3 0.75s ease-in-out infinite 0.3s;
  animation-play-state: paused;
}
.lr-visualizer .lr-bar:nth-child(4) {
  height: 20px;
  animation: lr-bar4 0.65s ease-in-out infinite 0.1s;
  animation-play-state: paused;
}

.lr-visualizer.lr-active .lr-bar {
  animation-play-state: running;
}

@keyframes lr-bar1 {
  0%, 100% { height: 8px; }
  50%      { height: 22px; }
}
@keyframes lr-bar2 {
  0%, 100% { height: 16px; }
  50%      { height: 6px; }
}
@keyframes lr-bar3 {
  0%, 100% { height: 10px; }
  50%      { height: 24px; }
}
@keyframes lr-bar4 {
  0%, 100% { height: 20px; }
  50%      { height: 4px; }
}

@media (max-width: 480px) {
  .lr-visualizer {
    display: none;
  }
}

/* --- Cover Art --- */
.lr-cover {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 6px;
  overflow: hidden;
  background: #f0f0f0;
  position: relative;
}

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

.lr-cover .lr-cover-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ff4444 0%, #cc0000 100%);
}

.lr-cover .lr-cover-placeholder svg {
  width: 20px;
  height: 20px;
  fill: rgba(255, 255, 255, 0.7);
}

@media (max-width: 480px) {
  .lr-cover {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 5px;
  }
}

/* --- Track Info --- */
.lr-track-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}

.lr-track-artist {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
  color: #1a1a1a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lr-track-title {
  font-weight: 400;
  font-size: 12px;
  line-height: 1.2;
  color: #888;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lr-track-info .lr-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #e60000;
}

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

@keyframes lr-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(0.8); }
}

@media (max-width: 360px) {
  .lr-track-artist { font-size: 13px; }
  .lr-track-title  { font-size: 11px; }
}

/* --- Volume Controls --- */
.lr-volume-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 130px;
}

.lr-volume-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: #666;
  cursor: pointer;
  transition: color 0.2s ease;
}

.lr-volume-btn:hover {
  color: #e60000;
}

.lr-volume-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Volume Slider */
.lr-volume-slider {
  position: relative;
  flex: 1;
  height: 28px;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.lr-volume-track {
  position: relative;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: #e0e0e0;
  overflow: visible;
}

.lr-volume-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  border-radius: 2px;
  background: #e60000;
  width: 100%;
  transition: width 0.05s linear;
}

.lr-volume-thumb {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #e60000;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.15s ease;
  pointer-events: none;
}

.lr-volume-slider:hover .lr-volume-thumb,
.lr-volume-slider.lr-dragging .lr-volume-thumb {
  transform: translate(-50%, -50%) scale(1);
}

@media (max-width: 768px) {
  .lr-volume-wrap {
    display: none;
  }
}

/* --- Station Logo / Branding --- */
.lr-station-logo {
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 4px;
  overflow: hidden;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.lr-station-logo:hover {
  opacity: 1;
}

.lr-station-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (max-width: 480px) {
  .lr-station-logo {
    display: none;
  }
}

/* --- Utility: hidden audio --- */
.lr-audio-element {
  display: none !important;
}
