/* Styl przycisku na stronie (widoczny dla użytkownika) */
.ml-print-container {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.ml-print-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #f4f4f4;
    color: #333;
    border: 1px solid #ccc;
    padding: 8px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.ml-print-button:hover {
    background-color: #0056b3;
    color: #ffffff;
    border-color: #0056b3;
}

.ml-print-button svg {
    fill: currentColor;
}

/* ===================================================
   REGUŁY DLA DRUKARKI / ZAPISU DO PDF (@media print)
   =================================================== */
@media print {
    /* Ukryj absolutnie wszystko na stronie */
    body * {
        visibility: hidden !important;
    }

    /* Wyświetl tylko kontener posta oraz tytuł i treść */
    body.single .post,
    body.single .post *,
    body.single article,
    body.single article * {
        visibility: visible !important;
    }

    /* Pozycjonowanie treści do druku na samej górze strony */
    body.single .post,
    body.single article {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Ukryj przycisk drukowania na wydruku/PDF */
    .ml-print-container {
        display: none !important;
    }

    /* Ukryj sekcję komentarzy, nawigację wpisów i metadane, jeśli znajdują się w artykule */
    .comments-area,
    .post-navigation,
    .entry-meta,
    .nav-links {
        display: none !important;
    }
}