@font-face {
  font-display: swap;
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  src: url("../fonts/IBMPlexMono-Regular.ttf") format("truetype");
}

@font-face {
  font-display: swap;
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  src: url("../fonts/IBMPlexMono-Medium.ttf") format("truetype");
}

:root {
  --lolpop-black: #090909;
  --lolpop-panel: #121211;
  --lolpop-ink: #f0eee7;
  --lolpop-muted: #8d8f93;
  --lolpop-line: #303236;
}

.lolpop-player-root,
.lolpop-shell {
  color: var(--lolpop-ink);
  font-family: "IBM Plex Mono", "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  letter-spacing: 0;
}

.lolpop-player-root *,
.lolpop-shell * {
  box-sizing: border-box;
}

.lolpop-player-root ::selection,
.lolpop-shell ::selection {
  background: var(--lolpop-ink);
  color: var(--lolpop-black);
}

.lolpop-player-root button,
.lolpop-shell button,
.lolpop-shell input {
  font: inherit;
  letter-spacing: 0;
}

.lolpop-player-root button,
.lolpop-shell button {
  -webkit-tap-highlight-color: transparent;
}

.lolpop-player-root button:hover,
.lolpop-player-root button:focus,
.lolpop-player-root button:active,
.lolpop-shell button:hover,
.lolpop-shell button:focus,
.lolpop-shell button:active {
  box-shadow: none;
  text-decoration: none;
}

.lolpop-player-root {
  background: var(--lolpop-black);
  border: 1px solid var(--lolpop-line);
  border-radius: 2px;
  min-height: 220px;
  overflow: hidden;
  width: 100%;
}

.lolpop-player-root[data-view="dock"] {
  display: none;
}

.lolpop-player-root__loading,
.lolpop-player-root--error {
  align-items: center;
  color: var(--lolpop-muted);
  display: flex;
  justify-content: center;
  min-height: 220px;
  padding: 24px;
}

.lolpop-release-card {
  display: grid;
  grid-template-columns: minmax(240px, 38%) minmax(0, 1fr);
  margin: 0;
  min-height: 420px;
}

.lolpop-release-card__visual {
  aspect-ratio: 1;
  background: #050505;
  min-width: 0;
  overflow: hidden;
  position: relative;
}

.lolpop-release-card__artwork {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.lolpop-release-card__logo {
  filter: drop-shadow(0 2px 8px #000);
  height: auto;
  left: 50%;
  max-width: 68%;
  position: absolute;
  top: 8%;
  transform: translateX(-50%);
}

.lolpop-player-root[data-project="pop"] .lolpop-release-card__logo {
  display: none;
}

.lolpop-release-card__content {
  align-content: center;
  background: var(--lolpop-panel);
  display: grid;
  min-width: 0;
  padding: 42px;
}

.lolpop-kicker {
  color: var(--lolpop-ink);
  font-size: 11px;
  line-height: 1.4;
  margin: 0 0 12px;
  text-transform: uppercase;
}

.lolpop-kicker::before {
  color: var(--lolpop-muted);
  content: "REC // ";
}

.lolpop-release-card h2,
.lolpop-drawer h2 {
  color: var(--lolpop-ink);
  font-family: inherit;
  font-size: 28px;
  font-weight: 500;
  line-height: 1.16;
  margin: 0;
  overflow-wrap: anywhere;
}

.lolpop-release-tracks,
.lolpop-queue {
  list-style: none;
  margin: 34px 0 0;
  padding: 0;
}

.lolpop-release-tracks li,
.lolpop-queue li {
  border-top: 1px solid var(--lolpop-line);
  margin: 0;
  padding: 0;
}

.lolpop-release-tracks li:last-child,
.lolpop-queue li:last-child {
  border-bottom: 1px solid var(--lolpop-line);
}

.lolpop-release-track,
.lolpop-queue button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: var(--lolpop-muted);
  cursor: pointer;
  display: grid;
  gap: 16px;
  grid-template-columns: 24px 30px minmax(0, 1fr) auto;
  min-height: 62px;
  padding: 9px 2px;
  text-align: left;
  width: 100%;
}

.lolpop-release-track:hover,
.lolpop-release-track:focus-visible,
.lolpop-release-track.is-current,
.lolpop-queue button:hover,
.lolpop-queue button:focus-visible,
.lolpop-queue button.is-current {
  background: transparent;
  color: var(--lolpop-ink);
  outline: none;
}

.lolpop-release-track:focus-visible,
.lolpop-queue button:focus-visible,
.lolpop-icon-button:focus-visible,
.lolpop-now-playing:focus-visible {
  box-shadow: inset 0 0 0 1px var(--lolpop-ink);
}

.lolpop-release-track__icon {
  align-items: center;
  display: flex;
  justify-content: center;
}

.lolpop-release-track__icon .lolpop-icon {
  height: 16px;
  width: 16px;
}

.lolpop-release-track__number,
.lolpop-release-track time,
.lolpop-queue span,
.lolpop-queue time {
  color: var(--lolpop-muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.lolpop-release-track strong,
.lolpop-queue strong {
  font-size: 14px;
  font-weight: 500;
  min-width: 0;
  overflow-wrap: anywhere;
}

.lolpop-icon {
  display: block;
  height: 20px;
  width: 20px;
}

.lolpop-audio-engine {
  display: none;
}

body.lolpop-player-active {
  padding-bottom: 84px;
}

body.lolpop-drawer-open {
  overflow: hidden;
}

.lolpop-shell[hidden],
.lolpop-drawer[hidden],
.lolpop-shell [hidden] {
  display: none !important;
}

.lolpop-shell {
  bottom: 0;
  left: 0;
  position: fixed;
  right: 0;
  z-index: 99990;
}

.lolpop-dock {
  align-items: center;
  background: rgba(9, 9, 9, 0.98);
  border-top: 1px solid var(--lolpop-line);
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(180px, 250px) auto minmax(240px, 1fr) auto;
  height: 84px;
  padding: 0 16px;
  position: relative;
  z-index: 2;
}

.lolpop-now-playing {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: var(--lolpop-ink);
  cursor: pointer;
  display: grid;
  gap: 12px;
  grid-template-columns: 48px minmax(0, 1fr);
  min-width: 0;
  padding: 0;
  position: relative;
  text-align: left;
}

.lolpop-shell .lolpop-now-playing:hover,
.lolpop-shell .lolpop-now-playing:focus,
.lolpop-shell .lolpop-now-playing:active {
  background: transparent;
  color: var(--lolpop-ink);
}

.lolpop-now-playing__art {
  aspect-ratio: 1;
  background-position: center;
  background-size: cover;
  border: 1px solid var(--lolpop-line);
  display: block;
  width: 48px;
}

.lolpop-now-playing__copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.lolpop-now-playing strong,
.lolpop-now-playing small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lolpop-now-playing strong {
  font-size: 12px;
  font-weight: 500;
}

.lolpop-now-playing small {
  color: var(--lolpop-muted);
  font-size: 9px;
  text-transform: uppercase;
}

.lolpop-transport,
.lolpop-dock__actions {
  align-items: center;
  display: flex;
  gap: 4px;
}

.lolpop-icon-button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 50%;
  color: var(--lolpop-muted);
  cursor: pointer;
  display: inline-flex;
  height: 44px;
  justify-content: center;
  padding: 0;
  position: relative;
  width: 44px;
}

.lolpop-shell .lolpop-icon-button:hover,
.lolpop-shell .lolpop-icon-button:focus,
.lolpop-shell .lolpop-icon-button:active,
.lolpop-shell .lolpop-icon-button.is-active {
  background: transparent;
  color: var(--lolpop-ink);
}

.lolpop-icon-button.is-active::before {
  background: var(--lolpop-ink);
  border-radius: 50%;
  bottom: 4px;
  content: "";
  height: 3px;
  left: 50%;
  position: absolute;
  transform: translateX(-50%);
  width: 3px;
}

.lolpop-icon-button[data-tooltip]::after,
.lolpop-now-playing[data-tooltip]::after {
  background: var(--lolpop-ink);
  border-radius: 2px;
  bottom: calc(100% + 8px);
  color: var(--lolpop-black);
  content: attr(data-tooltip);
  font-size: 10px;
  left: 50%;
  opacity: 0;
  padding: 5px 7px;
  pointer-events: none;
  position: absolute;
  transform: translate(-50%, 4px);
  transition: opacity 120ms ease, transform 120ms ease;
  white-space: nowrap;
}

.lolpop-icon-button[data-tooltip]:hover::after,
.lolpop-icon-button[data-tooltip]:focus-visible::after,
.lolpop-now-playing[data-tooltip]:hover::after,
.lolpop-now-playing[data-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.lolpop-drawer__close[data-tooltip]::after {
  bottom: auto;
  left: auto;
  right: 0;
  top: calc(100% + 8px);
  transform: translate(0, -4px);
}

.lolpop-drawer__close[data-tooltip]:hover::after,
.lolpop-drawer__close[data-tooltip]:focus-visible::after {
  transform: translate(0, 0);
}

.lolpop-transport__play {
  background: var(--lolpop-ink);
  color: var(--lolpop-black);
}

.lolpop-shell .lolpop-transport__play:hover,
.lolpop-shell .lolpop-transport__play:focus,
.lolpop-shell .lolpop-transport__play:active {
  background: var(--lolpop-ink);
  color: var(--lolpop-black);
}

.lolpop-transport__play.is-loading::after {
  animation: lolpop-spin 700ms linear infinite;
  border: 1px solid transparent;
  border-radius: 50%;
  border-right-color: var(--lolpop-muted);
  content: "";
  height: 32px;
  position: absolute;
  width: 32px;
}

.lolpop-timeline {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: 38px minmax(100px, 1fr) 38px;
  min-width: 0;
}

.lolpop-timeline > span {
  color: var(--lolpop-muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.lolpop-waveform {
  height: 42px;
  min-width: 0;
  position: relative;
}

.lolpop-waveform canvas,
.lolpop-waveform input {
  height: 100%;
  inset: 0;
  position: absolute;
  width: 100%;
}

.lolpop-waveform input {
  cursor: pointer;
  opacity: 0;
}

.lolpop-volume {
  align-items: center;
  color: var(--lolpop-muted);
  display: flex;
  gap: 5px;
  height: 44px;
}

.lolpop-volume input {
  accent-color: var(--lolpop-ink);
  width: 62px;
}

.lolpop-drawer {
  background: var(--lolpop-black);
  bottom: 84px;
  display: grid;
  grid-template-columns: minmax(320px, 48%) minmax(0, 1fr);
  left: 0;
  min-height: 0;
  overflow: auto;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 1;
}

.admin-bar .lolpop-drawer {
  top: 32px;
}

.lolpop-drawer__close {
  position: fixed;
  right: 22px;
  top: 20px;
  z-index: 3;
}

.admin-bar .lolpop-drawer__close {
  top: 52px;
}

.lolpop-drawer__visual {
  align-items: center;
  background: #050505;
  display: flex;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

.lolpop-drawer__artwork {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.lolpop-drawer__logo {
  filter: drop-shadow(0 2px 10px #000);
  height: auto;
  left: 50%;
  max-width: 60%;
  position: absolute;
  top: 8%;
  transform: translateX(-50%);
}

.lolpop-shell[data-project="pop"] .lolpop-drawer__logo {
  display: none;
}

.lolpop-drawer__content {
  align-content: center;
  display: grid;
  min-width: 0;
  padding: 80px 9%;
}

.lolpop-queue button {
  grid-template-columns: 34px minmax(0, 1fr) auto;
}

.lolpop-queue button.is-current strong::after {
  color: var(--lolpop-muted);
  content: " // PLAYING";
  font-size: 9px;
  font-weight: 400;
}

.lolpop-error {
  color: var(--lolpop-ink);
  font-size: 11px;
  min-height: 1.5em;
}

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  width: 1px;
}

@keyframes lolpop-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 900px) {
  body.lolpop-player-active {
    padding-bottom: 112px;
  }

  .lolpop-release-card {
    grid-template-columns: minmax(220px, 44%) minmax(0, 1fr);
  }

  .lolpop-release-card__content {
    padding: 28px;
  }

  .lolpop-dock {
    gap: 6px 12px;
    grid-template-columns: minmax(130px, 1fr) auto auto;
    grid-template-rows: 58px 42px;
    height: 112px;
    padding: 6px 10px;
  }

  .lolpop-now-playing {
    grid-column: 1;
    grid-row: 1;
  }

  .lolpop-transport {
    grid-column: 2;
    grid-row: 1;
  }

  .lolpop-timeline {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .lolpop-dock__actions {
    grid-column: 3;
    grid-row: 1;
  }

  .lolpop-volume {
    display: none;
  }

  .lolpop-drawer {
    bottom: 112px;
  }
}

@media (max-width: 680px) {
  .lolpop-release-card {
    grid-template-columns: 1fr;
  }

  .lolpop-release-card__visual {
    width: 100%;
  }

  .lolpop-release-card__content {
    min-height: 270px;
    padding: 28px 20px;
  }

  .lolpop-release-card h2,
  .lolpop-drawer h2 {
    font-size: 24px;
  }

  .lolpop-release-track {
    gap: 9px;
    grid-template-columns: 22px 24px minmax(0, 1fr) auto;
  }

  .lolpop-dock {
    grid-template-columns: minmax(110px, 1fr) auto auto;
  }

  .lolpop-now-playing {
    grid-template-columns: 38px minmax(0, 1fr);
  }

  .lolpop-now-playing__art {
    width: 38px;
  }

  .lolpop-transport [data-action="previous"],
  .lolpop-transport [data-action="next"],
  .lolpop-dock__actions [data-action="shuffle"] {
    display: none;
  }

  .lolpop-drawer {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(260px, 52vh) auto;
  }

  .lolpop-drawer__content {
    align-content: start;
    padding: 34px 20px 64px;
  }

  .lolpop-drawer__close {
    background: rgba(9, 9, 9, 0.72);
    right: 10px;
    top: 10px;
  }

  .admin-bar .lolpop-drawer {
    top: 46px;
  }

  .admin-bar .lolpop-drawer__close {
    top: 56px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lolpop-icon-button[data-tooltip]::after,
  .lolpop-now-playing[data-tooltip]::after {
    transition: none;
  }
}
