/* mod_simplepopup – Layout, Positionierung und Animation.
   Ausrichtung (align-items/justify-content), Größe, Hintergrundfarbe, Rand
   und Schatten kommen als Inline-Style aus den Moduleinstellungen
   (tmpl/default.php) und werden hier bewusst nicht erneut gesetzt. */

.hkpopup-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease;
}

.hkpopup-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

.hkpopup-box {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
    overflow-y: auto;
    border-radius: 10px;
    padding: 32px 28px;
    text-align: left;
    box-sizing: border-box;
    transition: transform 0.45s ease;
    transform: translate(var(--hkpopup-offset-x, 0), var(--hkpopup-offset-y, 0));
}

.hkpopup-overlay.is-visible .hkpopup-box {
    transform: none;
}

.hkpopup-content a {
    color: var(--hkpopup-link-color, revert);
}

.hkpopup-close {
    position: absolute;
    top: 6px;
    right: 10px;
    z-index: 3;
    background: none;
    border: none;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    color: inherit;
    opacity: 0.6;
    padding: 4px 8px;
}

.hkpopup-close:hover {
    opacity: 1;
}

.hkpopup-link-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.hkpopup-content {
    position: relative;
    z-index: 0;
}

.hkpopup-content img {
    max-width: 100%;
    height: auto;
}

body.hkpopup-open {
    overflow: hidden;
}

@media (max-width: 480px) {
    .hkpopup-box {
        padding: 24px 20px;
    }
}
