/* Compact homepage player. Compatible with the existing record-radio.js. */
.record-radio {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  box-sizing: border-box;
  width: min(100%, 1600px);
  z-index: 65;
  background: #101810;
  color: #f5f9ee;
  border-top: 3px solid #a6d900;
  box-shadow: 0 -4px 18px #10181026;
  padding: 8px clamp(12px, 2vw, 24px);
  padding-bottom: max(8px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(270px, 1.5fr) auto auto;
  gap: 4px 14px;
  align-items: center;
  font-size: 12px;
  line-height: 1.25;
}
.record-radio[hidden] { display: none !important; }
.record-radio a:focus-visible,
.record-radio button:focus-visible,
.record-radio input:focus-visible,
.record-radio select:focus-visible {
  outline: 2px solid #a6d900;
  outline-offset: 3px;
}
.radio-record {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  gap: 9px;
  min-width: 0;
  align-items: center;
}
.radio-art {
  width: 46px;
  height: 46px;
  box-sizing: border-box;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, #111810 0 3px, #293224 4px 5px);
  border: 2px solid #303e27;
  overflow: hidden;
  animation: radio-vinyl-turn 1.8s linear infinite;
  animation-play-state: paused;
  transform-origin: center;
}
.radio-art img { width: 100%; height: 100%; object-fit: cover; }
.radio-art img[hidden] { display: none; }
.radio-art span {
  background: #a6d900;
  color: #101810;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 900;
  display: grid;
  place-items: center;
}
.radio-record-copy { min-width: 0; flex: 1; }
.radio-button.radio-toggle {
  flex: none;
  border: 1px solid #48583c;
  color: #a6d900;
}
.radio-toggle svg { width: 14px; height: 14px; }
.record-radio [hidden] { display: none !important; }
.radio-kicker {
  margin: 0 0 2px !important;
  font-size: 8px !important;
  color: #a6d900 !important;
  font-weight: 800;
  letter-spacing: .09em;
}
.radio-record-title {
  display: block;
  font-weight: 800;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.radio-artist {
  margin: 2px 0 0 !important;
  color: #b8c8ab;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.radio-controls {
  grid-column: 2;
  grid-row: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 10px;
  min-width: 0;
}
.radio-buttons {
  display: flex;
  gap: 2px;
  align-items: center;
  grid-row: 1 / 3;
}
.radio-button {
  width: 32px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  background: transparent;
  color: #f5f9ee;
  border: 0;
  border-radius: 4px;
}
.radio-button:hover { background: #283820; }
.radio-button svg { width: 16px; height: 16px; fill: currentColor; }
.radio-button.radio-play {
  width: 36px;
  height: 36px;
  background: #a6d900;
  color: #101810;
  border-radius: 50%;
}
.radio-button:disabled { opacity: .5; cursor: wait; }
.radio-track-select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  background: #1d2a16;
  border: 1px solid #48583c;
  color: #f5f9ee;
  border-radius: 4px;
  padding: 4px 7px;
  font-size: 11px;
}
.radio-timeline { display: flex; gap: 7px; align-items: center; min-width: 0; }
.radio-timeline input {
  width: 100%;
  min-width: 0;
  margin: 0;
  accent-color: #a6d900;
  cursor: pointer;
  height: 16px;
}
.radio-time {
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: #b8c8ab;
}
.radio-buy { grid-column: 4; grid-row: 1; display: grid; gap: 3px; text-align: right; }
.radio-buy a {
  padding: 7px 10px;
  border: 1px solid #a6d900;
  border-radius: 4px;
  font-weight: 800;
  font-size: 11px;
  color: #a6d900;
  white-space: nowrap;
}
.radio-buy a:hover { background: #a6d900; color: #101810; }
.radio-next { color: #aebea0; font-size: 9px; font-variant-numeric: tabular-nums; }
/* Flatten the former bottom row so volume fits alongside the main controls. */
.radio-bottom-line { display: contents; }
.radio-bottom-line .radio-status {
  grid-column: 2 / 4;
  grid-row: 2;
  min-height: 0;
  margin: 0;
  color: #b8c8ab;
  font-size: 10px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.radio-status:empty { display: none; }
.radio-volume {
  grid-column: 3;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: 2px;
}
.radio-volume input { width: 44px; margin: 0; accent-color: #a6d900; }
.radio-volume .radio-button { width: 32px; height: 36px; }
body.has-record-radio { padding-bottom: var(--record-radio-height, 84px); }
body.has-record-radio .floating-bag { bottom: calc(var(--record-radio-height, 84px) + 12px); }
.record-radio.is-playing .radio-art { animation-play-state: running; }
@keyframes radio-vinyl-turn { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .radio-art { animation: none; } }
@media (max-width: 800px) {
  .record-radio {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 10px;
    padding-left: 12px;
    padding-right: 12px;
  }
  .radio-buy { grid-column: 2; grid-row: 1; }
  .radio-controls { grid-column: 1; grid-row: 2; gap: 2px 7px; }
  .radio-volume { grid-column: 2; grid-row: 2; justify-self: end; }
  .radio-bottom-line .radio-status { grid-column: 1 / -1; grid-row: 3; }
}
@media (max-width: 450px) {
  .record-radio { gap: 5px 6px; padding: 7px 10px; padding-bottom: max(7px, env(safe-area-inset-bottom)); }
  .radio-art { width: 40px; height: 40px; }
  .radio-record { gap: 7px; }
  .radio-kicker { display: none; }
  .radio-record-title { font-size: 12px; }
  .radio-artist { font-size: 10px; }
  .radio-buy a { padding: 7px; font-size: 10px; }
  .radio-next { font-size: 8px; }
  .radio-controls { column-gap: 5px; }
  .radio-buttons { gap: 0; }
  .radio-button { width: 30px; }
  .radio-track-select { font-size: 10px; padding: 4px; }
  .radio-timeline { gap: 3px; }
  .radio-time { font-size: 9px; }
  .radio-volume input { width: 35px; }
}
/* One small row with the record link, expand button and the same Play/Pause button. */
.record-radio.is-minimized {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 8px;
  padding: 6px clamp(10px, 2vw, 24px);
  padding-bottom: max(6px, env(safe-area-inset-bottom));
}
.record-radio.is-minimized .radio-record { grid-column: 1; grid-row: 1; gap: 8px; }
.record-radio.is-minimized .radio-art { width: 30px; height: 30px; }
.record-radio.is-minimized .radio-art span { width: 15px; height: 15px; font-size: 8px; }
.record-radio.is-minimized .radio-record-title { font-size: 12px; }
.record-radio.is-minimized .radio-controls { grid-column: 2; grid-row: 1; display: flex; }
.record-radio.is-minimized .radio-buttons { display: flex; gap: 0; }
.record-radio.is-minimized .radio-play { width: 32px; height: 32px; }
.record-radio.is-minimized .radio-toggle { width: 32px; height: 32px; }
.record-radio.is-minimized .radio-bottom-line .radio-status { grid-column: 1 / -1; grid-row: 2; }
