/* ersy mini player — Spotify-style compact bar */

:root {
  --bar-h: 64px;
  --bar-radius: 12px;
  --bar-inset: 10px;
  --bar-magenta: #ff2d6f;
  --bar-magenta-soft: rgba(255, 45, 111, 0.35);
}

.player-dock {
  display: contents;
}

.bar,
.bar.ersy-playbar,
.vh.audio .vh-box {
  position: fixed;
  left: var(--bar-inset) !important;
  right: var(--bar-inset) !important;
  bottom: calc(var(--bar-inset) + env(safe-area-inset-bottom, 0px)) !important;
  top: auto !important;
  transform: none !important;
  z-index: 60;
  width: auto !important;
  min-height: var(--bar-h);
  height: var(--bar-h) !important;
  padding: 8px 10px 10px !important;
  display: grid;
  align-items: center;
  background: #1a1520 !important;
  border: 0 !important;
  border-radius: var(--bar-radius) !important;
  box-shadow: none !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  overflow: hidden;
  cursor: pointer;
}

.bar-tint {
  display: none;
}

.bar::after,
.vh.audio .vh-box::after {
  display: none;
}

.bar-main,
.vh.audio .vh-grip {
  position: relative;
  z-index: 2;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  height: 100%;
  min-width: 0;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.bar-left,
.vh.audio .vh-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.bar-center {
  display: none;
}

.bar-right,
.vh.audio .vh-controls {
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  flex: none;
  min-width: 0;
}

.bar button,
.bar input,
.vh.audio .vh-btn,
.vh.audio .vh-play-main,
.vh.audio .vh-seek,
.vh.audio input,
.vh.audio .vh-meta {
  cursor: pointer;
}

.bar .disc,
.bar .disc img,
.vh.audio .vh-meta img {
  width: 44px !important;
  height: 44px !important;
  flex: none;
  border-radius: 6px !important;
  object-fit: cover;
  object-position: center 20%;
  background: #1a1524;
  display: block;
}

.bar .disc {
  border: 0;
  background: transparent;
  padding: 0;
}

.bar .disc.spin img,
.bar .disc i {
  animation: none;
  border-radius: 6px !important;
}

.bar .disc i {
  display: none;
}

.bar-meta,
.bar-meta-btn,
.vh.audio .vh-text {
  min-width: 0;
  display: grid;
  gap: 2px;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  font: inherit;
  padding: 0;
  cursor: pointer;
}

.bar-meta strong,
.vh.audio .vh-text strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  mask-image: none;
  -webkit-mask-image: none;
}

.bar-meta span,
.vh.audio .vh-kind,
.vh.audio .vh-text em {
  display: block;
  font-size: 12px;
  font-weight: 500;
  font-style: normal;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.72);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-ico,
.bar-play,
.vh.audio .vh-btn,
.vh.audio .vh-play-main {
  width: 36px !important;
  height: 36px !important;
  border: 0;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  padding: 0;
  color: #fff !important;
  background: transparent !important;
  box-shadow: none !important;
  filter: none !important;
  transform: none !important;
  position: relative;
  flex: none;
}

.vh.audio .vh-btn::after,
.vh.audio .vh-play-main::after {
  display: none !important;
}

.bar-ico:hover,
.bar-play:hover,
.vh.audio .vh-btn:hover,
.vh.audio .vh-play-main:hover {
  background: rgba(255, 255, 255, 0.08) !important;
}

.bar-ico .yt-svg,
.bar-play .yt-svg,
.vh.audio .vh-btn .yt-svg,
.vh.audio .vh-play-main svg {
  width: 20px;
  height: 20px;
}

.bar-save {
  width: 28px !important;
  height: 28px !important;
  margin: 0 2px;
  border: 1.5px solid rgba(255, 255, 255, 0.88) !important;
  border-radius: 50%;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  color: #fff !important;
}

.bar-save.on {
  border-color: #fff !important;
  color: #fff !important;
}

.bar-save.on::after,
.bar-ico.on::after {
  display: none;
}

.bar-ico.on,
.vh.audio .vh-btn.on {
  color: #ff2d6f !important;
}

.bar-progress,
.bar .bar-progress.seek,
.vh.audio .vh-seekrow {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 4px;
  z-index: 3;
  height: 2px;
  display: block !important;
  margin: 0;
  padding: 0;
  width: auto;
}

.bar-progress.seek,
.vh.audio .vh-seek {
  height: 2px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.28);
  cursor: pointer;
  overflow: hidden;
  flex: none;
}

.bar-progress i,
.vh.audio .vh-seek i {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: 99px;
  background: #fff;
  display: block;
  box-shadow: none;
}

.bar-progress i::after,
.vh.audio .vh-seek i::after,
.bar-seek,
.bar .time,
.vh.audio .vh-time {
  display: none !important;
}

.bar-vol,
.bar-transport {
  display: none !important;
}

.bar-device-wrap {
  position: relative;
}

.bar-dot {
  position: absolute;
  right: 6px;
  top: 6px;
  width: 6px;
  height: 6px;
  margin: 0;
  border-radius: 50%;
  background: var(--bar-magenta);
}

.device-pop {
  position: absolute;
  right: 0;
  bottom: calc(100% + 14px);
  width: min(320px, calc(100vw - 24px));
  padding: 14px;
  border-radius: 16px;
  background: #1a1524;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
  display: grid;
  gap: 8px;
  z-index: 70;
}

.device-pop-fixed {
  position: fixed;
  right: calc(var(--bar-inset) + 8px);
  bottom: calc(var(--bar-h) + var(--bar-inset) + 14px);
  z-index: 80;
}

.device-pop > strong {
  font-size: 13px;
  font-weight: 700;
  padding: 2px 6px 8px;
}

.device-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 10px 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #fff;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.device-row:hover {
  background: rgba(255, 255, 255, 0.08);
}

.device-row.on {
  color: var(--bar-magenta);
}

.device-row span:first-child {
  display: grid;
  place-items: center;
}

.device-row b {
  display: block;
  font-size: 13px;
  font-weight: 650;
}

.device-row em {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-style: normal;
  color: #b3b3b3;
}

.device-note {
  margin: 4px 6px 0;
  font-size: 11px;
  line-height: 1.4;
  color: #a7a7a7;
}

/* Video collapsed into the same mini bar */
.vh.audio {
  pointer-events: none;
}

.vh.audio .vh-box {
  width: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
  padding: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  pointer-events: none !important;
}

.vh.audio .vh-now-head,
.vh.audio .vh-stage,
.vh.audio .vh-dots,
.vh.audio .vh-resize,
.vh.audio .vh-art,
.vh.audio .vh-transport,
.vh.audio .vh-controls,
.vh.audio .vh-grip,
.vh.audio [data-vh-min] {
  display: none !important;
}

.vh.audio iframe {
  position: fixed !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
  bottom: 0;
  left: 0;
}

.vh.audio .vh-controls [data-vh-max] {
  display: grid !important;
  place-items: center;
  color: #fff !important;
}

.vh.audio .vh-center {
  display: contents;
}

.vh.audio .vh-meta {
  grid-area: unset;
  margin: 0 !important;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  padding: 0;
}

.vh.audio .vh-meta {
  order: 1;
  flex: 1;
  min-width: 0;
}

.vh.audio .vh-controls {
  order: 2;
}

.vh.audio .vh-transport {
  order: 3;
  display: flex !important;
  align-items: center;
  margin: 0;
  gap: 0;
}

.vh.audio .vh-seekrow {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 4px;
  width: auto;
  margin: 0;
  padding: 0;
  display: block !important;
  z-index: 3;
}
