/* =============================================================================
   Badge Layout: Epson ColorWorks — Fanfold 4" × 6" (Single-sided)
   layout code:  badge_4x6_fanfold
   Badge stock:  4in wide × 6in per label, single-sided continuous fanfold
   Used for:     Axonius Adapt 2026 (June 2026)

   Physical notes (measured 2026-05-15):
     Overall:     4.0in × 6.0in (portrait)
     Lanyard hole: 5/8in wide × 1/8in tall, centered horizontally,
                   1/4in from top edge, 3/8in from each side edge.
     Keep decorative header content below the hole zone (~3/8in from top).

   Print behavior:
     Single-sided only. Set duplex=0 on the template — the badge_back section
     will not render at all. @page size (4in × 6in) is injected dynamically
     by print/+page.svelte <svelte:head> based on the layout field.

   CSS scope:
     All rules scoped under [data-layout="badge_4x6_fanfold"] to avoid conflicts
     with other layouts compiled into the same bundle. These override the
     Tailwind utility classes (w-[4in], min-h-[6.0in], etc.) hardcoded on the
     badge sections — attribute + class selectors win over single class selectors.
   ============================================================================= */

/* --- Badge front --- */

[data-layout='badge_4x6_fanfold'] .badge_front {
    min-width: 4in;
    width: 4in;
    min-height: 6in;
    max-height: 6in;

    /* debug */
    /* outline: thick solid orange; */
}

/*
 * Header image zone: 624×232px at full 4in badge width → natural height ≈ 1.49in.
 * Override Tailwind's max-h-[1.00in] to avoid cropping the bottom of the image.
 * min-h-[.50in] from the component HTML is fine; leave it in place.
 */
[data-layout='badge_4x6_fanfold'] .badge_header {
    max-height: 1.5in;
}

/*
 * Body area: 6in total − 1.5in header − 0.5in footer = 4.0in for name/title/affiliations.
 *
 * margin-top: 0 overrides the component-level mt-54 (≈2.25in). That margin was added
 * for the PVC badge layout (badge_3.5x5.5_pvc) where a full-bleed background_image_path
 * was used — the body needed to start below the background image's logo zone. For
 * fanfold badges with a standalone header_path image and no background, mt-54 creates
 * a large blank gap between the header and the attendee name.
 */
[data-layout='badge_4x6_fanfold'] .badge_body {
    margin-top: 0;
    max-height: 4.0in;
}

/* Outer wrapper: strip the default padding/gap so the outline hugs the badge.
   badge_front above supplies the exact 4×6in card size. */
[data-layout='badge_4x6_fanfold'].event_badge_wrapper {
    padding: 0;
    gap: 0;
    min-height: 0;
    min-width: 4in;
    width: 4in;
    max-width: 4in;
}

@media print {
    [data-layout='badge_4x6_fanfold'].event_badge_wrapper {
        width: 4in !important;
        height: 6in !important;
        max-width: 4in !important;
        max-height: 6in !important;
        /* overflow: visible so any intentional bleed element is not clipped by the
           wrapper — the Epson driver clips at the physical label edge. */
        overflow: visible !important;
    }
}
