.np-document-viewer {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-height: 12rem;
    max-height: min(72vh, 48rem);
}

.np-document-viewer__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--muted-foreground, #9ca3af);
}

.np-document-viewer__canvas-wrap,
.np-document-viewer__image-wrap {
    flex: 1 1 auto;
    overflow: auto;
    border: 1px solid var(--border, #2d3748);
    border-radius: 0.5rem;
    background: color-mix(in srgb, var(--background, #111827) 92%, #000 8%);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 0.5rem;
    position: relative;
}

.np-document-viewer__canvas-wrap > .bb-spinner,
.np-document-viewer__canvas-wrap > [class*='spinner'] {
    position: absolute;
    inset: 0;
    margin: auto;
    z-index: 1;
    pointer-events: none;
}

.np-document-viewer__canvas-wrap canvas {
    max-width: 100%;
    height: auto;
}

.np-document-viewer__embed-hint {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--muted-foreground, #9ca3af);
}

.np-document-viewer__frame {
    width: 100%;
    min-height: min(72vh, 48rem);
    flex: 1 1 auto;
    border: 1px solid var(--border, #2d3748);
    border-radius: 0.5rem;
    background: #fff;
}

.np-document-viewer__image-wrap img {
    max-width: 100%;
    max-height: min(68vh, 44rem);
    object-fit: contain;
}

.np-document-viewer__empty {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--muted-foreground, #9ca3af);
    font-size: 0.875rem;
}

/* Belge önizleme — BbDialogProvider ile çift katman oluşmaması için özel modal */
.np-doc-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(11, 18, 59, 0.45);
    backdrop-filter: blur(2px);
}

.np-doc-modal {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: min(64rem, 100%);
    max-height: min(95vh, 52rem);
    padding: 1rem 1.25rem 1.25rem;
    border-radius: 1rem;
    border: 1px solid var(--border, #dbe7e3);
    background: var(--background, #fff);
    box-shadow: 0 26px 56px -30px rgba(11, 18, 59, 0.45);
    overflow: hidden;
}

.np-doc-modal__head {
    flex: none;
}

.np-doc-modal__title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--foreground, #1c2541);
}

.np-doc-modal__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}

.np-doc-modal__loading {
    display: flex;
    min-height: 12rem;
    align-items: center;
    justify-content: center;
}

.np-doc-modal__foot {
    flex: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
    padding-top: 0.25rem;
}
