#ndt247-ad-system {
    position: relative;
    z-index: 999999;
}

.ndt247-ad-layer {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 999999;
}

.ndt247-ad-layer.ndt247-active {
    display: flex !important;
}

.ndt247-ad-box {
    position: relative;
    display: inline-block;
    width: auto;
    max-width: 92vw;
    max-height: 90vh;
    background: transparent;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

.ndt247-ad-link {
    display: block;
    line-height: 0;
}

.ndt247-ad-image {
    display: block;
    width: auto;
    height: auto;
    max-width: 92vw;
    max-height: 86vh;
    object-fit: contain;
}

.ndt247-ad-placeholder {
    width: min(90vw, 650px);
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    background: #f1f1f1;
    border: 6px solid #fff;
}

.ndt247-ad-close {
    position: absolute;
    top: -22px;
    right: -22px;

    width: 52px;
    height: 52px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;
    border: 4px solid #fff;

    background: #111;
    color: #fff;

    font-size: 38px;
    font-weight: 700;
    line-height: 1;

    cursor: pointer;
    z-index: 100;

    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.45);
}

.ndt247-ad-close:hover {
    transform: scale(1.08);
}

@media (max-width: 600px) {

    .ndt247-ad-layer {
        padding: 12px;
    }

    .ndt247-ad-image {
        max-width: 94vw;
        max-height: 82vh;
    }

    .ndt247-ad-close {
        top: -18px;
        right: -10px;
        width: 48px;
        height: 48px;
        font-size: 34px;
    }
}

.ndt247-ad-close.ndt247-waiting {
    opacity: 0.55;
    cursor: not-allowed;
}

.ndt247-countdown {
    position: absolute;
    left: 50%;
    bottom: -48px;
    transform: translateX(-50%);
    white-space: nowrap;

    padding: 8px 14px;

    background: #111;
    color: #fff;

    border-radius: 6px;

    font-size: 15px;
    font-weight: 700;

    box-shadow: 0 2px 8px rgba(0,0,0,0.35);
}

/*
 * ==============================================
 * BÀI VIẾT TIẾP THEO
 * ==============================================
 */

.ndt247-next-post {
    width: min(92%, 620px);
    margin: 40px auto;
    padding: 18px;

    background: #fff;

    border: 2px solid #111;
    border-radius: 10px;

    box-sizing: border-box;

    text-align: center;

    box-shadow:
        0 4px 18px rgba(0, 0, 0, 0.12);
}

.ndt247-next-title {
    margin-bottom: 15px;

    font-size: 24px;
    font-weight: 800;
    line-height: 1.25;
}

.ndt247-next-link {
    display: block;

    color: inherit;
    text-decoration: none;
}

.ndt247-next-image {
    display: block;

    width: 100%;
    height: auto;

    max-height: 360px;

    margin: 0 auto 14px;

    object-fit: cover;

    border-radius: 7px;
}

.ndt247-next-post-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.35;
}

.ndt247-next-link:hover
.ndt247-next-post-title {
    text-decoration: underline;
}

@media (max-width: 768px) {

    .ndt247-next-post {
        width: calc(100% - 24px);

        margin-top: 28px;
        margin-bottom: 28px;

        padding: 14px;
    }

    .ndt247-next-title {
        font-size: 22px;
    }

    .ndt247-next-post-title {
        font-size: 18px;
    }

    .ndt247-next-image {
        max-height: 300px;
    }
}
