/* Shared styles for the floating download button inside templates */

.download-btn-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

#download-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

#download-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

#download-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
}

/* Hide button during PDF generation */
@media print {
    .download-btn-container {
        display: none !important;
    }
}

/* Fix for grey bar and extra page issues during generation */
body.generating-pdf {
    background: white !important;
}

body.generating-pdf #resume-container {
    background: white !important;
    padding: 0 !important;
    margin: 0 !important;
    height: auto !important;
    overflow: visible !important;
    display: block !important;
    /* Force block to avoid flexbox sub-pixel issues */
}

body.generating-pdf .page {
    margin: 0 !important;
    box-shadow: none !important;
    border: none !important;
    /* Removed explicit page-break-after to avoid intermediate empty pages */
}

body.generating-pdf .page:last-child {
    margin-bottom: 0 !important;
}

/* Hide the button container during capture */
body.generating-pdf .download-btn-container {
    display: none !important;
}