/**
 * WooCommerce PDF Attachments Frontend CSS
 */

/* PDF Button */
.wap-pdf-button-wrapper {
    margin: 10px 0;
}

.wap-pdf-button {
    display: inline-block;
    margin: 0;
    cursor: pointer;
    padding: 0.5em 1em;
    border-radius: 3px;
    font-weight: 600;
    transition: background-color 0.3s ease;
    text-decoration: none;
}

/* PDF Error Message */
.wap-pdf-error {
    background-color: #fff9f9;
    border: 1px solid #ffebee;
    border-radius: 5px;
    padding: 20px;
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.wap-pdf-error p {
    margin-bottom: 15px;
    color: #d32f2f;
    font-size: 16px;
}

.wap-pdf-error .button {
    background-color: #2271b1;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 3px;
    font-weight: 600;
    display: inline-block;
    transition: background-color 0.3s ease;
}

.wap-pdf-error .button:hover {
    background-color: #135e96;
}

/* PDF Modal */
.wap-pdf-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
}

.wap-pdf-modal-content {
    position: relative;
    background-color: #fefefe;
    margin: 2% auto;
    padding: 0;
    width: 90%;
    max-width: 1000px;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    height: 90vh;
}

.wap-pdf-modal-header {
    padding: 10px 15px;
    background-color: #f8f8f8;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
}

.wap-pdf-modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.wap-pdf-modal-close {
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    line-height: 1;
}

.wap-pdf-modal-close:hover,
.wap-pdf-modal-close:focus {
    color: #333;
    text-decoration: none;
}

.wap-pdf-modal-body {
    padding: 15px;
    flex: 1;
    overflow: hidden;
    position: relative;
}

.wap-pdf-modal-footer {
    padding: 10px 15px;
    background-color: #f8f8f8;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
}

/* PDF Viewer Container */
.wap-pdf-viewer-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: none;
}

#wap-pdf-viewer {
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: #f0f0f0;
}

/* Pagination Mode */
#wap-pdf-viewer.pagination-mode {
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
}

#wap-pdf-viewer.pagination-mode canvas {
    max-width: 100%;
    margin-bottom: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

/* Scrollable Mode */
#wap-pdf-viewer.scrollable-mode {
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
}

#wap-pdf-viewer.scrollable-mode canvas {
    max-width: 100%;
    margin-bottom: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

/* PDF Pagination */
.wap-pdf-pagination {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wap-pdf-nav-btn {
    padding: 5px 10px !important;
    font-size: 14px !important;
}

/* PDF Loading */
.wap-pdf-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 80%;
}

.wap-pdf-progress-container {
    width: 100%;
    background-color: #f1f1f1;
    border-radius: 5px;
    margin-bottom: 10px;
    overflow: hidden;
}

.wap-pdf-progress-bar {
    width: 0;
    height: 20px;
    background-color: #4CAF50;
    border-radius: 5px;
    transition: width 0.3s ease;
}

.wap-pdf-progress-text {
    font-weight: bold;
    margin-top: 5px;
}

/* PDF Download Button */
.wap-pdf-download-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
}

.wap-pdf-download-btn:hover {
    background-color: #45a049;
}

/* Responsive Styles */
@media screen and (max-width: 600px) {
    .wap-pdf-modal-content {
        width: 95%;
        height: 95vh;
        margin: 10px auto;
    }
    
    .wap-pdf-modal-footer {
        flex-direction: column;
        gap: 10px;
    }
    
    .wap-pdf-pagination {
        width: 100%;
        justify-content: space-between;
    }
    
    .wap-pdf-actions {
        width: 100%;
    }
    
    .wap-pdf-download-btn {
        width: 100%;
    }
} 