/* Layout for the listening screen. Components and tokens come from blaster.css. */

.radio {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 16px 64px;
  display: flex;
  flex-direction: column;
}
@media (min-width: 720px) { .radio { padding: 40px 32px 72px; } }

.radio-case { display: flex; flex-direction: column; gap: 20px; }
.radio-model { margin-left: 10px; }
@media (max-width: 520px) { .radio-model { display: none; } }

@media (max-width: 1000px) { .radio-speaker { --size: 128px; } }

/* The globe's LCD window */
.radio-window {
  position: relative;
  padding: 0;
  aspect-ratio: 16 / 10;
  min-height: 280px;
}
@media (max-width: 720px) { .radio-window { aspect-ratio: 1 / 1; min-height: 0; } }
.radio-window canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: grab;
}
.radio-window canvas.is-dragging { cursor: grabbing; }
.radio-window__hint {
  position: absolute;
  left: 14px;
  bottom: 10px;
  opacity: 0.7;
  pointer-events: none;
  font-size: 16px;
}

/* Readout under the globe */
.radio-readout { display: flex; flex-direction: column; gap: 2px; min-height: 132px; }
.radio-readout__name,
.radio-readout__place,
.radio-readout__meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.radio-readout__place { text-transform: uppercase; }

/* Key rows */
.radio-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  flex-wrap: wrap;
}
.radio-play { min-width: 120px; }
@media (max-width: 720px) {
  .radio-controls > .bb-controls { width: 100%; display: grid; grid-template-columns: 1fr 1.3fr 1fr; gap: 10px; }
  .radio-controls #spin { order: -1; grid-column: 1 / -1; }
  .radio-controls .bb-key { min-width: 0; padding: 0 12px; }
}
.radio-play[aria-pressed="true"] { background: var(--bb-chrome-gradient); color: var(--bb-ink); }

.radio-vol { position: relative; display: flex; align-items: center; gap: 12px; }
.radio-vol input {
  /* The range input sits invisibly over the knob: drag sideways or use the arrow keys. */
  position: absolute;
  left: 0;
  top: 0;
  width: 64px;
  height: 64px;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}
.radio-vol:focus-within .bb-knob { outline: 3px solid var(--bb-focus); outline-offset: 4px; }

.radio-presets {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid rgba(43, 45, 49, 0.25);
}
.radio-mem[aria-pressed="true"] { background: var(--bb-record); color: var(--bb-on-record); }
.radio-presets__keys {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 720px) { .radio-presets__keys { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.radio-preset {
  flex-direction: column;
  gap: 2px;
  min-height: 60px;
  padding: 6px 10px;
  min-width: 0;
}
.radio-preset__name {
  max-width: 100%;
  font-family: var(--bb-font-lcd);
  font-size: 17px;
  letter-spacing: 0;
  color: var(--bb-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.radio-preset.is-current { box-shadow: var(--bb-shadow-key), 0 0 0 2px var(--bb-record); }

/* Station list under the case */
.radio-panel { margin-top: 40px; display: flex; flex-direction: column; gap: 16px; }
.radio-panel__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; }
.radio-panel__head .bb-section-title { flex: 1 1 260px; }
.radio-search { flex: 0 1 380px; min-width: 0; }
.radio-search .bb-lcd-input { min-height: 48px; font-size: 26px; letter-spacing: 0.06em; }
.radio-panel__empty { margin: 0; }

.radio-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 8px;
}
.radio-list button {
  width: 100%;
  min-height: 56px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px 14px;
  border: 1px solid var(--bb-line);
  border-radius: var(--bb-radius-md);
  background: var(--bb-gunmetal-raised);
  color: var(--bb-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.radio-list button:hover { border-color: var(--bb-chrome-lo); }
.radio-list button[aria-current="true"] { border: 2px solid var(--bb-record); padding: 9px 13px; }
.radio-list__name { font-weight: 600; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.radio-list__sub { font-size: var(--bb-text-sm); color: var(--bb-text-faint); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Share bar under the case */
.radio-share { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.radio-share h2 { margin: 0; font-weight: 400; }
.radio-share__links { gap: 8px; }
.radio-share a.bb-chip { text-decoration: none; color: var(--bb-text); }
.radio-share a.bb-chip:hover, .radio-share .bb-chip:hover { border-color: var(--bb-record); color: var(--bb-text); }
.radio-share__native { border-color: var(--bb-record); }

/* Footer: the maker's plate, like the badge on the back of a set */
.radio-foot {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--bb-line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
}
.radio-foot p { margin: 0; flex: 1 1 380px; line-height: 1.6; }
.radio-foot__maker {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  padding: 10px 18px;
  border-radius: var(--bb-radius-md);
  background: var(--bb-chrome-gradient);
  color: var(--bb-ink);
}
.radio-foot__maker .bb-label { color: var(--bb-ink); font-size: 10px; }
.radio-foot__name { font-family: var(--bb-font-label); font-size: 16px; letter-spacing: 0.08em; }
