@use "../theme/breakpoints" as *;

.modal {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 100vw;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0);
    z-index: -99999;
    transition: background 200ms ease;

    &.show, &.out {
        z-index: 99999;
    }

    &.show {
        background: rgba(0, 0, 0, 0.7);

        .modal-body {
            opacity: 1;
        }
    }

    .modal-body {
        opacity: 0;
        position: relative;
        background: white;
        width: 80%;
        padding: 24px;
        max-height: 80%;
        overflow-y: auto;
        transition: opacity 200ms ease;

        &.big {
            width: 90%;
            max-height: 90%;

            @media screen and (max-width: $breakpoints-sm) {
                width: 100%;
                max-height: 100%;
            }
        }

        @media screen and (max-width: $breakpoints-sm) {
            width: 100%;
            max-height: 100%;
        }

        .close {
            background: black;
            color: white;
            height: 40px;
            width: 40px;
            position: absolute;
            display: flex;
            right: 0;
            top: 0;
            justify-content: center;
            align-items: center;
            cursor: pointer;
            z-index: 5;
        }
    }

    .modal-iframe {
        padding: 0;
        height: 90%;

        @media screen and (max-width: $breakpoints-sm) {
            height: 100%;
        }

        iframe {
            width: 100%;
            height: 100%;
            border: none;
        }
    }
}
