.dialog-container,
.dialog-overlay {
    position: fixed;
    inset: 0;
}

.dialog-container {
    z-index: 2;
    display: flex;

    &[aria-hidden='true'] {
        display: none;
    }
}

.dialog-overlay {
    background-color: rgba(0, 0, 0, .72);
    animation: fade-in .2s ease forwards;
}

@keyframes fade-in {
    from {
        opacity: 0;
    }
}

.dialog-content {
    position: absolute;
    z-index: 2;
    top: 1.25rem;
    bottom: 1.25rem;
    left: 50%;
    width: min(54rem, calc(100% - 2rem));
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: var(--surface);
    border: .0625rem solid var(--line-strong);
    border-radius: .875rem;
    box-shadow: 0 2rem 4rem -1rem rgba(0, 0, 0, .8);
    transform: translateX(-50%);
}

.dialog-header {
    flex: none;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: .0625rem solid var(--line);
}

.dialog-heading {
    margin-right: auto;
    font-size: 1.1rem;
}

.dialog-language {
    width: auto;
    max-width: none;
    margin: 0;

    > span:first-child {
        min-width: 0;
    }

    select {
        min-width: 5rem;
    }
}

.dialog-close-btn {
    flex: none;
    width: 2.375rem;
    height: 2.375rem;
    padding: 0;
}

.dialog-body {
    flex: 1;
    min-height: 0;
}

.dialog-footer {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    padding: .9rem 1.25rem;
    border-top: .0625rem solid var(--line);
}

.dialog-footer__hint {
    margin-right: auto;
    font-size: .8125rem;
    color: var(--muted);
}

@media screen and (max-width: 640px) {
    .dialog-content {
        inset: 0;
        width: 100%;
        border: 0;
        border-radius: 0;
        transform: none;
    }

    .dialog-header {
        flex-wrap: wrap;
        padding: .8rem 1rem;
    }

    .dialog-footer__hint {
        display: none;
    }
}
