/* =============================================
   Shared Styles — Ad Containers & Utilities
   ============================================= */

/* Ad Container — responsive with CLS prevention */
.ad-container {
  width: 100%;
  display: block;
  margin: 1.5rem 0;
  min-height: 100px;
  overflow: hidden;
}

.ad-placeholder {
  width: 100%;
  height: 150px;
  max-height: 180px;
  background: var(--light, #f4f4f4);
  display: block;
  border-radius: 8px;
  border: 1px dashed var(--text-light, #ccc);
  opacity: 0.5;
}

/* Dark mode ad placeholder */
[data-theme="dark"] .ad-placeholder {
  background: var(--card-bg, #393C4E);
  border-color: var(--text-light, #555);
}

/* Desktop: shorter ad space (leaderboard) */
@media (min-width: 800px) {
  .ad-placeholder {
    height: 90px;
    max-height: 100px;
  }
}

/* Hide ads on very small screens if they overlap buttons */
@media (max-width: 360px) {
  .ad-container {
    margin: 0.5rem 0;
  }
  .ad-placeholder {
    height: 100px;
  }
}

/* Ensure ads don't overlap navigation on mobile */
header .ad-container,
nav .ad-container {
  display: none !important;
}
