/* broadcast-player.css — shared Netflix-style live broadcast player */

.bp-container {
  position: relative;
  aspect-ratio: 16 / 9;
  max-height: 80vh;
  background: #000;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

.bp-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Mute indicator — top-left circle */
.bp-mute-indicator {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 0, 0, .6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4;
  transition: opacity .3s ease;
  pointer-events: none;
}

.bp-mute-indicator svg {
  width: 20px;
  height: 20px;
  fill: #fff;
}

.bp-mute-indicator.bp-hidden {
  opacity: 0;
}

/* Live badge — top-right, red pulse */
.bp-live-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(230, 57, 70, .9);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #fff;
  letter-spacing: .04em;
  z-index: 4;
  pointer-events: none;
}

.bp-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  animation: bp-pulse 1.5s ease-in-out infinite;
}

@keyframes bp-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .3; }
}

/* Quality badge — top-right, left of live badge */
.bp-quality-badge {
  position: absolute;
  top: 12px;
  right: 72px;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(0, 0, 0, .6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-size: .6rem;
  font-weight: 600;
  color: #fff;
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s ease;
}

.bp-container.bp-controls-visible .bp-quality-badge {
  opacity: 1;
}

/* Bottom gradient — ONLY with controls */
.bp-gradient {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .6));
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s ease;
}

.bp-container.bp-controls-visible .bp-gradient {
  opacity: 1;
}

/* Controls bar */
.bp-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px;
  background: rgba(0, 0, 0, .4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 3;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .3s ease, transform .3s ease;
}

.bp-container.bp-controls-visible .bp-controls {
  opacity: 1;
  transform: translateY(0);
}

.bp-controls-left,
.bp-controls-right {
  display: flex;
  align-items: center;
  gap: 2px;
}

/* Buttons */
.bp-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background .15s ease;
}

.bp-btn:hover {
  background: rgba(255, 255, 255, .12);
}

.bp-btn svg {
  width: 20px;
  height: 20px;
  fill: #fff;
}

/* Volume wrapper — expandable */
.bp-volume-wrap {
  display: flex;
  align-items: center;
  width: 36px;
  overflow: hidden;
  transition: width .25s ease;
}

.bp-volume-wrap:hover {
  width: 110px;
}

.bp-volume-range {
  width: 70px;
  height: 3px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, .3);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  margin-left: 2px;
  opacity: 0;
  transition: opacity .2s ease;
}

.bp-volume-wrap:hover .bp-volume-range {
  opacity: 1;
}

.bp-volume-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}

.bp-volume-range::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  border: none;
  cursor: pointer;
}

.bp-volume-range::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 2px;
}

.bp-volume-range::-moz-range-track {
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, .3);
}

/* Loading spinner */
.bp-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s ease;
}

.bp-loading.bp-active {
  opacity: 1;
}

.bp-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid transparent;
  border-top-color: #fff;
  border-radius: 50%;
  animation: bp-spin .8s linear infinite;
}

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

/* Fullscreen: remove max-height */
.bp-container:fullscreen,
.bp-container:-webkit-full-screen {
  max-height: none;
}

/* Mobile */
@media (max-width: 600px) {
  .bp-mute-indicator {
    width: 32px;
    height: 32px;
    top: 8px;
    left: 8px;
  }

  .bp-mute-indicator svg {
    width: 16px;
    height: 16px;
  }

  .bp-live-badge {
    top: 8px;
    right: 8px;
    font-size: .58rem;
    padding: 3px 6px;
  }

  .bp-quality-badge {
    top: 8px;
    right: 60px;
    font-size: .55rem;
  }

  .bp-btn {
    width: 32px;
    height: 32px;
  }

  .bp-btn svg {
    width: 18px;
    height: 18px;
  }

  /* Hide volume slider on mobile — tap mute button to toggle */
  .bp-volume-wrap {
    width: 32px;
  }

  .bp-volume-wrap:hover {
    width: 32px;
  }

  .bp-volume-range {
    display: none;
  }

  .bp-spinner {
    width: 32px;
    height: 32px;
  }
}
