/* Live Stream PIP Styles */

#live-stream-pip {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 320px;
  height: 180px;
  background: #000;
  border: 3px solid #dc3545;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  z-index: 10001;
  overflow: hidden;
  cursor: move;
  display: none;
}

#live-stream-pip.active {
  display: block;
}

#live-stream-pip-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to bottom, rgba(220, 53, 69, 0.95), transparent);
  padding: 8px 10px 8px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 2;
  cursor: move;
  gap: 8px;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

#live-stream-pip-header .pip-title {
  color: white;
  font-size: 0.85rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 5px;
}

#live-stream-pip-header .pip-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  line-height: 1;
  pointer-events: auto;
  padding: 0;
  touch-action: manipulation;
  -webkit-appearance: none;
  appearance: none;
  flex-shrink: 0;
}

#live-stream-pip-header .pip-close:hover,
#live-stream-pip-header .pip-close:active {
  background: rgba(255, 255, 255, 0.3);
}

#live-stream-pip-header .pip-fullscreen {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  line-height: 1;
  pointer-events: auto;
  padding: 0;
  touch-action: manipulation;
  -webkit-appearance: none;
  appearance: none;
  flex-shrink: 0;
}

#live-stream-pip-header .pip-fullscreen:hover,
#live-stream-pip-header .pip-fullscreen:active {
  background: rgba(255, 255, 255, 0.3);
}

#live-stream-pip-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

#live-stream-pip-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 1;
}

#live-stream-pip-loader .spinner-border {
  width: 2rem;
  height: 2rem;
  border-width: 0.25rem;
}

#live-stream-pip-loader p {
  color: white;
  font-size: 0.85rem;
  margin-top: 10px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  #live-stream-pip {
    width: 240px;
    height: 135px;
    bottom: 60px;
    right: 10px;
  }
}

/* Fullscreen Mode */
#live-stream-pip.fullscreen {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  border-radius: 0 !important;
  z-index: 10002 !important;
}

#live-stream-pip.fullscreen #live-stream-pip-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
