/* Ensure videos in rich content are properly displayed */
.rich-content-wrapper video,
.rich-content-wrapper .video-attachment video,
.rich-content-wrapper action-text-attachment video {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1em auto;
}

/* Ensure Action Text attachment styles are applied */
.rich-content-wrapper .attachment {
  display: inline-block;
  position: relative;
  max-width: 100%;
  margin: 1em 0;
}

.rich-content-wrapper .attachment--preview {
  width: 100%;
  text-align: center;
}

/* Video container styling */
.rich-content-wrapper .video-attachment {
  margin: 1em 0;
  text-align: center;
}

.rich-content-wrapper .video-caption {
  font-size: 0.9em;
  color: #666;
  margin-top: 0.5em;
  text-align: center;
}

/* Ensure action-text-attachment elements don't break layout */
.rich-content-wrapper action-text-attachment {
  display: block;
  margin: 1em 0;
}

/* Override any prose class restrictions on videos */
.prose video,
.prose .video-attachment,
.prose action-text-attachment {
  max-width: 100% !important;
  margin-left: auto;
  margin-right: auto;
}

/* Ensure iframe embeds (YouTube, Vimeo, etc.) also work */
.rich-content-wrapper iframe {
  max-width: 100%;
  height: auto;
  aspect-ratio: 16/9;
  margin: 1em auto;
  display: block;
}