/* PDF preview — viewport-capped shell. Position via DialogPositionData;
   do not CSS-transform (that fights Syncfusion and leaves the dialog half-open). */

.pdf-preview-dialog.e-dialog {
    width: min(1200px, calc(100vw - 1.25rem)) !important;
    height: min(88vh, calc(100dvh - 1rem)) !important;
    max-height: min(88vh, calc(100dvh - 1rem)) !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    margin: 0 !important;
    border-radius: 12px !important;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.28) !important;
}

.pdf-preview-dialog.e-dialog > .e-dlg-header-content,
.pdf-preview-dialog.e-dialog > .e-footer-content {
    flex: 0 0 auto !important;
}

.pdf-preview-dialog.e-dialog > .e-dlg-content {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    height: auto !important;
    max-height: none !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 0 !important;
}

.pdf-preview-header {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 800;
    min-width: 0;
    padding-right: 1.5rem;
}

.pdf-preview-body {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #e2e8f0;
    box-sizing: border-box;
    max-height: calc(min(88vh, 100dvh - 1rem) - 7.25rem);
}

.pdf-preview-frame {
    display: block;
    flex: 1 1 auto;
    width: 100%;
    min-height: 0 !important;
    height: 100% !important;
    border: 0;
    background: #fff;
}

.pdf-preview-state {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex: 1 1 auto;
    min-height: 16rem;
    color: #64748b;
    font-weight: 650;
    padding: 1rem;
}

.pdf-preview-state--error {
    color: #b91c1c;
}

.pdf-preview-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.55rem;
    padding: 0.35rem 0.15rem;
}

.pdf-preview-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: none;
    border-radius: 8px;
    padding: 0.55rem 1rem;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
}

.pdf-preview-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.pdf-preview-btn--ghost {
    background: #f1f5f9;
    color: #334155;
}

.pdf-preview-btn--primary {
    background: #002245;
    color: #fff;
}
