/* Bricks oEmbed Manager – front-end embed styles */

.boe-embed {
  --boe-ratio: 16/9;
  display: block;
  position: relative;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.boe-embed > * {
  max-width: 100%;
}

/* Responsive iframe wrapper -------------------------------------------- */
.boe-embed .boe-frame {
  position: relative;
  width: 100%;
  aspect-ratio: var(--boe-ratio);
}

.boe-embed.is-responsive .boe-frame > iframe,
.boe-embed.is-responsive .boe-frame > object,
.boe-embed.is-responsive .boe-frame > embed,
.boe-embed.is-responsive .boe-frame > video {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  border: 0;
  display: block;
}

/* Fallback for browsers without aspect-ratio support */
@supports not (aspect-ratio: 16/9) {
  .boe-embed .boe-frame {
    height: 0;
    padding-top: 56.25%;
  }
}

/* Non-responsive embeds keep their own size but never overflow */
.boe-embed:not(.is-responsive) iframe,
.boe-embed:not(.is-responsive) video,
.boe-embed:not(.is-responsive) img {
  max-width: 100%;
  border: 0;
}

/* Images / rich cards -------------------------------------------------- */
.boe-embed img {
  height: auto;
  display: block;
}

.boe-embed blockquote {
  margin: 0;
}

/* Alignment ------------------------------------------------------------ */
.boe-align-left {
  margin-left: 0;
  margin-right: auto;
}

.boe-align-center {
  margin-left: auto;
  margin-right: auto;
}

.boe-align-right {
  margin-left: auto;
  margin-right: 0;
}

/* Loading placeholder used by the link converter ----------------------- */
a[data-boe-state="queued"] {
  opacity: .55;
}

.boe-embed.is-loading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .12), rgba(255, 255, 255, .04));
  animation: boe-shimmer 1.2s infinite;
  pointer-events: none;
}

@keyframes boe-shimmer {
  0% {
    opacity: .3;
  }
  50% {
    opacity: .8;
  }
  100% {
    opacity: .3;
  }
}

/* Builder placeholder (preview disabled) -------------------------------- */
.boe-embed--placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  min-height: 120px;
  aspect-ratio: var(--boe-ratio);
  padding: 16px;
  overflow: hidden;
  text-align: center;
  font-size: 13px;
  line-height: 1.45;
  border: 1px dashed currentColor;
  border-radius: 6px;
  background: rgba(127, 127, 127, .08);
  opacity: .85;
}

.boe-embed--placeholder .boe-placeholder__title {
  font-weight: 700;
}

.boe-embed--placeholder .boe-placeholder__url {
  font-size: 12px;
  word-break: break-all;
  opacity: .75;
}

.boe-embed--placeholder .boe-placeholder__hint {
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  opacity: .6;
}