/* Mini player ("Speelt nu", components/now-playing.js): bottom right on
   wide screens; on phones a full-width bar just above the menu button and
   the map/list toggle. Styled like the map labels: white, red border. */

.now-playing {
  position: fixed;
  z-index: 3500; /* above the place panel, below the menu */
  right: 1rem;
  bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: min(26rem, calc(100vw - 2rem));
  padding: 0.375rem;
  background: #fff;
  border: 1px solid var(--color-text-primary);
  color: var(--color-text-primary);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  /* Hidden: faded out and moved down; out of the tab order once gone. */
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition:
    opacity calc(var(--duration-panel) * 0.25) ease,
    transform calc(var(--duration-panel) * 0.25) ease,
    visibility 0s linear calc(var(--duration-panel) * 0.25);
}

.now-playing.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition:
    opacity calc(var(--duration-panel) * 0.4) var(--ease-enter),
    transform calc(var(--duration-panel) * 0.4) var(--ease-enter),
    visibility 0s;
}

@media (max-width: 639px) {
  .now-playing {
    left: 1rem;
    width: auto;
    bottom: 4.25rem; /* above the menu button and the map/list toggle */
  }
}

/* Round red play/pause button, like the menu button. */
.now-playing__toggle {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  background: var(--color-text-primary);
  color: #fff;
}

.now-playing__icon-pause,
.now-playing.is-playing .now-playing__icon-play {
  display: none;
}

.now-playing.is-playing .now-playing__icon-pause {
  display: block;
}

/* Place + title; clicking opens the place again. */
.now-playing__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.125rem;
  text-align: left;
}

.now-playing__place {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.now-playing__title {
  max-width: 100%;
  font-size: 0.875rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.now-playing__info:hover .now-playing__title {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.now-playing__close {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
}

.now-playing__close:hover {
  color: var(--color-text-darkpurple);
}
