/* ===== Google AdSense Styles ===== */

/* Ad Container Base Styles */
.ad-container {
  width: 100%;
  margin: 0 auto;
  text-align: center;
  min-height: 90px; /* Prevent CLS for banner ads */
  background-color: var(--color-gray-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Header Ad Styles */
.header-ad {
  flex: 1;
  max-width: 728px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: transparent;
}

.header-ad .adsbygoogle {
  display: block;
  width: 100%;
  height: 100%;
}

@media (max-width: 768px) {
  .header-ad {
    height: 100px;
  }
}

/* Banner Ad (728x90 Desktop, 320x100 Mobile) */
.ad-banner {
  min-height: 90px;
  max-width: 728px;
  margin: 0 auto;
}

/* In-Feed Ad */
.ad-infeed {
  min-height: 250px;
  max-width: 100%;
}

/* Display Ad (300x250) */
.ad-display {
  min-height: 250px;
  max-width: 300px;
  margin: 0 auto;
}

/* AdSense Ins Element */
.adsbygoogle {
  display: block;
  width: 100%;
  height: 100%;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .ad-banner {
    min-height: 100px;
    max-width: 320px;
  }
  
  .ad-display {
    min-height: 250px;
    max-width: 300px;
  }
  
  .ad-infeed {
    min-height: 200px;
  }
}

/* Prevent layout shift during ad load */
.ad-container::before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
}

/* Loading state */
.ad-container.loading {
  background-color: var(--color-gray-light);
  border: 1px dashed var(--color-border);
}

.ad-container.loading::after {
  content: "Advertisement";
  color: var(--color-gray-medium);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

