/* Homepage event pop-up (core/templates/home/_popup.html) */
.yac-popup {
    padding: 0;
    border: 0;
    background: transparent;
    max-width: min(92vw, 640px);
    max-height: 92vh;
    max-height: 92dvh;
    overflow: visible;
    color: var(--primary-color, #021708);
}
.yac-popup::backdrop {
    background: rgba(2, 23, 8, 0.72);
}
.yac-popup[open] { animation: yacPopupIn .28s cubic-bezier(.2, .8, .2, 1); }
.yac-popup[open]::backdrop { animation: yacPopupFade .28s ease-out; }
@keyframes yacPopupIn { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes yacPopupFade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
    .yac-popup[open], .yac-popup[open]::backdrop { animation: none; }
}

/* The site hides the system cursor on many elements for its custom cursor, which sits below the pop-up. */
.yac-popup, .yac-popup * { cursor: auto; }
.yac-popup a, .yac-popup button { cursor: pointer; }
html.yac-popup-open .cb-cursor { opacity: 0 !important; }
html.yac-popup-open { overflow: hidden; }

.yac-popup__box {
    position: relative;
    background: var(--white-color, #fff);
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
    overflow: hidden;
}
.yac-popup__art { display: block; line-height: 0; background: var(--secondary-color, #FEF2F2); }
.yac-popup__art img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    /* leave room for the button row */
    max-height: calc(92vh - 84px);
    max-height: calc(92dvh - 84px);
    margin: 0 auto;
    object-fit: contain;
}
.yac-popup__box:not(:has(.yac-popup__actions)) .yac-popup__art img { max-height: 92vh; max-height: 92dvh; }

.yac-popup__close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 2px solid var(--white-color, #fff);
    border-radius: 50%;
    background: var(--primary-color, #021708);
    color: var(--white-color, #fff);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .35);
    transition: background-color .2s, transform .2s;
}
.yac-popup__close:hover { background: var(--accent-color, #F26B0F); }
.yac-popup__close:active { transform: scale(.94); }
.yac-popup__close:focus-visible,
.yac-popup__btn:focus-visible,
.yac-popup__art:focus-visible {
    outline: 3px solid var(--accent-color, #F26B0F);
    outline-offset: 3px;
}

.yac-popup__actions {
    padding: 16px;
    display: flex;
    justify-content: center;
}
.yac-popup__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 28px;
    border-radius: 999px;
    background: var(--accent-color, #F26B0F);
    /* dark text: white on this orange is below WCAG AA contrast */
    color: var(--primary-color, #021708);
    font-family: var(--accent-font, inherit);
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
    transition: background-color .2s, color .2s;
}
.yac-popup__btn:hover { background: var(--primary-color, #021708); color: var(--white-color, #fff); }
