/* WRAPPER */
.o-ui-dialog-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    padding: 1rem;
}

/* WRAPPER | SCROLLING */
.o-ui-dialog-wrapper-scrolling {
    align-items: flex-start;
}

/* DIALOG */
.o-ui-dialog {
    position: relative;
    background-color: var(--o-ui-bg-alias-surface);
    border-radius: var(--o-ui-br-4);
    display: grid;
    overflow: hidden;
    align-items: stretch;
    grid-template-areas: "image image" "aside aside";
    grid-template-rows: min-content auto;
}

@media screen and (min-width: 768px) {
    .o-ui-dialog {
        grid-template-rows: unset;
        grid-template-areas: "image aside";
        grid-template-columns: min-content auto;
    }
}

/* DIALOG | ASIDE */
.o-ui-dialog-aside {
    padding: var(--o-ui-sp-9);
    grid-area: aside;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* DIALOG | SIZES */
.o-ui-dialog-sm {
    width: 544px;
}

.o-ui-dialog-md {
    width: 800px;
}

.o-ui-dialog-lg {
    width: 960px;
}

/* DIALOG | IMAGE & ILLUSTRATION */
.o-ui-dialog-image,
.o-ui-dialog-illustration {
    width: 100%;
    height: var(--o-ui-sz-14);
    grid-area: image;
    overflow: hidden;
}

@media screen and (min-width: 768px) {
    .o-ui-dialog-image,
    .o-ui-dialog-illustration {
        width: var(--o-ui-sz-15);
        height: 100%;
    }
}

.o-ui-dialog-image img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    overflow: hidden;
    object-fit: cover;
    object-position: top center;
}

.o-ui-dialog-illustration {
    padding: var(--o-ui-sp-7);
}

/* DIALOG | HEADER SECTION */
.o-ui-dialog-header-section {
    display: flex;
    justify-content: space-between;
    gap: var(--o-ui-sp-4);
    flex-wrap: wrap;
}

/* DIALOG | HEADER SECTION | HEADING */
.o-ui-dialog .o-ui-dialog-heading {
    align-self: center;
    margin-bottom: 0;
}

/* DIALOG | HEADER SECTION | HEADER */
.o-ui-dialog-header {
    align-self: center;
    max-width: var(--o-ui-sz-14);
    flex-shrink: 0;
}

/* DIALOG | CONTENT */
.o-ui-dialog-content {
    margin-top: var(--o-ui-sp-4);
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

/* DIALOG | FOOTER SECTION */
.o-ui-dialog-footer-section {
    display: flex;
    justify-content: space-between;
    padding-top: var(--o-ui-sp-6);
    margin-top: auto;
    gap: var(--o-ui-sp-4);
}

/* DIALOG | FOOTER SECTION | FOOTER */
.o-ui-dialog-footer {
    align-self: center;
    width: 100%;
}

/* DIALOG | FOOTER SECTION | BUTTONS */
.o-ui-dialog-button,
.o-ui-dialog-button-group {
    justify-content: flex-end;
    margin-left: auto;
}

.o-ui-dialog-button-group {
    width: 100%;
}

/* DISMISS BUTTON */
.o-ui-dialog .o-ui-dialog-dismiss-button {
    position: absolute;
    right: var(--o-ui-sp-4);
    top: var(--o-ui-sp-4);
}
