.tbam-ad {
    display: block;
    max-width: 100%;
    overflow: hidden;
}

.tbam-ad img,
.tbam-ad video {
    display: block;
    width: 100%;
    height: auto;
}

.tbam-ad a {
    display: block;
}

.tbam-popup {
    position: fixed;
    inset: 0;
    z-index: 999999;
    opacity: 0;
    transition: opacity .25s ease;
}

.tbam-popup.is-visible {
    opacity: 1;
}

.tbam-popup__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 13, 22, .72);
    backdrop-filter: blur(7px);
}

.tbam-popup__dialog {
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(92vw, 760px);
    max-height: 88vh;
    transform: translate(-50%, -46%) scale(.97);
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 28px 90px rgba(0, 0, 0, .35);
    overflow: hidden;
    transition: transform .3s cubic-bezier(.2, .8, .2, 1);
}

.tbam-popup.is-visible .tbam-popup__dialog {
    transform: translate(-50%, -50%) scale(1);
}

.tbam-popup__dialog img,
.tbam-popup__dialog video {
    display: block;
    width: 100%;
    max-height: 82vh;
    object-fit: contain;
}

.tbam-popup__close {
    position: absolute;
    z-index: 2;
    right: 12px;
    top: 12px;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: rgba(15, 18, 30, .82);
    color: #fff;
    font-size: 25px;
    line-height: 34px;
    cursor: pointer;
}
