/* AdSense container fixes to prevent zero-width errors */

/* Ensure ad containers have minimum dimensions */
.ad-container {
  min-height: 90px;
  width: 100%;
  overflow: hidden;
  position: relative;
  display: block; /* Ensure block display */
}

/* Ensure parent containers provide width */
body .ad-container {
  min-width: 250px; /* Minimum width for ads */
}

/* Ensure adsbygoogle elements have proper sizing */
.adsbygoogle {
  min-height: 90px;
  width: 100%;
}

/* Prevent ads in hidden elements */
.ad-container:empty {
  display: none;
}

/* Fix for mobile sticky ads */
.sticky-ad {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: white;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  min-height: 50px;
  max-height: 100px;
}

/* Ensure ads don't show in hidden containers */
[style*="display: none"] .ad-container,
[style*="display:none"] .ad-container,
[hidden] .ad-container {
  display: none !important;
}

/* Responsive ad sizing */
@media (max-width: 768px) {
  .ad-container {
    min-height: 50px;
  }

  .adsbygoogle {
    min-height: 50px;
  }
}

/* Ensure parent containers have width */
.page-content .ad-container {
  width: 100%;
  max-width: 100%;
}
