.nettsite-popup {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
}

.nettsite-popup.is-open {
    display: flex;
}

.nettsite-popup[data-position="left"] {
    justify-content: flex-start;
    padding-left: var(--nettsite-popup-offset, 0px);
}

.nettsite-popup[data-position="right"] {
    justify-content: flex-end;
    padding-right: var(--nettsite-popup-offset, 0px);
}

.nettsite-popup[data-position="top"] {
    align-items: flex-start;
    padding-top: var(--nettsite-popup-offset, 0px);
}

.nettsite-popup[data-position="bottom"] {
    align-items: flex-end;
    padding-bottom: var(--nettsite-popup-offset, 0px);
}

.nettsite-popup__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.nettsite-popup__box {
    position: relative;
    max-width: 95vw;
    max-height: 90vh;
    min-width: 0;
    overflow-y: auto;
    overflow-x: hidden;
    background: #fff;
    border-radius: 6px;
    padding: 1.5rem 2rem;
    box-sizing: border-box;
    opacity: 0;
    transform: scale(0.96);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.nettsite-popup.is-open .nettsite-popup__box {
    opacity: 1;
    transform: scale(1);
}

.nettsite-popup__content {
    overflow-wrap: anywhere;
}

.nettsite-popup__content > *:first-child {
    margin-top: 0;
}

.nettsite-popup__content > *:last-child {
    margin-bottom: 0;
}

.nettsite-popup__content img,
.nettsite-popup__content video,
.nettsite-popup__content iframe {
    max-width: 100%;
    max-height: 50vh;
    width: auto;
    height: auto;
    display: block;
    margin: 0 auto;
}

.nettsite-popup__content table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
}

@media (max-width: 600px) {
    .nettsite-popup__box {
        max-width: 92vw;
        padding: 1.25rem;
    }
}

.nettsite-popup__close {
    position: absolute;
    top: 0.5rem;
    right: 0.75rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: #333;
}

.nettsite-popup__close--footer {
    position: static;
    display: block;
    margin: 1rem 0 0 auto;
    background: #1a1a1a;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.2;
    padding: 0.65rem 1.75rem;
    border-radius: 4px;
}
