/* 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 {
    /* 1. Ukryj absolutnie wszystko w dokumencie HTML */
    body, body * {
        visibility: hidden !important;
        height: auto !important;
        max-height: none !important;
    }

    /* 2. Odkryj tylko główny obszar wpisu (tytuł + treść) */
    .post,
    .entry-content,
    .entry-content *,
    .entry-title,
    article,
    article * {
        visibility: visible !important;
    }

    /* 3. Wyrzuć kontener artykułu na samą górę strony i wyzeruj marginesy szablonu */
    body.single .post,
    body.single article,
    .single-post .post {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        background: transparent !important;
    }

    /* 4. Bezpiecznik: Agresywne ukrycie reklam, sidebarów, komentarzy i stopek */
    .ml-print-container,
    .widget,
    .sidebar,
    #sidebar,
    .comments-area,
    #comments,
    .post-navigation,
    .entry-meta,
    .nav-links,
    footer,
    header,
    .site-header,
    .site-footer,
    iframe,
    ins,
    .adsbygoogle,
    [class*="ad-"],
    [class*="advert"],
    [id*="ad-"] {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        width: 0 !important;
        overflow: hidden !important;
    }
}