/* =================================
   Kiddoloodo Printables
   File: printables.css
================================= */


/* =================================
   Download counter
================================= */

.download-count {
    display: inline-block;
    margin-left: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #374151;
    align-self: center;
}


/* =================================
 main
================================= */

.printable-sheet {
    background: #ffffff;
    color: #1f2937;
    border-radius: 22px;
    padding: 22px;
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 10px 30px rgba(0,0,0,0.18);
}

.printable-topbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 14px;
}

.print-btn {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 999px;
    background: #ff7eb3;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    border: none;
    cursor: pointer;
}

.print-btn:hover {
    opacity: 0.92;
}

.sheet-title {
    text-align: center;
    font-size: 2rem;
    margin: 0 0 8px;
    color: #7c3aed;
    line-height: 1.15;
}

.sheet-subtitle {
    text-align: center;
    font-size: 1rem;
    margin: 0 0 16px;
    color: #374151;
}

.name-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    font-weight: 700;
    color: #2563eb;
    font-size: 1rem;
}

.name-line {
    flex: 1;
    border-bottom: 3px dashed #93c5fd;
    height: 18px;
    min-width: 120px;
}

.prompt-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.prompt-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 12px 8px;
    border-radius: 18px;
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.15;
    color: #1f2937;
    min-height: 128px;
}

.prompt-chip:nth-child(1) { background: #fde68a; }
.prompt-chip:nth-child(2) { background: #bfdbfe; }
.prompt-chip:nth-child(3) { background: #fecdd3; }
.prompt-chip:nth-child(4) { background: #c7f9cc; }

.prompt-image {
    width: 88px;
    height: 88px;
    object-fit: contain;
    display: block;
    margin-bottom: 6px;
}

.prompt-text {
    display: block;
    font-size: 0.95rem;
}

.drawing-box {
    position: relative;
    min-height: 410px;
    border: 4px dashed #c084fc;
    border-radius: 24px;
    background: #fffdf8;
    overflow: hidden;
}

.corner-illustration {
    position: absolute;
    object-fit: contain;
    z-index: 1;
}

.corner-top-left {
    top: 6px;
    left: 6px;
    width: 82px;
    height: 150px;
}

.corner-top-right {
    top: 6px;
    right: 6px;
    width: 82px;
    height: 150px;
}

.corner-bottom-left {
    bottom: 6px;
    left: 6px;
    width: 82px;
    height: 150px;
}

.corner-bottom-right {
    bottom: 6px;
    right: 6px;
    width: 82px;
    height: 150px;
}

.draw-here {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    background: #ffffff;
    color: #7c3aed;
    font-weight: 800;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.92rem;
    border: 2px solid #e9d5ff;
    z-index: 2;
}

.bottom-ideas {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.idea-box {
    text-align: center;
    padding: 10px 6px;
    border-radius: 16px;
    background: #f3f4f6;
    font-weight: 700;
    color: #374151;
    line-height: 1.15;
    font-size: 0.88rem;
}

.idea-image {
    width: 74px;
    height: 74px;
    object-fit: contain;
    display: block;
    margin: 0 auto 4px;
}

@media (max-width: 760px) {
    .prompt-row,
    .bottom-ideas {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .drawing-box {
        min-height: 360px;
    }
}

/* ================================
   Print / PDF
================================ */

@page {
    size: A4 portrait;
    margin: 10mm;
}

@media print {
    html,
    body {
        background: #ffffff !important;
        color: #000000 !important;
        margin: 0;
        padding: 0;
        width: auto !important;
        height: auto !important;
        overflow: visible !important;
    }

    body::before,
    body::after,
    .shooting-star,
    .no-print-ui,
    .share-buttons,
    footer,
    .sub-intro,
    .print-page-actions,
    .back-link,
    .print-btn {
        display: none !important;
    }

    .sub-header {
        padding: 0 !important;
        margin: 0 !important;
    }

    .page-title {
        display: none !important;
    }

    .sub-main {
        max-width: none !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .printable-sheet {
        box-shadow: none !important;
        border: none !important;
        border-radius: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        page-break-inside: avoid;
    }

    .printable-topbar {
        display: none !important;
    }

    .sheet-title {
        font-size: 20pt;
        margin: 0 0 4mm;
    }

    .sheet-subtitle {
        font-size: 11pt;
        margin: 0 0 4mm;
    }

    .name-row {
        margin-bottom: 4mm;
        font-size: 10.5pt;
    }

    .prompt-row {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 2.5mm !important;
        margin-bottom: 4mm !important;
        break-inside: avoid;
    }

    .prompt-chip {
        min-height: 29mm !important;
        padding: 2.5mm 1.5mm !important;
        font-size: 9.5pt !important;
        break-inside: avoid;
    }

    .prompt-image {
        width: 21mm !important;
        height: 21mm !important;
        margin-bottom: 1.5mm !important;
    }

    .drawing-box {
        min-height: 122mm !important;
        height: 122mm !important;
        margin: 0 !important;
        break-inside: avoid;
    }

    .corner-top-left,
    .corner-top-right,
    .corner-bottom-left,
    .corner-bottom-right {
        width: 18mm !important;
        height: 34mm !important;
    }

    .draw-here {
        top: 3mm !important;
        font-size: 9pt !important;
        padding: 1.8mm 4mm !important;
    }

    .bottom-ideas {
        display: grid !important;
        grid-template-columns: repeat(5, 1fr) !important;
        gap: 2.5mm !important;
        margin-top: 4mm !important;
        break-inside: avoid;
    }

    .idea-box {
        padding: 2mm 1mm !important;
        font-size: 8.5pt !important;
        break-inside: avoid;
    }

    .idea-image {
        width: 18mm !important;
        height: 18mm !important;
        margin-bottom: 1mm !important;
    }
}

/* when opened in dedicated print window */
body.print-mode .no-print-ui {
    display: none !important;
}