/* Floral Foam Installations — guide-specific print overrides
   All shared styles live in ../guide.css */

/* This guide needs SCALE=0.94 when regenerating (not the 0.97 default) —
   dense front page (arrangement-type text + general tips + 2-step prep).
   node generate-pdf.js ../floral-foam-installations/floral-foam-installations.html 0.94 --cmyk */

.illustration-wrapper--with-overlay { max-width: 180px; }

@media print {
  /* Inspiration image sits in a 1-of-3 grid column — fill it fully */
  .illustration--inspiration { max-width: 100%; }

  .guide-page--front .guide-page__content { gap: 0.3rem; }
  .guide-page--front .guide-section { padding-top: 0.2rem; }
  .guide-page--front .guide-page__tagline { padding-top: 0.25rem; font-size: 0.78rem; }
  .guide-page--front .guide-section__intro { font-size: 0.72rem; margin-bottom: 0.28rem; line-height: 1.32; }
  /* Column gap stays at the shared 1.5rem and margin-left at the shared 1.1rem:
     `list-style: disc` paints the ::marker OUTSIDE the li content box, so the
     right column's bullet reaches back into the gutter. Narrowing either value
     (this guide previously used 1rem / 0.85rem) lands that bullet on top of the
     left column's last word. Only the row gap is tightened for density. */
  .guide-page--front .guide-section__list--grid-2 { margin: 0.12rem 0 0.12rem 1.1rem; gap: 0.08rem 1.5rem; }
  .guide-page--front .guide-section__list li { font-size: 0.72rem; line-height: 1.3; }
  .guide-page--front .text-columns--2 { gap: 0.6rem; }
  .guide-page--front .materials__grid { gap: 0.12rem 0.22rem; }
  .guide-page--front .material-pill { font-size: 0.63rem; padding: 0.06rem 0.38rem; }
  .guide-page--front .step-grid { gap: 0.8rem; }
  .guide-page--front .step__text { font-size: 0.74rem; line-height: 1.32; }

  /* "Consider Your Arrangement Type" reads squished against the images below
     it — give it a touch more breathing room */
  #type-title ~ .guide-section__intro,
  #type-title ~ .text-columns--2 .guide-section__intro { font-size: 0.74rem; line-height: 1.36; margin-bottom: 0.3rem; }
  /* `gap` here must stay two-value. As a single value it is shorthand for BOTH
     axes, which collapsed the column gutter to 0.1rem — and because this
     selector carries an ID it outranks the .guide-section__list--grid-2 rule
     above, so that rule's 1.5rem never applied. */
  #type-title ~ .guide-section__list { margin: 0.2rem 0 0.18rem 1.1rem; gap: 0.1rem 1.5rem; }
  #type-title ~ .guide-section__list li { font-size: 0.74rem; line-height: 1.34; }

  .guide-page--back .guide-page__content  { gap: 0.5rem; }
  .guide-page--back .flower-grid          { gap: 0.45rem; }
  .guide-page--back .flower-tip           { font-size: 0.76rem; line-height: 1.4; }
  .guide-page--back .flower-tip--numbered { gap: 0.35rem; }
  .guide-page--back .flower-care          { padding-top: 0.4rem; }

  /* min-height nudges each row taller so its image flex-fills the leftover
     page space instead of collapsing to a thumbnail — tuned to the max that
     still holds a 2-page total at SCALE=0.94. */
  .guide-page--front .step-grid > .step { min-height: 285px; }
  .guide-page--back .flower-grid > .flower-tip--numbered { min-height: 390px; }

  /* max-height MUST match max-width. With aspect-ratio 1/1 the flex context
     otherwise stretches this box taller than it is wide; object-fit:contain
     then letterboxes the square artwork inside it, and the shared 6px rounding
     clips that empty space rather than the visible image edge — which is what
     left every tile on this guide with square corners. */
  .guide-page--front .step-grid .illustration-wrapper {
    flex: 1 1 0;
    min-height: 0;
    aspect-ratio: 1 / 1;
    height: 100%;
    width: auto;
    max-width: 240px;
    max-height: 240px;
    margin: 0 auto;
    display: flex;
  }
  .guide-page--back .flower-grid .illustration-wrapper {
    flex: 1 1 0;
    min-height: 0;
    aspect-ratio: 1 / 1;
    height: 100%;
    width: auto;
    max-width: 220px;
    max-height: 220px;
    margin: 0 auto;
    display: flex;
  }
  .guide-page--front .step-grid .illustration-wrapper .illustration,
  .guide-page--back .flower-grid .illustration-wrapper .illustration {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
  }

  .tips-callout__text--oneline { white-space: nowrap; }
}
