/**
 * Mirrors VideoElement static styles in video-element/src/my-element.ts (scoped for flat HTML preview).
 */

.video-element {
 position: relative;
}

.video-element .media-outer {
  width: 100%;
  position: relative;
  overflow: hidden;
}

.video-element .media-placeholder {
  min-height: 120px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  color: #64748b;
  font-weight: 600;
  font-family: "Inter", sans-serif;
}

.video-element .media-placeholder--empty {
  flex-direction: column;
  gap: 6px;
  text-align: center;
  padding: 16px 12px;
  line-height: 1.35;
}

.video-element .media-placeholder__title {
  font-size: 15px;
  font-weight: 600;
  color: #475569;
}

.video-element .media-placeholder__hint {
  font-size: 13px;
  font-weight: 400;
  color: #64748b;
  max-width: 280px;
}

.video-element .media-error {
  background: #2d3748;
  color: #fff;
}

.video-element .video-element__video {
  transition: filter 0.2s ease;
  width: 100%;
}

.video-element .video-file-wrap {
  position: relative;
  display: block;
  width: 100%;
}

.video-element .video-file-wrap video {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.video-element .video-embed-poster-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: hidden;
  border-radius: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
  width: 100%;
  height: 100%;
}

.video-element .video-embed-poster-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-element .video-embed-poster-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.video-element .video-embed-poster-bg--solid {
  position: absolute;
  inset: 0;
}

.video-element .video-embed-poster-bg-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.video-element .video-embed-poster-layer .video-play-overlay__img {
  position: relative;
  z-index: 1;
  pointer-events: none;
}

.video-element .video-play-overlay {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.video-element .video-play-overlay__img,
.video-element .video-play-overlay__fallback {
  max-width: 22%;
  max-height: 22%;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.35));
}

.video-element .video-embed-shell {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0f172a;
}

.video-element .video-embed-shell iframe,
.video-element .video-embed-iframe {
  width: 100%;
  height: 100%;
  max-width: 100%;
  border: 0;
}

/* Raw oEmbed iframes from Razor need the same fill behavior as builder iframes. */
.video-element .video-embed-shell > iframe,
.video-element .video-embed-shell > .video-embed-iframe {
  position: absolute;
  top: 0;
  left: 0;
}

.video-element .video-embed-shell .rte-embed-holder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  box-sizing: border-box;
}

.video-element .video-embed-shell .rte-embed-holder[data-embed-full-width="true"] {
  padding-bottom: 0;
  height: 100%;
}

.video-element .video-embed-shell .rte-embed-holder iframe,
.video-element .video-embed-shell .rte-embed-holder object,
.video-element .video-embed-shell .rte-embed-holder embed {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-element .loader {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  animation: video-element-spin 1s linear infinite;
}

.video-element .media-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-color: transparent;
  opacity: 1;
  transition: opacity 0.2s ease;
  z-index: 1;
}

video {
  display: block;
  max-width: 100%;
  height: auto;
  width: 100%;
}
.video-element {
  width: 100%;
}

@keyframes video-element-spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}
