/* ------------------------------------------------------------------
   Taster player
   A 20-second preview of the latest track that hands the listener over
   to Bandcamp for the full song. Styled to match the Bandcamp embed it
   replaces (bg #333, links #0f91ff) so the page looks the same, but it
   only ever loads the short clip.

   The card is square-artwork tall, so --tp-art drives the card height,
   the artwork and the text inset. Narrow containers only change that
   one value; see the compact section at the end.

   Kept in its own file so a fresh Webflow export never overwrites it.
   ------------------------------------------------------------------ */

.taster-player {
  --tp-art: 120px;
  position: relative;
  display: block;
  overflow: hidden;
  width: 100%;
  height: var(--tp-art);
  border-radius: 8px;
  background-color: #333;
  color: #ccc;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  line-height: 1.35;
  text-align: left;
}

.taster-player *,
.taster-player *:before,
.taster-player *:after {
  box-sizing: border-box;
}

/* --- artwork ------------------------------------------------------ */

.tp-art {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  width: var(--tp-art);
  height: var(--tp-art);
  overflow: hidden;
  background-color: #262626;
}

.tp-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- text + controls ---------------------------------------------- */

.tp-body {
  position: relative;
  height: 100%;
  margin-left: var(--tp-art);
  padding: 11px 14px 12px;
  display: flex;
  flex-direction: column;
}

.tp-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.tp-title {
  overflow: hidden;
  color: #0f91ff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tp-buy {
  flex: none;
  margin-left: 12px;
  color: #0f91ff;
  font-size: 12px;
  text-decoration: none;
  white-space: nowrap;
}

/* Repeat the colour so Webflow's global link hover cannot recolour these. */
.tp-title:hover,
.tp-title:focus,
.tp-buy:hover,
.tp-buy:focus {
  color: #0f91ff;
  text-decoration: underline;
}

.tp-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 2px;
  color: #9a9a9a;
  font-size: 12px;
}

.tp-by {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tp-badge {
  flex: none;
  margin-left: 12px;
  color: #7d7d7d;
  font-size: 9px;
  letter-spacing: .09em;
  text-transform: uppercase;
  white-space: nowrap;
}

.tp-controls {
  display: flex;
  align-items: center;
  margin-top: auto;
}

/* --- play / pause -------------------------------------------------- */

.tp-play {
  position: relative;
  flex: none;
  width: 38px;
  height: 32px;
  margin: 0 12px 0 0;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background-color: #8a8a8a;
  cursor: pointer;
  transition: background-color .15s ease;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.tp-play:hover {
  background-color: #a5a5a5;
}

.tp-play svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: #333;
}

.tp-play .tp-icon-pause,
.taster-player.is-playing .tp-play .tp-icon-play {
  display: none;
}

.taster-player.is-playing .tp-play .tp-icon-pause {
  display: block;
}

/* --- progress ------------------------------------------------------ */

.tp-track {
  position: relative;
  flex: 1 1 auto;
  height: 12px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* Grow both tap targets vertically without changing how they look.
   Keeps the play button and the scrub bar at ~44px for touch. */
.tp-play:after,
.tp-track:after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -8px;
  bottom: -8px;
}

.tp-rail {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 6px;
  margin-top: -3px;
  border-radius: 3px;
  background-color: #4d4d4d;
}

.tp-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  border-radius: 3px;
  background-color: #b3b3b3;
}

.tp-track:hover .tp-fill,
.tp-track:focus-visible .tp-fill {
  background-color: #0f91ff;
}

.tp-time {
  flex: none;
  margin-left: 12px;
  color: #9a9a9a;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* --- end-of-taster call to action ---------------------------------- */

.tp-end {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  background-color: rgba(26, 26, 26, .93);
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}

.taster-player.is-finished .tp-end {
  opacity: 1;
  visibility: visible;
}

.tp-end-line {
  margin-bottom: 8px;
  color: #ddd;
  font-size: 12px;
}

.tp-end-cta {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 4px;
  background-color: #0f91ff;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: background-color .15s ease;
}

.tp-end-cta:hover,
.tp-end-cta:focus {
  background-color: #3aa8ff;
  color: #fff;
  text-decoration: none;
}

.tp-replay {
  margin-top: 7px;
  padding: 0;
  border: 0;
  background: none;
  color: #8f8f8f;
  font-family: inherit;
  font-size: 11px;
  cursor: pointer;
}

.tp-replay:hover {
  color: #ccc;
  text-decoration: underline;
}

/* --- narrow containers (e.g. the 280px floating mini player) --------
   JS adds .tp-compact below 360px of card width. Shrinking --tp-art
   resizes the card, the artwork and the text inset together. */

.taster-player.tp-compact {
  --tp-art: 96px;
}

.taster-player.tp-compact .tp-body {
  padding: 8px 10px 9px;
}

.taster-player.tp-compact .tp-title {
  font-size: 13px;
}

/* The title already links to Bandcamp and the end card carries the real
   call to action, so "buy" is the one thing that can go. The badge stays
   — it is what sets expectations — but shortens to just "20 sec" rather
   than truncating the artist names. */
.taster-player.tp-compact .tp-buy,
.taster-player.tp-compact .tp-badge-word {
  display: none;
}

.taster-player.tp-compact .tp-meta {
  font-size: 11px;
}

.taster-player.tp-compact .tp-play {
  width: 34px;
  height: 28px;
  margin-right: 9px;
}

.taster-player.tp-compact .tp-time {
  margin-left: 9px;
  font-size: 10px;
}

.taster-player.tp-compact .tp-end-line {
  margin-bottom: 6px;
  font-size: 11px;
}

.taster-player.tp-compact .tp-end-cta {
  padding: 6px 12px;
  font-size: 12px;
}

.taster-player.tp-compact .tp-replay {
  margin-top: 5px;
}

/* --- no-JS fallback ------------------------------------------------- */

.taster-player-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 14px;
  color: #0f91ff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  text-align: center;
  text-decoration: none;
}

@media (prefers-reduced-motion: reduce) {
  .tp-end,
  .tp-play,
  .tp-end-cta {
    transition: none;
  }
}
