.tn24-ad-popup {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.tn24-ad-popup.is-visible {
    display: flex;
}

.tn24-ad-popup__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
}

.tn24-ad-popup__dialog {
    position: relative;
    z-index: 2;
    max-width: min(720px, 96vw);
    max-height: 90vh;
    background: #fff;
    border-radius: 6px;
    overflow: auto;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.45);
}

.tn24-ad-popup__close {
    position: absolute;
    top: 0.35rem;
    right: 0.5rem;
    z-index: 3;
    border: 0;
    background: transparent;
    font-size: 2rem;
    line-height: 1;
    color: #333;
    cursor: pointer;
}

.tn24-ad-popup__body {
    padding: 2rem 1rem 1rem;
    text-align: center;
}

.tn24-ad-popup__body img {
    max-width: 100%;
    height: auto;
}

body.tn24-popup-open {
    overflow: hidden;
}

.widget_section--has-ad:empty,
.widget_section--has-ad .textwidget:empty {
    display: none;
}

.tn24-ad-slot .tn24-ad-img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}
