/*
 * Popup ad (front.includes.ads.popup). Loaded only on pages that carry one.
 */
.ak-popup {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.ak-popup[hidden] {
    display: none;
}

.ak-popup__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .65);
    animation: ak-popup-fade .2s ease-out;
}

.ak-popup__dialog {
    position: relative;
    width: 100%;
    max-height: calc(100vh - 32px);
    overflow: auto;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .35);
    animation: ak-popup-rise .25s ease-out;
    outline: none;
}

.ak-popup__dialog--small { max-width: 400px; }
.ak-popup__dialog--medium { max-width: 600px; }
.ak-popup__dialog--large { max-width: 800px; }

.ak-popup__body {
    padding: 28px 12px 12px;
    text-align: center;
}

.ak-popup__body img {
    display: block;
    width: 100%;
    height: auto;
}

.ak-popup__body iframe {
    max-width: 100%;
}

/* Small "বিজ্ঞাপন" (advertisement) label, top left. */
.ak-popup__tag {
    position: absolute;
    top: 6px;
    left: 12px;
    font-size: 12px;
    color: #888;
}

.ak-popup__close {
    position: absolute;
    top: 4px;
    right: 4px;
    z-index: 1;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border: 0;
    border-radius: 16px;
    background: #A2268D;
    color: #fff;
    font-size: 22px;
    line-height: 32px;
    cursor: pointer;
}

.ak-popup__close:hover,
.ak-popup__close:focus-visible {
    background: #7d1d6d;
}

.ak-popup__close:focus-visible {
    outline: 2px solid #fff;
    outline-offset: -4px;
}

/* During the close countdown the button shows the seconds left and does nothing. */
.ak-popup__count {
    display: none;
    font-size: 15px;
}

.ak-popup--counting .ak-popup__close {
    background: #777;
    cursor: default;
}

.ak-popup--counting .ak-popup__count {
    display: inline;
}

.ak-popup--counting .ak-popup__x {
    display: none;
}

/* The page behind stays put while the popup is open. */
body.ak-popup-open {
    overflow: hidden;
}

@keyframes ak-popup-fade {
    from { opacity: 0; }
}

@keyframes ak-popup-rise {
    from { opacity: 0; transform: translateY(16px) scale(.98); }
}

@media (prefers-reduced-motion: reduce) {
    .ak-popup__backdrop,
    .ak-popup__dialog {
        animation: none;
    }
}
