/* Chỉ áp dụng cho plugin này; không chỉnh CSS player / theme Halim. */
#hcb-sticky-banner,
#hcb-inline-banner,
#hcb-inline-banner *,
#hcb-popup-overlay,
#hcb-popup-overlay * {
    box-sizing: border-box;
}
#hcb-sticky-banner[hidden],
#hcb-inline-banner[hidden],
#hcb-popup-overlay[hidden] {
    display: none !important;
}
#hcb-sticky-banner {
    position: fixed !important;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px)) !important;
    left: 50% !important;
    right: auto !important;
    top: auto !important;
    transform: translateX(-50%) !important;
    width: min(var(--hcb-banner-width, 650px), calc(100vw - 24px));
    max-width: calc(100vw - 24px);
    z-index: 2147481000;
    margin: 0 !important;
    padding: 5px;
    background: #0d100f;
    border: 1px solid #333b36;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, .55);
    text-align: center;
}
#hcb-sticky-banner .hcb-content,
#hcb-inline-banner .hcb-content,
#hcb-popup-overlay .hcb-content {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    line-height: normal;
}
#hcb-sticky-banner img,
#hcb-inline-banner img,
#hcb-popup-overlay img {
    display: block;
    width: 100%;
    height: auto;
    border: 0;
    margin: 0;
    object-fit: contain;
}
#hcb-sticky-banner img { max-height: 150px; }
#hcb-sticky-banner .hcb-content a,
#hcb-inline-banner .hcb-content a,
#hcb-popup-overlay .hcb-content a { display: block; }
#hcb-sticky-banner iframe,
#hcb-inline-banner iframe,
#hcb-popup-overlay iframe,
#hcb-sticky-banner video,
#hcb-inline-banner video,
#hcb-popup-overlay video { max-width: 100%; }
#hcb-sticky-banner .hcb-close,
#hcb-inline-banner .hcb-close,
#hcb-popup-overlay .hcb-close {
    position: absolute !important;
    top: 4px !important;
    right: 4px !important;
    bottom: auto !important;
    left: auto !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 1px solid #6f7572 !important;
    border-radius: 50% !important;
    background: rgba(16, 16, 16, .9) !important;
    color: #fff !important;
    font: normal 22px/1 Arial, sans-serif !important;
    cursor: pointer !important;
    z-index: 3;
    opacity: 1 !important;
    text-shadow: none !important;
}
#hcb-sticky-banner .hcb-close:focus-visible,
#hcb-inline-banner .hcb-close:focus-visible,
#hcb-popup-overlay .hcb-close:focus-visible {
    outline: 3px solid #56bdf2 !important;
    outline-offset: 2px;
}
#hcb-popup-overlay {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    z-index: 2147482000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, .78);
    margin: 0 !important;
}
#hcb-popup-overlay .hcb-popup-box {
    position: relative;
    flex: 0 1 auto;
    width: min(var(--hcb-popup-width, 430px), 100%);
    max-width: 100%;
    max-height: calc(100dvh - 32px);
    padding: 6px;
    overflow: auto;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .55);
    outline: none;
}
#hcb-popup-overlay .hcb-popup-box img { max-height: calc(100dvh - 48px); }
body.hcb-popup-open { overflow: hidden !important; }
@media (max-width: 767px) {
    #hcb-sticky-banner {
        bottom: calc(6px + env(safe-area-inset-bottom, 0px)) !important;
    }
    #hcb-sticky-banner img { max-height: 100px; }
    #hcb-popup-overlay { padding: 12px; }
    #hcb-popup-overlay .hcb-popup-box { max-height: calc(100dvh - 24px); }
}

/* Banner thứ ba: nằm TRONG bố cục trang xem phim, không fixed, không overlay. */
#hcb-inline-banner {
    position: relative !important;
    display: block;
    clear: both;
    float: none !important;
    width: min(var(--hcb-inline-width, 728px), 100%);
    max-width: 100%;
    min-width: 0;
    margin: 16px auto 18px !important;
    padding: 5px;
    background: #101820;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 9px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, .2);
    text-align: center;
    isolation: isolate;
}
#hcb-inline-banner img {
    max-height: none;
}
#hcb-inline-banner .hcb-close {
    position: absolute !important;
}
@media (max-width: 767px) {
    #hcb-inline-banner {
        margin: 12px auto 14px !important;
        padding: 3px;
    }
}
