/* PDF Compressor Styles */

#previewContainer {
    position: relative;
    background-color: #f8f9fa;
    border-radius: 0.25rem;
    cursor: pointer;
}

/* Dark mode support */
[data-theme="dark"] #previewContainer,
[data-theme="true-dark"] #previewContainer {
    background-color: #1a1a1a;
    border-color: #444;
}

[data-theme="dark"] #previewContainer:not(.has-file),
[data-theme="true-dark"] #previewContainer:not(.has-file) {
    background-color: #0d1117;
}

#previewContainer.drag-over {
    background-color: #e7f3ff;
    border-color: #0d6efd;
}

[data-theme="dark"] #previewContainer.drag-over,
[data-theme="true-dark"] #previewContainer.drag-over {
    background-color: #1e3a5f;
    border-color: #4a9eff;
}

#previewPlaceholder {
    user-select: none;
    width: 100%;
    height: 100%;
}

#previewPlaceholder:hover {
    opacity: 0.8;
}

[data-theme="dark"] #previewPlaceholder,
[data-theme="true-dark"] #previewPlaceholder {
    color: #c9d1d9;
}

#previewCanvas {
    display: none;
    margin: 0 auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#previewContainer.has-file #previewCanvas {
    display: block;
}

#previewContainer.has-file #previewPlaceholder {
    display: none !important;
}

.pdf-compressor-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

[data-theme="dark"] .pdf-compressor-loading,
[data-theme="true-dark"] .pdf-compressor-loading {
    background-color: rgba(13, 17, 23, 0.95);
}

.pdf-compressor-loading .spinner-border {
    width: 3rem;
    height: 3rem;
}

#fileInfo {
    word-break: break-all;
}

#perPageSizes ul {
    margin-top: 0.5rem;
    padding-left: 1.5rem;
}

#perPageSizes li {
    margin-bottom: 0.25rem;
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
    #previewContainer {
        min-height: 300px;
    }
}
