/* ============================================
   GENERIC AD CONTAINER
============================================ */
.ad-container {
  min-width: 250px;
  min-height: 50px;
  max-width: 100%;
  margin: 16px auto;
  overflow: hidden;
  text-align: center;
}

/* Hide empty ad containers to prevent empty space */
.ad-empty {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Hide ad containers that haven't been initialized yet */
.ad-container:not([data-ad-initialized]) {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Also hide ad slots that haven't been initialized */
.ad-slot-display:not([data-ad-initialized]) {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Hide ad containers by default until they're loaded with ads */
#adContainer {
  display: none !important;
}

/* Only show ad container when it has active ads */
#adContainer.ad-active {
  display: block !important;
}

/* ============================================
   TOP BANNER
============================================ */
.ad-top-banner {
  width: 100%;
}

/* ============================================
   IN-CONTENT DISPLAY AD
============================================ */
.ad-slot-display {
  margin: 24px 0;
  text-align: center;
  min-height: 50px;
}

.ad-slot-display.ad-empty {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}


/* ============================================
   OUTSTREAM VIDEO AD
============================================ */
.outstream-ad-container {
  width: 300px;
  max-width: 100%;
  margin: 16px auto;
  display: none;
}

.outstream-ad-container.ad-empty {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.outstream-ad-container .ad-label {
  font-size: 11px;
  text-align: center;
  margin-bottom: 4px;
}

#ad-slot-video {
  width: 300px;
  height: 250px;
  max-width: 100%;
}

/* ============================================
   SIMPLE TOP BANNER
============================================ */
.ad-top-banner {
  width: 100%;
  text-align: center;
}

.ad-top-banner.ad-empty {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* ============================================
   STICKY TOP AD
============================================ */
.sticky-bottom-ad {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  margin: 0;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.sticky-bottom-ad.ad-empty {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}


/* ============================================
   FLOATING RIGHT BANNER (drawer-style, top-right corner)
============================================ */
.floating-right-wrapper {
  position: fixed;
  top: 100px;              /* adjust agar top banner se overlap ho */
  right: 0;
  z-index: 9998;
  display: flex;
  align-items: flex-start;
  pointer-events: none;
}

.floating-right-close {
  pointer-events: auto;
  width: 26px;
  height: 26px;
  margin-top: 4px;
  margin-right: 4px;
  border-radius: 50%;
  background: #333;
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 13px;
  line-height: 26px;
  text-align: center;
  padding: 0;
  flex-shrink: 0;
}

.floating-right-close:hover {
  background: #000;
}

.floating-right-drawer {
  pointer-events: auto;
  overflow: hidden;
  width: 300px;
  max-width: 300px;
  opacity: 1;
  background: #fff;
  border: 1px solid #ddd;
  border-right: none;
  border-radius: 6px 0 0 6px;
  transition: max-width 0.3s ease, width 0.3s ease, opacity 0.2s ease, border-width 0.3s ease;
}

.floating-right-drawer .ad-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 250px;
  margin: 0;
}

/* Closed state: drawer slides away to width 0, close button (notch) stays visible */
.floating-right-wrapper.closed .floating-right-drawer {
  width: 0;
  max-width: 0;
  opacity: 0;
  border-width: 0;
}

.floating-right-wrapper.closed .floating-right-drawer .ad-container {
  min-height: 0;
}
