/* ============================================================
   com_webradio — Styles
   ============================================================ */
.webradio {
  --wr-bg: #10151b;
  --wr-card: #151c24;
  --wr-border: #1e2a36;
  --wr-cyan: #2da6d0;
  --wr-text: #c2c3c2;
  --wr-heading: #e8eae9;
  --wr-green: #2ecc71;
  --wr-red: #e74c3c;
  max-width: 1300px;
  margin: 0 auto;
  color: var(--wr-text);
  font-family: 'Segoe UI', Arial, sans-serif;
}

.wr-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.wr-title {
  color: var(--wr-heading);
  font-size: 1.8rem;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.wr-stats {
  display: flex;
  gap: 14px;
}

.wr-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  background: var(--wr-card);
  border: 1px solid var(--wr-border);
  padding: 4px 10px;
  border-radius: 20px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.dot.online { background: var(--wr-green); box-shadow: 0 0 6px rgba(46, 204, 113, 0.6); }
.dot.total { background: var(--wr-cyan); box-shadow: 0 0 6px rgba(45, 166, 208, 0.6); }

/* --- Tabs --- */
.wr-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
  border-bottom: 2px solid var(--wr-border);
}

.wr-tab {
  background: transparent;
  border: 1px solid transparent;
  border-bottom: none;
  color: var(--wr-text);
  padding: 10px 22px;
  border-radius: 8px 8px 0 0;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.25s;
}

.wr-tab:hover {
  color: var(--wr-cyan);
}

.wr-tab.active {
  background: var(--wr-card);
  border-color: var(--wr-border);
  color: var(--wr-cyan);
  border-bottom: 2px solid var(--wr-cyan);
  margin-bottom: -2px;
}

/* --- Filter-Gruppen (Genre/Land-Dropdowns, nativ) --- */
.wr-filter-group {
  display: flex;
  gap: 8px;
  flex: 1 1 240px;
}

/* Suchzeile: Feld-Auswahl + Suchfeld + Button */
.wr-search-row {
  display: flex;
  gap: 8px;
  flex: 1 1 100%;
  margin-bottom: 8px;
}

.wr-field-select {
  flex: 0 0 auto;
  min-width: 110px;
}

.wr-search-input {
  flex: 1;
}

/* --- Favoriten --- */
.wr-fav-auth {
  background: var(--wr-card);
  border: 1px solid var(--wr-border);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 16px;
}

.wr-fav-hint {
  margin-top: 0;
  color: var(--wr-text);
}

.wr-fav-login {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Ghost-Button (Profil-Link) */
.wr-btn-ghost {
  display: inline-block;
  margin-top: 10px;
  background: transparent;
  border-color: var(--wr-border);
  color: var(--wr-text);
  text-transform: none;
  font-weight: 600;
  text-decoration: none;
}

.wr-btn-ghost:hover {
  background: var(--wr-cyan);
  color: #fff;
  border-color: var(--wr-cyan);
  text-decoration: none;
}

.wr-fav-login .wr-input {
  flex: 1 1 180px;
}

.wr-fav-remove {
  padding: 8px 10px;
  flex-shrink: 0;
  background: transparent;
  border-color: var(--wr-red);
  color: var(--wr-red);
}

.wr-fav-remove:hover {
  background: var(--wr-red);
  color: #fff;
}

/* --- Suche --- */
.wr-search {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding: 14px;
  background: var(--wr-card);
  border: 1px solid var(--wr-border);
  border-radius: 8px;
}

.wr-input {
  flex: 1 1 260px;
  background: #0d1218;
  border: 1px solid var(--wr-border);
  color: var(--wr-text);
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 0.95rem;
}

.wr-select {
  background: #0d1218;
  border: 1px solid var(--wr-border);
  color: var(--wr-text);
  padding: 9px 10px;
  border-radius: 6px;
  max-width: 220px;
}

.wr-input:focus,
.wr-select:focus {
  outline: none;
  border-color: var(--wr-cyan);
}

.wr-btn {
  background: linear-gradient(180deg, rgba(45, 166, 208, 0.25), rgba(45, 166, 208, 0.05));
  border: 1px solid var(--wr-cyan);
  color: #4fc3e8;
  padding: 9px 18px;
  border-radius: 6px;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.25s;
}

.wr-btn:hover {
  background: var(--wr-cyan);
  color: #fff;
  box-shadow: 0 0 12px rgba(45, 166, 208, 0.5);
}

/* Favorit-Toggle: aktiv (★) = Favorit, inaktiv (☆) = kein Favorit */
.wr-fav-toggle {
  min-width: 42px;
  padding: 9px 8px;
  font-size: 1rem;
  color: #7a7f79;
  border-color: var(--wr-border);
}

.wr-fav-toggle.active {
  color: #ffd700;
  border-color: #ffd700;
  background: rgba(255, 215, 0, 0.15);
}

.wr-fav-toggle.removed {
  color: #7a7f79;
  border-color: var(--wr-border);
  opacity: 0.75;
}

.wr-fav-toggle.removed:hover {
  opacity: 1;
  color: #ffd700;
  border-color: #ffd700;
  background: rgba(255, 215, 0, 0.15);
}

/* --- Ergebnisse --- */
.wr-count {
  color: var(--wr-text);
  font-size: 0.9rem;
  margin-bottom: 12px;
  opacity: 0.8;
}

.wr-stations {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wr-station {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--wr-card);
  border: 1px solid var(--wr-border);
  border-left: 3px solid var(--wr-red);
  border-radius: 8px;
  padding: 10px 14px;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.wr-station.online {
  border-left-color: var(--wr-green);
}

.wr-station:hover {
  border-color: var(--wr-cyan);
  box-shadow: 0 0 10px rgba(45, 166, 208, 0.2);
}

.wr-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.wr-station.online .wr-status-dot { background: var(--wr-green); }
.wr-station.offline .wr-status-dot { background: var(--wr-red); }

.wr-logo {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  background: #0d1218;
}

.wr-logo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  background: #0d1218;
}

.wr-station-info {
  flex: 1;
  min-width: 0;
}

.wr-station-name {
  display: block;
  color: var(--wr-heading);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wr-station-meta {
  display: block;
  font-size: 0.82rem;
  color: var(--wr-text);
  opacity: 0.75;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wr-play {
  padding: 8px 14px;
  flex-shrink: 0;
}

/* --- Player --- */
.wr-player {
  /* Innerhalb der Seite (nicht viewport-fixiert) */
  position: sticky;
  bottom: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--wr-card);
  border: 1px solid var(--wr-cyan);
  border-radius: 12px 12px 0 0;
  padding: 12px 16px;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.7), 0 0 20px rgba(45, 166, 208, 0.2);
  max-width: 1300px;
  margin: 0 auto;
}

/* hidden-Attribut darf nicht von display:flex überschrieben werden */
.wr-player[hidden] {
  display: none !important;
}

.wr-player-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.wr-player-name {
  font-weight: 700;
  color: var(--wr-heading);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Equalizer-Animation */
.wr-player-eq {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 18px;
}

.wr-player-eq span {
  width: 3px;
  background: var(--wr-cyan);
  border-radius: 2px;
  animation: wr-eq 1s ease-in-out infinite;
}

.wr-player-eq span:nth-child(1) { height: 40%; animation-delay: 0s; }
.wr-player-eq span:nth-child(2) { height: 90%; animation-delay: 0.2s; }
.wr-player-eq span:nth-child(3) { height: 60%; animation-delay: 0.4s; }
.wr-player-eq span:nth-child(4) { height: 100%; animation-delay: 0.1s; }

@keyframes wr-eq {
  0%, 100% { transform: scaleY(0.4); }
  50% { transform: scaleY(1); }
}

.wr-player audio {
  height: 36px;
  max-width: 200px;
  flex-shrink: 0;
}

.wr-player-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.wr-btn-playpause {
  padding: 8px 14px;
  min-width: 44px;
}

.wr-volume {
  display: flex;
  align-items: center;
  gap: 6px;
}

.wr-volume-icon {
  font-size: 0.9rem;
}

.wr-volume-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 90px;
  height: 5px;
  border-radius: 4px;
  background: #0d1218;
  border: 1px solid var(--wr-border);
  outline: none;
  cursor: pointer;
}

.wr-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--wr-cyan);
  border: 2px solid #fff;
  cursor: pointer;
  transition: box-shadow 0.2s;
}

.wr-volume-slider::-webkit-slider-thumb:hover {
  box-shadow: 0 0 8px rgba(45, 166, 208, 0.6);
}

.wr-volume-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--wr-cyan);
  border: 2px solid #fff;
  cursor: pointer;
}

.wr-volume-slider::-moz-range-track {
  height: 5px;
  border-radius: 4px;
  background: #0d1218;
}

.wr-btn-close {
  padding: 4px 10px;
  font-size: 0.9rem;
}

/* --- Pagination --- */
.wr-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 18px;
}

.wr-page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  background: var(--wr-card);
  border: 1px solid var(--wr-border);
  border-radius: 6px;
  color: var(--wr-text);
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.2s;
}

.wr-page:hover {
  border-color: var(--wr-cyan);
  color: var(--wr-cyan);
}

.wr-page.current {
  background: var(--wr-cyan);
  border-color: var(--wr-cyan);
  color: #fff;
  font-weight: 700;
}

/* Responsive */
@media (max-width: 768px) {
  .wr-player {
    left: 12px;
    right: 12px;
    max-width: none;
    flex-wrap: wrap;
  }
  .wr-player audio {
    max-width: 100%;
    width: 100%;
  }
  .wr-search {
    flex-direction: column;
  }
  .wr-select {
    max-width: none;
    width: 100%;
  }
}
