/* 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%;
}

/* No .ad-container:empty { display: none } here: DisplayAdSafe and SafeAd add
   their <ins> only after the container has width, so hiding the empty
   container kept every slot empty (issue #240). */

/* The mobile sticky ad bar is styled in styles.css only (issue #369): a
   rule here loads later and overrode its theme background with white. */

/* 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%;
}
