﻿.print-form-shell {
    background: #eef2f5;
    color: #1f2933;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
}

.print-form-workspace,
.print-form-splitter,
.print-form-field-pane,
.print-form-editor-splitter-pane,
.print-form-left-panel,
.print-form-editor-panel {
    height: 100%;
    min-height: 0;
    min-width: 0;
    overflow: hidden;
}

.print-form-workspace,
.print-form-splitter {
    width: 100%;
}

.print-form-left-panel {
    background: #f8fafc;
    border-right: 1px solid #d8dee6;
    display: grid;
    grid-template-rows: auto auto auto minmax(0, 1fr);
}

.print-form-panel-header {
    align-items: center;
    background: #fff;
    border-bottom: 1px solid #d8dee6;
    display: flex;
    justify-content: space-between;
    min-height: 44px;
    padding: 9px 12px;
}

    .print-form-panel-header strong {
        font-size: 13px;
    }

    .print-form-panel-header span {
        color: #697684;
        font-size: 12px;
    }

.print-form-field-search {
    background: #fff;
    border-bottom: 1px solid #d8dee6;
    padding: 10px 12px;
}

.print-form-panel-tabs {
    background: #fff;
    border-bottom: 1px solid #d8dee6;
    display: grid;
    gap: 6px;
    grid-template-columns: 1fr 1fr;
    padding: 8px 12px;
}

.print-form-panel-tab {
    background: #f7f9fb;
    border: 1px solid #cdd6df;
    border-radius: 4px;
    color: #334155;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    height: 30px;
}

    .print-form-panel-tab.active {
        background: #e9f2ff;
        border-color: #6aa0d8;
        color: #0d4f8b;
    }

.print-form-field-panel-body {
    min-height: 0;
    overflow: auto;
    padding: 10px;
}

.print-form-editor-panel {
    background: #eef2f5;
    display: grid;
    grid-template-rows: minmax(0, 1fr);
}

.print-form-quick-toolbar {
    align-items: center;
    background: #fff;
    border-bottom: 1px solid #d8dee6;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 44px;
    overflow: hidden;
    padding: 6px 8px;
}

.print-form-editor {
    box-sizing: border-box;
    height: 100%;
    min-height: 0;
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100%;
    overflow: hidden;
}

.print-form-tool-button {
    background: #f7f9fb;
    border: 1px solid #cdd6df;
    border-radius: 4px;
    color: #23313f;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    height: 30px;
    padding: 0 9px;
    white-space: nowrap;
}

.print-form-field-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.print-form-function-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.print-form-field {
    background: #fff;
    border: 1px solid #d8dee6;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 72px;
    padding: 10px 11px;
    text-align: left;
    width: 100%;
}

    .print-form-field:hover {
        background: #eef6fb;
        border-color: #5d95bf;
    }

    .print-form-field code {
        color: #0d6efd;
        font-size: 12px;
        font-weight: 700;
    }

    .print-form-field small {
        color: #5f6b77;
        font-size: 11px;
    }

/* DevExpress RichEdit */
.print-form-editor,
.print-form-editor > *,
.print-form-editor [class*="dxre"] {
    box-sizing: border-box;
    min-width: 0 !important;
    max-width: 100% !important;
}

.print-form-editor .dxreControl {
    height: 100% !important;
    min-height: 0 !important;
    width: 100% !important;
    overflow: hidden !important;
}

.print-form-editor .dxreView {
    height: 100% !important;
    min-height: 0 !important;
    overflow: auto !important;
}

.print-form-editor .dxrePageCanvas {
    max-width: none !important;
}

.print-form-editor .dxrePageArea {
    min-width: max-content !important;
}

/* Ribbon */
.print-form-editor .dxrControl {
    max-width: 100% !important;
    min-width: 0 !important;
    width: 100% !important;
    overflow: visible !important;
}

.print-form-editor .dxr-tabContent {
    max-width: 100% !important;
    min-width: 0 !important;
    width: 100% !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
}

/* Print preview */
.print-form-preview-container,
.print-form-preview-popup-body {
    background: #eef2f5;
    height: 100%;
    min-height: 0;
    min-width: 0;
    overflow: hidden;
    width: 100%;
}

.print-form-preview-editor {
    box-sizing: border-box;
    height: 100%;
    min-height: 0;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden;
    width: 100%;
}

.print-form-preview-editor,
.print-form-preview-editor > *,
.print-form-preview-editor [class*="dxre"] {
    box-sizing: border-box;
    min-width: 0 !important;
    max-width: 100% !important;
}

.print-form-preview-editor .dxreControl {
    height: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
    width: 100% !important;
}

.print-form-preview-editor .dxreView {
    background: #eef2f5 !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow: auto !important;
    text-align: center;
}

.print-form-preview-editor .dxrePageCanvas {
    display: inline-block !important;
    max-width: none !important;
    text-align: left;
}

.print-form-preview-editor .dxrePageArea {
    display: inline-block !important;
    min-width: max-content !important;
    text-align: left;
}

.print-form-preview-message {
    align-items: center;
    background: #eef2f5;
    color: #52606d;
    display: flex;
    justify-content: center;
    min-height: 160px;
    text-align: center;
    width: 100%;
}

.print-form-preview-footer {
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: space-between;
    width: 100%;
}

.print-form-preview-header {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    min-width: 0;
    width: 100%;
}

.print-form-preview-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.print-form-preview-actions {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.print-form-list-preview-scope.print-form-preview-busy,
.print-form-list-preview-scope.print-form-preview-busy * {
    cursor: wait !important;
}

.page:has(.print-form-shell),
.main-body-wrapper:has(.print-form-shell) {
    height: 100dvh !important;
    min-height: 0 !important;
    overflow: hidden !important;
}

.main-body-wrapper:has(.print-form-shell) {
    display: flex !important;
    flex-direction: column !important;
}

.main-body-wrapper > .print-form-shell {
    flex: 1 1 auto;
}
