/* HQ-32990: blog picture layouts. Linked ONLY by the post pages that use one (see
   lib/blogRender.js usesLayouts), and kept out of site.css on purpose: site.css is linked with a
   content hash on every page, so a rule added there would change the HTML of every page.

   Under 900px the wrappers do nothing: the picture stacks above its text (or the two pictures
   stack), each with the same width and margins as a column picture followed by paragraphs. */

.bp-beside, .bp-row { clear: both; }

@media (min-width: 900px) {
  .bp-beside, .bp-row {
    display: grid;
    align-items: start;
    column-gap: 40px;
    width: min(1200px, calc(100vw - 44px));
    margin: 40px 0 40px 50%;
    transform: translateX(-50%);
  }
  /* The picture takes 58% of the row; the text gets the rest. */
  .bp-beside--left { grid-template-columns: 58fr 42fr; }
  .bp-beside--right { grid-template-columns: 42fr 58fr; }
  .bp-beside--right > .bp-fig { order: 2; }
  .bp-beside--right > .bp-beside-text { order: 1; }
  .bp-row { grid-template-columns: 1fr 1fr; }

  .bp-beside > .bp-fig, .bp-row > .bp-fig { margin-top: 0; margin-bottom: 0; }
  .bp-beside-text > .bp-p:first-child { margin-top: 0; }
}
