.bmwdc-remote-video {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #ddd;
  border: 0;
  overflow: hidden;
}

.bmwdc-remote-video.is-blocked {
  z-index: 2;
}

.bmwdc-remote-video__poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bmwdc-remote-video.is-allowed .bmwdc-remote-video__poster {
  display: none;
}

.bmwdc-remote-video__fallback {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  align-content: center;
  gap: 1rem;
  padding: 2rem;
  box-sizing: border-box;
  overflow-y: auto;
  color: #1e1e1e;
  text-align: center;
  background: rgba(255, 255, 255, 0.85);
}

.bmwdc-remote-video__fallback[hidden] {
  display: none;
}

.bmwdc-remote-video__fallback p {
  max-width: 100%;
  margin: 0;
  color: #1e1e1e;
}

/* Keep the interactive elements (neo-button) inside the frame on narrow
   viewports so nothing is clipped by the component's overflow: hidden. */
.bmwdc-remote-video__fallback > :not(p) {
  max-width: 100%;
}

/* Mobile: the 16:9 frame is short, so shrink padding and type to keep the
   consent notice and button fully visible (theme breakpoint: <768px). */
@media (max-width: 767px) {
  .bmwdc-remote-video__fallback {
    gap: 0.75rem;
    padding: 1rem;
  }

  .bmwdc-remote-video__fallback p {
    font-size: 0.95rem !important;
    line-height: 1.35 !important;
  }
}

/* Sync the fallback colours with the header dark/light toggle (.neo-dark
   is applied on #main-wrapper by Drupal.toggleColorScheme). */
.neo-dark .bmwdc-remote-video__fallback {
  color: #fff;
  background: rgba(4, 10, 23, 0.85);
}

.neo-dark .bmwdc-remote-video__fallback p {
  color: #fff;
}

.bmwdc-remote-video__iframe {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}
