﻿.blazored-modal.formobile {
    --mobile-modal-gap: 0.25rem;
    max-height: calc(100vh - 0.5rem);
    height: calc(100vh - 0.5rem);
    max-height: calc(100dvh - 0.5rem);
    height: calc(100dvh - 0.5rem);
    max-width: calc(100vw - 0.5rem);
    width: calc(100vw - 0.5rem);
    max-width: calc(100dvw - 0.5rem);
    width: calc(100dvw - 0.5rem);
    margin-left: auto !important;
    margin-right: auto !important;
    padding: 0 !important;
    margin-top: var(--mobile-modal-gap) !important;
    margin-bottom: var(--mobile-modal-gap) !important;
}

    .blazored-modal.formobile > .bm-header, .blazored-modal.formobile > .bm-header-copy {
        padding: 0.5rem;
    }

.blazored-modal.fullheight {
    height: calc(100vh - 3.5rem);
    margin-left: auto !important;
    margin-right: auto !important;
}

.blazored-modal.size-medium {
    max-width: min(100vw, 500px) !important;
}

.blazored-modal.fullscreen {
    height: calc(100vh - 3.5rem);
    width: calc(100vw - 5rem);
    margin-left: auto !important;
    margin-right: auto !important;
}

    .blazored-modal.fullheight > .bm-content, .blazored-modal.formobile > .bm-content, .blazored-modal.fullscreen > .bm-content {
        overflow: hidden;
        flex-grow: 1;
    }

.blazored-modal.autowidth {
    min-width: 800px;
    min-width: max(50vw, 800px); /* we want 50% width - at least 800px */
    max-width: 100vw; /* 2025-06-20 DNF-SaS: never exceed display width*/
    width: -moz-fit-content;
    width: fit-content;
}

.blazored-modal.autowidthwithoutminwidth {
    width: -moz-fit-content;
    width: fit-content;
}

.blazored-modal.minwidth {
    width: min-content;
}

/* 2023-09-16 DNF-SaS: copied from https://github.com/Blazored/Modal/blob/main/src/Blazored.Modal/BlazoredModalInstance.razor.css */
.bm-header-copy {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 0 0 2rem 0;
}

.bm-title-copy {
    margin-bottom: 0;
}

.bm-close-copy {
    padding: 1rem;
    margin: -1rem -1rem -1rem auto;
    background-color: transparent;
    border: 0;
    -webkit-appearance: none;
    cursor: pointer;
    font-size: 1.5rem;
    font-weight: bold;
}

/* 2026-07-17 DNF-SaS: ermöglicht vertikale Scrollbar im Modal ohne Verwendung von .fullheight (also erst bei Überschreitung der Viewport-Höhe) */
.bm-container > .blazored-modal-focus-trap {
    display: flex;
    flex-direction: column;
    max-height: 100dvh;
    min-height: 0;
}

    .bm-container > .blazored-modal-focus-trap > .blazored-modal {
        display: flex;
        flex-direction: column;
        max-height: inherit;
        min-height: 0;
    }

.bm-content {
    min-height: 0;
    /* 2026-09-16 DNF-SaS: testweise hier schon flex mit column reinbauen um den Overflow nicht immer hier zu haben sondern im Model-Content steuern zu können */
    /*overflow-y: auto;*/
    display: flex;
    flex-direction: column;
}