/**
 * Alle Programm-Modals: im Viewport halten + per Griff vergrößern/verkleinern.
 */
.mdl-resizable-modal-overlay,
.mdl-user-modal-overlay {
    padding: 0.75rem !important;
    overflow: hidden !important;
    align-items: center !important;
    justify-content: center !important;
}

.mdl-resizable-modal-panel {
    position: relative;
    box-sizing: border-box;
    max-width: calc(100vw - 1.5rem);
    max-height: calc(100dvh - 1.5rem);
    min-width: 16rem;
    min-height: 12rem;
}

.mdl-resizable-modal-panel.flex.flex-col {
    overflow: hidden;
    min-height: 0;
}

.mdl-resizable-modal-panel:not(.flex.flex-col) {
    overflow: auto;
}

.mdl-resizable-modal-panel[data-mdl-resized="1"] {
    flex: none !important;
}

/* Kanzlei-Benutzer: etwas kompaktere Startgröße */
#modal-users .mdl-resizable-modal-panel:not([data-mdl-resized="1"]) {
    width: min(88vw, 56rem);
    height: min(68dvh, 640px);
    min-width: 20rem;
    min-height: 18rem;
}

#modal-edit-user .mdl-resizable-modal-panel:not([data-mdl-resized="1"]) {
    width: min(88vw, 44rem);
    height: min(64dvh, 600px);
    min-width: 18rem;
    min-height: 16rem;
}

#modal-employee-mandants .mdl-resizable-modal-panel:not([data-mdl-resized="1"]) {
    width: min(88vw, 36rem);
    height: min(58dvh, 520px);
    min-width: 18rem;
    min-height: 14rem;
}

.mdl-user-modal-panel__header {
    flex-shrink: 0;
}

.mdl-user-modal-panel__body {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.mdl-user-modal-panel__body > *:not(.mdl-user-modal-panel__scroll) {
    flex-shrink: 0;
}

.mdl-user-modal-panel__scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.mdl-user-modal-panel__footer {
    flex-shrink: 0;
}

.mdl-user-modal-create-block {
    flex-shrink: 0;
    max-height: min(38dvh, 22rem);
    overflow-y: auto;
}

.mdl-modal-resize-handle {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 1.35rem;
    height: 1.35rem;
    cursor: nwse-resize;
    z-index: 30;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 0 0.2rem 0.15rem 0;
    color: #94a3b8;
    opacity: 0.45;
    transition: opacity 0.15s ease, color 0.15s ease;
    user-select: none;
    touch-action: none;
}

.mdl-resizable-modal-panel:hover .mdl-modal-resize-handle,
.mdl-modal-resize-handle:hover {
    opacity: 1;
    color: #6366f1;
}
