.pdf-compression-dialog {
    width: 440px;
    max-width: calc(100vw - 24px);
    max-height: calc(100dvh - 24px);
    padding: 0;
    border: 1px solid #dce1e7;
    border-radius: 8px;
    background: #fff;
    color: #212529;
    box-shadow: 0 12px 40px #0003;
    font-family: inherit;
    font-size: 14px;
    overflow: auto;
}
.pdf-compression-dialog::backdrop { background: #0007; }
.pdf-compression-header, .pdf-compression-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 20px;
}
.pdf-compression-header { justify-content: space-between; border-bottom: 1px solid #e5e8ec; }
.pdf-compression-header h2 { font-size: 18px; font-weight: 600; margin: 0; }
.pdf-compression-header .btn-close { flex-shrink: 0; }
.pdf-compression-body { height: 260px; overflow: auto; padding: 20px; }
.pdf-compression-file { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.pdf-compression-sizes { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; color: #647080; }
.pdf-compression-sizes strong { color: #212529; white-space: nowrap; }
.pdf-compression-state { display: flex; align-items: center; gap: 12px; margin-top: 18px; min-height: 44px; }
.pdf-compression-state.is-error { color: #b42318; }
.pdf-compression-state.is-success { color: #18794e; }
.pdf-compression-state .pure-spinner { flex-shrink: 0; width: 24px; height: 24px; border-width: 3px; margin: 0; }
.pdf-compression-result { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.pdf-compression-before { color: #647080; }
.pdf-compression-result strong { color: #18794e; font-size: 18px; }
.pdf-compression-result small { flex-basis: 100%; color: #647080; }
.pdf-compression-note { margin: 16px 0 0; color: #647080; font-size: 12px; }
.pdf-compression-footer { justify-content: flex-end; border-top: 1px solid #e5e8ec; }
.pdf-compression-footer .btn { font-size: 14px; white-space: nowrap; }
.pdf-compression-dialog [hidden] { display: none !important; }
@media (max-width: 380px) {
    .pdf-compression-header, .pdf-compression-footer { padding: 12px; }
    .pdf-compression-body { padding: 16px 12px; }
    .pdf-compression-footer { gap: 6px; flex-wrap: wrap; }
    .pdf-compression-footer .btn { padding-inline: 9px; }
}
.pdf-preview-dialog {
    width: 860px;
    max-width: calc(100vw - 24px);
    height: min(880px, calc(100dvh - 24px));
    max-height: calc(100dvh - 24px);
    padding: 0;
    border: 1px solid #dce1e7;
    border-radius: 8px;
    background: #fff;
    color: #212529;
    font-family: inherit;
    font-size: 14px;
    overflow: hidden;
}
.pdf-preview-dialog[open] { display: flex; flex-direction: column; }
.pdf-preview-dialog::backdrop { background: #0007; }
.pdf-preview-dialog .pdf-compression-header { flex-shrink: 0; min-width: 0; }
.pdf-preview-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdf-preview-toolbar { display: flex; align-items: center; gap: 6px; padding: 8px 12px; flex-shrink: 0; border-bottom: 1px solid #e5e8ec; }
.pdf-preview-toolbar .btn { height: 32px; min-width: 32px; padding: 3px 8px; font-size: 14px; }
.pdf-preview-toolbar-space { flex: 1; }
.pdf-preview-page { min-width: 60px; text-align: center; font-variant-numeric: tabular-nums; }
.pdf-preview-pages { flex: 1; min-height: 0; padding: 16px; overflow: auto; background: #e9ecef; }
.pdf-preview-pages canvas { display: block; margin: 0 auto; background: #fff; box-shadow: 0 2px 8px #0002; }
.pdf-preview-status { padding: 12px; text-align: center; flex-shrink: 0; }
.pdf-preview-status .pure-spinner { display: inline-block; width: 24px; height: 24px; border-width: 3px; margin: 0; }
.pdf-preview-status.is-error { color: #b42318; }
.pdf-preview-dialog [hidden] { display: none !important; }
@media (max-width: 380px) {
    .pdf-preview-dialog .pdf-compression-header { padding: 12px; }
    .pdf-preview-dialog .pdf-compression-header h2 { font-size: 16px; }
    .pdf-preview-toolbar { padding-inline: 6px; gap: 4px; }
    .pdf-preview-page { min-width: 48px; }
}
