
/* FV document tabs: connect the grey subtab rail directly under the blue document header. */
html body .vario-erp-document-details-modal:not(.vario-document-line-lookup-modal):not(.vario-document-quick-create-modal) .vario-erp-modal-body,
html[data-vario-theme] body .vario-erp-document-details-modal:not(.vario-document-line-lookup-modal):not(.vario-document-quick-create-modal) .vario-erp-modal-body {
    padding: 0 8px 8px !important;
}

html body .vario-erp-document-details-modal:not(.vario-document-line-lookup-modal):not(.vario-document-quick-create-modal) .vario-win-document-tabs,
html[data-vario-theme] body .vario-erp-document-details-modal:not(.vario-document-line-lookup-modal):not(.vario-document-quick-create-modal) .vario-win-document-tabs {
    display: flex !important;
    align-items: flex-end !important;
    gap: 0 !important;
    height: 30px !important;
    min-height: 30px !important;
    margin: 0 -8px 0 !important;
    padding: 0 10px !important;
    border: 0 !important;
    border-top: 1px solid #d6e0ed !important;
    border-bottom: 1px solid #dce6f4 !important;
    border-radius: 0 !important;
    background: #ffffff !important;
    box-shadow: none !important;
}

html body .vario-erp-document-details-modal:not(.vario-document-line-lookup-modal):not(.vario-document-quick-create-modal) .vario-win-document-tabs button,
html[data-vario-theme] body .vario-erp-document-details-modal:not(.vario-document-line-lookup-modal):not(.vario-document-quick-create-modal) .vario-win-document-tabs button {
    position: relative !important;
    height: 30px !important;
    min-height: 30px !important;
    padding: 0 16px !important;
    border: 0 !important;
    border-bottom: 2px solid transparent !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: #526987 !important;
    font: 900 11px/28px Inter, "Segoe UI", Arial, sans-serif !important;
    text-shadow: none !important;
    box-shadow: none !important;
}

html body .vario-erp-document-details-modal:not(.vario-document-line-lookup-modal):not(.vario-document-quick-create-modal) .vario-win-document-tabs button+button::before,
html[data-vario-theme] body .vario-erp-document-details-modal:not(.vario-document-line-lookup-modal):not(.vario-document-quick-create-modal) .vario-win-document-tabs button+button::before {
    content: "" !important;
    position: absolute !important;
    left: 0 !important;
    top: 8px !important;
    width: 1px !important;
    height: 13px !important;
    background: #d5dfed !important;
}

html body .vario-erp-document-details-modal:not(.vario-document-line-lookup-modal):not(.vario-document-quick-create-modal) .vario-win-document-tabs button.active,
html body .vario-erp-document-details-modal:not(.vario-document-line-lookup-modal):not(.vario-document-quick-create-modal) .vario-win-document-tabs button.active:focus,
html body .vario-erp-document-details-modal:not(.vario-document-line-lookup-modal):not(.vario-document-quick-create-modal) .vario-win-document-tabs button.active:focus-visible,
html body .vario-erp-document-details-modal:not(.vario-document-line-lookup-modal):not(.vario-document-quick-create-modal) .vario-win-document-tabs button.active:active,
html[data-vario-theme] body .vario-erp-document-details-modal:not(.vario-document-line-lookup-modal):not(.vario-document-quick-create-modal) .vario-win-document-tabs button.active,
html[data-vario-theme] body .vario-erp-document-details-modal:not(.vario-document-line-lookup-modal):not(.vario-document-quick-create-modal) .vario-win-document-tabs button.active:focus,
html[data-vario-theme] body .vario-erp-document-details-modal:not(.vario-document-line-lookup-modal):not(.vario-document-quick-create-modal) .vario-win-document-tabs button.active:focus-visible,
html[data-vario-theme] body .vario-erp-document-details-modal:not(.vario-document-line-lookup-modal):not(.vario-document-quick-create-modal) .vario-win-document-tabs button.active:active {
    border-bottom-color: #1263f1 !important;
    background: transparent !important;
    color: #134f8c !important;
    text-shadow: none !important;
    box-shadow: none !important;
}

html body .vario-erp-document-details-modal .vario-document-lines-panel .vario-line-delete-button,
html[data-vario-theme] body .vario-erp-document-details-modal .vario-document-lines-panel .vario-line-delete-button {
    border-color: #efb0b0 !important;
    background: linear-gradient(180deg, #fff7f7 0%, #ffe8e8 100%) !important;
    color: #bd1f1f !important;
}

html body .vario-erp-document-details-modal .vario-document-links-split-section>.vario-erp-section-body,
html[data-vario-theme] body .vario-erp-document-details-modal .vario-document-links-split-section>.vario-erp-section-body {
    display: grid !important;
    grid-template-rows: minmax(0, 1fr) !important;
    gap: 8px !important;
    height: min(620px, calc(100dvh - 202px)) !important;
    min-height: 440px !important;
    padding: 6px !important;
    overflow: hidden !important;
}

html body .vario-erp-document-details-modal .vario-document-flow-has-purchase-content>.vario-erp-section-body,
html[data-vario-theme] body .vario-erp-document-details-modal .vario-document-flow-has-purchase-content>.vario-erp-section-body {
    grid-template-rows: minmax(0, 1fr) minmax(0, 1fr) !important;
}

html body .vario-erp-document-details-modal .vario-document-flow-purchase-content,
html[data-vario-theme] body .vario-erp-document-details-modal .vario-document-flow-purchase-content {
    display: grid !important;
    grid-auto-rows: max-content !important;
    align-content: start !important;
    gap: 8px !important;
    min-height: 0 !important;
    overflow: auto !important;
}

html body .vario-erp-document-details-modal .vario-document-flow-purchase-content>.vario-document-receipt-settlement-panel,
html[data-vario-theme] body .vario-erp-document-details-modal .vario-document-flow-purchase-content>.vario-document-receipt-settlement-panel {
    margin-bottom: 0 !important;
}

html body .vario-erp-document-details-modal .vario-document-links-split,
html[data-vario-theme] body .vario-erp-document-details-modal .vario-document-links-split {
    display: grid !important;
    grid-template-rows: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 8px !important;
    height: 100% !important;
    min-height: 0 !important;
}

html body .vario-erp-document-details-modal .vario-document-links-panel,
html[data-vario-theme] body .vario-erp-document-details-modal .vario-document-links-panel {
    display: grid !important;
    grid-template-rows: 32px minmax(0, 1fr) !important;
    min-height: 0 !important;
    overflow: hidden !important;
    border: 1px solid #c8d7eb !important;
    border-radius: 8px !important;
    background: #ffffff !important;
}

html body .vario-erp-document-details-modal .vario-document-links-panel>header,
html[data-vario-theme] body .vario-erp-document-details-modal .vario-document-links-panel>header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    min-height: 32px !important;
    padding: 3px 8px !important;
    border-bottom: 1px solid #d7e2f0 !important;
    background: linear-gradient(180deg, #f9fbff 0%, #eef4fb 100%) !important;
}

html body .vario-erp-document-details-modal .vario-document-links-panel h3,
html body .vario-erp-document-details-modal .vario-document-receipt-settlement-panel h3,
html[data-vario-theme] body .vario-erp-document-details-modal .vario-document-links-panel h3,
html[data-vario-theme] body .vario-erp-document-details-modal .vario-document-receipt-settlement-panel h3 {
    margin: 0 !important;
    color: #08224f !important;
    font: 950 12px/14px Inter, "Segoe UI", Arial, sans-serif !important;
}

html body .vario-erp-document-details-modal .vario-document-links-grid-wrap,
html[data-vario-theme] body .vario-erp-document-details-modal .vario-document-links-grid-wrap {
    min-height: 0 !important;
    overflow: auto !important;
}

html body .vario-erp-document-details-modal .vario-document-links-grid tbody tr.vario-grid-empty-message-row,
html[data-vario-theme] body .vario-erp-document-details-modal .vario-document-links-grid tbody tr.vario-grid-empty-message-row {
    height: 22px !important;
    min-height: 22px !important;
    max-height: 22px !important;
}

html body .vario-erp-document-details-modal .vario-document-links-grid .vario-grid-empty-message-row td,
html[data-vario-theme] body .vario-erp-document-details-modal .vario-document-links-grid .vario-grid-empty-message-row td {
    height: 22px !important;
    min-height: 22px !important;
    max-height: 22px !important;
    padding: 3px 8px !important;
    color: #526985 !important;
    background: #ffffff !important;
    box-shadow: none !important;
    text-align: center !important;
    vertical-align: middle !important;
    font: 850 11px/16px Inter, "Segoe UI", Arial, sans-serif !important;
}

html body .vario-erp-document-details-modal .vario-document-links-panel .vario-erp-empty,
html[data-vario-theme] body .vario-erp-document-details-modal .vario-document-links-panel .vario-erp-empty {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 100% !important;
    color: #5c6f8a !important;
    font: 850 11px/14px Inter, "Segoe UI", Arial, sans-serif !important;
}

@media (max-width: 720px) {
    html body:has(.vario-erp-document-details-modal) .vario-win-titlebar,
    html[data-vario-theme] body:has(.vario-erp-document-details-modal) .vario-win-titlebar {
        z-index: 100 !important;
    }

    html body .vario-erp-document-details-modal .vario-document-links-panel,
    html[data-vario-theme] body .vario-erp-document-details-modal .vario-document-links-panel {
        grid-template-rows: auto minmax(0, 1fr) !important;
    }

    html body .vario-erp-document-details-modal .vario-document-links-panel>header,
    html[data-vario-theme] body .vario-erp-document-details-modal .vario-document-links-panel>header {
        align-items: stretch !important;
        flex-wrap: wrap !important;
        min-height: 0 !important;
        height: auto !important;
        row-gap: 4px !important;
    }

    html body .vario-erp-document-details-modal .vario-document-links-panel>header .vario-document-lines-panel-title,
    html[data-vario-theme] body .vario-erp-document-details-modal .vario-document-links-panel>header .vario-document-lines-panel-title {
        flex: 1 1 auto !important;
        min-width: 0 !important;
    }

    html body .vario-erp-document-details-modal .vario-document-links-panel>header .vario-document-inline-actions,
    html[data-vario-theme] body .vario-erp-document-details-modal .vario-document-links-panel>header .vario-document-inline-actions {
        flex: 1 1 100% !important;
        flex-wrap: nowrap !important;
        justify-content: flex-end !important;
        gap: 4px !important;
    }

    html body .vario-erp-document-details-modal .vario-document-links-panel>header .vario-document-inline-actions .btn,
    html[data-vario-theme] body .vario-erp-document-details-modal .vario-document-links-panel>header .vario-document-inline-actions .btn {
        padding-inline: 7px !important;
    }
}
