/* Custom styles for Coloring Page Studio.
 * Tailwind (CDN) handles the layout utilities; this file holds only the
 * handful of things Tailwind cannot express inline: keyframes, scrollbar
 * chrome, and the print media query that makes a single page print crisp.
 */

body {
    font-family: 'Inter', sans-serif;
}

.spinner {
    border: 3px solid rgba(14, 165, 233, 0.2);
    border-left-color: #0284c7;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    animation: spin 0.8s linear infinite;
}

.spinner-white {
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-left-color: #ffffff;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#historyContainer::-webkit-scrollbar {
    height: 6px;
}
#historyContainer::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 8px;
}
#historyContainer::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 8px;
}
#historyContainer::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Print Media Query for crisp single-page printing.
 * Everything interactive is hidden; only #printArea + #imageOutput survive,
 * centred and scaled to fit one sheet. */
@media print {
    @page {
        margin: 0.5cm;
        size: auto;
    }
    body {
        background: white !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    .no-print {
        display: none !important;
    }
    #printArea {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 100vw;
        height: 95vh;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    #imageOutput {
        display: block !important;
        max-width: 100% !important;
        max-height: 100% !important;
        width: auto !important;
        height: auto !important;
        object-fit: contain !important;
        border: none !important;
        box-shadow: none !important;
    }
}
