/* Styles for PDF conversion box */
.wc-pdf-conversion-box {
    text-align: center;
    margin-top: 10px;
}

.convert-to-pdf-btn {
    /* استفاده از استایل پیش‌فرض دکمه ووکامرس */
    background-color: var(--wp--preset--color--primary, #00A4A7);
    color: white !important;
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 3px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.convert-to-pdf-btn:hover {
    background-color: var(--wp--preset--color--secondary, #49C1C3);
    opacity: 0.9;
}

.convert-to-pdf-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.pdf-download-link {
    display: inline-block;
    background-color: var(--wp--preset--color--primary, #00A4A7);
    color: white !important;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 3px;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.pdf-download-link:hover {
    background-color: var(--wp--preset--color--secondary, #49C1C3);
    opacity: 0.9;
    color: white;
    text-decoration: none;
}

.pdf-download-link-modal {
    display: inline-block;
    background-color: var(--wp--preset--color--primary, #00A4A7);
    color: white !important;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 3px;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.pdf-download-link-modal:hover {
    background-color: var(--wp--preset--color--secondary, #49C1C3);
    opacity: 0.9;
    color: white !important;
    text-decoration: none;
}

.pdf-cache-info {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.pdf-conversion-status {
    margin-top: 10px;
    font-size: 14px;
}

.pdf-conversion-status .converting {
    color: var(--wp--preset--color--primary, #96588a);
}

.pdf-conversion-status .error {
    color: #dc3232;
}

/* Modal styles - سازگار با تم سایت */
.pdf-convert-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.pdf-convert-modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 0;
    border: none;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    /* استفاده از فونت پیش‌فرض سایت */
    font-family: inherit;
    direction: rtl;
}

.pdf-convert-modal-header {
    padding: 20px;
    background-color: #f8f8f8;
    border-bottom: 1px solid #eee;
    border-radius: 8px 8px 0 0;
    position: relative;
}

.pdf-convert-modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.pdf-convert-close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    left: 20px; /* سمت چپ برای RTL */
    top: 15px;
    width: 30px;
    height: 30px;
    text-align: center;
    line-height: 30px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.pdf-convert-close:hover {
    color: #000;
    background-color: #f0f0f0;
}

.pdf-convert-modal-body {
    padding: 20px;
    line-height: 1.6;
    color: #555;
    font-size: 14px;
}

.pdf-convert-modal-footer {
    padding: 15px 20px;
    background-color: #f8f8f8;
    border-top: 1px solid #eee;
    border-radius: 0 0 8px 8px;
    text-align: left; /* برای RTL */
}

.pdf-convert-modal-footer button {
    padding: 8px 16px;
    margin-right: 10px; /* برای RTL */
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.pdf-convert-confirm {
    background-color: var(--wp--preset--color--primary, #96588a);
    color: white;
}

.pdf-convert-confirm:hover {
    background-color: var(--wp--preset--color--secondary, #743c69);
    opacity: 0.9;
}

.pdf-convert-cancel {
    background-color: #f1f1f1;
    color: #333;
    border: 1px solid #ddd;
}

.pdf-convert-cancel:hover {
    background-color: #ddd;
    border-color: #ccc;
}

/* RTL specific styles */
.rtl .pdf-convert-modal-content {
    direction: rtl;
    text-align: right;
}

.rtl .pdf-convert-close {
    left: 20px;
    right: auto;
}

.rtl .pdf-convert-modal-footer {
    text-align: left;
}

.rtl .pdf-convert-modal-footer button {
    margin-right: 10px;
    margin-left: 0;
}

/* Responsive design */
@media screen and (max-width: 600px) {
    .pdf-convert-modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .pdf-convert-modal-header,
    .pdf-convert-modal-body,
    .pdf-convert-modal-footer {
        padding: 15px;
    }
    
    .pdf-convert-modal-footer {
        text-align: center;
    }
    
    .pdf-convert-modal-footer button {
        margin: 5px;
        width: 45%;
    }
}

.pdf-convert-modal-status {
    margin-top: 15px;
    font-size: 14px;
}
.pdf-convert-modal-status .error {
    color: #dc3232;
}
