/* ================================
   Femdoo — WPUF Writing / Editor
   ================================ */


/* Femdoo – limit TinyMCE inline video preview height to 450px */

.mce-content-body .fd-uwv-inline video,
.mce-content-body .fdwf-inline-preview video {
  max-height: 450px !important;
  height: auto !important;
  width: auto !important;
  max-width: 100% !important;
  object-fit: contain;
}


/* Keep the wrapper from stretching weirdly */

.mce-content-body .fd-uwv-inline,
.mce-content-body .fdwf-inline-preview {
  display: inline-block;
  max-width: 100%;
}



/* ===== Femdoo — WPUF article cover image preview size ===== */

.wpuf-form {
  --fdFeatH: 500px;
}


/* Shrink-wrap the LI so the image doesn’t go full-width */

.wpuf-form .wpuf-attachment-item.thumbnail {
  display: inline-block !important;
  inline-size: max-content !important;
  max-inline-size: min(100%, 999px) !important;
  margin: 5px 0 !important;
  vertical-align: top !important;
}


/* Image uses its real aspect ratio */

.wpuf-form .wpuf-attachment-item.thumbnail img {
  display: block !important;
  max-block-size: var(--fdFeatH) !important;
  inline-size: auto !important;
  max-inline-size: 100% !important;
  aspect-ratio: auto !important;
}



/* Center ONLY the cover-image preview, not the upload button */

.wpuf-form .wpuf-attachment-list.thumbnails {
  text-align: center !important;
  padding-left: 0 !important;
}


/* Keep the upload wrapper normal so the button stays left */

.wpuf-form .wpuf-attachment-upload-filelist {
  text-align: left !important;
}


/* Default help text before upload */

.wpuf-form .wpuf-fields span.wpuf-help {
  display: block;
  text-align: left;
  margin: 4px 0 0;
  width: auto;
}


/* When the featured image field has a thumbnail,
   center the help text and make it move with the image */

.wpuf-form .wpuf-fields:has(
  [id^="wpuf-featured_image-"][id$="-upload-container"]
  .wpuf-attachment-item.thumbnail
) span.wpuf-help {
  width: max-content !important;
  max-width: 100% !important;
  margin: 4px auto 0 !important;
  text-align: center !important;
}



/* Round the big WPUF featured-image preview */

.wpuf-attachment-item.thumbnail {
  border-radius: 12px;
  overflow: hidden;
}

.wpuf-attachment-item.thumbnail img {
  border-radius: 12px;
}



/* Hide the small Femdoo article featured-image preview */

.femdoo-article-feimg-preview,
.femdoo-article-feimg-preview img {
  display: none !important;
}