/* ==========================================================================
   OLA Ads Module — ~/Public/AD/Assets/css/ola-ads.css
   Load sau Bootstrap + styles site. Kích thước tùy AdManager.AdOptions.
   ========================================================================== */

/* --- Wrapper linh hoạt (AdManager.Render) --- */
.ola-ad-root {
    --ola-ad-w: 100%;
    --ola-ad-h: auto;
    --ola-ad-radius: var(--ola-ad-radius-default, 8px);
    width: var(--ola-ad-w);
    height: var(--ola-ad-h);
    border-radius: var(--ola-ad-radius);
    overflow: hidden;
    position: relative;
    display: block;
    box-sizing: border-box;
    max-width: 100%;
}

.ola-ad-root--fixed-h {
    min-height: var(--ola-ad-h);
}

.ola-ad-root--custom .ola-ad-banner,
.ola-ad-root--custom .ola-ad-video,
.ola-ad-root--custom .ola-ad-google {
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: 100%;
    border-radius: inherit;
}

.ola-ad-root--custom.ola-ad-root--fixed-h .ola-ad-video {
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    aspect-ratio: unset;
}

.ola-ad-root--custom .ola-ad-banner__link,
.ola-ad-root--custom .ola-ad-banner picture {
    display: block;
    width: 100%;
    height: 100%;
}

.ola-ad-root--custom .ola-ad-banner__img {
    width: 100%;
    height: 100%;
    max-height: none;
}

.ola-ad-root .ola-ad-video .ad-yt-player,
.ola-ad-root .ola-ad-video__mp4 {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Lớp click link trên video (dưới toolbar) */
.ola-ad-hitlayer {
    position: absolute;
    inset: 0;
    z-index: 8;
    display: block;
    cursor: pointer;
    background: transparent;
    text-indent: -9999px;
    overflow: hidden;
}

.ola-ad-video__toolbar {
    z-index: var(--ola-ad-z-toolbar, 25);
}

.ola-ad-video__toolbar ~ .ola-ad-hitlayer {
    /* Không che toolbar (đã thu gọn) */
    bottom: 40px;
}

:root {
    --ola-ad-radius-default: 8px;
    --ola-ad-radius: var(--md-radius, 8px);
    --ola-ad-primary: var(--md-primary, #0b57d0);
    --ola-ad-border: var(--ola-border, #e2e8f0);
    --ola-ad-bg-page: var(--ola-bg-page, #f4f7fb);
    --ola-ad-bg-placeholder: #f1f5f9;
    --ola-ad-bg-placeholder-hover: #e2e8f0;
    --ola-ad-text-muted: #64748b;
    --ola-ad-overlay: linear-gradient(0deg, rgba(255, 255, 255, 0.22), rgba(11, 87, 208, 0.1));
    --ola-ad-hover-filter: brightness(1.07) saturate(1.04);
    --ola-ad-full-top-h: 250px;
    --ola-ad-full-top-video-h: 300px;
    --ola-ad-full-bottom-h: 250px;
    --ola-ad-full-bottom-video-h: 180px;
    --ola-ad-home-top-video-h: 400px;
    --ola-ad-home-mid-video-h: 400px;
    --ola-ad-home-mid-video-h-mobile: 120px;
    --ola-ad-strip-video-h: 150px;
    --ola-ad-sidebar-video-h: 280px;
    --ola-ad-sidebar-video-h-mobile: 250px;
    --ola-ad-sidebar-img-max-h: 500px;
    --ola-cat-sidebar-w: 100%;
    --ola-cat-sidebar-h: auto;
    /* CATEGORY-SIDEBAR dùng chung biến sidebar với DETAIL-SIDEBAR */
    --ola-cat-sidebar-video-h: var(--ola-ad-sidebar-video-h);
    --ola-cat-sidebar-video-h-mobile: var(--ola-ad-sidebar-video-h-mobile);
    --ola-cat-sidebar-video-w: 100%;
    --ola-ad-z-toolbar: 25;
    --ola-ad-z-expand: 10050;
    /* Toolbar video QC — icon-only, gọn */
    --ola-ad-btn-h: 32px;
    --ola-ad-btn-min-w: 32px;
    --ola-ad-btn-pad-x: 0;
    --ola-ad-btn-pad-y: 0;
    --ola-ad-btn-fs: 0.75rem;
    --ola-ad-btn-gap: 4px;
    --ola-ad-btn-radius: 30px;
    --ola-ad-btn-icon: 13px;
    --ola-ad-toolbar-inset: 8px;
    --ola-ad-toolbar-gap: 5px;
}

/* --- Layout bands --- */
.ola-ad-band-top {
    width: 100%;
    line-height: 0;
    background-color: var(--ola-ad-bg-page);
    border-bottom: 1px solid var(--ola-ad-border);
}

/* --- Slot & placeholder --- */
.ola-ad-slot {
    width: 100%;
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.ola-ad-placeholder {
    width: 100%;
    min-height: 0;
    background-color: var(--ola-ad-bg-placeholder);
    border: 0px dashed #cbd5e1;
    border-radius: var(--ola-ad-radius);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    text-decoration: none !important;
    color: var(--ola-ad-text-muted) !important;
}

.ola-ad-placeholder:hover {
    background-color: var(--ola-ad-bg-placeholder-hover);
    border-color: var(--ola-ad-primary);
}

.ola-ad-placeholder i {
    font-size: 24px;
    margin-bottom: 10px;
    opacity: 0.7;
    transition: color 0.3s ease;
}

.ola-ad-placeholder:hover i {
    color: var(--ola-ad-primary);
    opacity: 1;
}

.ola-ad-placeholder .ad-label {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.ola-ad-placeholder .ad-size-hint {
    font-size: 12px;
    line-height: 1.45;
    background-color: transparent;
    padding: 8px 10px;
    margin-top: 10px;
    border-radius: 4px;
    border: 1px solid var(--ola-ad-border);
    text-align: left;
    max-width: 100%;
}

.ola-ad-placeholder .ad-size-hint strong {
    font-weight: 700;
    color: #334155;
}

.ola-ad-placeholder .ad-size-hint .ad-size-hint__mob,
.ola-ad-placeholder .ad-size-hint .ad-size-hint__sub {
    font-size: 11px;
    color: var(--ola-ad-text-muted);
}

/* --- Placeholder WYSIWYG: khung demo = khung QC thật (P1AdSlotSpecs / biến :root) --- */
.ola-ad-slot:has(> .ola-ad-placeholder) {
    align-items: stretch;
    justify-content: flex-start;
}

.ola-ad-slot > .ola-ad-placeholder {
    flex: 1 1 auto;
    align-self: stretch;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: auto;
}

/* Vùng phía trên (gradient) = kích thước video/khung cố định trong báo giá */
.ola-ad-placeholder[data-ad-position="FULL-TOP"],
.ola-ad-placeholder[data-ad-position="FULL-BOTTOM"],
.ola-ad-placeholder[data-ad-position="HOME-TOP"],
.ola-ad-placeholder[data-ad-position="HOME-MID"],
.ola-ad-placeholder[data-ad-position="HOME-SIDEBAR"],
.ola-ad-placeholder[data-ad-position="DETAIL-TOP"],
.ola-ad-placeholder[data-ad-position="DETAIL-MID"],
.ola-ad-placeholder[data-ad-position="DETAIL-SIDEBAR"],
.ola-ad-placeholder[data-ad-position="CATEGORY-TOP"],
.ola-ad-placeholder[data-ad-position="CATEGORY-MID"],
.ola-ad-placeholder[data-ad-position="CATEGORY-SIDEBAR"] {
    background-repeat: no-repeat;
    background-size: 100% var(--ola-ad-ph-frame-h, 250px);
}

.ola-ad-placeholder[data-ad-position="FULL-TOP"] {
    --ola-ad-ph-frame-h: var(--ola-ad-full-top-h);
    min-height: var(--ola-ad-full-top-h);
    background-image: linear-gradient(to bottom, rgba(11, 87, 208, 0.07) 0, rgba(11, 87, 208, 0.07) var(--ola-ad-ph-frame-h), var(--ola-ad-bg-placeholder) var(--ola-ad-ph-frame-h));
}

.ola-ad-placeholder[data-ad-position="FULL-BOTTOM"] {
    --ola-ad-ph-frame-h: var(--ola-ad-full-bottom-h);
    min-height: var(--ola-ad-full-bottom-h);
    background-image: linear-gradient(to bottom, rgba(11, 87, 208, 0.07) 0, rgba(11, 87, 208, 0.07) var(--ola-ad-ph-frame-h), var(--ola-ad-bg-placeholder) var(--ola-ad-ph-frame-h));
}

.ola-ad-placeholder[data-ad-position="HOME-TOP"],
.ola-ad-placeholder[data-ad-position="DETAIL-TOP"],
.ola-ad-placeholder[data-ad-position="DETAIL-MID"],
.ola-ad-placeholder[data-ad-position="CATEGORY-TOP"],
.ola-ad-placeholder[data-ad-position="CATEGORY-MID"] {
    --ola-ad-ph-frame-h: var(--ola-ad-home-top-video-h);
    min-height: var(--ola-ad-home-top-video-h);
    background-image: linear-gradient(to bottom, rgba(11, 87, 208, 0.07) 0, rgba(11, 87, 208, 0.07) var(--ola-ad-ph-frame-h), var(--ola-ad-bg-placeholder) var(--ola-ad-ph-frame-h));
}

.ola-ad-placeholder[data-ad-position="HOME-MID"] {
    --ola-ad-ph-frame-h: var(--ola-ad-home-mid-video-h);
    min-height: var(--ola-ad-home-mid-video-h);
    background-image: linear-gradient(to bottom, rgba(11, 87, 208, 0.07) 0, rgba(11, 87, 208, 0.07) var(--ola-ad-ph-frame-h), var(--ola-ad-bg-placeholder) var(--ola-ad-ph-frame-h));
}

.ola-ad-placeholder[data-ad-position="HOME-SIDEBAR"],
.ola-ad-placeholder[data-ad-position="DETAIL-SIDEBAR"],
.ola-ad-placeholder[data-ad-position="CATEGORY-SIDEBAR"] {
    --ola-ad-ph-frame-h: var(--ola-ad-sidebar-video-h);
    min-height: var(--ola-ad-sidebar-video-h);
    background-image: linear-gradient(to bottom, rgba(11, 87, 208, 0.07) 0, rgba(11, 87, 208, 0.07) var(--ola-ad-ph-frame-h), var(--ola-ad-bg-placeholder) var(--ola-ad-ph-frame-h));
}

.ola-ad-band-top .ola-ad-slot--full-top:has(> .ola-ad-placeholder) {
    display: block;
    height: var(--ola-ad-full-top-h);
    min-height: var(--ola-ad-full-top-h);
    max-height: var(--ola-ad-full-top-h);
    overflow: hidden;
}

.ola-ad-band-top .ola-ad-slot--full-top > .ola-ad-placeholder {
    height: 100%;
    min-height: 100%;
    max-height: 100%;
    margin: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
    overflow-y: auto;
}

.ola-page-bottom-ad .ola-ad-slot--full-bottom:has(> .ola-ad-placeholder) {
    min-height: var(--ola-ad-full-bottom-h);
}

.ola-ad-slot--home-top:has(> .ola-ad-placeholder),
.ola-ad-slot--home-mid:has(> .ola-ad-placeholder),
.ola-ad-slot--home-sidebar:has(> .ola-ad-placeholder),
.ola-ad-slot--detail-top:has(> .ola-ad-placeholder),
.ola-ad-slot--detail-mid:has(> .ola-ad-placeholder),
.ola-ad-slot--detail-sidebar:has(> .ola-ad-placeholder),
.ola-ad-slot--category-sidebar:has(> .ola-ad-placeholder),
.ola-ad-slot--infeed:has(> .ola-ad-placeholder) {
    display: block;
    overflow: hidden;
}

.ola-ad-slot--home-top > .ola-ad-placeholder {
    min-height: var(--ola-ad-home-top-video-h);
}

.ola-ad-slot--home-mid > .ola-ad-placeholder {
    min-height: var(--ola-ad-home-mid-video-h);
}

.ola-ad-slot--home-sidebar > .ola-ad-placeholder,
.ola-ad-slot--detail-sidebar > .ola-ad-placeholder,
.ola-ad-slot--category-sidebar > .ola-ad-placeholder {
    min-height: var(--ola-ad-sidebar-video-h);
}

.ola-ad-slot--detail-top > .ola-ad-placeholder,
.ola-ad-slot--detail-mid > .ola-ad-placeholder,
.ola-ad-slot--infeed > .ola-ad-placeholder {
    min-height: var(--ola-ad-home-top-video-h);
}

/* --- Shared media hover (banner + google) --- */
.ola-ad-banner,
.ola-ad-google {
    position: relative;
    overflow: hidden;
    border-radius: var(--ola-ad-radius);
    isolation: isolate;
}

.ola-ad-banner {
    display: block;
    line-height: 0;
}

/* Chỉ áp cho link wrapper của banner (không áp cho CTA "Xem thêm") */
.ola-ad-banner .ola-ad-banner__link {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: inherit;
}

.ola-ad-banner::after,
.ola-ad-google::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    background: var(--ola-ad-overlay);
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: auto;
    border-radius: inherit;
}

.ola-ad-banner:hover::after,
.ola-ad-google:hover::after {
    opacity: 1;
}

.ola-ad-banner picture {
    display: block;
    overflow: hidden;
    border-radius: inherit;
}

.ola-ad-banner img,
.ola-ad-banner .ola-ad-banner__img,
.ola-ad-google img {
    max-width: 100%;
    width: 100%;
    height: auto;
    display: block;
    border-radius: inherit;
    transition: filter 0.25s ease;
    transform: none !important;
}

.ola-ad-banner:hover img,
.ola-ad-banner:hover .ola-ad-banner__img,
.ola-ad-google:hover img {
    transform: none !important;
    filter: var(--ola-ad-hover-filter);
}

/* Ảnh QC: chỉ nút Xem thêm góc phải dưới (không toolbar video) */
.ola-ad-banner--has-cta .ola-ad-banner__cta {
    position: absolute;
    bottom: var(--ola-ad-toolbar-inset);
    left: var(--ola-ad-toolbar-inset);
    right: auto;
    z-index: 12;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    pointer-events: auto;
}

.ola-ad-banner--has-cta .ola-ad-banner__cta .ad-link-btn {
    pointer-events: auto;
    display: inline-flex;
    overflow: visible;
    border-radius: var(--ola-ad-btn-radius);
}

#heroSideCarousel .carousel-item.ola-ad-banner--hero .ola-ad-banner__cta {
    bottom: var(--ola-ad-toolbar-inset);
    left: var(--ola-ad-toolbar-inset);
    z-index: 20;
}

/* Video: Xem thêm trái; Xem full + tiếng phải */
.ola-ad-video__toolbar--has-link .ad-link-btn {
    order: 0;
    margin-right: auto;
}

.ola-ad-video__toolbar--has-link .ola-ad-video__toolbar-actions {
    order: 1;
}

/* --- Video base --- */
.ola-ad-video {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: var(--ola-ad-radius);
    background: #d2d0d0;
}

.ola-ad-video .ad-yt-player {
    position: absolute;
    top: 50%;
    left: 50%;
    border: none;
    pointer-events: none;
    transform: translate(-50%, -50%);
    transform-origin: center center;
}

    .ola-ad-video > .ola-ad-video__frame {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        overflow: hidden;
        z-index: 1;
        background: #d2d0d0;
        line-height: 0;
    }

.ola-ad-video > .ola-ad-video__frame .ad-yt-player {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: none;
}

/* --- Position: HOME-TOP --- */
.ola-ad-home-top-panel {
    padding: 8px 0 4px;
}

.ola-ad-slot--home-top {
    margin-bottom: 16px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

.ola-ad-slot--home-top:has(.ola-ad-video) {
    overflow: hidden;
    line-height: 0;
    font-size: 0;
}

/* HOME-TOP: khung cao 400px, video cover full ngang (kiểu FULL-TOP) */
.ad-pos-home-top.ola-ad-video,
#Panel_Ad_Home_Top .ola-ad-video {
    width: 100%;
    height: var(--ola-ad-home-top-video-h);
    max-height: var(--ola-ad-home-top-video-h);
    aspect-ratio: unset;
    background: #000;
    overflow: hidden;
    container-type: size;
    container-name: ola-home-top-video;
}

.ola-ad-slot--home-top .ola-ad-root:has(.ola-ad-video) {
    width: 100%;
    height: var(--ola-ad-home-top-video-h);
    display: block;
}

.ad-pos-home-top.ola-ad-video > .ola-ad-video__frame,
#Panel_Ad_Home_Top .ola-ad-video > .ola-ad-video__frame {
    transform: none;
    /* Nới khung lên/xuống 1px để triệt đường seam ngang do subpixel */
    top: -1px;
    bottom: -1px;
    height: calc(100% + 2px);
}

.ad-pos-home-top.ola-ad-video > .ola-ad-video__frame .ad-yt-player,
#Panel_Ad_Home_Top .ola-ad-video > .ola-ad-video__frame .ad-yt-player {
    display: block;
    top: 50% !important;
    left: 50% !important;
    width: max(100cqw, calc(100cqh * 16 / 9)) !important;
    height: max(100cqh, calc(100cqw * 9 / 16)) !important;
    max-width: none !important;
    min-width: unset !important;
    min-height: unset !important;
    aspect-ratio: 16 / 9 !important;
    border: 0;
    outline: 0;
    box-shadow: none;
    pointer-events: none;
    transform: translate3d(-50%, -50%, 0) scale(1.18) !important;
    transform-origin: center center !important;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    will-change: transform;
}

/* Fallback: rộng → full width 16:9; hẹp → full height */
@supports not (width: 1cqw) {
    .ad-pos-home-top.ola-ad-video > .ola-ad-video__frame .ad-yt-player,
    #Panel_Ad_Home_Top .ola-ad-video > .ola-ad-video__frame .ad-yt-player {
        width: 100% !important;
        height: auto !important;
        min-width: 100% !important;
        min-height: unset !important;
        transform: translate3d(-50%, -50%, 0) scale(1.2) !important;
    }
}

@media (max-width: 767px) {
    @supports not (width: 1cqw) {
        .ad-pos-home-top.ola-ad-video > .ola-ad-video__frame .ad-yt-player,
        #Panel_Ad_Home_Top .ola-ad-video > .ola-ad-video__frame .ad-yt-player {
            width: auto !important;
            height: 100% !important;
            min-width: 100% !important;
            min-height: 100% !important;
        }
    }
}

#Panel_Ad_Home_Top .ola-ad-banner.ad-pos-home-top,
.ola-ad-slot--home-top .ola-ad-banner.ad-pos-home-top {
    width: 100%;
    height: auto;
    max-height: none;
    overflow: visible;
    line-height: 0;
}

#Panel_Ad_Home_Top .ola-ad-banner.ad-pos-home-top a,
.ola-ad-slot--home-top .ola-ad-banner.ad-pos-home-top a,
#Panel_Ad_Home_Top .ola-ad-banner.ad-pos-home-top picture,
.ola-ad-slot--home-top .ola-ad-banner.ad-pos-home-top picture {
    display: grid;
    width: 100%;
}

#Panel_Ad_Home_Top .ola-ad-banner.ad-pos-home-top .ola-ad-banner__img,
.ola-ad-slot--home-top .ola-ad-banner.ad-pos-home-top .ola-ad-banner__img,
#Panel_Ad_Home_Top .ola-ad-banner.ad-pos-home-top img,
.ola-ad-slot--home-top .ola-ad-banner.ad-pos-home-top img {
    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: none;
    object-fit: contain;
    border-radius: var(--ola-ad-radius);
}

/* --- Position: HOME-MID --- */
/* HOME-MID video dùng cùng chuẩn kích thước/cover như HOME-TOP */
.ad-pos-home-mid.ola-ad-video,
#Panel_Ad_Home_Mid .ola-ad-video {
    width: 100%;
    height: var(--ola-ad-home-mid-video-h);
    max-height: var(--ola-ad-home-mid-video-h);
    aspect-ratio: unset;
    background: #000;
    overflow: hidden;
    container-type: size;
    container-name: ola-home-mid-video;
}

.ola-ad-slot--home-mid .ola-ad-root:has(.ola-ad-video) {
    width: 100%;
    height: var(--ola-ad-home-mid-video-h);
    display: block;
    line-height: 0;
    font-size: 0;
}

.ad-pos-home-mid.ola-ad-video > .ola-ad-video__frame,
#Panel_Ad_Home_Mid .ola-ad-video > .ola-ad-video__frame {
    transform: none;
    /* Nới khung lên/xuống 1px để triệt đường seam ngang do subpixel */
    top: -1px;
    bottom: -1px;
    height: calc(100% + 2px);
}

.ad-pos-home-mid.ola-ad-video > .ola-ad-video__frame .ad-yt-player,
#Panel_Ad_Home_Mid .ola-ad-video > .ola-ad-video__frame .ad-yt-player {
    display: block;
    top: 50% !important;
    left: 50% !important;
    width: max(100cqw, calc(100cqh * 16 / 9)) !important;
    height: max(100cqh, calc(100cqw * 9 / 16)) !important;
    max-width: none !important;
    min-width: unset !important;
    min-height: unset !important;
    aspect-ratio: 16 / 9 !important;
    border: 0;
    outline: 0;
    box-shadow: none;
    pointer-events: none;
    transform: translate3d(-50%, -50%, 0) scale(1.18) !important;
    transform-origin: center center !important;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    will-change: transform;
}

/* Fix seam line artifact (subpixel on scaled iframe/frame) */
#Panel_Ad_Home_Top .ola-ad-video > .ola-ad-video__frame .ad-yt-player,
#Panel_Ad_Home_Mid .ola-ad-video > .ola-ad-video__frame .ad-yt-player {
    margin-top: -0.5px;
}

@supports not (width: 1cqw) {
    .ad-pos-home-mid.ola-ad-video > .ola-ad-video__frame .ad-yt-player,
    #Panel_Ad_Home_Mid .ola-ad-video > .ola-ad-video__frame .ad-yt-player {
        width: 100% !important;
        height: auto !important;
        min-width: 100% !important;
        min-height: unset !important;
        transform: translate3d(-50%, -50%, 0) scale(1.2) !important;
    }
}

@media (max-width: 767px) {
    @supports not (width: 1cqw) {
        .ad-pos-home-mid.ola-ad-video > .ola-ad-video__frame .ad-yt-player,
        #Panel_Ad_Home_Mid .ola-ad-video > .ola-ad-video__frame .ad-yt-player {
            width: auto !important;
            height: 100% !important;
            min-width: 100% !important;
            min-height: 100% !important;
        }
    }
}

/* --- Position: infeed strip (DETAIL / SEARCH / CATEGORY TOP & MID) --- */
.ola-ad-slot--infeed,
.ola-ad-slot--detail-top,
.ola-ad-slot--detail-mid {
    width: 100%;
    max-width: 100%;
}

.ad-pos-detail-top.ola-ad-video,
.ad-pos-detail-mid.ola-ad-video,
.ad-pos-search-top.ola-ad-video,
.ad-pos-search-mid.ola-ad-video,
.ad-pos-category-top.ola-ad-video,
.ad-pos-category-mid.ola-ad-video,
.ola-ad-slot--infeed .ola-ad-video {
    height: var(--ola-ad-strip-video-h);
    max-height: var(--ola-ad-strip-video-h);
    aspect-ratio: unset;
    background: #000;
}

.ad-pos-detail-top.ola-ad-video > .ola-ad-video__frame,
.ad-pos-detail-mid.ola-ad-video > .ola-ad-video__frame,
.ad-pos-search-top.ola-ad-video > .ola-ad-video__frame,
.ad-pos-search-mid.ola-ad-video > .ola-ad-video__frame,
.ad-pos-category-top.ola-ad-video > .ola-ad-video__frame,
.ad-pos-category-mid.ola-ad-video > .ola-ad-video__frame,
.ola-ad-slot--infeed .ola-ad-video > .ola-ad-video__frame {
    transform: scale(1.5);
    transform-origin: center center;
}

.ad-pos-detail-top.ola-ad-banner,
.ad-pos-detail-mid.ola-ad-banner,
.ad-pos-search-top.ola-ad-banner,
.ad-pos-search-mid.ola-ad-banner,
.ad-pos-category-top.ola-ad-banner,
.ad-pos-category-mid.ola-ad-banner {
    width: 100%;
    max-height: var(--ola-ad-strip-video-h);
    overflow: hidden;
    line-height: 0;
}

.ad-pos-detail-top.ola-ad-banner .ola-ad-banner__img,
.ad-pos-detail-mid.ola-ad-banner .ola-ad-banner__img,
.ad-pos-search-top.ola-ad-banner .ola-ad-banner__img,
.ad-pos-search-mid.ola-ad-banner .ola-ad-banner__img,
.ad-pos-category-top.ola-ad-banner .ola-ad-banner__img,
.ad-pos-category-mid.ola-ad-banner .ola-ad-banner__img {
    width: 100%;
    height: var(--ola-ad-strip-video-h);
    max-height: var(--ola-ad-strip-video-h);
    object-fit: cover;
    object-position: center;
}

/* ChiTietTinTuc / ChiTietSanPham / ChiTietTour DETAIL-TOP / DETAIL-MID: video = HOME-TOP (400px); ảnh = auto full ngang */
:is(.chitiet-tintuc-page, .chitiet-sanpham-page, .chitiet-tour-page) .ola-ad-slot--detail-top:has(.ola-ad-video),
:is(.chitiet-tintuc-page, .chitiet-sanpham-page, .chitiet-tour-page) .ola-ad-slot--detail-mid:has(.ola-ad-video) {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    overflow: hidden;
}

:is(.chitiet-tintuc-page, .chitiet-sanpham-page, .chitiet-tour-page) .ad-pos-detail-top.ola-ad-video,
:is(.chitiet-tintuc-page, .chitiet-sanpham-page, .chitiet-tour-page) .ad-pos-detail-mid.ola-ad-video,
:is(.chitiet-tintuc-page, .chitiet-sanpham-page, .chitiet-tour-page) #Panel_Ad_Detail_Top .ola-ad-video,
:is(.chitiet-tintuc-page, .chitiet-sanpham-page, .chitiet-tour-page) #Panel_Ad_Detail_MID .ola-ad-video {
    width: 100%;
    height: var(--ola-ad-home-top-video-h) !important;
    max-height: var(--ola-ad-home-top-video-h) !important;
    aspect-ratio: unset;
    background: #000;
    overflow: hidden;
    container-type: size;
    container-name: ola-detail-hero-video;
}

:is(.chitiet-tintuc-page, .chitiet-sanpham-page, .chitiet-tour-page) .ola-ad-slot--detail-top .ola-ad-root:has(.ola-ad-video),
:is(.chitiet-tintuc-page, .chitiet-sanpham-page, .chitiet-tour-page) .ola-ad-slot--detail-mid .ola-ad-root:has(.ola-ad-video),
:is(.chitiet-tintuc-page, .chitiet-sanpham-page, .chitiet-tour-page) #Panel_Ad_Detail_Top .ola-ad-root:has(.ola-ad-video),
:is(.chitiet-tintuc-page, .chitiet-sanpham-page, .chitiet-tour-page) #Panel_Ad_Detail_MID .ola-ad-root:has(.ola-ad-video) {
    width: 100%;
    height: var(--ola-ad-home-top-video-h);
    display: block;
}

:is(.chitiet-tintuc-page, .chitiet-sanpham-page, .chitiet-tour-page) .ad-pos-detail-top.ola-ad-video > .ola-ad-video__frame,
:is(.chitiet-tintuc-page, .chitiet-sanpham-page, .chitiet-tour-page) .ad-pos-detail-mid.ola-ad-video > .ola-ad-video__frame,
:is(.chitiet-tintuc-page, .chitiet-sanpham-page, .chitiet-tour-page) #Panel_Ad_Detail_Top .ola-ad-video > .ola-ad-video__frame,
:is(.chitiet-tintuc-page, .chitiet-sanpham-page, .chitiet-tour-page) #Panel_Ad_Detail_MID .ola-ad-video > .ola-ad-video__frame {
    transform: none !important;
}

:is(.chitiet-tintuc-page, .chitiet-sanpham-page, .chitiet-tour-page) .ad-pos-detail-top.ola-ad-video > .ola-ad-video__frame .ad-yt-player,
:is(.chitiet-tintuc-page, .chitiet-sanpham-page, .chitiet-tour-page) .ad-pos-detail-mid.ola-ad-video > .ola-ad-video__frame .ad-yt-player,
:is(.chitiet-tintuc-page, .chitiet-sanpham-page, .chitiet-tour-page) #Panel_Ad_Detail_Top .ola-ad-video > .ola-ad-video__frame .ad-yt-player,
:is(.chitiet-tintuc-page, .chitiet-sanpham-page, .chitiet-tour-page) #Panel_Ad_Detail_MID .ola-ad-video > .ola-ad-video__frame .ad-yt-player {
    top: 50% !important;
    left: 50% !important;
    width: max(100cqw, calc(100cqh * 16 / 9)) !important;
    height: max(100cqh, calc(100cqw * 9 / 16)) !important;
    max-width: none !important;
    min-width: unset !important;
    min-height: unset !important;
    aspect-ratio: 16 / 9 !important;
    border: 0;
    outline: 0;
    box-shadow: none;
    pointer-events: none;
    transform: translate3d(-50%, -50%, 0) scale(1.18) !important;
    transform-origin: center center !important;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

@supports not (width: 1cqw) {
    :is(.chitiet-tintuc-page, .chitiet-sanpham-page, .chitiet-tour-page) .ad-pos-detail-top.ola-ad-video > .ola-ad-video__frame .ad-yt-player,
    :is(.chitiet-tintuc-page, .chitiet-sanpham-page, .chitiet-tour-page) .ad-pos-detail-mid.ola-ad-video > .ola-ad-video__frame .ad-yt-player,
    :is(.chitiet-tintuc-page, .chitiet-sanpham-page, .chitiet-tour-page) #Panel_Ad_Detail_Top .ola-ad-video > .ola-ad-video__frame .ad-yt-player,
    :is(.chitiet-tintuc-page, .chitiet-sanpham-page, .chitiet-tour-page) #Panel_Ad_Detail_MID .ola-ad-video > .ola-ad-video__frame .ad-yt-player {
        width: 100% !important;
        height: auto !important;
        min-width: 100% !important;
        min-height: unset !important;
        transform: translate3d(-50%, -50%, 0) scale(1.2) !important;
    }
}

:is(.chitiet-tintuc-page, .chitiet-sanpham-page, .chitiet-tour-page) #Panel_Ad_Detail_Top .ola-ad-banner.ad-pos-detail-top,
:is(.chitiet-tintuc-page, .chitiet-sanpham-page, .chitiet-tour-page) #Panel_Ad_Detail_MID .ola-ad-banner.ad-pos-detail-mid,
:is(.chitiet-tintuc-page, .chitiet-sanpham-page, .chitiet-tour-page) .ola-ad-slot--detail-top .ola-ad-banner.ad-pos-detail-top,
:is(.chitiet-tintuc-page, .chitiet-sanpham-page, .chitiet-tour-page) .ola-ad-slot--detail-mid .ola-ad-banner.ad-pos-detail-mid {
    width: 100%;
    height: auto;
    max-height: none;
    overflow: visible;
    line-height: 0;
}

:is(.chitiet-tintuc-page, .chitiet-sanpham-page, .chitiet-tour-page) #Panel_Ad_Detail_Top .ola-ad-banner.ad-pos-detail-top .ola-ad-banner__img,
:is(.chitiet-tintuc-page, .chitiet-sanpham-page, .chitiet-tour-page) #Panel_Ad_Detail_MID .ola-ad-banner.ad-pos-detail-mid .ola-ad-banner__img,
:is(.chitiet-tintuc-page, .chitiet-sanpham-page, .chitiet-tour-page) .ola-ad-slot--detail-top .ola-ad-banner.ad-pos-detail-top img,
:is(.chitiet-tintuc-page, .chitiet-sanpham-page, .chitiet-tour-page) .ola-ad-slot--detail-mid .ola-ad-banner.ad-pos-detail-mid img {
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
    border-radius: var(--ola-ad-radius);
}

/* DanhMucTinTuc CATEGORY-TOP / CATEGORY-MID (infeed): video = HOME-TOP; ảnh = auto */
:is(.danhmuc-tintuc-page, .danhmuc-sanpham-page, .danhmuc-tour-page, .timkiem-page) .ola-ad-slot--infeed:has(.ola-ad-video) {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    overflow: hidden;
}

:is(.danhmuc-tintuc-page, .danhmuc-sanpham-page, .danhmuc-tour-page, .timkiem-page) .ad-pos-category-top.ola-ad-video,
:is(.danhmuc-tintuc-page, .danhmuc-sanpham-page, .danhmuc-tour-page, .timkiem-page) .ad-pos-category-mid.ola-ad-video,
:is(.danhmuc-tintuc-page, .danhmuc-sanpham-page, .danhmuc-tour-page, .timkiem-page) .ola-ad-slot--infeed .ad-pos-category-top.ola-ad-video,
:is(.danhmuc-tintuc-page, .danhmuc-sanpham-page, .danhmuc-tour-page, .timkiem-page) .ola-ad-slot--infeed .ad-pos-category-mid.ola-ad-video {
    width: 100%;
    height: var(--ola-ad-home-top-video-h) !important;
    max-height: var(--ola-ad-home-top-video-h) !important;
    aspect-ratio: unset;
    background: #000;
    overflow: hidden;
    container-type: size;
    container-name: ola-category-hero-video;
}

:is(.danhmuc-tintuc-page, .danhmuc-sanpham-page, .danhmuc-tour-page, .timkiem-page) .ola-ad-slot--infeed .ola-ad-root:has(.ola-ad-video) {
    width: 100%;
    height: var(--ola-ad-home-top-video-h);
    display: block;
}

:is(.danhmuc-tintuc-page, .danhmuc-sanpham-page, .danhmuc-tour-page, .timkiem-page) .ad-pos-category-top.ola-ad-video > .ola-ad-video__frame,
:is(.danhmuc-tintuc-page, .danhmuc-sanpham-page, .danhmuc-tour-page, .timkiem-page) .ad-pos-category-mid.ola-ad-video > .ola-ad-video__frame,
:is(.danhmuc-tintuc-page, .danhmuc-sanpham-page, .danhmuc-tour-page, .timkiem-page) .ola-ad-slot--infeed .ad-pos-category-top.ola-ad-video > .ola-ad-video__frame,
:is(.danhmuc-tintuc-page, .danhmuc-sanpham-page, .danhmuc-tour-page, .timkiem-page) .ola-ad-slot--infeed .ad-pos-category-mid.ola-ad-video > .ola-ad-video__frame {
    transform: none !important;
}

:is(.danhmuc-tintuc-page, .danhmuc-sanpham-page, .danhmuc-tour-page, .timkiem-page) .ad-pos-category-top.ola-ad-video > .ola-ad-video__frame .ad-yt-player,
:is(.danhmuc-tintuc-page, .danhmuc-sanpham-page, .danhmuc-tour-page, .timkiem-page) .ad-pos-category-mid.ola-ad-video > .ola-ad-video__frame .ad-yt-player,
:is(.danhmuc-tintuc-page, .danhmuc-sanpham-page, .danhmuc-tour-page, .timkiem-page) .ola-ad-slot--infeed .ad-pos-category-top.ola-ad-video > .ola-ad-video__frame .ad-yt-player,
:is(.danhmuc-tintuc-page, .danhmuc-sanpham-page, .danhmuc-tour-page, .timkiem-page) .ola-ad-slot--infeed .ad-pos-category-mid.ola-ad-video > .ola-ad-video__frame .ad-yt-player {
    top: 50% !important;
    left: 50% !important;
    width: max(100cqw, calc(100cqh * 16 / 9)) !important;
    height: max(100cqh, calc(100cqw * 9 / 16)) !important;
    max-width: none !important;
    min-width: unset !important;
    min-height: unset !important;
    aspect-ratio: 16 / 9 !important;
    border: 0;
    outline: 0;
    box-shadow: none;
    pointer-events: none;
    transform: translate3d(-50%, -50%, 0) scale(1.18) !important;
    transform-origin: center center !important;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

@supports not (width: 1cqw) {
    :is(.danhmuc-tintuc-page, .danhmuc-sanpham-page, .danhmuc-tour-page, .timkiem-page) .ad-pos-category-top.ola-ad-video > .ola-ad-video__frame .ad-yt-player,
    :is(.danhmuc-tintuc-page, .danhmuc-sanpham-page, .danhmuc-tour-page, .timkiem-page) .ad-pos-category-mid.ola-ad-video > .ola-ad-video__frame .ad-yt-player,
    :is(.danhmuc-tintuc-page, .danhmuc-sanpham-page, .danhmuc-tour-page, .timkiem-page) .ola-ad-slot--infeed .ad-pos-category-top.ola-ad-video > .ola-ad-video__frame .ad-yt-player,
    :is(.danhmuc-tintuc-page, .danhmuc-sanpham-page, .danhmuc-tour-page, .timkiem-page) .ola-ad-slot--infeed .ad-pos-category-mid.ola-ad-video > .ola-ad-video__frame .ad-yt-player {
        width: 100% !important;
        height: auto !important;
        min-width: 100% !important;
        min-height: unset !important;
        transform: translate3d(-50%, -50%, 0) scale(1.2) !important;
    }
}

:is(.danhmuc-tintuc-page, .danhmuc-sanpham-page, .danhmuc-tour-page, .timkiem-page) .ola-ad-slot--infeed .ola-ad-banner.ad-pos-category-top,
:is(.danhmuc-tintuc-page, .danhmuc-sanpham-page, .danhmuc-tour-page, .timkiem-page) .ola-ad-slot--infeed .ola-ad-banner.ad-pos-category-mid {
    width: 100%;
    height: auto;
    max-height: none;
    overflow: visible;
    line-height: 0;
}

:is(.danhmuc-tintuc-page, .danhmuc-sanpham-page, .danhmuc-tour-page, .timkiem-page) .ola-ad-slot--infeed .ola-ad-banner.ad-pos-category-top .ola-ad-banner__img,
:is(.danhmuc-tintuc-page, .danhmuc-sanpham-page, .danhmuc-tour-page, .timkiem-page) .ola-ad-slot--infeed .ola-ad-banner.ad-pos-category-mid .ola-ad-banner__img,
:is(.danhmuc-tintuc-page, .danhmuc-sanpham-page, .danhmuc-tour-page, .timkiem-page) .ola-ad-slot--infeed .ola-ad-banner.ad-pos-category-top img,
:is(.danhmuc-tintuc-page, .danhmuc-sanpham-page, .danhmuc-tour-page, .timkiem-page) .ola-ad-slot--infeed .ola-ad-banner.ad-pos-category-mid img {
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
    border-radius: var(--ola-ad-radius);
}

/* --- Position: HOME-SIDEBAR / DETAIL-SIDEBAR / CATEGORY-SIDEBAR --- */
.ola-ad-slot--home-sidebar,
.ola-ad-slot--detail-sidebar,
.ola-ad-slot--category-sidebar,
.ola-ad-slot:has(.ad-pos-category-sidebar) {
    width: 100%;
    max-width: 100%;
}

.ad-pos-home-sidebar.ola-ad-banner,
.ad-pos-detail-sidebar.ola-ad-banner,
.ad-pos-category-sidebar.ola-ad-banner {
    width: 100%;
    height: auto;
    line-height: 0;
}

.ad-pos-home-sidebar.ola-ad-banner .ola-ad-banner__img,
.ad-pos-detail-sidebar.ola-ad-banner .ola-ad-banner__img,
.ad-pos-category-sidebar.ola-ad-banner .ola-ad-banner__img,
.ad-pos-home-sidebar.ola-ad-banner img,
.ad-pos-detail-sidebar.ola-ad-banner img,
.ad-pos-category-sidebar.ola-ad-banner img {
    width: 100%;
    height: auto;
    max-height: var(--ola-ad-sidebar-img-max-h);
    object-fit: cover;
    object-position: center;
}

.ad-pos-home-sidebar.ola-ad-video {
    width: 100%;
    height: var(--ola-ad-sidebar-video-h);
    max-height: var(--ola-ad-sidebar-video-h);
    aspect-ratio: unset;
    background: #000;
    overflow: hidden;
    container-type: size;
    container-name: ola-home-sidebar-video;
}

.ad-pos-home-sidebar.ola-ad-video > .ola-ad-video__frame {
    transform: none;
    top: -1px;
    bottom: -1px;
    height: calc(100% + 2px);
}

.ola-ad-slot--home-sidebar .ola-ad-root:has(.ola-ad-video),
#Panel_Ad_Home_Sidebar .ola-ad-root:has(.ola-ad-video) {
    width: 100%;
    height: var(--ola-ad-sidebar-video-h);
    display: block;
    line-height: 0;
    font-size: 0;
}

.ad-pos-home-sidebar.ola-ad-video > .ola-ad-video__frame .ad-yt-player,
#Panel_Ad_Home_Sidebar .ola-ad-video > .ola-ad-video__frame .ad-yt-player {
    display: block;
    top: 50% !important;
    left: 50% !important;
    width: max(100cqw, calc(100cqh * 16 / 9)) !important;
    height: max(100cqh, calc(100cqw * 9 / 16)) !important;
    max-width: none !important;
    min-width: unset !important;
    min-height: unset !important;
    aspect-ratio: 16 / 9 !important;
    border: 0;
    outline: 0;
    box-shadow: none;
    pointer-events: none;
    transform: translate3d(-50%, -50%, 0) scale(1.16) !important;
    transform-origin: center center !important;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    will-change: transform;
    margin-top: -0.5px;
}

@supports not (width: 1cqw) {
    .ad-pos-home-sidebar.ola-ad-video > .ola-ad-video__frame .ad-yt-player,
    #Panel_Ad_Home_Sidebar .ola-ad-video > .ola-ad-video__frame .ad-yt-player {
        width: auto !important;
        height: 100% !important;
        min-width: 100% !important;
        min-height: 100% !important;
        transform: translate3d(-50%, -50%, 0) scale(1.18) !important;
    }
}

/* DETAIL-SIDEBAR + CATEGORY-SIDEBAR: khung cố định, video cover full */
.ad-pos-detail-sidebar.ola-ad-video,
.ad-pos-category-sidebar.ola-ad-video,
#Panel_Ad_Detail_Sidebar .ola-ad-video,
#Panel_Ad_Category_Sidebar .ola-ad-video,
:is(.chitiet-tintuc-page, .chitiet-sanpham-page, .chitiet-tour-page) .ola-ad-slot--detail-sidebar .ad-pos-detail-sidebar.ola-ad-video,
:is(.danhmuc-tintuc-page, .timkiem-page) .ola-ad-slot--category-sidebar .ad-pos-category-sidebar.ola-ad-video {
    width: 100%;
    height: var(--ola-ad-sidebar-video-h);
    max-height: var(--ola-ad-sidebar-video-h);
    aspect-ratio: unset;
    background: #000;
    overflow: hidden;
    container-type: size;
    container-name: ola-detail-sidebar-video;
}

.ola-ad-slot--detail-sidebar .ola-ad-root:has(.ola-ad-video),
.ola-ad-slot--category-sidebar .ola-ad-root:has(.ola-ad-video),
#Panel_Ad_Detail_Sidebar .ola-ad-root:has(.ola-ad-video),
#Panel_Ad_Category_Sidebar .ola-ad-root:has(.ola-ad-video) {
    width: 100%;
    height: var(--ola-ad-sidebar-video-h);
    display: block;
}

.ad-pos-detail-sidebar.ola-ad-video > .ola-ad-video__frame,
.ad-pos-category-sidebar.ola-ad-video > .ola-ad-video__frame,
#Panel_Ad_Detail_Sidebar .ola-ad-video > .ola-ad-video__frame,
#Panel_Ad_Category_Sidebar .ola-ad-video > .ola-ad-video__frame {
    transform: none;
}

.ad-pos-detail-sidebar.ola-ad-video > .ola-ad-video__frame .ad-yt-player,
.ad-pos-category-sidebar.ola-ad-video > .ola-ad-video__frame .ad-yt-player,
#Panel_Ad_Detail_Sidebar .ola-ad-video > .ola-ad-video__frame .ad-yt-player,
#Panel_Ad_Category_Sidebar .ola-ad-video > .ola-ad-video__frame .ad-yt-player {
    top: 50% !important;
    left: 50% !important;
    width: max(100cqw, calc(100cqh * 16 / 9)) !important;
    height: max(100cqh, calc(100cqw * 9 / 16)) !important;
    max-width: none !important;
    min-width: unset !important;
    min-height: unset !important;
    aspect-ratio: 16 / 9 !important;
    border: 0;
    outline: 0;
    box-shadow: none;
    pointer-events: none;
    transform: translate3d(-50%, -50%, 0) scale(1.16) !important;
    transform-origin: center center !important;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

@supports not (width: 1cqw) {
    .ad-pos-detail-sidebar.ola-ad-video > .ola-ad-video__frame .ad-yt-player,
    .ad-pos-category-sidebar.ola-ad-video > .ola-ad-video__frame .ad-yt-player,
    #Panel_Ad_Detail_Sidebar .ola-ad-video > .ola-ad-video__frame .ad-yt-player,
    #Panel_Ad_Category_Sidebar .ola-ad-video > .ola-ad-video__frame .ad-yt-player {
        width: auto !important;
        height: 100% !important;
        min-width: 100% !important;
        min-height: 100% !important;
        transform: translate3d(-50%, -50%, 0) scale(1.18) !important;
    }
}

/* --- Position: FULL-TOP (master band) --- */
.ola-ad-band-top .ola-ad-root {
    width: 100%;
    height: 100%;
    max-height: inherit;
    min-height: inherit;
    border-radius: 0 !important;
}

/* Khi SetSlotOptions đặt Width/Height — slot cha theo .ola-ad-root--custom */
.ola-ad-band-top .ola-ad-slot:has(.ola-ad-root--custom),
.ola-ad-slot:has(.ola-ad-root--custom.ola-ad-root--fixed-h) {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
}

.ola-ad-band-top .ola-ad-slot:has(.ola-ad-root--custom.ola-ad-root--fixed-h) {
    height: var(--ola-ad-h, auto) !important;
    min-height: var(--ola-ad-h, auto) !important;
    max-height: var(--ola-ad-h, none) !important;
}

.ola-ad-slot--category-sidebar:has(.ola-ad-root--custom),
.ola-ad-slot:has(.ad-pos-category-sidebar .ola-ad-root--custom) {
    width: var(--ola-ad-w, 100%);
    height: var(--ola-ad-h, auto);
    max-width: 100%;
}

.ola-ad-slot > .ola-ad-root {
    width: 100%;
    margin: 0;
}

.ola-ad-band-top .container-fluid,
.ola-ad-band-top .ola-ad-slot {
    width: 100%;
    max-width: 100%;
    margin-bottom: 0;
    border-radius: 0 !important;
}

.ola-ad-band-top .ola-ad-slot,
.ola-ad-band-top .ola-ad-slot--full-top {
    display: block;
    width: 100%;
    height: var(--ola-ad-full-top-h);
    max-height: var(--ola-ad-full-top-h);
    min-height: var(--ola-ad-full-top-h);
    overflow: hidden;
    background: #f8fafc;
}

.ola-ad-band-top .ola-ad-slot:has(.ola-ad-video) {
    background: #000;
}

.ola-ad-band-top .ola-ad-banner,
.ola-ad-band-top .ola-ad-banner.ad-pos-full-top {
    width: 100%;
    height: var(--ola-ad-full-top-h);
    max-height: var(--ola-ad-full-top-h);
    display: block;
    overflow: hidden;
    border-radius: 0 !important;
    line-height: 0;
}

.ola-ad-band-top .ola-ad-banner a,
.ola-ad-band-top .ola-ad-banner picture {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 0 !important;
}

.ola-ad-band-top .ola-ad-banner__img,
.ola-ad-band-top .ola-ad-banner img {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
    object-position: center center;
    border-radius: 0 !important;
}

.ola-ad-band-top .ola-ad-banner::after {
    border-radius: 0 !important;
}

.ola-ad-band-top .ola-ad-google,
.ola-ad-band-top .ola-ad-google.ad-pos-full-top {
    display: block;
    width: 100%;
    height: var(--ola-ad-full-top-h);
    max-height: var(--ola-ad-full-top-h);
    min-height: var(--ola-ad-full-top-h);
    overflow: hidden;
    line-height: normal;
    text-align: center;
    background: #fff;
}

.ola-ad-band-top .ola-ad-google img {
    width: 100% !important;
    height: 100% !important;
    max-height: var(--ola-ad-full-top-h) !important;
    object-fit: cover;
    object-position: center;
}

.ola-ad-band-top .ola-ad-google iframe,
.ola-ad-band-top .ola-ad-google embed,
.ola-ad-band-top .ola-ad-google object {
    width: 100% !important;
    height: var(--ola-ad-full-top-h) !important;
    max-width: 100%;
    display: block;
    border: 0;
    margin: 0 auto;
}

.ola-ad-band-top .ola-ad-slot:has(.ola-ad-video.ad-pos-full-top) {
    height: var(--ola-ad-full-top-video-h) !important;
    max-height: var(--ola-ad-full-top-video-h) !important;
    min-height: var(--ola-ad-full-top-video-h) !important;
    overflow: hidden !important;
    background: #000 !important;
    position: relative;
}

.ola-ad-band-top .ola-ad-video.ad-pos-full-top,
.ola-ad-band-top .ad-pos-full-top.ola-ad-video {
    width: 100% !important;
    height: 100% !important;
    max-height: var(--ola-ad-full-top-video-h) !important;
    min-height: var(--ola-ad-full-top-video-h) !important;
    position: relative !important;
    overflow: hidden !important;
    border-radius: 0 !important;
    background: #000 !important;
}

.ola-ad-band-top .ola-ad-video.ad-pos-full-top .ad-yt-player,
.ola-ad-band-top .ad-pos-full-top.ola-ad-video .ad-yt-player {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 100vw !important;
    height: 56.25vw !important;
    min-height: var(--ola-ad-full-top-video-h) !important;
    min-width: 534px !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    outline: 0 !important;
    transform: translate(-50%, -50%) scale(1.2) !important;
    transform-origin: center center !important;
    pointer-events: none !important;
    box-sizing: border-box;
}

.ola-ad-band-top .ola-ad-video.ad-pos-full-top .ola-ad-video__toolbar {
    z-index: 30;
    pointer-events: auto;
}

/* --- Position: FULL-BOTTOM — trong .ola-site-surface (1200px), không tràn viewport --- */
.ola-master-bottom-ad-wrap,
.ola-page-bottom-ad,
.ola-master-bottom-ad-wrap .ola-page-bottom-ad {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    line-height: 0;
    overflow: hidden;
    box-sizing: border-box;
}

.ola-page-bottom-ad .ola-ad-slot--full-bottom {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0;
    margin-bottom: 0 !important;
    padding: 0;
    overflow: hidden;
    justify-content: unset;
    align-items: unset;
    background: #f8fafc;
}

.ola-page-bottom-ad .ola-ad-slot--full-bottom:has(.ola-ad-video) {
    background: #000;
}

.ola-page-bottom-ad .ola-ad-slot--full-bottom,
.ola-page-bottom-ad .ola-ad-slot--full-bottom:not(:has(.ola-ad-video)) {
    min-height: var(--ola-ad-full-bottom-h);
}

.ola-page-bottom-ad .ad-pos-full-bottom.ola-ad-video {
    width: 100%;
    height: var(--ola-ad-full-bottom-video-h) !important;
    max-height: var(--ola-ad-full-bottom-video-h) !important;
    min-height: var(--ola-ad-full-bottom-video-h) !important;
    aspect-ratio: unset;
    background: #000;
    border-radius: 0;
    display: block;
    overflow: hidden;
}

.ola-page-bottom-ad .ad-pos-full-bottom.ola-ad-video > .ola-ad-video__frame {
    transform: none;
    transform-origin: center center;
}

.ola-page-bottom-ad .ad-pos-full-bottom.ola-ad-banner,
.ola-page-bottom-ad .ola-ad-banner.ad-pos-full-bottom {
    width: 100%;
    height: var(--ola-ad-full-bottom-h);
    max-height: var(--ola-ad-full-bottom-h);
    display: block;
    overflow: hidden;
    line-height: 0;
    border-radius: 0 !important;
}

.ola-page-bottom-ad .ad-pos-full-bottom.ola-ad-banner a,
.ola-page-bottom-ad .ad-pos-full-bottom.ola-ad-banner picture {
    display: block;
    width: 100%;
    height: 100%;
}

.ola-page-bottom-ad .ad-pos-full-bottom.ola-ad-banner .ola-ad-banner__img,
.ola-page-bottom-ad .ad-pos-full-bottom.ola-ad-banner img {
    width: 100% !important;
    height: 100%;
    max-height: none;
    object-fit: cover;
    object-position: center center;
    border-radius: 0 !important;
    display: block;
}

.ola-page-bottom-ad .ola-ad-slot--full-bottom > .ola-ad-placeholder {
    width: 100%;
    max-width: 100%;
    margin: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
}

.ola-page-bottom-ad .ola-ad-slot--full-bottom > .ola-ad-root {
    width: 100%;
    max-width: 100%;
}

/* Video FULL-BOTTOM: không 100vw / container-query — tránh tràn (ChiTietTour) */
.ola-page-bottom-ad .ad-pos-full-bottom.ola-ad-video,
.ola-master-bottom-ad-wrap .ad-pos-full-bottom.ola-ad-video {
    position: relative;
    container-type: normal;
}

.ola-page-bottom-ad .ad-pos-full-bottom.ola-ad-video > .ola-ad-video__frame,
.ola-master-bottom-ad-wrap .ad-pos-full-bottom.ola-ad-video > .ola-ad-video__frame {
    position: absolute;
    inset: 0;
    overflow: hidden;
    transform: none !important;
}

.ola-page-bottom-ad .ad-pos-full-bottom.ola-ad-video > .ola-ad-video__frame .ad-yt-player,
.ola-page-bottom-ad .ad-pos-full-bottom.ola-ad-video > .ola-ad-video__frame .ola-ad-video__mp4,
.ola-master-bottom-ad-wrap .ad-pos-full-bottom.ola-ad-video > .ola-ad-video__frame .ad-yt-player,
.ola-master-bottom-ad-wrap .ad-pos-full-bottom.ola-ad-video > .ola-ad-video__frame .ola-ad-video__mp4 {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    transform: translate(-50%, -50%) !important;
    object-fit: cover;
    pointer-events: none;
}

.ola-page-bottom-ad .ola-ad-root,
.ola-page-bottom-ad .ola-ad-video,
.ola-page-bottom-ad .ola-ad-banner,
.ola-page-bottom-ad img,
.ola-page-bottom-ad iframe {
    max-width: 100%;
}

/* CATEGORY-SIDEBAR: layout ảnh/video = HOME-SIDEBAR / DETAIL-SIDEBAR (block trên) */

.ola-ad-google.ad-pos-category-sidebar {
    line-height: normal;
    text-align: center;
    background: #fff;
}

.ola-ad-google.ad-pos-category-sidebar img {
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    object-fit: cover;
    object-position: center;
}

.ola-ad-google.ad-pos-category-sidebar iframe {
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    display: block;
    border: 0;
}

/* --- Position: generic fallback --- */
.ola-ad-video[class*="ad-pos-"]:not(.ad-pos-home-top):not(.ad-pos-home-mid):not(.ad-pos-full-top):not(.ad-pos-full-bottom):not(.ad-pos-category-sidebar):not(.ad-pos-home-sidebar):not(.ad-pos-detail-sidebar):not(.ad-pos-detail-top):not(.ad-pos-detail-mid):not(.ad-pos-search-top):not(.ad-pos-search-mid):not(.ad-pos-category-top):not(.ad-pos-category-mid) {
    aspect-ratio: 16 / 9;
    max-height: 320px;
}

.ola-ad-video[class*="ad-pos-"]:not(.ad-pos-home-top):not(.ad-pos-home-mid):not(.ad-pos-full-top):not(.ad-pos-full-bottom):not(.ad-pos-category-sidebar):not(.ad-pos-home-sidebar):not(.ad-pos-detail-sidebar):not(.ad-pos-detail-top):not(.ad-pos-detail-mid):not(.ad-pos-search-top):not(.ad-pos-search-mid):not(.ad-pos-category-top):not(.ad-pos-category-mid) .ad-yt-player {
    width: 100%;
    height: 100%;
    aspect-ratio: unset;
    min-height: 100%;
}

/* --- Video toolbar & sound --- */
.ola-ad-video__toolbar {
    position: absolute;
    bottom: var(--ola-ad-toolbar-inset);
    left: var(--ola-ad-toolbar-inset);
    right: var(--ola-ad-toolbar-inset);
    z-index: var(--ola-ad-z-toolbar);
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: var(--ola-ad-toolbar-gap);
    max-width: none;
    pointer-events: none;
    font-size: var(--ola-ad-btn-fs);
    line-height: 1.15;
}

.ola-ad-video__toolbar--has-link {
    justify-content: space-between;
}

.ola-ad-video__toolbar-actions {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: var(--ola-ad-toolbar-gap);
    flex-shrink: 0;
    margin-left: auto;
    pointer-events: auto;
}

.ola-ad-video__toolbar--has-link .ola-ad-video__toolbar-actions {
    margin-left: 0;
}

.ola-ad-video__toolbar .ad-link-btn {
    pointer-events: auto;
    flex-shrink: 0;
}

.ola-ad-video__toolbar .ad-expand-btn,
.ola-ad-video__toolbar .sound-toggle-btn {
    position: static;
    bottom: auto;
    right: auto;
    z-index: 1;
    pointer-events: auto;
    font-size: var(--ola-ad-btn-fs);
    line-height: 1.15;
}

.ad-link-btn,
.ad-expand-btn,
.sound-toggle-btn {
    background: rgba(0, 0, 0, 0.62);
    color: #fff;
    border: 0px solid rgba(255, 255, 255, 0.38);
    padding: 0;
    width: var(--ola-ad-btn-h);
    height: var(--ola-ad-btn-h);
    min-width: var(--ola-ad-btn-min-w);
    min-height: var(--ola-ad-btn-h);
    border-radius: var(--ola-ad-btn-radius);
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: var(--ola-ad-btn-fs);
    font-weight: normal;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
   /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);*/
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    flex-shrink: 0;
}

/* Vùng bấm mở rộng (ẩn) — nút trông gọn nhưng vẫn dễ chạm */
.ad-link-btn::before,
.ad-expand-btn::before,
.sound-toggle-btn::before {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 999px;
    pointer-events: none;
}

.ad-link-btn {
    text-decoration: none;
}

.ad-link-btn:hover {
    color: #fff;
    text-decoration: none;
}

.ad-expand-btn:hover,
.sound-toggle-btn:hover:not(.is-toggling),
.ad-link-btn:hover {
    background: rgba(0, 0, 0, 0.95);
    border-color: #fff;
    transform: none;
}

.sound-toggle-btn.is-toggling {
    opacity: 0.72;
    pointer-events: none;
    transform: none;
}

.ad-link-btn__icon,
.ad-expand-btn__icon,
.sound-toggle-btn__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--ola-ad-btn-icon);
    height: var(--ola-ad-btn-icon);
    flex-shrink: 0;
}

.ad-link-btn__icon svg,
.ad-link-btn__icon i,
.ad-expand-btn__icon svg,
.ad-expand-btn__icon i,
.sound-toggle-btn__icon svg {
    display: block;
    width: var(--ola-ad-btn-icon);
    height: var(--ola-ad-btn-icon);
    font-size: calc(var(--ola-ad-btn-icon) - 1px);
    line-height: var(--ola-ad-btn-icon);
    text-align: center;
}

.sound-toggle-btn .icon-unmuted {
    display: none;
}

.sound-toggle-btn[data-muted="false"] .icon-muted {
    display: none;
}

.sound-toggle-btn[data-muted="false"] .icon-unmuted {
    display: block;
}

/* Chỉ icon — ẩn chữ (Xem thêm / Xem full / Bật tiếng) */
.ad-link-btn__label,
.ad-expand-btn__label,
.sound-toggle-btn__label {
    display: none !important;
}

.sound-toggle-btn__label,
.ad-link-btn__label {
    white-space: nowrap;
}

/* Gallery bài / Pages: .ratio > * (BS5) kéo toolbar full khung → căn giữa. Tách frame + toolbar. */
.ola-ad-video--slide {
    position: relative;
    overflow: hidden;
}

/* BS5 .ratio::before + transform scale() → vạch ngang giữa video; dùng aspect-ratio thay padding-top */
    .ola-ad-video--slide.ratio {
        aspect-ratio: 16 / 9;
        width: 100%;
        background: #efe3e3;
    }

.ola-ad-video--slide.ratio::before {
    display: none !important;
    content: none !important;
    padding: 0 !important;
    margin: 0 !important;
    height: 0 !important;
    border: none !important;
}

.ola-ad-video--slide > .ola-ad-video__frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    background: #000;
    line-height: 0;
    font-size: 0;
    /* Zoom trên wrapper (không scale iframe) → full khung, không vạch ngang */
    transform: scale(1.52);
    transform-origin: center center;
    will-change: transform;
}

.ola-ad-video--slide > .ola-ad-video__frame iframe.ad-yt-player {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    outline: 0;
    box-shadow: none;
    transform: none;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* Chi tiết tin: carousel gallery (#postCarousel) — crop mạnh hơn strip QC */
#postCarousel .ola-ad-video--slide > .ola-ad-video__frame {
    transform: scale(1.58);
}

#postCarousel .carousel-item:has(.ola-ad-video--slide) {
    background: #efe3e3;
    line-height: 0;
}

/* Gỡ hiệu ứng .ratio > * áp lên toolbar (top/left/width/height 100%) */
#postCarousel .ola-ad-video--slide > .ola-ad-video__toolbar,
.page-swiper .ola-ad-video--slide > .ola-ad-video__toolbar,
#postCarousel .ratio.ola-ad-video--post > .ola-ad-video__toolbar,
.page-swiper .ratio.ola-ad-video--page > .ola-ad-video__toolbar,
.page-swiper .ola-ad-video--page .page-video-toolbar {
    position: absolute !important;
    inset: auto var(--ola-ad-toolbar-inset) var(--ola-ad-toolbar-inset) var(--ola-ad-toolbar-inset) !important;
    top: auto !important;
    left: var(--ola-ad-toolbar-inset) !important;
    bottom: var(--ola-ad-toolbar-inset) !important;
    right: var(--ola-ad-toolbar-inset) !important;
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: none !important;
    z-index: 30 !important;
    display: flex !important;
    flex-flow: row nowrap !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: var(--ola-ad-toolbar-gap) !important;
    margin: 0 !important;
    padding: 0 !important;
    pointer-events: auto !important;
    touch-action: manipulation;
    transform: none !important;
}

#postCarousel .ola-ad-video--slide > .ola-ad-video__toolbar.ola-ad-video__toolbar--has-link,
.page-swiper .ola-ad-video--slide > .ola-ad-video__toolbar.ola-ad-video__toolbar--has-link {
    justify-content: space-between !important;
}

#postCarousel .ola-ad-video--slide .ola-ad-video__toolbar .ad-link-btn,
#postCarousel .ola-ad-video--slide .ola-ad-video__toolbar .ad-expand-btn,
#postCarousel .ola-ad-video--slide .ola-ad-video__toolbar .sound-toggle-btn,
.page-swiper .ola-ad-video--slide .ola-ad-video__toolbar .ad-link-btn,
.page-swiper .ola-ad-video--slide .ola-ad-video__toolbar .ad-expand-btn,
.page-swiper .ola-ad-video--slide .ola-ad-video__toolbar .sound-toggle-btn {
    position: static !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    margin: 0 !important;
    flex-shrink: 0;
    transform: none !important;
}

#postCarousel .ola-ad-video--slide .ola-ad-video__toolbar-actions,
.page-swiper .ola-ad-video--slide .ola-ad-video__toolbar-actions {
    pointer-events: auto !important;
}

#postCarousel .ola-ad-video--slide .ola-ad-video__toolbar .ad-link-btn:hover,
#postCarousel .ola-ad-video--slide .ola-ad-video__toolbar .ad-expand-btn:hover,
#postCarousel .ola-ad-video--slide .ola-ad-video__toolbar .sound-toggle-btn:hover:not(.is-toggling),
.page-swiper .ola-ad-video--slide .ola-ad-video__toolbar .ad-link-btn:hover,
.page-swiper .ola-ad-video--slide .ola-ad-video__toolbar .ad-expand-btn:hover,
.page-swiper .ola-ad-video--slide .ola-ad-video__toolbar .sound-toggle-btn:hover:not(.is-toggling) {
    transform: scale(1.03) !important;
}

/* Toolbar visibility theo ngữ cảnh */
.ola-page-body .ola-ad-video,
#main-content .ola-ad-video,
#olaEventPopup .ola-ad-video,
#postCarousel .ola-ad-video--post,
.danhmuc-tintuc-page .ola-ad-slot .ola-ad-video,
.danhmuc-sanpham-page .ola-ad-slot .ola-ad-video,
.danhmuc-tour-page .ola-ad-slot .ola-ad-video,
.timkiem-page .ola-ad-slot .ola-ad-video {
    position: relative;
}

/* Infeed toolbar — 3 trang danh mục/tìm kiếm (scoped, không đụng slot global) */
:is(.danhmuc-sanpham-page, .danhmuc-tour-page, .timkiem-page) .ola-ad-slot--infeed .ola-ad-video__toolbar {
    z-index: 30;
    pointer-events: auto;
}

:is(.danhmuc-sanpham-page, .danhmuc-tour-page, .timkiem-page) .ola-ad-slot--infeed .ola-ad-video__toolbar-actions,
:is(.danhmuc-sanpham-page, .danhmuc-tour-page, .timkiem-page) .ola-ad-slot--infeed .sound-toggle-btn,
:is(.danhmuc-sanpham-page, .danhmuc-tour-page, .timkiem-page) .ola-ad-slot--infeed .ad-expand-btn {
    pointer-events: auto;
}

.ola-page-body .ola-ad-video__toolbar,
#main-content .ola-ad-video__toolbar,
#olaEventPopup .ola-ad-video__toolbar,
.ola-ad-slot .ola-ad-video__toolbar,
#heroSideCarousel .carousel-item .ola-ad-video__toolbar,
#heroSideCarousel .carousel-item.ola-ad-video--hero .ola-ad-video__toolbar,
.ola-ad-video--tour .ola-ad-video__toolbar,
.ola-ad-video--page .ola-ad-video__toolbar,
.ola-ad-video--popup .video-wrapper .ola-ad-video__toolbar {
    z-index: var(--ola-ad-z-toolbar);
}

#heroSideCarousel .carousel-item .sound-toggle-btn {
    z-index: 10;
}

#heroSideCarousel .carousel-item .sound-toggle-btn:not(.ola-ad-video__toolbar .sound-toggle-btn) {
    display: none;
}

/* --- Expand modal (full video) --- */
.ola-ad-expand-modal {
    position: fixed;
    inset: 0;
    z-index: var(--ola-ad-z-expand);
    display: none !important;
    align-items: center;
    justify-content: center;
    padding: 16px;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.ola-ad-expand-modal.is-open,
.ola-ad-expand-modal.is-open[hidden] {
    display: flex !important;
    visibility: visible;
    opacity: 1;
}

.ola-ad-expand-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.82);
    cursor: pointer;
}

.ola-ad-expand-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(1100px, 100%);
    max-height: calc(100dvh - 32px);
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.ola-ad-expand-modal__close {
    position: absolute;
    top: 8px;
    right: 10px;
    z-index: 3;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ola-ad-expand-modal__close:hover {
    background: rgba(0, 0, 0, 0.85);
}

.ola-ad-expand-modal__body {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.ola-ad-expand-modal__body iframe,
.ola-ad-expand-modal__body video.ola-ad-expand-modal__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.ola-ad-expand-modal__body video.ola-ad-expand-modal__video {
    object-fit: contain;
    background: #000;
}

.ola-ad-expand-modal__body video.ola-ad-expand-modal__video[hidden] {
    display: none !important;
}

.ola-ad-expand-modal__body iframe[hidden] {
    display: none !important;
}

/* MP4 — crop/cover giống YouTube trong khung quảng cáo */
.ola-ad-video > .ola-ad-video__frame .ola-ad-video__mp4 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: none;
    object-fit: cover;
    pointer-events: none;
    border: none;
    z-index: 1;
}

.ad-pos-home-top.ola-ad-video > .ola-ad-video__frame .ola-ad-video__mp4,
#Panel_Ad_Home_Top .ola-ad-video > .ola-ad-video__frame .ola-ad-video__mp4,
.ad-pos-home-mid.ola-ad-video > .ola-ad-video__frame .ola-ad-video__mp4,
#Panel_Ad_Home_Mid .ola-ad-video > .ola-ad-video__frame .ola-ad-video__mp4,
.ad-pos-full-top.ola-ad-video > .ola-ad-video__frame .ola-ad-video__mp4,
#Panel_Ad_Full_Top .ola-ad-video > .ola-ad-video__frame .ola-ad-video__mp4,
.ola-home-sidebar-ad .ola-ad-video > .ola-ad-video__frame .ola-ad-video__mp4,
#Panel_Ad_Home_Sidebar .ola-ad-video > .ola-ad-video__frame .ola-ad-video__mp4,
.ad-pos-detail-top.ola-ad-video > .ola-ad-video__frame .ola-ad-video__mp4,
.ad-pos-detail-mid.ola-ad-video > .ola-ad-video__frame .ola-ad-video__mp4,
.ad-pos-detail-sidebar.ola-ad-video > .ola-ad-video__frame .ola-ad-video__mp4,
.ad-pos-search-top.ola-ad-video > .ola-ad-video__frame .ola-ad-video__mp4,
.ad-pos-search-mid.ola-ad-video > .ola-ad-video__frame .ola-ad-video__mp4,
.ad-pos-category-top.ola-ad-video > .ola-ad-video__frame .ola-ad-video__mp4,
.ad-pos-category-mid.ola-ad-video > .ola-ad-video__frame .ola-ad-video__mp4,
.ad-pos-category-sidebar.ola-ad-video > .ola-ad-video__frame .ola-ad-video__mp4,
:is(.chitiet-tintuc-page, .chitiet-sanpham-page, .chitiet-tour-page) #Panel_Ad_Detail_Top .ola-ad-video > .ola-ad-video__frame .ola-ad-video__mp4,
:is(.chitiet-tintuc-page, .chitiet-sanpham-page, .chitiet-tour-page) #Panel_Ad_Detail_MID .ola-ad-video > .ola-ad-video__frame .ola-ad-video__mp4,
:is(.chitiet-tintuc-page, .chitiet-sanpham-page, .chitiet-tour-page) #Panel_Ad_Detail_Sidebar .ola-ad-video > .ola-ad-video__frame .ola-ad-video__mp4,
#Panel_Ad_Category_Sidebar .ola-ad-video > .ola-ad-video__frame .ola-ad-video__mp4,
.ola-ad-slot--infeed .ola-ad-video > .ola-ad-video__frame .ola-ad-video__mp4 {
    display: block;
    top: 50% !important;
    left: 50% !important;
    width: max(100cqw, calc(100cqh * 16 / 9)) !important;
    height: max(100cqh, calc(100cqw * 9 / 16)) !important;
    max-width: none !important;
    max-height: none !important;
    transform: translate(-50%, -50%) !important;
    object-fit: cover;
}

/* FULL-BOTTOM: ghi đè block MP4 cover-scale toàn cục (sau rule chung ~dòng 1866) */
.ola-page-bottom-ad .ad-pos-full-bottom.ola-ad-video > .ola-ad-video__frame :is(.ola-ad-video__mp4, .ad-yt-player),
.ola-master-bottom-ad-wrap .ad-pos-full-bottom.ola-ad-video > .ola-ad-video__frame :is(.ola-ad-video__mp4, .ad-yt-player),
#main-content .ola-site-surface > .ola-master-bottom-ad-wrap .ad-pos-full-bottom.ola-ad-video > .ola-ad-video__frame :is(.ola-ad-video__mp4, .ad-yt-player),
#Panel_Ad_Global_BOTTOM .ad-pos-full-bottom.ola-ad-video > .ola-ad-video__frame :is(.ola-ad-video__mp4, .ad-yt-player) {
    display: block;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    transform: translate(-50%, -50%) !important;
    object-fit: cover;
    pointer-events: none;
    border: none;
}

.ola-ad-band-top .ola-ad-video.ad-pos-full-top :is(.ad-yt-player, .ola-ad-video__mp4),
.ola-ad-band-top .ad-pos-full-top.ola-ad-video :is(.ad-yt-player, .ola-ad-video__mp4) {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 100vw !important;
    height: 56.25vw !important;
    min-height: var(--ola-ad-full-top-video-h) !important;
    min-width: 534px !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    outline: 0 !important;
    transform: translate(-50%, -50%) scale(1.2) !important;
    transform-origin: center center !important;
    pointer-events: none !important;
    box-sizing: border-box;
    object-fit: cover;
}

.ola-page-bottom-ad .ad-pos-full-bottom.ola-ad-video :is(.ad-yt-player, .ola-ad-video__mp4),
.ola-master-bottom-ad-wrap .ad-pos-full-bottom.ola-ad-video :is(.ad-yt-player, .ola-ad-video__mp4),
#Panel_Ad_Global_BOTTOM .ad-pos-full-bottom.ola-ad-video :is(.ad-yt-player, .ola-ad-video__mp4) {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    object-fit: cover;
}

/* Bo góc dưới khớp khối trắng .ola-site-surface */
#main-content .ola-site-surface > .ola-master-bottom-ad-wrap .ola-ad-slot--full-bottom,
#main-content .ola-site-surface > .ola-master-bottom-ad-wrap .ad-pos-full-bottom.ola-ad-video,
#main-content .ola-site-surface > .ola-master-bottom-ad-wrap .ad-pos-full-bottom.ola-ad-banner {
    border-radius: 0 0 10px 10px;
}

body.ola-ad-expand-open {
    overflow: hidden;
}

/* --- Responsive --- */
@media (max-width: 767px) {
    :root {
        --ola-ad-full-top-h: 160px;
        --ola-ad-full-top-video-h: 180px;
        --ola-ad-full-bottom-h: 120px;
        --ola-ad-full-bottom-video-h: 150px;
        --ola-ad-strip-video-h: 120px;
        --ola-ad-sidebar-video-h: var(--ola-ad-sidebar-video-h-mobile);
        --ola-ad-sidebar-img-max-h: 250px;
        --ola-ad-btn-h: 30px;
        --ola-ad-btn-min-w: 30px;
        --ola-ad-btn-pad-x: 0;
        --ola-ad-btn-pad-y: 0;
        --ola-ad-btn-fs: 0.7rem;
        --ola-ad-btn-icon: 12px;
        --ola-ad-toolbar-inset: 6px;
        --ola-ad-toolbar-gap: 4px;
        --ola-ad-home-mid-video-h: var(--ola-ad-home-mid-video-h-mobile);
    }

    .ad-pos-home-top.ola-ad-video,
    #Panel_Ad_Home_Top .ola-ad-video,
    .ola-ad-slot--home-top .ola-ad-root:has(.ola-ad-video) {
        height: 250px;
        max-height: 250px;
    }

    :is(.chitiet-tintuc-page, .chitiet-sanpham-page, .chitiet-tour-page) .ad-pos-detail-top.ola-ad-video,
    :is(.chitiet-tintuc-page, .chitiet-sanpham-page, .chitiet-tour-page) .ad-pos-detail-mid.ola-ad-video,
    :is(.chitiet-tintuc-page, .chitiet-sanpham-page, .chitiet-tour-page) #Panel_Ad_Detail_Top .ola-ad-video,
    :is(.chitiet-tintuc-page, .chitiet-sanpham-page, .chitiet-tour-page) #Panel_Ad_Detail_MID .ola-ad-video,
    :is(.chitiet-tintuc-page, .chitiet-sanpham-page, .chitiet-tour-page) .ola-ad-slot--detail-top .ola-ad-root:has(.ola-ad-video),
    :is(.chitiet-tintuc-page, .chitiet-sanpham-page, .chitiet-tour-page) .ola-ad-slot--detail-mid .ola-ad-root:has(.ola-ad-video) {
        height: 250px !important;
        max-height: 250px !important;
    }

    @supports not (width: 1cqw) {
        :is(.chitiet-tintuc-page, .chitiet-sanpham-page, .chitiet-tour-page) .ad-pos-detail-top.ola-ad-video > .ola-ad-video__frame .ad-yt-player,
        :is(.chitiet-tintuc-page, .chitiet-sanpham-page, .chitiet-tour-page) .ad-pos-detail-mid.ola-ad-video > .ola-ad-video__frame .ad-yt-player,
        :is(.chitiet-tintuc-page, .chitiet-sanpham-page, .chitiet-tour-page) #Panel_Ad_Detail_Top .ola-ad-video > .ola-ad-video__frame .ad-yt-player,
        :is(.chitiet-tintuc-page, .chitiet-sanpham-page, .chitiet-tour-page) #Panel_Ad_Detail_MID .ola-ad-video > .ola-ad-video__frame .ad-yt-player {
            width: auto !important;
            height: 100% !important;
            min-width: 100% !important;
            min-height: 100% !important;
        }
    }

    :is(.danhmuc-tintuc-page, .danhmuc-sanpham-page, .danhmuc-tour-page, .timkiem-page) .ad-pos-category-top.ola-ad-video,
    :is(.danhmuc-tintuc-page, .danhmuc-sanpham-page, .danhmuc-tour-page, .timkiem-page) .ad-pos-category-mid.ola-ad-video,
    :is(.danhmuc-tintuc-page, .danhmuc-sanpham-page, .danhmuc-tour-page, .timkiem-page) .ola-ad-slot--infeed .ola-ad-root:has(.ola-ad-video) {
        height: 250px !important;
        max-height: 250px !important;
    }

    @supports not (width: 1cqw) {
        :is(.danhmuc-tintuc-page, .danhmuc-sanpham-page, .danhmuc-tour-page, .timkiem-page) .ad-pos-category-top.ola-ad-video > .ola-ad-video__frame .ad-yt-player,
        :is(.danhmuc-tintuc-page, .danhmuc-sanpham-page, .danhmuc-tour-page, .timkiem-page) .ad-pos-category-mid.ola-ad-video > .ola-ad-video__frame .ad-yt-player,
        :is(.danhmuc-tintuc-page, .danhmuc-sanpham-page, .danhmuc-tour-page, .timkiem-page) .ola-ad-slot--infeed .ad-pos-category-top.ola-ad-video > .ola-ad-video__frame .ad-yt-player,
        :is(.danhmuc-tintuc-page, .danhmuc-sanpham-page, .danhmuc-tour-page, .timkiem-page) .ola-ad-slot--infeed .ad-pos-category-mid.ola-ad-video > .ola-ad-video__frame .ad-yt-player {
            width: auto !important;
            height: 100% !important;
            min-width: 100% !important;
            min-height: 100% !important;
        }
    }

    .ad-pos-detail-sidebar.ola-ad-video,
    .ad-pos-category-sidebar.ola-ad-video,
    #Panel_Ad_Detail_Sidebar .ola-ad-video,
    #Panel_Ad_Category_Sidebar .ola-ad-video,
    .ola-ad-slot--detail-sidebar .ola-ad-root:has(.ola-ad-video),
    .ola-ad-slot--category-sidebar .ola-ad-root:has(.ola-ad-video) {
        height: var(--ola-ad-sidebar-video-h-mobile);
        max-height: var(--ola-ad-sidebar-video-h-mobile);
    }

    .ad-pos-home-mid.ola-ad-video,
    #Panel_Ad_Home_Mid .ola-ad-video,
    .ola-ad-slot--home-mid .ola-ad-root:has(.ola-ad-video) {
        height: var(--ola-ad-home-mid-video-h-mobile);
        max-height: var(--ola-ad-home-mid-video-h-mobile);
    }

    .ola-ad-band-top .ola-ad-slot--full-top > .ola-ad-placeholder {
        min-height: 100%;
    }

    .ola-ad-placeholder[data-ad-position="HOME-TOP"],
    .ola-ad-placeholder[data-ad-position="DETAIL-TOP"],
    .ola-ad-placeholder[data-ad-position="DETAIL-MID"],
    .ola-ad-placeholder[data-ad-position="CATEGORY-TOP"],
    .ola-ad-placeholder[data-ad-position="CATEGORY-MID"],
    .ola-ad-slot--home-top > .ola-ad-placeholder,
    .ola-ad-slot--detail-top > .ola-ad-placeholder,
    .ola-ad-slot--detail-mid > .ola-ad-placeholder,
    .ola-ad-slot--infeed > .ola-ad-placeholder {
        --ola-ad-ph-frame-h: 250px;
        min-height: 250px;
    }

    .ola-ad-placeholder[data-ad-position="HOME-MID"],
    .ola-ad-slot--home-mid > .ola-ad-placeholder {
        --ola-ad-ph-frame-h: var(--ola-ad-home-mid-video-h-mobile);
        min-height: var(--ola-ad-home-mid-video-h-mobile);
    }

    .ola-ad-placeholder[data-ad-position="HOME-SIDEBAR"],
    .ola-ad-placeholder[data-ad-position="DETAIL-SIDEBAR"],
    .ola-ad-placeholder[data-ad-position="CATEGORY-SIDEBAR"],
    .ola-ad-slot--home-sidebar > .ola-ad-placeholder,
    .ola-ad-slot--detail-sidebar > .ola-ad-placeholder,
    .ola-ad-slot--category-sidebar > .ola-ad-placeholder {
        --ola-ad-ph-frame-h: var(--ola-ad-sidebar-video-h-mobile);
        min-height: var(--ola-ad-sidebar-video-h-mobile);
    }

    .ola-ad-band-top .ola-ad-slot,
    .ola-ad-band-top .ola-ad-slot--full-top,
    .ola-ad-band-top .ola-ad-banner,
    .ola-ad-band-top .ola-ad-google {
        height: var(--ola-ad-full-top-h);
        max-height: var(--ola-ad-full-top-h);
        min-height: var(--ola-ad-full-top-h);
    }

    .ola-ad-band-top .ola-ad-slot:has(.ola-ad-video.ad-pos-full-top) {
        height: var(--ola-ad-full-top-video-h) !important;
        max-height: var(--ola-ad-full-top-video-h) !important;
        min-height: var(--ola-ad-full-top-video-h) !important;
    }

    .ola-ad-band-top .ola-ad-video.ad-pos-full-top .ad-yt-player,
    .ola-ad-band-top .ad-pos-full-top.ola-ad-video .ad-yt-player {
        min-height: var(--ola-ad-full-top-video-h) !important;
        min-width: 285px !important;
        transform: translate(-50%, -50%) scale(1.15) !important;
    }

    .ola-page-bottom-ad .ola-ad-slot--full-bottom,
    .ola-page-bottom-ad .ad-pos-full-bottom.ola-ad-banner,
    .ola-page-bottom-ad .ola-ad-banner.ad-pos-full-bottom {
        height: var(--ola-ad-full-bottom-h);
        max-height: var(--ola-ad-full-bottom-h);
        min-height: var(--ola-ad-full-bottom-h);
    }

    .ola-page-bottom-ad .ad-pos-full-bottom.ola-ad-video {
        height: var(--ola-ad-full-bottom-video-h) !important;
        max-height: var(--ola-ad-full-bottom-video-h) !important;
        min-height: var(--ola-ad-full-bottom-video-h) !important;
    }

    .ola-ad-video__toolbar {
        bottom: var(--ola-ad-toolbar-inset);
        left: var(--ola-ad-toolbar-inset);
        right: var(--ola-ad-toolbar-inset);
        gap: var(--ola-ad-toolbar-gap);
    }

    #postCarousel .ola-ad-video--slide > .ola-ad-video__toolbar,
    .page-swiper .ola-ad-video--slide > .ola-ad-video__toolbar {
        bottom: var(--ola-ad-toolbar-inset) !important;
        left: var(--ola-ad-toolbar-inset) !important;
        right: var(--ola-ad-toolbar-inset) !important;
        inset: auto var(--ola-ad-toolbar-inset) var(--ola-ad-toolbar-inset) var(--ola-ad-toolbar-inset) !important;
        gap: var(--ola-ad-toolbar-gap) !important;
    }

    .page-swiper .ola-ad-video--slide > .ola-ad-video__toolbar {
        bottom: var(--ola-ad-toolbar-inset) !important;
        left: var(--ola-ad-toolbar-inset) !important;
        right: var(--ola-ad-toolbar-inset) !important;
        inset: auto var(--ola-ad-toolbar-inset) var(--ola-ad-toolbar-inset) var(--ola-ad-toolbar-inset) !important;
    }

    .ola-ad-banner--has-cta .ola-ad-banner__cta {
        bottom: var(--ola-ad-toolbar-inset);
        left: var(--ola-ad-toolbar-inset);
    }
}
