.cfg-component-details__trigger {
    border: 0;
    cursor: pointer;
    font: inherit;
    white-space: normal;
    -webkit-tap-highlight-color: transparent;
}

.cfg-component-details__trigger:focus-visible,
.cfg-component-dialog button:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

html.cfg-component-dialog-open,
html.cfg-component-dialog-open body {
    overflow: hidden;
}

.cfg-component-dialog {
    width: min(48rem, calc(100% - 2rem));
    max-width: calc(100% - 2rem);
    max-height: calc(100% - 2rem);
    max-height: calc(100dvh - 2rem);
    margin: auto;
    padding: 0;
    border: 1px solid #ddd;
    border-radius: 0.25rem;
    color: #202020;
    background: #fff;
    box-shadow: 0 1rem 3rem rgb(0 0 0 / 25%);
    overflow: hidden;
}

.cfg-component-dialog[open] {
    display: flex;
    flex-direction: column;
}

.cfg-component-dialog::backdrop {
    background: rgb(0 0 0 / 55%);
}

.cfg-component-dialog__header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid #ddd;
    flex-shrink: 0;
}

.cfg-component-dialog__title {
    flex: 1;
    margin: 0;
    font-size: 1.25rem;
    overflow-wrap: anywhere;
}

.cfg-component-dialog__close {
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    flex-shrink: 0;
    border: 1px solid #ddd;
    border-radius: 0.25rem;
    background: #fff;
    color: inherit;
    font-size: 1.75rem;
    line-height: 1;
    cursor: pointer;
}

.cfg-component-dialog__body {
    min-height: 0;
    padding: 1rem;
    overflow: auto;
    overscroll-behavior: contain;
    overflow-wrap: anywhere;
}

.cfg-component-dialog__body img,
.cfg-component-dialog__body video,
.cfg-component-dialog__body iframe {
    max-width: 100%;
}

.cfg-component-dialog__image {
    display: block;
    width: auto;
    height: auto;
    max-height: 22rem;
    margin: 0 auto 1rem;
    object-fit: contain;
}
