.gnt-cad-preview {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-height: 28rem;
    background: var(--gnt-surface-muted, #f5f5f5);
}

.gnt-cad-preview__stage {
    flex: 1 1 auto;
    min-height: 24rem;
    position: relative;
    overflow: hidden;
}

.gnt-cad-preview__stage > canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.gnt-cad-preview__status {
    padding: 0.75rem 1rem;
    color: var(--gnt-text-secondary, #555);
    font-size: 0.875rem;
}

.gnt-cad-preview__status--error {
    color: var(--gnt-danger, #b42318);
}

.gnt-cad-preview__detail {
    margin-top: 0.35rem;
    font-size: 0.75rem;
    opacity: 0.85;
    word-break: break-word;
}

.gnt-cad-preview__stage--dxf,
.gnt-cad-preview--dxf {
    background: #000;
}

.gnt-cad-preview--dxf .gnt-cad-preview__status {
    color: #e8e8e8;
}

.gnt-cad-preview--dxf .gnt-cad-preview__status--error {
    color: #ff8a80;
}

.gnt-doc-preview-popup,
.gnt-cad-doc-popup {
    max-width: 94vw;
    max-height: 90vh;
}

.gnt-doc-preview-popup .dxbl-popup-body,
.gnt-doc-preview-popup .dxbl-popup-content,
.gnt-cad-doc-popup .dxbl-popup-body,
.gnt-cad-doc-popup .dxbl-popup-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    padding: 0;
    overflow: hidden;
}

.article-documents-preview--popup-layout,
.article-documents-preview--cad-layout {
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 0;
}

.article-documents-preview--popup-layout {
    align-items: center;
    justify-content: center;
}

.article-documents-preview--cad-layout {
    align-items: stretch;
}

.article-documents-preview--cad {
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.article-documents-preview--cad .gnt-cad-preview,
.article-documents-preview--cad .gnt-eyeshot-webgl {
    flex: 1 1 auto;
    min-height: 0;
}

.article-documents-preview--cad-dxf {
    background: #000;
}
