.radioflow-player {
  --rfp-bg: #111827;
  --rfp-text: #ffffff;
  --rfp-primary: #ffffff;
  --rfp-accent: #e11d48;
  --rfp-bottom: 0px;
  --rfp-vis-height: 58px;
  --rfp-low: #ff365e;
  --rfp-mid: #8b5cf6;
  --rfp-high: #22d3ee;
  --rfp-vis-opacity: .74;
  box-sizing: border-box;
  color: var(--rfp-text);
  font-family: inherit;
  z-index: 99999;
}

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

.radioflow-player--sticky {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(16px + var(--rfp-bottom));
}

.radioflow-player--inline {
  width: 100%;
  max-width: 760px;
  margin: 18px 0;
}

.radioflow-player__inner {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 76px;
  padding: 12px 16px;
  border-radius: 22px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--rfp-bg) 94%, #ffffff 6%), var(--rfp-bg));
  box-shadow: 0 18px 50px rgba(0, 0, 0, .28);
  border: 1px solid rgba(255, 255, 255, .12);
  backdrop-filter: blur(12px);
}

.radioflow-player__canvas {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 1;
  width: 100%;
  height: var(--rfp-vis-height);
  opacity: .82;
  pointer-events: none;
  mix-blend-mode: screen;
}

.radioflow-player__content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
}

.radioflow-player__button {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border: 0;
  border-radius: 999px;
  background: var(--rfp-accent);
  color: var(--rfp-primary);
  cursor: pointer;
  box-shadow: 0 10px 24px color-mix(in srgb, var(--rfp-accent) 36%, transparent);
  transition: transform .18s ease, filter .18s ease;
}

.radioflow-player__button:hover,
.radioflow-player__button:focus-visible {
  transform: translateY(-1px) scale(1.03);
  filter: brightness(1.08);
  outline: none;
}

.radioflow-player__icon--play {
  width: 0;
  height: 0;
  margin-left: 4px;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  border-left: 18px solid currentColor;
}

.radioflow-player.is-playing .radioflow-player__icon--play {
  width: 18px;
  height: 22px;
  margin-left: 0;
  border: 0;
  position: relative;
}

.radioflow-player.is-playing .radioflow-player__icon--play::before,
.radioflow-player.is-playing .radioflow-player__icon--play::after {
  content: '';
  position: absolute;
  top: 0;
  width: 6px;
  height: 22px;
  border-radius: 4px;
  background: currentColor;
}

.radioflow-player.is-playing .radioflow-player__icon--play::before { left: 0; }
.radioflow-player.is-playing .radioflow-player__icon--play::after { right: 0; }

.radioflow-player__logo {
  display: inline-grid;
  place-items: center;
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, .12);
  color: var(--rfp-primary);
  font-size: 22px;
  font-weight: 800;
}

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

.radioflow-player__meta {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.radioflow-player__title {
  color: var(--rfp-primary);
  font-size: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .38);
}

.radioflow-player__status {
  margin-top: 4px;
  color: color-mix(in srgb, var(--rfp-text) 78%, transparent);
  font-size: 13px;
}

.radioflow-player__message {
  margin-top: 3px;
  color: color-mix(in srgb, var(--rfp-text) 70%, transparent);
  font-size: 12px;
}

.radioflow-player__volume {
  width: 120px;
  flex: 0 0 120px;
  display: flex;
  align-items: center;
}

.radioflow-player__volume input {
  width: 100%;
  accent-color: var(--rfp-accent);
}

.radioflow-player audio { display: none; }

@media (max-width: 640px) {
  .radioflow-player--sticky {
    left: 8px;
    right: 8px;
    bottom: calc(8px + var(--rfp-bottom));
  }

  .radioflow-player__inner {
    min-height: 70px;
    border-radius: 18px;
    padding: 10px;
  }

  .radioflow-player__content { gap: 10px; }

  .radioflow-player__button {
    width: 46px;
    height: 46px;
    flex-basis: 46px;
  }

  .radioflow-player__logo {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }

  .radioflow-player__volume {
    width: 78px;
    flex-basis: 78px;
  }
}

/* v3.5.0: background visualizer + safe footer spacing */
body.radioflow-player-safe-padding {
  padding-bottom: var(--radioflow-player-safe-bottom, 0px) !important;
}

.radioflow-player__inner {
  isolation: isolate;
  background: transparent;
  -webkit-backdrop-filter: blur(var(--rfp-blur));
  backdrop-filter: blur(var(--rfp-blur));
}

.radioflow-player__inner::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at 18% 10%, color-mix(in srgb, var(--rfp-accent) 28%, transparent), transparent 42%),
    linear-gradient(135deg, color-mix(in srgb, var(--rfp-bg) 94%, #ffffff 6%), var(--rfp-bg));
  opacity: var(--rfp-opacity);
  pointer-events: none;
}

.radioflow-player__canvas {
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  opacity: var(--rfp-vis-opacity);
  border-radius: inherit;
  mix-blend-mode: screen;
}

.radioflow-player__content {
  z-index: 2;
}

/* v3.6.1: hide/show sticky player toggle */
.radioflow-player--sticky {
  transition: transform .42s cubic-bezier(.22, 1, .36, 1), opacity .32s ease;
  will-change: transform;
}

.radioflow-player--sticky.is-hidden {
  transform: translateY(calc(100% + 18px));
  opacity: .98;
}

.radioflow-player__toggle {
  position: absolute;
  right: 18px;
  top: -18px;
  z-index: 4;
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 34px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px 999px 0 0;
  background: color-mix(in srgb, var(--rfp-bg) 82%, transparent);
  color: var(--rfp-primary);
  cursor: pointer;
  box-shadow: 0 -8px 24px rgba(0,0,0,.18);
  -webkit-backdrop-filter: blur(var(--rfp-blur));
  backdrop-filter: blur(var(--rfp-blur));
  transition: transform .24s ease, filter .24s ease, background .24s ease;
}

.radioflow-player__toggle:hover,
.radioflow-player__toggle:focus-visible {
  transform: translateY(-2px);
  filter: brightness(1.12);
  outline: none;
}

.radioflow-player__toggle-icon {
  position: relative;
  display: block;
  width: 14px;
  height: 14px;
  transform: translateY(2px) rotate(45deg);
  border-left: 2px solid currentColor;
  border-top: 2px solid currentColor;
  transition: transform .28s ease;
}

.radioflow-player--sticky.is-hidden .radioflow-player__toggle {
  top: -46px;
  border-radius: 999px;
  width: 48px;
  height: 42px;
  background: color-mix(in srgb, var(--rfp-bg) 88%, transparent);
}

.radioflow-player--sticky.is-hidden .radioflow-player__toggle-icon {
  transform: translateY(-2px) rotate(225deg);
}

@media (max-width: 640px) {
  .radioflow-player__toggle {
    right: 14px;
    top: -16px;
    width: 40px;
    height: 32px;
  }

  .radioflow-player--sticky.is-hidden .radioflow-player__toggle {
    top: -44px;
  }
}

/* v3.8.1: persistent iframe UI fix + stronger play button isolation */
.radioflow-player .radioflow-player__button {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 52px !important;
  min-width: 52px !important;
  max-width: 52px !important;
  height: 52px !important;
  min-height: 52px !important;
  max-height: 52px !important;
  padding: 0 !important;
  margin: 0 !important;
  line-height: 1 !important;
  text-align: center !important;
  text-decoration: none !important;
  overflow: hidden;
}
.radioflow-player .radioflow-player__button .radioflow-player__icon {
  display: block;
  flex: 0 0 auto;
  pointer-events: none;
}
.radioflow-player.is-playing .radioflow-player__button .radioflow-player__icon--play { display: block; }
.radioflow-player.is-playing .radioflow-player__button .radioflow-player__icon--play::before,
.radioflow-player.is-playing .radioflow-player__button .radioflow-player__icon--play::after { display: block; }
@media (max-width: 640px) {
  .radioflow-player .radioflow-player__button {
    width: 46px !important;
    min-width: 46px !important;
    max-width: 46px !important;
    height: 46px !important;
    min-height: 46px !important;
    max-height: 46px !important;
  }
}

/* v3.9.0: metadata tipo app + polished compact UI */
.radioflow-player__station {
  display: block;
  margin-bottom: 2px;
  color: color-mix(in srgb, var(--rfp-text) 62%, transparent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1.1;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.radioflow-player__artist {
  display: block;
  margin-top: 3px;
  color: color-mix(in srgb, var(--rfp-text) 82%, transparent);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.radioflow-player__artist:empty,
.radioflow-player__artist[hidden] { display: none; }

.radioflow-player__title.is-updating {
  animation: radioflowMetaIn .42s ease both;
}

@keyframes radioflowMetaIn {
  from { opacity: .35; transform: translateY(4px); filter: blur(2px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

.radioflow-player__logo {
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), 0 12px 28px rgba(0,0,0,.18);
}

.radioflow-player__logo.has-cover-art img {
  transform: scale(1.01);
}

.radioflow-player__inner {
  box-shadow: 0 22px 65px rgba(0,0,0,.32), inset 0 1px 0 rgba(255,255,255,.08);
}

.radioflow-player__inner::after {
  content: '';
  position: absolute;
  inset: 1px 1px auto 1px;
  height: 48%;
  z-index: 1;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,.10), transparent);
  pointer-events: none;
}

.radioflow-player__content { z-index: 3; }

@media (max-width: 640px) {
  .radioflow-player__station { font-size: 10px; }
  .radioflow-player__title { font-size: 14px; }
  .radioflow-player__artist,
  .radioflow-player__status { font-size: 12px; }
}
