/* ─── Shared (editor + public) ──────────────────────────────────────── */

.lexxy-content action-text-attachment:has(.embed) {
  display: block;
}

.lexxy-content .embed {
  text-align: start;
}

.lexxy-content .embed__play,
.lexxy-content .embed iframe {
  display: block;
  inline-size: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 6px;
  overflow: hidden;
  background: var(--color-black);
}

.lexxy-content .embed__play {
  position: relative;
  text-decoration: none;
}

.lexxy-content .embed__play img {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  max-block-size: none;
  margin: 0;
  object-fit: cover;
}

.lexxy-content .embed__play::after {
  content: "";
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: 50%;
  inline-size: 68px;
  block-size: 48px;
  translate: -50% -50%;
  opacity: 0.85;
  transition: opacity 150ms;
  background: url("/assets/shared/embeds/youtube-play-20fd523b.svg") center / contain no-repeat;
}

.lexxy-content .embed__play:hover::after,
.lexxy-content .embed__play:focus-visible::after {
  opacity: 1;
}

.lexxy-content .embed .attachment__caption {
  text-align: center;
}

/* ─── Editor only ───────────────────────────────────────────────────── */

lexxy-editor .embed__play {
  pointer-events: none;
}

lexxy-editor action-text-attachment:has(.embed) {
  border-radius: var(--lexxy-radius);
}

lexxy-editor .embed {
  padding: 0.75ch;
}
