/*
 * Print-only country sheet and coloring page. Loaded only by
 * templates/print/country-print.php and templates/print/country-coloring.php
 * (never on normal page views), and formatted specifically for
 * letter-size printing / "Print to PDF" — see Services\Pdf_Service
 * and Services\Coloring_Page_Service.
 */

* { box-sizing: border-box; }

body {
    font-family: Georgia, "Times New Roman", serif;
    color: #1a1a1a;
    margin: 0;
    background: #fff;
}

.print-sheet__page {
    width: 8.5in;
    min-height: 11in;
    margin: 0 auto;
    padding: 0.6in 0.75in;
}

.print-sheet__print-button {
    display: block;
    margin: 20px auto;
    padding: 10px 20px;
    font-size: 1rem;
    background: #1a5f7a;
    color: #fff;
    border: none;
    border-radius: 6px;
}

.print-sheet__header {
    text-align: center;
    border-bottom: 2px solid #1a5f7a;
    padding-bottom: 16px;
    margin-bottom: 20px;
}

.print-sheet__flag {
    width: 100px;
    height: auto;
    margin: 0 auto 10px;
}

.print-sheet__header h1 {
    margin: 0;
    font-size: 2rem;
}

.print-sheet__tagline {
    color: #555;
    margin: 4px 0 0;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.print-sheet__map img {
    max-width: 100%;
    max-height: 220px;
    display: block;
    margin: 0 auto 20px;
}

.print-sheet__facts dl {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 20px;
    font-size: 0.85rem;
}

.print-sheet__facts dt { font-weight: bold; }
.print-sheet__facts dd { margin: 0 0 6px; }

.print-sheet__summary,
.print-sheet__prayer {
    margin-top: 20px;
    font-size: 0.9rem;
}

.print-sheet__prayer ul { padding-left: 1.2em; }

.print-sheet__source {
    font-size: 0.7rem;
    font-style: italic;
    color: #777;
    margin-top: 8px;
}

.print-sheet__footer {
    margin-top: 30px;
    padding-top: 16px;
    border-top: 1px solid #999;
    display: flex;
    align-items: center;
    gap: 16px;
}

.print-sheet__qr img { width: 80px; height: 80px; }

.print-sheet__footer-text {
    font-size: 0.75rem;
    color: #555;
}

.print-sheet__footer-text p { margin: 0; }

.coloring-page {
    text-align: center;
    border: 5px dashed #1a1a1a;
    border-radius: 28px;
    padding: 0.35in 0.3in;
    /* .print-sheet__page already sets min-height: 11in on this same
       element; stretching as a flex column and letting the map grow
       into whatever's left (instead of only shrink-wrapping content)
       is what makes the frame reach the bottom of the printed page
       instead of leaving a dead white gap under it. */
    display: flex;
    flex-direction: column;
}

/* Shared "bubble letter" treatment: a hollow, thick-outlined word a
   kid can color in themselves, not just the map. A heavy rounded
   system font (no web-font download — see Slide_Service's own
   reasoning for staying local-only) gives the stroke enough room to
   read clearly at coloring-book thickness. color/plain black text is
   the fallback for the rare browser without -webkit-text-stroke
   support; browsers that do support it override to the hollow look. */
.coloring-page__bubble-text {
    font-family: 'Arial Rounded MT Bold', 'Arial Black', Arial, sans-serif;
    font-weight: 900;
    text-transform: uppercase;
    line-height: 1.05;
    letter-spacing: 0.01em;
    margin: 0;
    color: #1a1a1a;
    -webkit-text-fill-color: #fff;
    -webkit-text-stroke: 3px #1a1a1a;
    paint-order: stroke fill;
}

.coloring-page__kicker {
    font-size: 3.4rem;
}

.coloring-page__caption {
    color: #555;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1rem;
    margin: 10px 0 24px;
    padding: 0 0.3in;
}

.coloring-page__art {
    flex: 1 1 auto;
    min-height: 0; /* let a flex item actually shrink to its content in Safari/print engines */
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 12px auto;
}

.coloring-page__art svg {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    display: block;
}

.coloring-page__name {
    -webkit-text-stroke-width: 4px;
    margin-top: 24px;
    overflow-wrap: break-word;
}

.coloring-page__name--xl { font-size: 5.4rem; }
.coloring-page__name--lg { font-size: 4.2rem; }
.coloring-page__name--md { font-size: 3.2rem; }
.coloring-page__name--sm { font-size: 2.4rem; }
.coloring-page__name--xs { font-size: 1.8rem; }

.coloring-page__footer {
    margin-top: 28px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.75rem;
    color: #999;
}

/* The bundled map SVG ships as a solid currentColor silhouette (see
   MAP-SOURCES.md); overriding fill/stroke here — rather than editing
   the SVG files themselves — turns it into line art to color without
   touching the same asset every other map display on the site uses.
   (Sizing for .coloring-page__art svg itself lives with the rest of
   .coloring-page__art above — this is fill/stroke only.) */
.coloring-page__art svg path {
    fill: #fff;
    stroke: #1a1a1a;
    stroke-width: 6;
    stroke-linejoin: round;
}

/* One-off Lebanon coloring page — see
   templates/print/parts/coloring-scene-lebanon.php. Prints a single
   custom illustration supplied by the site owner (already a complete
   coloring page: title, labeled map, decorative border) plus the
   fridge/pray caption, which isn't part of the artwork itself. */

.coloring-page--photo {
    /* The artwork already has its own decorative border baked in —
       this page's usual dashed frame/padding would just double up on
       that, so both are turned off for this variant only. */
    border: none;
    padding: 0.1in 0.05in 0.2in;
}

.coloring-page__custom-image {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 auto;
}

.coloring-page__caption--bottom {
    margin: 12px 0 0;
}

@media print {
    .no-print,
    .print-sheet__print-button {
        display: none !important;
    }

    .print-sheet__page {
        width: auto;
        min-height: 0;
        padding: 0;
    }

    @page {
        size: letter;
        margin: 0.6in 0.75in;
    }
}
