.overlay {
    position: fixed;
    opacity: 0;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9;
    background-color: var(--backdrop);
    visibility: hidden;
    transition: var(--transition-property) var(--transition-duration-macro-medium) var(--transition-timing-function);

    &.open {
        opacity: 1;
        visibility: visible;
    }
}

.dialog {
    transform: scale(0.2);
    opacity: 0;
    box-shadow: var(--shadow-xl);
    max-width: 40rem;
    transition: var(--transition-property) var(--transition-duration-macro-medium) var(--transition-timing-function);

    &.open {
        transform: scale(1);
        opacity: 1;
        visibility: visible;
    }

    @media (--m) {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        max-width: 100%;
        border-radius: var(--radius-l) var(--radius-l) 0 0;
    }
}