/* css/ads.css — ads + TVC overlay, dùng chung mọi theme */
/* TVC pre-roll */
.vb-tvc { position: absolute; inset: 0; background: #000; }
.vb-tvc-video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.vb-tvc-hit { position: absolute; inset: 0; z-index: 2; }
/* Nhãn Quảng cáo — góc trái trên */
.vb-tvc-label {
  position: absolute; top: 10px; left: 10px; z-index: 4;
  font-size: 11px; color: #fff; background: rgba(225,29,72,.92);
  padding: 4px 10px; border-radius: 4px; font-weight: 700; letter-spacing: .03em;
  pointer-events: none; box-shadow: 0 1px 4px rgba(0,0,0,.35);
}
/* Nút Bỏ qua — góc phải dưới */
.vb-tvc-bar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
  display: flex; align-items: center; justify-content: flex-end;
  padding: 10px 12px; background: linear-gradient(transparent, rgba(0,0,0,.7));
  pointer-events: none;
}
.vb-tvc-skip {
  pointer-events: auto; border: 0; border-radius: 6px; cursor: pointer;
  font-size: 12px; font-weight: 600; padding: 7px 14px;
  background: rgba(255,255,255,.94); color: #0f172a;
}
.vb-tvc-skip:disabled { opacity: .55; cursor: not-allowed; }
.vb-tvc-skip:not(:disabled):hover { background: #fff; }
.vb-tvc-tap {
  position: absolute; inset: 0; z-index: 6;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; cursor: pointer;
  background: rgba(0,0,0,.55);
  color: #fff; border: 0; width: 100%;
  font-size: 15px; font-weight: 600;
}
.vb-tvc-tap span {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.95); color: #0f172a;
  padding: 12px 20px; border-radius: 999px;
  box-shadow: 0 4px 16px rgba(0,0,0,.35);
}
.vb-tvc-tap small { opacity: .85; font-size: 12px; font-weight: 500; }


/* Ads */
/* ===== Ads — PC ~25% ngang (như demo), mobile gần full ===== */
.vb-ad {
  text-align: center;
  position: relative;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
.vb-ad-body {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  position: relative;
  display: block;
}

/* Mobile: gần full; PC: ~25vw / max 420px — nhiều khoảng trống quanh */
.vb-ad-header,
.vb-ad-player {
  padding: 2px 0 8px;
  margin: 0 auto 0;
  display: block;
  width: 72%;
  max-width: 72%;
  box-sizing: border-box;
  background: transparent !important;
  border: 0 !important;
  position: relative;
  z-index: 1; /* dưới .vb-header sticky */
  overflow: visible;
  isolation: isolate;
  line-height: 0;
}
.vb-ad-header { margin-bottom: 0; }
.vb-ad-player { margin-top: 4px; margin-bottom: 6px; }
@media screen and (min-width: 768px) {
  .vb-ad-header,
  .vb-ad-player {
    width: 25vw;
    max-width: 420px;
    min-width: 300px;
  }
}

.vb-ad-banners {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  width: 100%;
  margin: 0 auto;
  position: relative;
}
.vb-ad-item {
  display: block;
  line-height: 0;
  width: 100%;
  margin: 0;
  cursor: pointer;
}
.vb-ad-item img,
.vb-ad-banners > img,
.vb-ad-body > a > img,
.vb-ad-body > img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 38px;
  object-fit: fill;
  margin: 0 auto;
  border-radius: 0;
}
@media screen and (min-width: 768px) {
  .vb-ad-item img,
  .vb-ad-banners > img,
  .vb-ad-body > a > img,
  .vb-ad-body > img {
    max-height: 52px;
  }
}

.vb-ad-square {
  display: block;
  max-width: 220px;
  margin: 0 auto;
}
.vb-ad-square img {
  width: 100%;
  max-width: 220px;
  height: auto;
  border-radius: 0;
  object-fit: contain;
}
@media screen and (min-width: 768px) {
  .vb-ad-square,
  .vb-ad-square img {
    max-width: 360px;
  }
}

.vb-ad-closeable { position: relative; }
.vb-ad-dismiss {
  position: absolute;
  z-index: 2;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  background-color: #fff;
  color: #e11d48;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.28);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  /* tránh lệch % + transform cha trên iOS */
  transform: none !important;
  -webkit-transform: none !important;
}
.vb-ad-dismiss:hover { background-color: #f8fafc; color: #be123c; }
@media screen and (min-width: 768px) {
  .vb-ad-dismiss { width: 26px; height: 26px; font-size: 16px; }
}

.vb-ad-body > .vb-ad-dismiss,
.vb-ad-header .vb-ad-dismiss,
.vb-ad-player .vb-ad-dismiss,
.vb-ad-footer .vb-ad-dismiss {
  top: auto;
  bottom: -6px;
  right: -6px;
  transform: none !important;
}

/* Catfish Top — sát mép trên màn hình */
.vb-ad-catfish-top {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  z-index: 10000050;
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 72%;
  max-width: 72%;
  box-sizing: border-box;
  pointer-events: none;
  overflow: visible;
}
@media screen and (min-width: 768px) {
  .vb-ad-catfish-top {
    width: 25vw;
    max-width: 420px;
    min-width: 300px;
  }
}
.vb-ad-catfish-top .vb-ad-body,
.vb-ad-catfish-top .vb-ad-catfish-inner {
  width: 100%;
  margin: 0 auto;
  position: relative;
  pointer-events: auto;
}
.vb-ad-catfish-top .vb-ad-banners { gap: 2px; width: 100%; }
.vb-ad-catfish-top .vb-ad-item { width: 100%; pointer-events: auto; }
.vb-ad-catfish-top .vb-ad-item img {
  width: 100%;
  height: auto;
  max-height: 38px;
  object-fit: fill;
}
@media screen and (min-width: 768px) {
  .vb-ad-catfish-top .vb-ad-item img {
    max-height: 52px;
  }
}
.vb-ad-catfish-top .vb-ad-dismiss {
  top: auto;
  bottom: -6px;
  right: -6px;
  transform: none !important;
  pointer-events: auto;
  z-index: 5;
}

/* Catfish Bottom */
.vb-ad-catfish,
.vb-ad-catfish-bottom {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  z-index: 90;
  background: transparent !important;
  border: 0 !important;
  padding: 0;
  margin: 0;
  width: 72%;
  max-width: 72%;
  box-sizing: border-box;
  pointer-events: none;
  overflow: visible;
  line-height: 0;
}
@media screen and (min-width: 768px) {
  .vb-ad-catfish,
  .vb-ad-catfish-bottom {
    width: 25vw;
    max-width: 420px;
    min-width: 300px;
  }
}
.vb-ad-catfish .vb-ad-body,
.vb-ad-catfish-inner {
  width: 100%;
  margin: 0 auto;
  position: relative;
  pointer-events: auto;
}
.vb-ad-catfish .vb-ad-banners {
  gap: 2px;
  pointer-events: auto;
  width: 100%;
  align-items: stretch;
}
.vb-ad-catfish .vb-ad-item { pointer-events: auto; width: 100%; }
.vb-ad-catfish .vb-ad-item img {
  width: 100%;
  height: auto;
  max-height: 38px;
  object-fit: fill;
}
@media screen and (min-width: 768px) {
  .vb-ad-catfish .vb-ad-item img {
    max-height: 52px;
  }
}
.vb-ad-catfish .vb-ad-dismiss,
.vb-ad-catfish-close {
  top: -6px;
  right: -6px;
  bottom: auto;
  transform: none !important;
  pointer-events: auto;
  z-index: 5;
}

/* Preload */
.vb-ad-preload {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  z-index: 9999 !important;
  background: transparent;
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 20px;
  pointer-events: none;
  margin: 0 !important;
  transform: none !important;
}
.vb-ad-preload .vb-ad-preload-box {
  pointer-events: auto;
}
.vb-ad-preload.vb-ad-preload-hidden {
  display: none !important;
  pointer-events: none !important;
  visibility: hidden !important;
}
.vb-ad-preload-box {
  position: relative;
  background: transparent;
  border: 0;
  padding: 0;
  max-width: min(220px, 66vw);
  width: auto;
  box-shadow: none;
  pointer-events: auto;
  border-radius: 0;
}
@media screen and (min-width: 768px) {
  .vb-ad-preload-box {
    max-width: 360px;
  }
}
.vb-ad-preload-close,
.vb-ad-preload .vb-ad-dismiss {
  top: -10px;
  right: -10px;
  bottom: auto;
  left: auto;
  transform: none;
  z-index: 6;
}
.vb-ad-preload-inner {
  text-align: center;
  line-height: 0;
}
.vb-ad-preload-inner img,
.vb-ad-preload-inner a img,
.vb-ad-preload-inner .vb-ad-item img {
  width: auto;
  max-width: min(220px, 66vw);
  max-height: min(200px, 42vh);
  height: auto;
  border-radius: 0;
  display: block;
  margin: 0 auto;
  object-fit: contain;
}
@media screen and (min-width: 768px) {
  .vb-ad-preload-inner img,
  .vb-ad-preload-inner a img,
  .vb-ad-preload-inner .vb-ad-item img {
    max-width: 360px;
    max-height: 360px;
  }
}
.vb-ad-preload .vb-ad-square {
  max-width: 220px;
  width: auto;
  margin: 0 auto;
}
.vb-ad-preload .vb-ad-square img {
  border-radius: 0;
  object-fit: contain;
  max-width: 220px;
  max-height: 220px;
}
@media screen and (min-width: 768px) {
  .vb-ad-preload .vb-ad-square {
    max-width: 360px;
  }
  .vb-ad-preload .vb-ad-square img {
    max-width: 360px;
    max-height: 360px;
  }
}

/* Chỉ chừa đúng chiều cao catfish — JS cập nhật --vb-catfish-h */
body.vb-has-catfish {
  padding-bottom: var(--vb-catfish-h, 0px);
}

/* Catfish top overlay — không chừa padding trên nội dung */
body.vb-has-catfish-top .vb-container {
  padding-top: 0;
}

/* Siết ảnh ads — theme khác hay set img {width:100%;height:auto} làm vỡ */
.vb-ad:not(.vb-ad-preload) img,
.vb-ad:not(.vb-ad-preload) .vb-ad-body img,
.vb-ad:not(.vb-ad-preload) .vb-ad-item img {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  max-height: 38px !important;
  object-fit: fill !important;
  margin: 0 auto !important;
}
@media screen and (min-width: 768px) {
  .vb-ad:not(.vb-ad-preload) img,
  .vb-ad:not(.vb-ad-preload) .vb-ad-body img,
  .vb-ad:not(.vb-ad-preload) .vb-ad-item img { max-height: 52px !important; }
}
.vb-ad-preload img,
.vb-ad-preload .vb-ad-body img,
.vb-ad-preload .vb-ad-item img,
.vb-ad-preload .vb-ad-square img,
.vb-ad-square img {
  max-height: 220px !important;
  max-width: 220px !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
}
@media screen and (min-width: 768px) {
  .vb-ad-preload img,
  .vb-ad-preload .vb-ad-body img,
  .vb-ad-preload .vb-ad-item img,
  .vb-ad-preload .vb-ad-square img,
  .vb-ad-square img {
    max-width: 360px !important;
    max-height: 360px !important;
  }
}

/* Không để preload/catfish chảy vào bài viết đè player */
.vb-ad-player, .vb-ad-header, .vb-ad-footer { position: relative !important; z-index: 1 !important; }
.vb-ad-preload {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9999 !important;
  pointer-events: none !important;
}
.vb-ad-preload .vb-ad-preload-box { pointer-events: auto !important; }
.vb-ad-catfish, .vb-ad-catfish-bottom {
  position: fixed !important;
  left: 50% !important;
  bottom: 0 !important;
  top: auto !important;
  transform: translateX(-50%) !important;
  z-index: 90 !important;
}
.vb-ad-catfish-top {
  position: fixed !important;
  left: 50% !important;
  top: 0 !important;
  right: auto !important;
  bottom: auto !important;
  padding: 0 !important;
  margin: 0 !important;
  transform: translateX(-50%) !important;
  z-index: 10000050 !important;
}
body.vb-skin-ditgai69 .vb-ad-catfish-top {
  top: 0 !important;
  z-index: 10000050 !important;
}
.vb-ad-catfish-top .vb-ad-body { padding: 0 !important; margin: 0 !important; line-height: 0 !important; }
.vb-ad-catfish-top img { margin: 0 !important; display: block !important; }

body.vb-skin-ditgai69 .vb-ad-header,
body.vb-skin-heovl .vb-ad-header,
body.vb-skin-ohsex .vb-ad-header {
  width: 72% !important;
  max-width: 72% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}
@media screen and (min-width: 768px) {
  body.vb-skin-ditgai69 .vb-ad-header,
  body.vb-skin-heovl .vb-ad-header,
  body.vb-skin-ohsex .vb-ad-header {
    width: 25vw !important;
    max-width: 420px !important;
    min-width: 300px !important;
  }
}
body.vb-skin-ditgai69 .vb-ad-header img,
body.vb-skin-heovl .vb-ad-header img {
  width: 100% !important;
  max-height: 38px !important;
  height: auto !important;
  display: block !important;
  object-fit: fill !important;
}
@media screen and (min-width: 768px) {
  body.vb-skin-ditgai69 .vb-ad-header img,
  body.vb-skin-heovl .vb-ad-header img {
    max-height: 52px !important;
  }
}
html { --vb-ad-sticky: 56px; }
.h2-ad-head { text-align: center; padding: 2px 0 0; }
.h2-body .vb-ad-header,
.h2-body .vb-ad-player,
.h2-body .vb-ad-catfish-top {
  width: min(72vw, 420px) !important;
  max-width: min(72vw, 420px) !important;
  min-width: 0 !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
.h2-body .vb-ad-header img,
.h2-body .vb-ad-player img {
  max-height: 36px !important;
}

body.vb-skin-ohsex .ads-header,
body.vb-skin-ohsex .vb-ad-header,
body.vb-skin-ditgai69 .vb-ad-header,
body.vb-skin-heovl .vb-ad-header {
  width: min(92%, 420px) !important;
  max-width: 420px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
body.vb-skin-ohsex .ads-header img,
body.vb-skin-ohsex .vb-ad-header img {
  width: 100% !important;
  max-height: 38px !important;
  height: auto !important;
  display: block !important;
  object-fit: fill !important;
}

.vb-ad-bar {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  text-align: center !important;
  clear: both !important;
  float: none !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}
.vb-ad-bar .vb-ad-header,
body.vb-skin-ditgai69 .vb-ad-header,
body.vb-skin-heovl .vb-ad-header,
body.vb-skin-ohsex .vb-ad-header,
body.vb-skin-ohsex .ads-header {
  display: inline-block !important;
  width: min(72vw, 420px) !important;
  max-width: 420px !important;
  min-width: 0 !important;
  margin: 6px auto !important;
  float: none !important;
  vertical-align: top !important;
}
.vb-ad-header img,
.vb-ad-player img,
.vb-ad-bar img,
body.vb-skin-ditgai69 .vb-ad img,
body.vb-skin-heovl .vb-ad img,
body.vb-skin-ohsex .vb-ad img,
body.vb-skin-ohsex .ads-header img {
  width: 100% !important;
  max-width: 100% !important;
  max-height: 36px !important;
  height: 36px !important;
  object-fit: fill !important;
  display: block !important;
}
@media screen and (min-width: 768px) {
  .vb-ad-header img,
  .vb-ad-player img,
  .vb-ad-bar img,
  body.vb-skin-ditgai69 .vb-ad img,
  body.vb-skin-heovl .vb-ad img,
  body.vb-skin-ohsex .vb-ad img {
    max-height: 50px !important;
    height: 50px !important;
  }
}

/* header/player = đúng khổ catfish bottom */
.vb-ad-header,
.vb-ad-player,
.vb-ad-bar .vb-ad-header,
body.vb-skin-ditgai69 .vb-ad-header,
body.vb-skin-heovl .vb-ad-header,
body.vb-skin-ohsex .vb-ad-header,
body.vb-skin-ohsex .ads-header {
  width: 72% !important;
  max-width: 72% !important;
  min-width: 0 !important;
  margin: 6px auto !important;
  display: block !important;
  float: none !important;
  box-sizing: border-box !important;
}
@media screen and (min-width: 768px) {
  .vb-ad-header,
  .vb-ad-player,
  .vb-ad-bar .vb-ad-header,
  body.vb-skin-ditgai69 .vb-ad-header,
  body.vb-skin-heovl .vb-ad-header,
  body.vb-skin-ohsex .vb-ad-header,
  body.vb-skin-ohsex .ads-header {
    width: 25vw !important;
    max-width: 420px !important;
    min-width: 300px !important;
  }
}
.vb-ad-header img,
.vb-ad-player img,
.vb-ad-bar img,
body.vb-skin-ditgai69 .vb-ad-header img,
body.vb-skin-heovl .vb-ad-header img,
body.vb-skin-ohsex .vb-ad-header img,
body.vb-skin-ohsex .ads-header img {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: 38px !important;
  object-fit: fill !important;
  display: block !important;
}
@media screen and (min-width: 768px) {
  .vb-ad-header img,
  .vb-ad-player img,
  .vb-ad-bar img,
  body.vb-skin-ditgai69 .vb-ad-header img,
  body.vb-skin-heovl .vb-ad-header img,
  body.vb-skin-ohsex .vb-ad-header img {
    max-height: 52px !important;
  }
}

/* Header ads = đúng 72vw như catfish (không tính theo .container) */
body.vb-skin-ohsex .vb-ad-bar,
body.vb-skin-ditgai69 .vb-ad-bar,
body.vb-skin-heovl .vb-ad-bar {
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: calc(50% - 50vw) !important;
  text-align: center !important;
}
body.vb-skin-ohsex .vb-ad-header,
body.vb-skin-ohsex .ads-header,
body.vb-skin-ohsex .vb-ad-bar .vb-ad-header,
body.vb-skin-ditgai69 .vb-ad-header,
body.vb-skin-heovl .vb-ad-header,
body.vb-skin-viet69 .vb-ad-header {
  width: 72vw !important;
  max-width: 72vw !important;
  min-width: 0 !important;
  margin: 6px auto !important;
}
@media screen and (min-width: 768px) {
  body.vb-skin-ohsex .vb-ad-header,
  body.vb-skin-ohsex .ads-header,
  body.vb-skin-ditgai69 .vb-ad-header,
  body.vb-skin-heovl .vb-ad-header,
  body.vb-skin-viet69 .vb-ad-header {
    width: 25vw !important;
    max-width: 420px !important;
    min-width: 300px !important;
  }
}

/* Preload PC — chặn rule banner 38px, to rõ trên desktop */
#vbAdPreload.vb-ad-preload .vb-ad-preload-box {
  max-width: min(220px, 66vw);
}
#vbAdPreload.vb-ad-preload .vb-ad-preload-inner img,
#vbAdPreload.vb-ad-preload .vb-ad-body img,
#vbAdPreload.vb-ad-preload .vb-ad-item img,
#vbAdPreload.vb-ad-preload img {
  max-width: min(220px, 66vw) !important;
  max-height: min(200px, 42vh) !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
}
@media screen and (min-width: 768px) {
  #vbAdPreload.vb-ad-preload .vb-ad-preload-box {
    max-width: 360px !important;
    width: auto !important;
  }
  #vbAdPreload.vb-ad-preload .vb-ad-preload-inner img,
  #vbAdPreload.vb-ad-preload .vb-ad-body img,
  #vbAdPreload.vb-ad-preload .vb-ad-item img,
  #vbAdPreload.vb-ad-preload img {
    max-width: 360px !important;
    max-height: 360px !important;
    width: auto !important;
    height: auto !important;
  }
}

/* Ads footer / top search cloud: full width, không dùng khung banner 72% */
.vb-ad-cloud,
.vb-theme-cloud,
.vb-ad-footer,
.vb-ad.vb-ad-footer {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  text-align: left !important;
  line-height: inherit !important;
  background: transparent !important;
  float: none !important;
}
.vb-theme-cloud { margin-top: 16px !important; margin-bottom: 8px !important; }
.vb-ad-cloud,
.vb-ad-footer,
.vb-ad.vb-ad-footer { margin-top: 8px !important; margin-bottom: 0 !important; }
body.vb-skin-classic .vb-theme-cloud { margin-bottom: 20px !important; }
body.vb-skin-classic .vb-ad-cloud,
body.vb-skin-classic .vb-ad-footer {
  margin-top: 16px !important;
  padding-top: 4px !important;
}
.vb-ad-cloud > div.px-2,
.vb-ad-cloud > .px-2,
.vb-ad-footer > div.px-2,
.vb-ad-cloud .pt-2 {
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
.vb-ad-cloud .border-l-2,
.vb-ad-footer .border-l-2,
.vb-theme-cloud .border-l-2 {
  padding-left: 8px !important;
}
.vb-top-search-title {
  font-size: 13px; font-weight: 600; color: #94a3b8; margin: 0 0 10px;
  text-transform: uppercase; letter-spacing: .04em;
}
.vb-top-search-list { display: flex; flex-wrap: wrap; gap: 8px; }
.vb-top-search-item {
  display: inline-flex; align-items: center;
  text-decoration: none; font-size: 12.5px; color: #cbd5e1;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08);
  border-radius: 999px; padding: 5px 12px;
}
