:root {
    --font-source-sans-pro: 'Source Sans Pro', sans-serif;
    --primary-color: rgba(22, 85, 129, 1);
}

.dialog {
    position: fixed;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 1rem;

    visibility: hidden;
    opacity: 0;
    pointer-events: none;

    transition:
        opacity 200ms ease,
        visibility 200ms ease;

    z-index: 1000;
}

.dialog.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.dialog-backdrop {
    position: absolute;
    inset: 0;

    background: rgba(0, 0, 0, 0);
    transition: background 200ms ease;
}

.dialog.is-open .dialog-backdrop {
    background: rgba(0, 0, 0, 0.5);
}

.dialog-content {
    position: relative;

    width: min(480px, calc(100vw - 2rem));
    max-height: calc(100vh - 2rem);

    overflow-y: auto;

    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);

    transform: translateY(24px);
    opacity: 0;

    transition:
        transform 250ms cubic-bezier(0.22, 1, 0.36, 1),
        opacity 200ms ease;
}

.dialog.is-open .dialog-content {
    transform: translateY(0);
    opacity: 1;
}

.dialog-header,
.dialog-body,
.dialog-footer {
    padding: 1rem 1.25rem;
}

.dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    border-bottom: 1px solid #eee;
}

.dialog-body {
    font-size: 0.85rem;
    line-height: 1.6;
    font-family: var(--font-source-sans-pro);
}

.dialog-body header h2{
    margin: 0;
    color: var(--primary-color);
    font-size: 1.6rem;
    font-family: var(--font-source-sans-pro);
}

.dialog-body dt {
    font-weight: bold;
    color: var(--primary-color);
}

.dialog-body dd {
    margin: 0;
    text-align: justify;
}

.dialog-body table {
    width: 100%;
    color: var(--primary-color);
}

.dialog-body thead {
    border-bottom: solid var(--primary-color) 1px;
}

.dialog-body .ta-left {
    text-align: left;
}

.dialog-body .ta-right {
    text-align: right;
}

.dialog-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;

    border-top: 1px solid #eee;
}

.dialog-close {
    padding: 0;
    border: none;
    background: none;

    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
    .dialog,
    .dialog-backdrop,
    .dialog-content {
        transition: none;
    }
}
