/* ===== افزونه چاپک وردپرس - نسخه چاپ IranSans و خروجی A4 ===== */

/* فونت ایران سنس */
@font-face {
    font-family: 'IRANSansWeb';
    src: url('fonts/IRANSansWeb.eot');
    src: url('fonts/IRANSansWeb.eot?#iefix') format('embedded-opentype'),
         url('fonts/IRANSansWeb.woff2') format('woff2'),
         url('fonts/IRANSansWeb.woff') format('woff'),
         url('fonts/IRANSansWeb.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@media print {

    @page {
        size: A4 portrait;
        margin: 1.7cm 1.5cm 2cm 1.5cm;
    }

    html, body {
        width: 21cm;
        height: 29.7cm;
        font-family: 'IRANSansWeb', Tahoma, Arial, sans-serif !important;
        font-size: 15px;
        color: #222;
        background: #fff !important;
        direction: rtl;
        margin: 0;
        box-sizing: border-box;
        line-height: 2.1;
    }

    .printmainpane {
        max-width: 100%;
        margin: 0;
        background: #fff;
        padding: 0;
        box-shadow: none;
        border-radius: 0;
    }

    h1, h2, h3, h4 {
        font-family: 'IRANSansWeb', Tahoma, Arial, sans-serif !important;
        color: #0b2341;
        margin-top: 1.2em;
        margin-bottom: 0.5em;
    }

    .print-thumb {
        text-align: center;
        margin: 28px 0 18px 0;
    }
    .print-thumb img {
        max-width: 93%;
        max-height: 290px;
        border-radius: 8px;
        box-shadow: none;
    }

    .print-rootitr {
        font-family: 'IRANSansWeb', Tahoma, Arial, sans-serif !important;
        margin-bottom: 8px;
    }

    .print-body {
        margin-top: 18px;
    }

    .entry {
        margin-top: 20px;
    }

    .print-copyright {
        margin-top: 30px;
        border-top: 1px dashed #bbb;
        padding-top: 12px;
        color: #888;
        font-size: 12.5px;
    }

    a[href]:after {
        content: '';
    }

    /* مخفی‌سازی اجزای غیرضروری */
    nav, header, footer, .comments, .chapak-print-btn, .tabnakweb-print-btn, .wp-block-button, .wp-block-social-links, .ast-header-break-point {
        display: none !important;
    }
}

body {
    background: #fcfcfc !important;
    font-family: 'IRANSansWeb', Tahoma, Arial, sans-serif !important;
}

.printmainpane {
    max-width: 850px;
    margin: 30px auto;
    background: #fff;
    padding: 36px 26px;
    border-radius: 14px;
    box-shadow: 0 2px 16px #d8eaff59;
    direction: rtl;
    font-family: 'IRANSansWeb', Tahoma, Arial, sans-serif !important;
    font-size: 17px;
}

@media screen and (max-width: 600px) {
    .printmainpane {
        padding: 12px 2vw;
    }
}

/* ============================== */
/* دکمه چاپ حرفه‌ای (هم چاپک و هم تابناک‌وب) */

.chapak-print-btn, .tabnakweb-print-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(90deg, #10b994 0%, #2979ff 100%);
    color: #fff !important;
    font-family: 'IRANSansWeb', Tahoma, Arial, sans-serif;
    font-size: 1.12rem;
    font-weight: 700;
    border: none;
    border-radius: 36px;
    padding: 13px 34px 13px 22px;
    box-shadow: 0 4px 16px -3px #1ec0b849, 0 1.5px 1.5px #d9ebff;
    cursor: pointer;
    transition: background 0.25s, box-shadow 0.18s, transform 0.17s;
    margin: 22px 0 28px 0;
    outline: none;
    position: relative;
    overflow: hidden;
    gap: 12px;
    text-decoration: none !important;
}

/* افکت هاور */
.chapak-print-btn:hover, .tabnakweb-print-btn:hover {
    background: linear-gradient(99deg, #0e9463 0%, #164baa 100%);
    box-shadow: 0 9px 28px -7px #18e09c55;
    transform: translateY(-2px) scale(1.04);
}

/* آیکون چاپ */
.chapak-print-btn::before, .tabnakweb-print-btn::before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 24px;
    margin-left: 12px;
    background: url('data:image/svg+xml;utf8,<svg width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="4" y="8" width="16" height="10" rx="2" fill="%23fff" stroke="%2310b994" stroke-width="1.5"/><rect x="7" y="16" width="10" height="5" rx="1.3" fill="%2310b994"/><rect x="6" y="2.5" width="12" height="6" rx="1.5" fill="%232979ff" stroke="%2310b994" stroke-width="1.2"/><circle cx="9" cy="11.5" r="0.9" fill="%232979ff"/><circle cx="15" cy="11.5" r="0.9" fill="%232979ff"/></svg>') no-repeat center center;
    background-size: 100% 100%;
    vertical-align: middle;
}

@media (max-width: 600px) {
    .chapak-print-btn, .tabnakweb-print-btn {
        padding: 8px 17px 8px 11px;
        font-size: 1rem;
        border-radius: 22px;
    }
    .chapak-print-btn::before, .tabnakweb-print-btn::before {
        width: 20px;
        height: 20px;
        margin-left: 7px;
    }
}
