/**
 * Lyrics Display Styles
 * 
 * Styles for the lyrics panel that displays synchronized lyrics.
 * Works alongside the visualizer and player controls.
 */

/* Lyrics Button - Match visualizer button structure */
.plyr__control[data-plyr="lyrics"],
.btn-lyrics {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  padding: calc(var(--plyr-control-spacing, 10px) * 0.7);
  color: currentColor;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s ease;
  visibility: visible !important;
  opacity: 1 !important;
}

.plyr__controls .btn-lyrics {
  padding: calc(var(--plyr-control-spacing, 10px) * 0.7);
}

.plyr__control[data-plyr="lyrics"]:hover,
.btn-lyrics:hover {
  opacity: 0.8;
}

.plyr__control[data-plyr="lyrics"].active,
.btn-lyrics.active {
  opacity: 1;
  color: var(--plyr-color-main, #00b3ff);
}

.plyr__control[data-plyr="lyrics"] svg,
.btn-lyrics svg {
  fill: none;
  width: 16px;
  height: 16px;
  stroke-width: 2;
  stroke: currentColor;
}

/* Lyrics Panel */
.wavyl-lyrics-panel {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: 400px;
  max-width: 90vw;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  z-index: 999998;
  display: none;
  flex-direction: column;
  box-shadow: -2px 0 20px rgba(0, 0, 0, 0.5);
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.wavyl-lyrics-panel.active {
  display: flex;
  transform: translateX(0);
}

/* When visualizer is open, adjust z-index */
body.wavyl-visualizer-open .wavyl-lyrics-panel {
  z-index: 999999;
}

/* Lyrics Header */
.wavyl-lyrics-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.wavyl-lyrics-title {
  margin: 0;
  color: #fff;
  font-size: 18px;
  font-weight: 500;
}

.wavyl-lyrics-close {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
  border-radius: 4px;
}

.wavyl-lyrics-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.wavyl-lyrics-close svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
}

/* Lyrics Content */
.wavyl-lyrics-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 20px;
  scroll-behavior: smooth;
}

.wavyl-lyrics-content::-webkit-scrollbar {
  width: 8px;
}

.wavyl-lyrics-content::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.wavyl-lyrics-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.wavyl-lyrics-content::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Lyrics Lines */
.wavyl-lyrics-lines {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.wavyl-lyrics-line {
  color: rgba(255, 255, 255, 0.6);
  font-size: 16px;
  line-height: 1.6;
  padding: 12px 16px;
  border-radius: 8px;
  transition: all 0.3s ease;
  text-align: center;
}

.wavyl-lyrics-line.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  font-size: 18px;
  font-weight: 500;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.wavyl-lyrics-line.wavyl-lyrics-empty {
  color: rgba(255, 255, 255, 0.4);
  font-style: italic;
  text-align: center;
  padding: 40px 20px;
}

.wavyl-lyrics-text {
  display: block;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .wavyl-lyrics-panel {
    width: 100%;
    max-width: 100%;
    right: 0;
    left: 0;
  }

  .wavyl-lyrics-line {
    font-size: 14px;
    padding: 10px 12px;
  }

  .wavyl-lyrics-line.active {
    font-size: 16px;
  }

  .wavyl-lyrics-content {
    padding: 16px;
  }
}

/* When visualizer is open - integrate with visualizer */
body.wavyl-visualizer-open .wavyl-lyrics-panel {
  /* Position lyrics panel within visualizer or alongside */
  /* Adjust based on visualizer layout */
}

/* Dark mode support (if theme uses dark mode) */
@media (prefers-color-scheme: dark) {
  .wavyl-lyrics-panel {
    background: rgba(0, 0, 0, 0.98);
  }
}

