/* Small responsive overrides to ensure player and children stay fluid */
.enhanced-player,
.player-main,
.player-visual,
.player-sidebar {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
}

.player-main > * {
  max-width: 100% !important;
}

/* Ensure media elements fill their containers */
#video-player,
#image-player,
.player-visual img,
.player-visual video,
.player-visual iframe {
  width: 100% !important;
  height: auto !important;
  display: block !important;
  object-fit: contain !important;
}

/* Mobile-specific reassurance */
@media (max-width: 480px) {
  .player-main { grid-template-columns: 1fr !important; }
  .player-visual { max-height: 60vh; }
}

/* Center media and provide a responsive video wrapper */
.player-visual img,
.player-visual video,
#image-player,
#video-player,
.player-visual iframe {
  object-position: center !important;
  margin: 0 auto !important;
  max-height: 100% !important;
  vertical-align: middle !important;
}

.video-wrapper {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16/9;
  max-height: 60vh;
  background: #000;
  overflow: hidden;
  margin: 0 auto;
}

.video-wrapper video {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  object-fit: contain !important;
  object-position: center !important;
}

@media (max-width: 480px) {
  .player-visual { display: flex !important; align-items: center !important; justify-content: center !important; }
}

/* Temporary debug outline (comment out when done) */
/* .enhanced-player { outline: 1px dashed rgba(255,0,0,0.12); } */
