/* Radio Widget Styles */

/* Hide widget on radio page */
body.radio-page-body .radio-widget-container {
  display: none !important;
}

.radio-widget-container {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 1000;
  font-family: var(--font-family, 'Arial', sans-serif);
  display: none !important; /* Hidden - functionality preserved but UI removed */
  visibility: hidden !important;
  pointer-events: none !important; /* Prevent any interaction */
  opacity: 0 !important; /* Ensure completely invisible */
}

/* Ensure panel is also hidden by default */
.radio-widget-panel {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Only show panel when explicitly opened via companion overlay */
.radio-widget-panel.open {
  display: flex !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

/* Toggle Button Removed - Radio widget is now accessed via companion overlay menu */

/* Widget Panel - Hidden by default, only shown when .open class is added */
.radio-widget-panel {
  position: absolute;
  bottom: 80px;
  left: 0;
  width: 320px;
  background: var(--theme-card-bg, rgba(255, 255, 255, 0.95));
  backdrop-filter: blur(10px);
  border-radius: 15px;
  box-shadow: 0 8px 32px var(--theme-card-shadow, rgba(0, 0, 0, 0.3));
  padding: 20px;
  display: none !important; /* Hidden by default */
  visibility: hidden !important;
  pointer-events: none !important;
  flex-direction: column;
  gap: 15px;
  max-height: 500px;
  overflow-y: auto;
  transition: all 0.3s ease;
}

/* Only show panel when explicitly opened via companion overlay */
.radio-widget-panel.open {
  display: flex !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.radio-widget-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--theme-border-light, rgba(102, 126, 234, 0.2));
  padding-bottom: 10px;
}

.radio-widget-header h3 {
  margin: 0;
  font-size: 1.2em;
  color: var(--theme-text-primary, #333);
}

.radio-widget-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--theme-text-secondary, #666);
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
}

.radio-widget-close:hover {
  background: var(--theme-bg-tertiary, rgba(0, 0, 0, 0.1));
  color: var(--theme-text-primary, #333);
}

/* Playlist Mode Selector */
.radio-mode-selector {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--theme-border-light, rgba(0, 0, 0, 0.1));
}

.mode-btn {
  flex: 1;
  padding: 8px 12px;
  border: 2px solid var(--theme-accent-primary, rgba(102, 126, 234, 0.3));
  background: var(--theme-input-bg, white);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9em;
  font-family: var(--display-font, 'AnimeAce', Arial, sans-serif) !important;
  transition: all 0.2s;
  color: var(--theme-text-secondary, #666);
}

.mode-btn:hover {
  border-color: var(--theme-accent-primary, rgba(102, 126, 234, 0.6));
  background: var(--theme-bg-secondary, rgba(102, 126, 234, 0.05));
}

.mode-btn.active {
  background: linear-gradient(135deg, var(--theme-accent-primary, #667eea) 0%, var(--theme-accent-secondary, #764ba2) 100%);
  color: var(--theme-text-inverse, white);
  border-color: transparent;
}

/* Now Playing */
.radio-now-playing {
  padding: 10px 0;
}

.now-playing-info {
  text-align: center;
}

.track-title {
  font-size: 1.1em;
  font-weight: bold;
  color: var(--theme-text-primary, #333);
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-meta {
  font-size: 0.85em;
  color: var(--theme-text-secondary, #666);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Controls */
.radio-widget-controls {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 10px 0;
}

.radio-control-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--theme-accent-primary, rgba(102, 126, 234, 0.3));
  background: var(--theme-input-bg, white);
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  color: var(--theme-text-secondary, #666);
}

.radio-control-btn:hover {
  border-color: var(--theme-accent-primary, rgba(102, 126, 234, 0.6));
  background: var(--theme-bg-secondary, rgba(102, 126, 234, 0.05));
  transform: scale(1.1);
}

.radio-play-btn {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: transparent;
  color: white;
  font-size: 20px;
}

.radio-play-btn:hover {
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* Favorite Button */
.radio-favorite-btn-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 10px 0;
}

.radio-favorite-btn {
  background: rgba(102, 126, 234, 0.1);
  border: 2px solid rgba(102, 126, 234, 0.3);
  border-radius: 25px;
  padding: 10px 20px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  justify-content: center;
  font-weight: 500;
  color: #667eea;
}

.radio-favorite-btn:hover {
  background: rgba(102, 126, 234, 0.2);
  border-color: rgba(102, 126, 234, 0.5);
  transform: scale(1.02);
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.radio-favorite-btn.active {
  background: rgba(233, 30, 99, 0.15);
  border-color: rgba(233, 30, 99, 0.6);
  color: #e91e63;
}

.radio-favorite-btn.active:hover {
  background: rgba(233, 30, 99, 0.25);
  border-color: rgba(233, 30, 99, 0.8);
}

.radio-favorite-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.radio-favorite-btn .favorite-icon {
  font-size: 20px;
  transition: transform 0.2s ease;
}

.radio-favorite-btn:hover .favorite-icon {
  transform: scale(1.2);
}

.radio-favorite-btn .favorite-label {
  font-size: 14px;
}

/* Notification styles */
.radio-widget-notification {
  position: fixed;
  bottom: 100px;
  left: 20px;
  background: rgba(0, 0, 0, 0.85);
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 10001;
  font-size: 14px;
  max-width: 300px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
  pointer-events: none;
}

.radio-widget-notification.show {
  opacity: 1;
  transform: translateY(0);
}

.radio-widget-notification-success {
  background: rgba(76, 175, 80, 0.9);
}

.radio-widget-notification-error {
  background: rgba(244, 67, 54, 0.9);
}

.radio-widget-notification-info {
  background: rgba(33, 150, 243, 0.9);
}

/* Volume Control */
.radio-widget-volume {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
}

.volume-icon {
  font-size: 18px;
}

.radio-volume-slider {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.1);
  outline: none;
  -webkit-appearance: none;
}

.radio-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  cursor: pointer;
}

.radio-volume-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  cursor: pointer;
  border: none;
}

.radio-volume-value {
  font-size: 0.85em;
  color: #666;
  min-width: 35px;
  text-align: right;
}

/* Link to Full Player */
.radio-widget-link {
  text-align: center;
  padding-top: 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.radio-full-player-link {
  color: #667eea;
  text-decoration: none;
  font-size: 0.9em;
  font-weight: 500;
  transition: color 0.2s;
}

.radio-full-player-link:hover {
  color: #764ba2;
  text-decoration: underline;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .radio-widget-container {
    bottom: 15px;
    left: 15px;
  }

  /* Toggle Button Removed - radio widget is now accessed via companion overlay menu */

  .radio-widget-panel {
    width: calc(100vw - 30px);
    max-width: 320px;
    bottom: 70px;
    left: 0;
  }
}

/* Animation for panel open */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.radio-widget-panel.open {
  animation: slideUp 0.3s ease;
}

