.blo-popup-notice {
    --blo-popup-accent: #e3000a;
    box-sizing: border-box;
    color: #242424;
    font: 400 1rem/1.5 system-ui, sans-serif;
    overflow-wrap: anywhere;
}

.blo-popup-notice *,
.blo-popup-notice *::before,
.blo-popup-notice *::after {
    box-sizing: inherit;
}

dialog.blo-popup-notice {
    position: fixed;
    inset: 0;
    margin: auto;
    padding: 0;
    width: min(var(--blo-popup-width, 580px), calc(100% - 24px));
    max-width: none;
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    overflow: auto;
    overscroll-behavior: contain;
    background: var(--blo-popup-background, #fff);
    color: var(--blo-popup-color, #242424);
    border: 0;
    border-radius: 12px;
    box-shadow: 0 16px 70px rgb(0 0 0 / 28%);
}

dialog.blo-popup-notice::backdrop {
    background: rgb(0 0 0 / 60%);
}

html.blo-popup-modal-open {
    overflow: hidden;
}

.blo-popup-notice .blo-popup-panel {
    position: relative;
    padding: 24px;
    padding-top: 56px;
    text-align: center;
}

aside.blo-popup-notice {
    position: relative;
    width: 100%;
    background: var(--blo-banner-background, #fafafa);
    color: var(--blo-banner-color, #242424);
    border-bottom: 2px solid var(--blo-popup-accent);
}

aside.blo-popup-notice.blo-popup-sticky {
    position: sticky;
    top: 0;
    z-index: 9990;
}

.admin-bar aside.blo-popup-notice.blo-popup-sticky {
    top: 32px;
}

@media (max-width: 782px) {
    .admin-bar aside.blo-popup-notice.blo-popup-sticky { top: 46px; }
}

@media (max-width: 600px) {
    .admin-bar aside.blo-popup-notice.blo-popup-sticky { top: 0; }
}

aside.blo-popup-notice .blo-popup-panel {
    min-height: 48px;
    padding: var(--blo-popup-padding, 12px) 52px;
}

aside.blo-popup-notice.blo-popup-banner-sized .blo-popup-panel {
    display: grid;
    align-items: center;
    min-height: calc(var(--blo-banner-height, 0px) - 2px);
    padding-block: 2px;
}

aside.blo-popup-notice .blo-popup-copy a {
    color: inherit;
    text-decoration: underline;
}

.blo-popup-notice .blo-popup-content {
    display: grid;
    gap: 12px;
    justify-items: center;
}

.blo-popup-notice .blo-popup-close {
    appearance: none;
    position: absolute;
    top: 6px;
    right: 6px;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f0f0f0;
    color: #202020;
    font: 400 27px/1 system-ui, sans-serif;
    cursor: pointer;
    box-shadow: none;
}

dialog.blo-popup-notice .blo-popup-close {
    top: 10px;
    right: 10px;
    width: 44px;
    height: 44px;
    background: transparent;
    color: var(--blo-popup-close-color, #1a1a1a);
}

dialog.blo-popup-notice .blo-popup-close::before,
dialog.blo-popup-notice .blo-popup-close::after {
    content: "";
    grid-area: 1 / 1;
    width: 17px;
    height: 2px;
    border-block-start: 2px solid currentColor;
    border-radius: 2px;
    transform: rotate(45deg);
}

dialog.blo-popup-notice .blo-popup-close::after {
    transform: rotate(-45deg);
}

dialog.blo-popup-notice .blo-popup-close:hover {
    background: transparent;
    background: color-mix(in srgb, currentColor 14%, transparent);
}

dialog.blo-popup-notice .blo-popup-close:focus-visible {
    outline-color: currentColor;
    outline-offset: 0;
}

aside.blo-popup-notice .blo-popup-close {
    top: 50%;
    transform: translateY(-50%);
}

aside.blo-popup-notice.blo-popup-banner-sized .blo-popup-close {
    width: 32px;
    height: min(32px, 100%);
    font-size: 24px;
}

.blo-popup-notice .blo-popup-close:hover { background: #e1e1e1; }
.blo-popup-notice :is(button, a):focus-visible {
    outline: 2px solid #222;
    outline-offset: 3px;
}

.blo-popup-notice .blo-popup-heading {
    margin: 0;
    color: inherit;
    font: 700 clamp(1.15rem, 3vw, 1.65rem)/1.2 system-ui, sans-serif;
}

.blo-popup-notice .blo-popup-copy {
    min-width: 0;
    max-width: 65ch;
    overflow-x: auto;
}

.blo-popup-notice .blo-popup-copy > :first-child { margin-top: 0; }
.blo-popup-notice .blo-popup-copy > :last-child { margin-bottom: 0; }

dialog.blo-popup-notice .blo-popup-copy :where(p, li, blockquote, h1, h2, h3, h4, h5, h6, th, td) {
    color: inherit;
}

.blo-popup-notice img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: auto;
}

aside.blo-popup-notice .blo-popup-image {
    max-height: 30vh;
    width: auto;
    object-fit: contain;
}

.blo-popup-art {
    --blo-overlay-x: var(--blo-overlay-desktop-x);
    --blo-overlay-y: var(--blo-overlay-desktop-y);
    --blo-overlay-width: var(--blo-overlay-desktop-width);
    --blo-overlay-size: var(--blo-overlay-desktop-size);
    position: relative;
    container-type: inline-size;
    width: 100%;
}

.blo-popup-art picture,
.blo-popup-art img,
aside.blo-popup-notice .blo-popup-art img {
    display: block;
    width: 100%;
    height: auto;
    max-height: none;
}

aside.blo-popup-notice .blo-popup-art { max-width: 720px; }

.blo-popup-art[data-blo-overlay-font="arial"] { --blo-overlay-font: Arial, sans-serif; }
.blo-popup-art[data-blo-overlay-font="tahoma"] { --blo-overlay-font: Tahoma, sans-serif; }
.blo-popup-art[data-blo-overlay-font="verdana"] { --blo-overlay-font: Verdana, sans-serif; }
.blo-popup-art[data-blo-overlay-font="georgia"] { --blo-overlay-font: Georgia, serif; }
.blo-popup-art[data-blo-overlay-font="times"] { --blo-overlay-font: "Times New Roman", serif; }

.blo-popup-overlay {
    position: absolute;
    top: var(--blo-overlay-y);
    left: var(--blo-overlay-x);
    width: min(var(--blo-overlay-width), calc(100% - var(--blo-overlay-x)));
    max-height: calc(100% - var(--blo-overlay-y));
    overflow: auto;
    color: var(--blo-overlay-color, #fff);
    text-align: var(--blo-overlay-align, left);
    font: 400 1rem/1.25 var(--blo-overlay-font, system-ui, sans-serif);
    font-size: var(--blo-overlay-size, 1rem);
}

.blo-popup-overlay,
.blo-popup-overlay-fallback {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.blo-popup-overlay:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: -2px;
}

@media (max-width: 600px) {
    .blo-popup-art {
        --blo-overlay-x: var(--blo-overlay-mobile-x);
        --blo-overlay-y: var(--blo-overlay-mobile-y);
        --blo-overlay-width: var(--blo-overlay-mobile-width);
        --blo-overlay-size: var(--blo-overlay-mobile-size);
    }
}

.blo-popup-notice .blo-popup-link {
    display: inline-block;
    padding: .6em 1.1em;
    border-radius: 5px;
    background: var(--blo-popup-accent);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
}

.blo-popup-notice .blo-popup-link:hover { background: #bd0008; }
