/**
 * PULSE Player Styles
 * Styles for the pulse-default player and IMA ad container
 */

#pulse-player {
  position: relative;
  width: 100%;
  height: 100%;
  background: #000;
  overflow: hidden;
}

#pulse-player video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#pulse-player video[hidden] {
  display: none;
}

.pulse-player-error {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  background: #000;
  color: #fff;
  text-align: center;
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* IMA Ad Container Styles */
.pulse-ima-ad-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: auto;
  z-index: 1000;
  overflow: hidden;
  display: none;
}

/* Ensure IMA controls are interactive */
.pulse-ima-ad-container div,
.pulse-ima-ad-container button,
.pulse-ima-ad-container a {
  pointer-events: auto !important;
}

/* Video element styles during ad playback */
#pulse-player video {
  transition: pointer-events 0.2s ease;
}

/* Custom Ad Controls */
.pulse-ad-controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: transparent;
  padding: 6px 8px;
  display: none;
  align-items: center;
  gap: 8px;
  z-index: 1001;
}

.pulse-ad-controls button {
  background: none;
  border: none;
  color: #FFD700;
  font-size: 14px;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 2px;
  transition: opacity 0.2s ease;
  min-width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pulse-ad-controls button:hover {
  opacity: 0.8;
}

.pulse-ad-controls button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pulse-ad-controls .pulse-ad-skip {
  background: #FFD700;
  border: none;
  color: #000;
  font-size: 12px;
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 2px;
  font-weight: 500;
}

.pulse-ad-controls .pulse-ad-skip:hover:not(:disabled) {
  background: #FFC107;
}

.pulse-ad-controls .pulse-ad-skip:disabled {
  background: #666;
  color: #999;
  cursor: not-allowed;
}

/* Progress Bar */
.pulse-ad-progress {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.pulse-ad-progress-fill {
  height: 100%;
  background: #FFD700;
  width: 0%;
  transition: width 0.1s linear;
}
