/* Shop Radio — the Hollerbak jukebox (Jim, Oct 27, 2026: "Yes,
 * that's perfect"). One player for the whole site: it starts its
 * life on the home page and rides the shop, the journey and the
 * legal pages — same station, same song, carried across page loads
 * by radio.js. Skinned as an old jukebox: arched top, warm glow,
 * vintage trim in the Hollerbak palette (black / cream / gold),
 * the stations laid out like jukebox selections and the song shown
 * like a title card. Present and characterful, never a billboard:
 * ~300px wide on desktop, ~250px on a phone; it rests as a small
 * play pill (amendment 22) and presents as that pill on a first
 * visit, it drags anywhere the visitor wants it (position
 * remembered, clamped on-screen), and its × closes it for the
 * session with a "Shop Radio" way back in the shop menu/footer.
 * Seat: bottom-right by default, raised clear of the cookie bar
 * while that bar is up (radio.js measures it). While the radio is
 * on a page the footer gains bottom room so the player never sits
 * on the legal lines (last rule in this file). */

.hbk-radio {
  --jr-ink: #1d1d22;
  --jr-cream: #faf6ee;
  --jr-paper: #fffdf8;
  --jr-gold: #ffe14d;
  --jr-gold-deep: #8a6d1a;
  --jr-mist: #6d675a;
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 60;
  width: 300px;
  max-width: calc(100vw - 20px);
  padding: 0 14px 12px;
  color: var(--jr-cream);
  background: linear-gradient(180deg, #2b2113 0%, #1a140d 55%, #120e09 100%);
  border: 1px solid var(--jr-gold-deep);
  border-radius: 150px 150px 18px 18px;
  box-shadow: 0 0 0 3px rgba(138, 109, 26, 0.35),
    0 0 36px rgba(255, 190, 60, 0.28), 0 18px 44px rgba(10, 6, 0, 0.45);
  font-family: Georgia, "Times New Roman", serif;
  -webkit-user-select: none;
  user-select: none;
  transition: width 0.22s ease;
}
.hbk-radio[hidden] { display: none; }
.hbk-radio.is-placed { right: auto; bottom: auto; }
.hbk-radio.is-dragging { cursor: grabbing; transition: none; opacity: 0.97; }

/* ——— the arch: cream dome, lit bulbs, HBK RADIO across the top.
       The whole arch is the drag handle (radio.js, data-drag-handle);
       the two chrome caps are the shrink and close buttons. ——— */
.hbk-radio-arch { position: relative; padding-top: 14px; cursor: grab; touch-action: none; }
.hbk-radio.is-dragging .hbk-radio-arch { cursor: grabbing; }
.hbk-radio-dome {
  height: 80px;
  border: 1px solid var(--jr-gold-deep);
  border-radius: 130px 130px 12px 12px;
  background: radial-gradient(ellipse at 50% 112%, #fff8dc 0%, #ffeeb0 52%, #f7d774 78%, #e9ba45 100%);
  color: var(--jr-ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  overflow: hidden;
}
.hbk-radio-bulbs { display: flex; justify-content: space-between; width: 72%; margin-bottom: 4px; }
.hbk-radio-bulbs i {
  width: 6px; height: 6px; border-radius: 50%;
  background: #7a611c;
  display: block;
}
.hbk-radio.is-playing .hbk-radio-bulbs i {
  background: var(--jr-gold);
  box-shadow: 0 0 7px 2px rgba(255, 225, 77, 0.75);
  animation: jr-bulb 1.7s ease-in-out infinite alternate;
}
.hbk-radio-bulbs i:nth-child(2) { animation-delay: 0.25s; }
.hbk-radio-bulbs i:nth-child(3) { animation-delay: 0.5s; }
.hbk-radio-bulbs i:nth-child(4) { animation-delay: 0.75s; }
.hbk-radio-bulbs i:nth-child(5) { animation-delay: 1s; }
.hbk-radio-bulbs i:nth-child(6) { animation-delay: 1.25s; }
.hbk-radio-bulbs i:nth-child(7) { animation-delay: 1.5s; }
@keyframes jr-bulb { from { opacity: 0.55; } to { opacity: 1; } }
.hbk-radio-brand { font-size: 17px; font-weight: 700; letter-spacing: 0.34em; text-indent: 0.34em; }
.hbk-radio-brandsub { font-size: 8px; letter-spacing: 0.3em; text-indent: 0.3em; color: #5d4a12; }
.hbk-radio-grip { position: absolute; left: 50%; bottom: -13px; transform: translateX(-50%); color: rgba(250, 246, 238, 0.5); font-size: 11px; letter-spacing: 0.2em; }
.hbk-radio-cap {
  position: absolute; top: 4px;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--jr-gold-deep);
  background: rgba(18, 14, 9, 0.88); color: var(--jr-cream);
  font-size: 19px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.hbk-radio-cap:hover { background: #2b2113; }
.hbk-radio-min { left: 2px; }
.hbk-radio-x { right: 2px; }

/* ——— the question, in Jim's words ——— */
.hbk-radio-ask { margin: 16px 2px 8px; text-align: center; font-style: italic; font-size: 13.5px; color: var(--jr-cream); }

/* ——— the title card: station, song, artist on cream paper ——— */
.hbk-radio-card {
  background: var(--jr-paper); color: var(--jr-ink);
  border: 1px solid var(--jr-gold-deep); border-radius: 8px;
  box-shadow: inset 0 0 0 3px var(--jr-paper), inset 0 0 0 4px rgba(138, 109, 26, 0.65);
  padding: 9px 10px 8px; text-align: center;
}
.hbk-radio-station { font-size: 10px; letter-spacing: 0.28em; text-indent: 0.28em; text-transform: uppercase; color: var(--jr-gold-deep); font-weight: 700; }
.hbk-radio-title { font-size: 16.5px; font-weight: 700; margin-top: 2px; }
.hbk-radio-artist { font-size: 12px; font-style: italic; color: var(--jr-mist); margin-top: 1px; }
.hbk-radio-note { font-size: 11px; color: var(--jr-gold-deep); margin-top: 5px; }
.hbk-radio-note[hidden] { display: none; }

/* ——— the selections: six strips, two across, one tap each ——— */
.hbk-radio-stations { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 10px; }
.hbk-radio-sel {
  display: flex; align-items: center; gap: 7px;
  min-height: 44px; padding: 6px 8px;
  background: var(--jr-cream); color: var(--jr-ink);
  border: 1px solid #d8cfb4; border-radius: 6px;
  font-family: Georgia, "Times New Roman", serif; font-size: 12.5px;
  text-align: left; cursor: pointer;
}
.hbk-radio-sel:hover { border-color: var(--jr-gold-deep); }
.hbk-radio-sel.is-active { background: var(--jr-gold); border-color: var(--jr-gold-deep); font-weight: 700; }
.hbk-radio-tab {
  flex: none; min-width: 22px; padding: 2px 3px; text-align: center;
  background: #2b2113; color: var(--jr-gold); border-radius: 3px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.04em;
}
.hbk-radio-sel.is-active .hbk-radio-tab { background: var(--jr-ink); }
.hbk-radio-sel small { display: block; font-size: 10px; font-weight: 400; color: var(--jr-mist); }

/* ——— transport: prev / the big gold coin / next, mute, volume ——— */
.hbk-radio-transport { display: flex; align-items: center; gap: 9px; margin-top: 12px; }
.hbk-radio-tbtn {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--jr-gold-deep); background: transparent;
  color: var(--jr-cream); font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.hbk-radio-tbtn:hover { background: rgba(255, 225, 77, 0.12); }
.hbk-radio-play {
  flex: none; width: 54px; height: 54px; border-radius: 50%;
  border: 1px solid var(--jr-gold-deep);
  background: radial-gradient(circle at 34% 30%, #fff3b0 0%, var(--jr-gold) 55%, #e9ba45 100%);
  color: var(--jr-ink); font-size: 20px; cursor: pointer;
  box-shadow: 0 0 16px rgba(255, 225, 77, 0.4);
  display: flex; align-items: center; justify-content: center;
}
.hbk-radio-play.is-resume { animation: jr-resume 1.25s ease-in-out infinite; }
@keyframes jr-resume { 0%, 100% { box-shadow: 0 0 10px rgba(255, 225, 77, 0.35); } 50% { box-shadow: 0 0 24px rgba(255, 225, 77, 0.85); } }
.hbk-radio-vol { flex: 1; min-width: 44px; accent-color: var(--jr-gold); height: 44px; cursor: pointer; }

/* ——— the speaker grille ——— */
.hbk-radio-grille {
  height: 16px; margin-top: 10px; border-radius: 0 0 12px 12px;
  background-image: radial-gradient(rgba(255, 225, 77, 0.3) 1.2px, transparent 1.4px);
  background-size: 9px 9px; background-position: center;
}

/* ——— the pill (amendment 22, Jim, Oct 28, 2026): the jukebox
       condensed to a small play pill — a station segment that
       reopens the full player, and prev / play / next beside it.
       It is the player's resting face AND its first-visit form;
       the full jukebox opens only when the visitor asks. The
       root keeps its seat/position in pill form (it still
       drags). On pages carrying the header pill (#head-radio,
       styles.css) the floating root steps aside while the pill
       is up (.is-seated, set by radio.js) — one pill per page —
       unless the visitor dragged the player to their own seat. ——— */
.hbk-radio-pillbar { display: none; }
.hbk-radio.is-pill { width: auto; padding: 5px 7px; border-radius: 999px; cursor: grab; touch-action: none; }
.hbk-radio.is-pill .hbk-radio-arch,
.hbk-radio.is-pill .hbk-radio-body { display: none; }
.hbk-radio.is-pill .hbk-radio-pillbar { display: flex; align-items: center; gap: 3px; }
.hbk-radio.is-seated { display: none; }
.hbk-radio-pill-open {
  display: inline-flex; align-items: center; gap: 6px;
  height: 38px; padding: 0 10px 0 8px;
  border: 0; border-radius: 999px; background: transparent;
  color: var(--jr-cream); font-family: Georgia, "Times New Roman", serif;
  cursor: pointer;
}
.hbk-radio-pill-open:hover { background: rgba(255, 225, 77, 0.12); }
.hbk-radio-note-mark { font-size: 19px; color: var(--jr-gold); line-height: 1; text-shadow: 0 0 10px rgba(255, 225, 77, 0.6); }
.hbk-radio-pill-station {
  font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase;
  max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hbk-radio-pbtn {
  flex: none; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--jr-gold-deep); background: transparent;
  color: var(--jr-cream); font-size: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.hbk-radio-pbtn:hover { background: rgba(255, 225, 77, 0.12); }
.hbk-radio-p-play {
  width: 44px; height: 44px; font-size: 16px; color: var(--jr-ink);
  background: radial-gradient(circle at 34% 30%, #fff3b0 0%, var(--jr-gold) 55%, #e9ba45 100%);
  box-shadow: 0 0 12px rgba(255, 225, 77, 0.35);
}
.hbk-radio-p-play:hover { background: radial-gradient(circle at 34% 30%, #fff3b0 0%, var(--jr-gold) 55%, #e9ba45 100%); }
.hbk-radio-p-play.is-resume { animation: jr-resume 1.25s ease-in-out infinite; }
/* The footer courtesy fold (radio.js adds .is-docked while the page
 * footer is on screen and the radio is in its default seat): same
 * pill rendering, different trigger — it is a fold, not a state the
 * visitor chose, so it never touches their open/pill memory. */
.hbk-radio.is-docked { width: auto; padding: 5px 7px; border-radius: 999px; }
.hbk-radio.is-docked .hbk-radio-arch,
.hbk-radio.is-docked .hbk-radio-body { display: none; }
.hbk-radio.is-docked .hbk-radio-pillbar { display: flex; align-items: center; gap: 3px; }
.hbk-radio.is-pill.is-playing .hbk-radio-note-mark,
.hbk-radio.is-docked.is-playing .hbk-radio-note-mark { animation: jr-bulb 1.7s ease-in-out infinite alternate; }

/* ——— phone: Jim's ~250px ——— */
@media (max-width: 560px) {
  .hbk-radio { width: 252px; right: 10px; bottom: 10px; padding: 0 11px 10px; }
  .hbk-radio-dome { height: 76px; }
  .hbk-radio-brand { font-size: 15px; }
  .hbk-radio-ask { font-size: 12.5px; margin-top: 18px; }
  .hbk-radio-title { font-size: 15px; }
  .hbk-radio-sel { font-size: 11.5px; padding: 6px 6px; gap: 5px; }
  .hbk-radio-pbtn { width: 34px; height: 34px; }
  .hbk-radio-p-play { width: 40px; height: 40px; }
  .hbk-radio-pill-open { height: 34px; padding: 0 8px 0 6px; }
  .hbk-radio-pill-station { max-width: 74px; }
}

@media (prefers-reduced-motion: reduce) {
  .hbk-radio, .hbk-radio-bulbs i, .hbk-radio-play.is-resume,
  .hbk-radio-p-play.is-resume,
  .hbk-radio.is-pill.is-playing .hbk-radio-note-mark { animation: none; transition: none; }
}

/* While the radio rides a page, the footer keeps bottom room so the
 * player — in its default seat, at max scroll — never sits on the
 * legal lines. (A visitor who drags it elsewhere has placed it
 * themselves; that is the point of the drag.) */
body.hbk-radio-on footer.site-foot,
body.hbk-radio-on footer.site-bottom { padding-bottom: 104px; }
