.custom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
    background-color: rgba(0, 0, 0, .2);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease, visibility .3s ease;

    &.active {
        opacity: 1;
        visibility: visible;

        .modal-body {
            bottom: 0;
        }
    }

    .modal-body {
        position: absolute;
        bottom: -100%;
        width: 100%;
        max-width: 768px;
        height: auto;
        max-height: 95dvh;
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 0 1rem 1rem;
        background-color: var(--white);
        border-radius: 1.5rem 1.5rem 0 0;
        box-shadow: 1px 2px 5px 2px rgba(0, 0, 0, .1);
        overflow: hidden;
        transition: .4s;

        &.small {
            max-width: 500px;
        }

        header {
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-direction: column;
            margin-bottom: 0;

            &::after {
                content: '';
                position: absolute;
                top: .25rem;
                left: 50%;
                transform: translateX(-50%);
                width: 100%;
                max-width: 100px;
                background: var(--gray);
                height: .375rem;
                border: none;
                border-radius: .25rem;
            }

            img {
                width: 100%;
                max-width: 100px;
                margin: 2rem auto 0;
            }

            h2 {
                font-size: 1.5rem;
                color: var(--dark-grey);
                text-align: center;
                margin: 2.5rem 0 1.5rem;
            }

            p {
                font-size: 1rem;
                color: var(--dark-grey);
                margin: 1rem 0;
                text-align: center;
            }
        }

        .content {
            width: 100%;
            display: flex;
            flex-direction: column;
            row-gap: 2rem;
            padding: .25rem 0 1rem;
            overflow-y: auto;

            .modal-mensagem {
                text-align: center;
            }

            .custom-input {
                &::before {
                    content: '';
                    padding: .25rem 1rem;
                    position: absolute;
                    bottom: 100%;
                    left: 0;
                    width: auto;
                    max-width: 400px;
                    font-size: .75rem;
                    border-radius: .5rem;
                    background: rgba(255, 255, 255, .7);
                    backdrop-filter: blur(1px);
                    z-index: 999;
                    box-shadow: 0 0 1rem rgba(0, 0, 0, .5);
                    opacity: 0;
                    visibility: hidden;
                    transition: all .3s ease;
                }

                &:focus-within {
                    &::before {
                        opacity: 1;
                        visibility: visible;
                    }
                }
            }
        }

        .botoes {
            width: 100%;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 1rem;
            padding: 1rem 0 0;

            span {
                font-size: .75rem;
                color: var(--grey);
            }

            button {
                width: 100%;
                &.cancelar {
                    display: none;
                }
            }
        }
    }
}

@media (min-width: 768px) {
    .custom-modal {
        
        .modal-body {
            position: relative;
            border-radius: .5rem;
            padding: 0 2rem 2rem;

            header {
                height: auto;

                &::after {
                    all: initial;
                }
            }

            .content {
                padding: .25rem 0 1rem;
            }

            .botoes {
                flex-direction: row;

                span {
                    margin-right: auto;
                }

                button {
                    width: auto;

                    &.cancelar {
                        display: flex;
                    }
                }
            }
        }
    }
}

@media (min-width: 991px) {
    .custom-modal {
        
        .modal-body {
            .content {
                padding: .25rem 1rem 1rem;
            }
        }
    }
}