/* Blocks only the blog admin's editor produces — galleries, floated images,
   in-article forms, its video wrapper. Everything else (text, tables, code,
   captions) is styled in css/post.css, shared with the static copies. */

/* Video (the editor writes .video-embed-wrapper; imported posts also carry
   .post-video, which post.css already sizes the same way). */
.post-body .video-embed-wrapper{position:relative;aspect-ratio:16/9;margin:1.9rem 0;border-radius:14px;overflow:hidden;background:#000}
.post-body .video-embed-wrapper iframe{position:absolute;inset:0;width:100%;height:100%;border:0}

/* Galleries */
.post-body .image-gallery,
.post-body .video-gallery{display:grid;grid-template-columns:repeat(var(--gallery-cols,3),minmax(0,1fr));gap:.75rem;margin:1.5rem 0;clear:both}
.post-body .image-gallery img{margin:0;width:100%;aspect-ratio:1/1;object-fit:cover}
.post-body .image-gallery--masonry{display:block;columns:var(--gallery-cols,3);column-gap:.75rem}
.post-body .image-gallery--masonry img{aspect-ratio:auto;margin:0 0 .75rem;break-inside:avoid}
.post-body .image-gallery--carousel{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch}
.post-body .image-gallery--carousel img{flex:0 0 70%;aspect-ratio:16/9;scroll-snap-align:start}
.post-body .video-gallery .video-embed-wrapper{margin:0}

/* Images placed left / right / centre in the editor */
.post-body img[data-align="left"]{float:left;max-width:50%;margin:.25rem 1.25rem .75rem 0}
.post-body img[data-align="right"]{float:right;max-width:50%;margin:.25rem 0 .75rem 1.25rem}
.post-body img[data-align="center"]{display:block;margin-left:auto;margin-right:auto}
.post-body::after{content:"";display:block;clear:both}

/* A form placed inside the article — filled in by js/post-embeds.js. Empty
   until then, and removed if its form is switched off. */
.post-body .ghl-form-embed{margin:1.5rem 0;clear:both}
.post-body .ghl-form-embed:empty{display:none}

@media (max-width:575.98px){
  .post-body .image-gallery,.post-body .video-gallery{grid-template-columns:repeat(2,minmax(0,1fr))}
  .post-body .image-gallery--masonry{columns:2}
  .post-body img[data-align="left"],.post-body img[data-align="right"]{float:none;max-width:100%;margin:1rem 0}
}
