/* ==========================================================================
   SOLID DARK RETRO TRANSISTOR-RADIO WIDGET
   Pure solid dark charcoal (#0F0F0F), flat amber/gold line, no halos or rings
   ========================================================================== */

.radio-dock {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: var(--z-radio-dock);
  font-family: var(--font-sans);
}

/* ==========================================================================
   STATE 1: MINIMIZED PILL (Clean Solid Dark Pill)
   ========================================================================== */

.radio-pill {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: #0f0f0f;
  border: 1px solid rgba(212, 163, 115, 0.45);
  border-radius: 9999px;
  padding: 8px 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.9);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-spring);
}

.radio-dock.is-minimized .radio-pill {
  display: flex;
}

.radio-dock.is-minimized .radio-chassis {
  display: none;
}

.radio-pill:hover {
  background: #161616;
  border-color: var(--color-amber);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.95);
}

.pill-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.radio-icon {
  font-size: 0.9rem;
}

.pill-title {
  font-family: var(--font-display);
  font-size: 0.76rem;
  letter-spacing: 1.2px;
  color: var(--color-gold);
  font-weight: 700;
  text-transform: uppercase;
}

.pill-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.7rem;
  color: var(--color-text-subtle);
  background: rgba(255, 255, 255, 0.08);
  padding: 4px 10px;
  border-radius: 9999px;
  transition: background 0.2s;
}

.pill-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: var(--color-text-white);
}

/* ==========================================================================
   STATE 2: EXPANDED CHASSIS (Clean Solid Dark #0F0F0F Box)
   ========================================================================== */

.radio-chassis {
  position: relative;
  width: 340px;
  max-width: calc(100vw - 32px);
  background: #0f0f0f;
  border: 1px solid rgba(212, 163, 115, 0.4);
  border-radius: 14px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.95);
  overflow: visible;
  transition: transform var(--duration-normal) var(--ease-spring), opacity var(--duration-normal);
}

/* Radio Faceplate Header */
.faceplate-header {
  padding: 10px 14px 8px 14px;
  background: #0f0f0f;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 13px 13px 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faceplate-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.station-brand {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 1.8px;
  color: var(--color-gold);
  text-transform: uppercase;
  transition: color 0.4s ease;
}

.faceplate-status {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stereo-indicator {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.52rem;
  letter-spacing: 0.8px;
  color: var(--color-copper);
  font-weight: 600;
}

.glow-light {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--color-amber);
}

.chassis-minimize-btn {
  color: var(--color-text-muted);
  padding: 2px;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.chassis-minimize-btn:hover {
  color: var(--color-text-white);
}

/* Analog Frequency Dial Window */
.tuning-dial-window {
  background: #080808;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 6px 8px;
  position: relative;
  overflow: hidden;
}

.tuning-needle {
  position: absolute;
  top: 2px;
  bottom: 2px;
  left: 52%;
  width: 2px;
  background: var(--color-dial-needle);
  transition: left 0.8s var(--ease-spring);
  border-radius: 1px;
}

.frequency-scale {
  font-family: var(--font-mono);
  font-size: 0.52rem;
  color: #8c8075;
  letter-spacing: 2.2px;
  text-align: center;
}

/* Hidden Headless YouTube Iframe Container (Active in Viewport, Layered Behind Solid Faceplate) */
.yt-player-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.001;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.yt-player-container iframe {
  width: 100% !important;
  height: 100% !important;
  border: none;
  pointer-events: none;
}

/* Primary Native Playback HUD */
.playback-hud {
  padding: 12px 14px;
  background: #0f0f0f;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.track-main-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.track-info {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  flex: 1;
}

.track-thumb {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: #1c1815;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-amber);
  border: 1px solid rgba(212, 163, 115, 0.25);
  font-size: 0.9rem;
}

.track-meta {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  gap: 2px;
}

.track-name {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--color-text-white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-artist {
  font-size: 0.62rem;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-sub-row {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  line-height: 1.1;
}

.track-dot {
  color: rgba(255, 255, 255, 0.25);
  font-size: 0.6rem;
  flex-shrink: 0;
}

.open-stream-link {
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--color-gold);
  text-decoration: none;
  opacity: 0.85;
  transition: opacity 0.2s, color 0.2s;
  flex-shrink: 0;
}

.open-stream-link:hover {
  opacity: 1;
  color: #fff;
  text-decoration: underline;
}

/* Local protocol warning banner */
.protocol-banner {
  display: none;
  background: rgba(212, 163, 115, 0.1);
  border: 1px solid rgba(212, 163, 115, 0.3);
  color: #f7d4a2;
  font-size: 0.64rem;
  padding: 6px 10px;
  border-radius: 4px;
  margin: 8px 12px 0 12px;
  line-height: 1.35;
}

.protocol-banner.visible {
  display: block;
}

.protocol-banner strong {
  color: #fff;
  text-decoration: underline;
}

/* Transport Controls */
.playback-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hud-ctrl-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-amber);
  background: #181818;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.2s;
  cursor: pointer;
}

.hud-ctrl-btn:hover {
  background: #222222;
  color: var(--color-gold);
  border-color: rgba(212, 163, 115, 0.4);
}

.hud-ctrl-btn.play-active {
  width: 32px;
  height: 32px;
  background: rgba(212, 163, 115, 0.16);
  color: var(--color-gold);
  border-color: var(--color-amber);
}

.hud-ctrl-btn.play-active:hover {
  background: rgba(212, 163, 115, 0.28);
  transform: scale(1.05);
}

/* Seek Bar & Timers */
.seek-container {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.time-display {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--color-text-muted);
  min-width: 28px;
}

.time-display.total {
  text-align: right;
}

.seek-bar-track {
  flex: 1;
  height: 4px;
  background: #242424;
  border-radius: 2px;
  position: relative;
  cursor: pointer;
}

.seek-bar-progress {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  background: var(--color-amber);
  border-radius: 2px;
  pointer-events: none;
}

/* Radio Faceplate Footer & Dual Volume Controls */
.faceplate-footer {
  background: #0f0f0f;
  padding: 10px 14px 12px 14px;
  border-radius: 0 0 13px 13px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

/* Volume Panel Component */
.volume-panel {
  display: flex;
  align-items: center;
  gap: 6px;
}

.vol-label {
  font-size: 0.62rem;
  color: var(--color-copper);
  font-weight: 600;
  letter-spacing: 0.4px;
}

.vol-btn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--color-amber);
  font-size: 0.8rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}

.vol-btn:hover {
  background: #262626;
  color: #fff;
  border-color: rgba(212, 163, 115, 0.4);
}

.vol-btn:active {
  transform: scale(0.92);
}

.vol-val {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--color-gold);
  min-width: 26px;
  text-align: center;
}

/* ==========================================================================
   LANGUAGE SELECTOR & CUSTOM YOUTUBE LINK TOOLBAR (Ganesha & Extensible)
   ========================================================================== */

.radio-toolbar {
  padding: 8px 14px;
  background: #0b0b0b;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: none;
  flex-direction: column;
  gap: 8px;
}

[data-aura="ganesha"] .radio-toolbar,
[data-aura="shiva"] .radio-toolbar,
[data-aura="saibaba"] .radio-toolbar,
[data-aura="krishna"] .radio-toolbar,
[data-aura="murugan"] .radio-toolbar {
  display: flex;
}

.toolbar-primary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* Language Dropdown Container */
.lang-picker-wrap {
  position: relative;
  flex: 1;
}

.lang-picker-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 5px 10px;
  background: #141414;
  border: 1px solid rgba(212, 163, 115, 0.3);
  border-radius: 6px;
  color: var(--color-gold);
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-picker-btn:hover {
  background: #1c1c1c;
  border-color: var(--color-amber);
  color: #fff;
}

.lang-btn-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lang-indicator-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--color-amber);
  box-shadow: 0 0 6px rgba(212, 163, 115, 0.7);
}

.lang-picker-btn .chevron-icon {
  color: var(--color-text-muted);
  transition: transform 0.25s var(--ease-spring);
  flex-shrink: 0;
}

.lang-picker-wrap.open .lang-picker-btn .chevron-icon {
  transform: rotate(180deg);
}

.lang-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: 100%;
  background: #0f0f0f;
  border: 1px solid rgba(212, 163, 115, 0.4);
  border-radius: 8px;
  padding: 4px;
  margin: 0;
  list-style: none;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.95);
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 100;
}

.lang-picker-wrap.open .lang-menu {
  display: flex;
}

.lang-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border-radius: 5px;
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--color-text-subtle);
  cursor: pointer;
  transition: all 0.15s ease;
}

.lang-option:hover {
  background: rgba(212, 163, 115, 0.12);
  color: var(--color-gold);
}

.lang-option.active {
  background: rgba(212, 163, 115, 0.2);
  color: var(--color-gold);
  font-weight: 700;
}

.lang-option.active::after {
  content: '✓';
  color: var(--color-amber);
  font-weight: bold;
  font-size: 0.72rem;
}

/* Toolbar Action Buttons (Login) */
.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.toolbar-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  background: #141414;
  border: 1px solid rgba(212, 163, 115, 0.35);
  border-radius: 6px;
  color: var(--color-gold);
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.toolbar-action-btn:hover {
  background: #1f1f1f;
  border-color: var(--color-amber);
  color: #fff;
  transform: translateY(-1px);
}

.toolbar-action-btn svg {
  flex-shrink: 0;
  color: var(--color-amber);
}

/* Custom Link Input Row (Always Visible) */
.custom-link-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #060606;
  border: 1px solid rgba(212, 163, 115, 0.28);
  border-radius: 6px;
  padding: 4px 6px 4px 8px;
  transition: all 0.2s ease;
}

.custom-link-bar:focus-within {
  border-color: var(--color-amber);
  background: #0d0d0d;
}

.custom-link-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--color-text-white);
  font-family: var(--font-sans);
  font-size: 0.66rem;
  min-width: 0;
}

.custom-link-input::placeholder {
  color: #777;
  font-size: 0.63rem;
}

.custom-link-submit-btn {
  background: var(--color-amber);
  color: #0f0f0f;
  border: none;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 0.64rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.custom-link-submit-btn:hover {
  background: var(--color-gold);
  transform: scale(1.04);
}

/* Radio Alert / Status Toast */
.radio-alert {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(230, 57, 70, 0.15);
  border-left: 2px solid #e63946;
  border-radius: 0 4px 4px 0;
  color: #ffb4a2;
  font-size: 0.62rem;
  line-height: 1.3;
}

.radio-alert.visible {
  display: flex;
}

.radio-alert.success {
  background: rgba(46, 204, 113, 0.15);
  border-left-color: #2ecc71;
  color: #abf7b1;
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
  .radio-dock {
    bottom: 16px;
    right: 16px;
    left: auto;
  }
  .radio-chassis {
    width: 310px;
  }
}
