/* ── HLS Video Player v1.3 – Frontend Styles ── */
.hlsvp-wrap {
  position: relative;
  width: 100%;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  display: block;
}

.hlsvp-wrap.hlsvp-clickable { cursor: pointer; }

.hlsvp-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  pointer-events: none;
}

/* ── Start overlay (shown when autoplay blocked by browser) ── */
.hlsvp-start-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 30;
  cursor: pointer;
}
.hlsvp-start-btn {
  width: 72px; height: 72px;
  background: rgba(0,0,0,0.65);
  border: 2.5px solid rgba(255,255,255,0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .15s, background .2s;
}
.hlsvp-start-overlay:hover .hlsvp-start-btn {
  transform: scale(1.1);
  background: rgba(0,0,0,0.85);
}
.hlsvp-start-btn svg {
  width: 32px; height: 32px;
  fill: #fff;
  margin-left: 4px;
}

/* ── Center Play button ── */
.hlsvp-play-btn {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 64px; height: 64px;
  background: var(--hlsvp-btn-bg, rgba(0,0,0,0.6));
  border: 2px solid var(--hlsvp-accent, #fff);
  border-radius: 50%;
  cursor: pointer;
  z-index: 20;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, transform .15s;
}
.hlsvp-play-btn:hover {
  background: rgba(0,0,0,0.85);
  transform: translate(-50%, -50%) scale(1.08);
}
.hlsvp-play-btn svg {
  width: 28px; height: 28px;
  fill: var(--hlsvp-accent, #fff);
  pointer-events: none;
}
.hlsvp-play-btn svg.icon-play  { margin-left: 3px; }
.hlsvp-play-btn svg.icon-pause { display: none; }
.hlsvp-play-btn.hlsvp-playing svg.icon-play  { display: none; }
.hlsvp-play-btn.hlsvp-playing svg.icon-pause { display: block; }

/* ── Pause flash (click-to-pause mode) ── */
.hlsvp-pause-flash {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.5);
  width: 64px; height: 64px;
  background: rgba(0,0,0,0.55);
  border: 2px solid rgba(255,255,255,0.8);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  pointer-events: none;
  z-index: 25;
}
.hlsvp-pause-flash svg { width: 28px; height: 28px; fill: #fff; }
.hlsvp-pause-flash.hlsvp-flash-show {
  animation: hlsvpFlash .5s ease-out forwards;
}
@keyframes hlsvpFlash {
  0%   { opacity: 1; transform: translate(-50%,-50%) scale(0.8); }
  60%  { opacity: 1; transform: translate(-50%,-50%) scale(1.1); }
  100% { opacity: 0; transform: translate(-50%,-50%) scale(1.2); }
}

/* ── Mute button ── */
.hlsvp-mute-btn {
  position: absolute;
  width: 40px; height: 40px;
  background: var(--hlsvp-btn-bg, rgba(0,0,0,0.6));
  border: 1.5px solid var(--hlsvp-accent, #fff);
  border-radius: 50%;
  cursor: pointer;
  z-index: 20;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, transform .15s;
}
.hlsvp-mute-btn:hover { background: rgba(0,0,0,0.85); transform: scale(1.1); }
.hlsvp-mute-btn svg {
  width: 20px; height: 20px;
  fill: var(--hlsvp-accent, #fff);
  pointer-events: none;
}
.hlsvp-mute-btn svg.icon-unmuted { display: none; }
.hlsvp-mute-btn.hlsvp-unmuted svg.icon-muted   { display: none; }
.hlsvp-mute-btn.hlsvp-unmuted svg.icon-unmuted { display: block; }

/* ── Bottom progress bar ── */
.hlsvp-bar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  z-index: 15;
}
.hlsvp-progress-wrap {
  flex: 1; cursor: pointer; padding: 6px 0;
}
.hlsvp-progress-bg {
  width: 100%; height: 4px;
  background: rgba(255,255,255,0.3);
  border-radius: 2px; overflow: hidden;
}
.hlsvp-progress-fill {
  height: 100%; width: 0%;
  background: var(--hlsvp-accent, #fff);
  border-radius: 2px;
  transition: width .2s linear;
}
.hlsvp-time {
  color: #fff; font-size: 12px;
  font-family: monospace; white-space: nowrap; opacity: .85;
}
