// https://m3.material.io/components/dialogs/specs

.sd-dialog {
    border: none;
    background: var(--md-sys-color-surface-container-high);
    @include elevation-level3;
    width: fit-content;
    height: fit-content;
    border-radius: 28px;
    min-width: 280px;
    max-width: min(560px, 100vw);
    max-height: 100vh;
    display: flex;
    flex-direction: column;

    &-headline {
        margin: 1.5rem 1.5rem 1rem;
        // default style
        font-size: x-large;
    }
    &-body {
        color: var(--md-sys-color-on-surface-variant);
    }
    &-buttons {
        margin: 1.5rem;
        text-align: right;
    }
}

.sd-dialog-fullscreen {
    width: 100vw;
    height: 100vh;
    background: var(--md-sys-color-surface-container-high);
    overflow: auto;
    display: flex;
    flex-direction: column;

    &-header {
        height: 56px;
        margin: 0 1.5rem;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    &-close {
        cursor: pointer;
        flex-shrink: 0;
    }
    &-headline {
        flex-shrink: 1;
        margin: 0 1rem;
        line-height: 28px;
        font-size: 22px;
        margin-right: auto;
        text-wrap: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    &-body {
        margin: 1.5rem;
        flex: 1;
        overflow-y: auto;
    }
    &-footer {
        margin-top: auto;
        &_content {
            margin: 4px 12px 10px;
        }
    }
}
