:root {
  --tr-player-red: #fe0000;
  --tr-player-orange: #ff6600;
  --tr-player-ink: #171717;
  --tr-player-panel: rgba(26, 26, 26, 0.96);
  --tr-player-text: #ffffff;
  --tr-player-muted: #b9b9b9;
}

.tr-radio-player {
  background: var(--tr-player-panel);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  bottom: 18px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
  color: var(--tr-player-text);
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  left: 18px;
  max-width: calc(100vw - 36px);
  min-height: 104px;
  overflow: hidden;
  position: fixed;
  transition: box-shadow 0.2s ease, transform 0.2s ease, width 0.2s ease;
  width: 388px;
  z-index: 2200;
}

.tr-radio-player::before {
  background: linear-gradient(90deg, var(--tr-player-red), var(--tr-player-orange));
  content: "";
  height: 4px;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  z-index: 2;
}

.tr-radio-player:hover {
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.42);
  transform: translateY(-2px);
}

.tr-player-cover-wrap {
  background: #0f0f0f;
  min-height: 104px;
  overflow: hidden;
  position: relative;
}

.tr-player-cover {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.tr-player-cover-shade {
  background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.58));
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.tr-player-live {
  align-items: center;
  bottom: 9px;
  display: flex;
  font-size: 0.65rem;
  font-weight: 800;
  gap: 0.35rem;
  left: 10px;
  letter-spacing: 0.08em;
  position: absolute;
  text-transform: uppercase;
}

.tr-player-live-dot {
  background: #ff3030;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(255, 48, 48, 0.58);
  height: 7px;
  width: 7px;
}

.tr-radio-player.is-playing .tr-player-live-dot {
  animation: trPlayerPulse 1.6s ease-out infinite;
}

.tr-player-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 15px 14px 12px;
}

.tr-player-heading {
  align-items: flex-start;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-width: 0;
}

.tr-player-meta {
  min-width: 0;
}

.tr-player-kicker {
  color: var(--tr-player-orange);
  display: block;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 2px;
  text-transform: uppercase;
}

.tr-player-track,
.tr-player-artist {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tr-player-track {
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.2;
}

.tr-player-artist {
  color: var(--tr-player-muted);
  font-size: 0.78rem;
  line-height: 1.35;
  margin-top: 3px;
}

.tr-player-minimize {
  align-items: center;
  background: rgba(0, 0, 0, 0.34);
  border: 0;
  border-radius: 50%;
  color: #d4d4d4;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 1.1rem;
  height: 28px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  position: absolute;
  right: 8px;
  top: 9px;
  width: 28px;
  z-index: 4;
}

.tr-player-minimize:hover,
.tr-player-minimize:focus {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.tr-player-controls {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: 42px minmax(0, 1fr);
  margin-top: auto;
  padding-top: 10px;
}

.tr-player-play {
  align-items: center;
  background: var(--tr-player-red);
  border: 0;
  border-radius: 50%;
  box-shadow: 0 7px 16px rgba(254, 0, 0, 0.3);
  color: #fff;
  display: inline-flex;
  height: 42px;
  justify-content: center;
  padding: 0;
  transition: background 0.2s ease, transform 0.2s ease;
  width: 42px;
}

.tr-player-play:hover,
.tr-player-play:focus {
  background: #d90000;
  transform: scale(1.04);
}

.tr-player-play-icon {
  border-bottom: 7px solid transparent;
  border-left: 11px solid currentColor;
  border-top: 7px solid transparent;
  display: block;
  height: 0;
  margin-left: 3px;
  width: 0;
}

.tr-radio-player.is-playing .tr-player-play-icon {
  border: 0;
  height: 15px;
  margin-left: 0;
  position: relative;
  width: 13px;
}

.tr-radio-player.is-playing .tr-player-play-icon::before,
.tr-radio-player.is-playing .tr-player-play-icon::after {
  background: currentColor;
  content: "";
  height: 15px;
  position: absolute;
  top: 0;
  width: 4px;
}

.tr-radio-player.is-playing .tr-player-play-icon::before {
  left: 1px;
}

.tr-radio-player.is-playing .tr-player-play-icon::after {
  right: 1px;
}

.tr-player-volume {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: auto minmax(0, 1fr);
}

.tr-player-volume-label {
  color: var(--tr-player-muted);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.tr-player-volume input[type="range"] {
  accent-color: var(--tr-player-red);
  cursor: pointer;
  height: 24px;
  margin: 0;
  min-width: 0;
  width: 100%;
}

.tr-player-status {
  color: var(--tr-player-muted);
  font-size: 0.66rem;
  line-height: 1.2;
  margin-top: 3px;
  min-height: 0.8rem;
}

.tr-radio-player.is-blocked .tr-player-status {
  color: #ffd166;
}

.tr-radio-player.is-error .tr-player-status {
  color: #ff8d8d;
}

.tr-radio-player.is-retrying .tr-player-status {
  color: #ffd166;
}

.tr-radio-player.is-minimized {
  grid-template-columns: 64px;
  min-height: 64px;
  width: 64px;
}

.tr-radio-player.is-minimized .tr-player-cover-wrap {
  min-height: 64px;
}

.tr-radio-player.is-minimized .tr-player-content {
  display: none;
}

.tr-radio-player.is-minimized .tr-player-live {
  bottom: 7px;
  font-size: 0;
  left: 8px;
}

.tr-radio-player.is-minimized .tr-player-live-dot {
  height: 8px;
  width: 8px;
}

@keyframes trPlayerPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 48, 48, 0.58);
  }

  70% {
    box-shadow: 0 0 0 8px rgba(255, 48, 48, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(255, 48, 48, 0);
  }
}

@media (max-width: 575.98px) {
  .tr-radio-player {
    bottom: 10px;
    grid-template-columns: 86px minmax(0, 1fr);
    left: 10px;
    min-height: 86px;
    width: calc(100vw - 20px);
  }

  .tr-player-cover-wrap {
    min-height: 86px;
  }

  .tr-player-content {
    padding: 12px 12px 10px;
  }

  .tr-player-controls {
    grid-template-columns: 38px minmax(0, 1fr);
    padding-top: 7px;
  }

  .tr-player-play {
    height: 38px;
    width: 38px;
  }

  .tr-player-status {
    font-size: 0.61rem;
  }

  .tr-radio-player.is-minimized {
    grid-template-columns: 58px;
    min-height: 58px;
    width: 58px;
  }

  .tr-radio-player.is-minimized .tr-player-cover-wrap {
    min-height: 58px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tr-radio-player,
  .tr-player-play {
    transition: none;
  }

  .tr-radio-player.is-playing .tr-player-live-dot {
    animation: none;
  }
}
