@use "variables" as *;

// Shared modal layout system used by all settings modals.
.ekesto-settings-modal {
    .components-modal__content {
        display: flex;
        flex-direction: column;
        flex: 1 1 auto;
        min-height: 0;
        padding: 0;
        background: #fff;
        overflow: hidden;
    }

    // Modal inserts an extra anonymous wrapper around children.
    .components-modal__content > div:not(.components-modal__header) {
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
        min-height: 0;
    }

    @media screen and (max-width:600px) {
        margin: 0;
        min-width: 100%;
        border-radius: 0;
    }
}

.ekesto-settings-modal--narrow {
    width: min(500px, 92vw);
    max-width: 500px;
}

.ekesto-settings-modal--medium {
    width: min(720px, 92vw);
    max-width: 720px;
}

.ekesto-settings-modal--wide {
    width: min(1000px, 92vw);
    max-width: 1000px;
}

.ekesto-settings-modal__content {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

.ekesto-settings-modal__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding: $spacing-md 32px;
}

.ekesto-settings-modal__actions {
    flex: 0 0 auto;
    position: static;
    display: flex;
    justify-content: flex-end;
    gap: $spacing-sm;
    padding: $spacing-lg 32px;
    background: #fff;
    border-top: 1px solid $color-border;
}

.ekesto-settings-modal__actions--split {
    justify-content: space-between;
}

.ekesto-settings-modal__actions-group {
    display: flex;
    gap: $spacing-sm;
}
