/* ============================================================
   Waking Up preview — full-size player band under Ra Mour Radio.
   Plays a 1:45 excerpt (js/music-preview.js).
   ============================================================ */

.wu-preview {
  /* same frame as .radio and the .music-grid cards, at every width */
  width: calc(100% - var(--pad) * 2);
  max-width: calc(var(--measure) - var(--pad) * 2);
  margin: 0 auto clamp(2rem, 6vh, 3.5rem);
  border: 1px solid rgba(91, 194, 231, 0.18);
  background: var(--abyss);
  display: grid;
  grid-template-columns: minmax(9rem, 13rem) 1fr auto;
  gap: clamp(1.25rem, 4vw, 2.5rem);
  align-items: center;
  padding: clamp(1.25rem, 3vw, 2rem) clamp(1.75rem, 4vw, 2.75rem);
}

@media (max-width: 860px) {
  .wu-preview { grid-template-columns: minmax(9rem, 13rem) 1fr; }
  /* two-column layout: gift card gets its own top-right row */
  .wu-preview__foot { grid-row: 1; grid-column: 1 / -1; justify-self: end; }
}


.wu-preview__cover {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.wu-preview__body { min-width: 0; }

.wu-preview__series {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.wu-preview__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  color: var(--text);
  margin: 0.15rem 0;
}

.wu-preview__teacher {
  font-style: italic;
  color: var(--zima);
}

.wu-preview__desc {
  margin-top: 0.6rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.wu-preview__player { margin-top: 1.2rem; }

.wu-preview__bar,
.wu-preview__vol {
  -webkit-appearance: none;
  appearance: none;
  border-radius: 2px;
  background: linear-gradient(
    to right,
    var(--text) var(--fill, 0%),
    rgba(232, 240, 240, 0.22) var(--fill, 0%)
  );
  cursor: pointer;
  display: block;
}

.wu-preview__bar { width: 100%; height: 4px; }
.wu-preview__vol { width: 6rem; height: 3px; }

.wu-preview__bar::-webkit-slider-thumb,
.wu-preview__vol::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--text);
  border: 0;
}

.wu-preview__bar::-moz-range-thumb,
.wu-preview__vol::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--text);
  border: 0;
}

.wu-preview__times {
  display: flex;
  justify-content: space-between;
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.wu-preview__row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  column-gap: 1rem;
  align-items: center;
  margin-top: 0.6rem;
}

.wu-preview__controls {
  grid-column: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
}

.wu-preview__row .wu-preview__vol { grid-column: 3; justify-self: end; }

.wu-preview button {
  background: none;
  border: 0;
  color: var(--text);
  cursor: pointer;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s, box-shadow 0.3s;
}

.wu-preview button:hover { opacity: 0.8; }
.wu-preview button:focus-visible { outline: 2px solid var(--zima); outline-offset: 2px; }

.wu-preview__skip { width: 2.4rem; height: 2.4rem; }
.wu-preview__skip svg { width: 100%; height: 100%; }

/* extra class beats the `.wu-preview button { background: none }` reset */
.wu-preview button.wu-preview__play {
  width: 3.6rem;
  height: 3.6rem;
  background: var(--text);
  color: var(--ink);
}

.wu-preview button.wu-preview__play:hover {
  opacity: 1;
  box-shadow: 0 0 24px rgba(91, 194, 231, 0.5);
}

.wu-preview__play svg { width: 1.5rem; height: 1.5rem; }

/* gift card image is the button */
.wu-preview__foot { margin: 0; align-self: start; } /* top-right corner */

.wu-preview__gift {
  display: block;
  width: 12rem;
  color: var(--zima);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-align: center;
  transition: color 0.3s, transform 0.3s;
}

.wu-preview__gift img {
  display: block;
  width: 100%;
  border-radius: 8px;
  margin-bottom: 0.4rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  transition: box-shadow 0.3s;
}

.wu-preview__gift:hover { color: #d6f7ff; transform: translateY(-2px); }
.wu-preview__gift:hover img { box-shadow: 0 8px 26px rgba(91, 194, 231, 0.4); }
.wu-preview__gift:focus-visible { outline: 2px solid var(--zima); outline-offset: 4px; border-radius: 8px; }

/* phones — after the base rules so these win */
@media (max-width: 640px) {
  .wu-preview {
    grid-template-columns: minmax(0, 1fr);
    padding: 1.25rem;
    row-gap: 1.25rem;
  }
  .wu-preview__cover { max-width: 14rem; margin: 0 auto; }
  .wu-preview__body { grid-row: 2; grid-column: 1; }
  /* gift card shrinks and sits beside the title, sharing the body's cell */
  .wu-preview__foot { grid-row: 2; grid-column: 1; justify-self: end; }
  .wu-preview__gift { width: 5.5rem; font-size: 0.7rem; line-height: 1.3; }
  .wu-preview__gift img { border-radius: 5px; margin-bottom: 0.25rem; }
  .wu-preview__series,
  .wu-preview__title,
  .wu-preview__teacher { padding-right: 6.5rem; }
  .wu-preview__series { font-size: 0.72rem; }
  /* phones ignore scripted volume (iOS) and have no room for it */
  .wu-preview__row { grid-template-columns: 1fr; }
  .wu-preview__controls { grid-column: 1; }
  .wu-preview__row .wu-preview__vol { display: none; }
}
