@use 'sass:math';

.iande-modal {
    background-color: var(--iande-background-color);
    border-radius: var(--iande-border-radius);
    max-height: 100vh;
    max-width: 100vw;
    overflow: auto;

    .iande-group-modal & {
        width: 60em;
    }

    &.narrow {
        @media (min-width: 32em) {
            max-width: 30em;
        }
    }

    &__wrapper {
        align-items: center;
        background-color: rgba(30, 46, 85, 0.8);
        bottom: 0;
        display: flex;
        height: 100%;
        justify-content: center;
        left: 0;
        min-height: 100vh;
        overflow: overlay;
        position: fixed;
        right: 0;
        top: 0;
        width: 100vw;
        z-index: #{math.pow(10, 6)};
    }

    &__header {
        color: var(--iande-secondary-color);
        display: flex;
        justify-content: flex-end;
        margin: 1em;
    }

    &__body {
        max-height: 100%;
        overflow-y: auto;

        & > :not(.-full-width) {
            margin: 1em;
        }

        & > :first-child {
            margin-top: 0 !important;
        }
    }
}
