/* Peraoke Radio — the bar that follows you, and the page that lists it.

   The bar sits at the bottom on a phone and at the bottom on a desk too:
   it is a radio, not a navigation, and the top of the page already has the
   app strip on a phone. Perry lives in the bottom-right corner, so the bar
   leaves him room rather than sitting under him. */

.radio-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 78;                       /* under Perry (75 is his root, 90 the app bar) */
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  padding-bottom: calc(8px + env(safe-area-inset-bottom));
  background: rgba(16, 18, 20, .97);
  border-top: 1px solid rgba(255, 255, 255, .10);
  backdrop-filter: saturate(140%) blur(8px);
  color: #fff;
}

.radio-bar__go,
.radio-bar__skip,
.radio-bar__x {
  flex: none; display: grid; place-items: center;
  border: 0; background: none; color: #fff; cursor: pointer;
  border-radius: 999px;
}
.radio-bar__go {
  width: 38px; height: 38px;
  background: #1ED1CF; color: #04211f;
}
.radio-bar__skip { width: 34px; height: 34px; color: #c9d1d8; }
.radio-bar__skip:hover { color: #fff; }
.radio-bar__x { width: 32px; height: 32px; color: #8b939c; }
.radio-bar__x:hover { color: #fff; }
.radio-bar__go:focus-visible,
.radio-bar__skip:focus-visible,
.radio-bar__x:focus-visible,
.radio-bar__all:focus-visible { outline: 2px solid #1ED1CF; outline-offset: 2px; }

.radio-bar__what {
  flex: 1; min-width: 0; text-decoration: none; color: inherit;
  display: flex; flex-direction: column; line-height: 1.25;
}
.radio-bar__what b {
  font-size: 14px; font-weight: 700;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.radio-bar__what span {
  font-size: 12px; color: #8b939c;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.radio-bar__all {
  flex: none; text-decoration: none;
  border: 1px solid rgba(255, 255, 255, .24); color: #fff;
  font-size: 12.5px; font-weight: 700;
  padding: 7px 13px; border-radius: 8px;
}

/* The teal dot that says it is actually making sound. */
.radio-bar.is-playing .radio-bar__what b::after {
  content: ''; display: inline-block;
  width: 6px; height: 6px; margin-left: 7px; border-radius: 50%;
  background: #1ED1CF; vertical-align: middle;
  animation: radio-pulse 1.8s ease-in-out infinite;
}
@keyframes radio-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) {
  .radio-bar.is-playing .radio-bar__what b::after { animation: none; }
}

/* Perry's corner. Lift him above the bar so the two never overlap. */
.radio-bar:not([hidden]) ~ .perry-root { bottom: 70px; }

@media (max-width: 720px) {
  .radio-bar { gap: 8px; padding-left: 10px; padding-right: 10px; }
  .radio-bar__all { display: none; }        /* the title is the link on a phone */
  .radio-bar:not([hidden]) ~ .perry-root { bottom: 66px; }
}

/* ---- the page ---------------------------------------------------------- */

.radio-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.radio-head__go {
  display: inline-flex; align-items: center; gap: 9px;
  background: #1ED1CF; color: #04211f; border: 0; cursor: pointer;
  font-size: 15px; font-weight: 800; letter-spacing: -.01em;
  padding: 12px 20px; border-radius: 999px;
}
.radio-head__go:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.radio-now {
  display: flex; flex-direction: column; line-height: 1.3; min-width: 0;
}
.radio-now b { font-size: 15px; font-weight: 700; }
.radio-now span { font-size: 13px; color: var(--muted, #69727D); }

.radio-queue { margin-top: 22px; display: flex; flex-direction: column; }
.radio-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 10px 12px; border: 0; border-radius: 10px;
  background: none; color: inherit; text-align: left; cursor: pointer;
  font: inherit;
}
.radio-row:hover { background: rgba(30, 209, 207, .10); }
.radio-row.is-now { background: rgba(30, 209, 207, .16); }
.radio-row__n {
  flex: none; width: 30px; text-align: right;
  font-size: 12px; color: var(--muted, #69727D); font-variant-numeric: tabular-nums;
}
.radio-row__tx { min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.radio-row__tx b { font-size: 15px; font-weight: 600; }
.radio-row__tx span {
  font-size: 12.5px; color: var(--muted, #69727D);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.radio-row.is-now .radio-row__n { color: #0B7C7B; font-weight: 700; }
.radio-row.is-now .radio-row__tx b { color: #0B7C7B; }

/* ---- the shelf on the home page --------------------------------------- */

.home-radio__go {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  margin: 0 0 1.2rem;
}
.home-radio .radio-now b { color: #fff; }
.home-radio .radio-now span { color: rgba(255, 255, 255, .62); }

.radio-card {
  display: flex; flex-direction: column; gap: 6px;
  text-decoration: none; color: #fff; min-width: 0;
}
.radio-card__art {
  display: block; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden;
  background: rgba(255, 255, 255, .08);
}
.radio-card__art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.radio-card__t {
  font-size: 15px; font-weight: 700; line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.radio-card__s {
  font-size: 12.5px; color: rgba(255, 255, 255, .66); line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.radio-card:hover .radio-card__art { outline: 2px solid #1ED1CF; outline-offset: 2px; }
.radio-card:focus-visible .radio-card__art { outline: 2px solid #1ED1CF; outline-offset: 2px; }
