/*
 * Popup pages inside the page (assets/js/lotgd.overlay.js).
 *
 * The colours are the skin's: it sets --lotgd-overlay-bg, -fg, -border and
 * -scheme in its style.css from its own palette, so a skin that follows the
 * system's dark mode gets a dark dialog there too. Bootstrap's --bs-body-bg
 * is not used: no bundled skin switches Bootstrap to its dark theme, so it is
 * white on dark skins as well. Without the variables the dialog is dark.
 */
.lotgd-overlay {
    width: min(720px, calc(100vw - 32px));
    max-height: calc(100vh - 64px);
    padding: 0;
    border: 1px solid var(--lotgd-overlay-border, rgba(255, 255, 255, 0.18));
    border-radius: 6px;
    background: var(--lotgd-overlay-bg, #1b1b1b);
    color: var(--lotgd-overlay-fg, #e0e0e0);
    color-scheme: var(--lotgd-overlay-scheme, dark);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.lotgd-overlay::backdrop {
    background: rgba(0, 0, 0, 0.55);
}

.lotgd-overlay[open] {
    display: flex;
    flex-direction: column;
}

.lotgd-overlay__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--lotgd-overlay-border, rgba(255, 255, 255, 0.18));
}

.lotgd-overlay__title {
    margin: 0;
    font-size: 1.1rem;
}

/* Its own cross on every skin, with or without Bootstrap. */
.lotgd-overlay__close {
    flex-shrink: 0;
    padding: 0 4px;
    border: 0;
    background: none;
    color: inherit;
    font-size: 1.5rem;
    line-height: 1;
    opacity: 0.75;
    cursor: pointer;
}

.lotgd-overlay__close:hover,
.lotgd-overlay__close:focus-visible {
    opacity: 1;
}

.lotgd-overlay__close::before {
    content: "\00d7";
}

.lotgd-overlay__body {
    padding: 12px 14px;
    overflow: auto;
}

.lotgd-overlay[aria-busy="true"] .lotgd-overlay__body {
    opacity: 0.6;
}
