/* LWG TV — VOD Player Styles */
.vod-player-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  z-index: 9999;
  background: #000;
  display: flex; flex-direction: column;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.vod-player-overlay.hidden { display: none; }
body.vod-player-active { overflow: hidden; }

/* Header */
.vod-player-header {
  display: flex; align-items: center; gap: 16px;
  padding: 12px 20px;
  background: rgba(0,0,0,0.85);
  z-index: 10;
  flex-shrink: 0;
}
.vod-player-back {
  background: none; border: none; color: #fff; font-size: 18px;
  cursor: pointer; padding: 8px 12px; border-radius: 6px;
  transition: background 0.15s;
}
.vod-player-back:hover, .vod-player-back:focus { background: rgba(255,255,255,0.15); }
.vod-player-title {
  color: #fff; font-size: 16px; font-weight: 600;
  flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.vod-player-servers {
  display: flex; gap: 8px; flex-shrink: 0;
}
.vod-server-btn {
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2);
  color: #fff; font-size: 13px; padding: 6px 14px; border-radius: 20px;
  cursor: pointer; transition: all 0.15s; white-space: nowrap;
}
.vod-server-btn:hover, .vod-server-btn:focus {
  background: rgba(255,255,255,0.2); border-color: rgba(255,255,255,0.4);
}
.vod-server-btn.active {
  background: #e50914; border-color: #e50914; font-weight: 600;
}
.vod-server-btn.loading {
  background: rgba(255,194,26,0.2); border-color: #FFC21A; color: #FFC21A;
  animation: pulse 1s infinite;
}
.vod-server-btn.playing {
  background: rgba(22,217,107,0.2); border-color: #16D96B; color: #16D96B;
}
.vod-server-btn.embed {
  background: rgba(7,136,255,0.2); border-color: #0788FF; color: #0788FF;
}
.vod-server-btn.failed {
  background: rgba(255,71,71,0.2); border-color: #FF4747; color: #FF4747;
  opacity: 0.6; cursor: not-allowed;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Status badge */
.vod-player-status-badge {
  font-size: 11px; padding: 3px 10px; border-radius: 12px;
  font-weight: 600; white-space: nowrap; flex-shrink: 0;
}
.vod-player-status-badge.playing {
  background: rgba(22,217,107,0.2); color: #16D96B; border: 1px solid rgba(22,217,107,0.4);
}
.vod-player-status-badge.loading {
  background: rgba(255,194,26,0.2); color: #FFC21A; border: 1px solid rgba(255,194,26,0.4);
  animation: pulse 1s infinite;
}
.vod-player-status-badge.embed {
  background: rgba(7,136,255,0.2); color: #0788FF; border: 1px solid rgba(7,136,255,0.4);
}
.vod-player-status-badge.native {
  background: rgba(22,217,107,0.2); color: #16D96B; border: 1px solid rgba(22,217,107,0.4);
}

/* Player container */
.vod-player-container {
  flex: 1; position: relative; background: #000;
  display: flex; align-items: center; justify-content: center;
}
.vod-player-container iframe {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  border: none;
}

/* Status */
.vod-player-status {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  color: #fff; font-size: 16px; background: rgba(0,0,0,0.7);
  padding: 16px 28px; border-radius: 10px;
  z-index: 5; pointer-events: none;
}

/* Error */
.vod-player-error {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.9); z-index: 20; gap: 16px;
}
.vod-player-error-icon { font-size: 48px; color: #e50914; }
.vod-player-error-text { color: #fff; font-size: 18px; }
.vod-player-error-btn {
  background: #e50914; color: #fff; border: none; padding: 12px 28px;
  border-radius: 8px; font-size: 15px; cursor: pointer; font-weight: 600;
}
.vod-player-error-btn.ghost {
  background: transparent; border: 1px solid rgba(255,255,255,0.3);
}
.vod-player-error-btn:hover { opacity: 0.9; }

/* D-pad focus for TV remote */
.vod-server-btn:focus, .vod-player-back:focus, .vod-player-error-btn:focus {
  outline: 2px solid #e50914; outline-offset: 2px;
}


/* Control de idioma de audio (solo cuando hay varias pistas) */
.vod-player-lang {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 6;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(10, 14, 24, 0.85);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.vod-player-lang.hidden { display: none; }
.vod-player-lang:focus-visible { outline: 2px solid #e50914; outline-offset: 2px; }
