/**
 * Ad slot styling - namespaced to avoid conflicts with site themes (NFR-9.2).
 * Responsive, reserves space to minimize CLS (NFR-9.3).
 */
[data-ad-placement] {
  margin: 20px 0;
  min-height: 100px;
  position: relative;
  box-sizing: border-box;
}

.ad-slot .ad-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100px;
  color: #999;
  font-size: 12px;
}

.ad-slot .ad-loading-text {
  color: #ccc;
  font-size: 12px;
}

/* Applied by ads.js when ad content is rendered */
.ad-slot .ad-label {
  font-size: 10px;
  color: #999;
  text-transform: uppercase;
  margin-bottom: 5px;
  font-weight: 600;
}

.ad-slot .ad-content {
  border: 1px solid #e0e0e0;
  padding: 10px;
  background: #f9f9f9;
  transition: opacity 0.3s ease-in-out;
  box-sizing: border-box;
}

.ad-slot .ad-content img {
  max-width: 100%;
  height: auto;
}

.ad-slot .ad-content.ad-refreshed {
  animation: adFadeIn 0.5s ease-in;
}

@keyframes adFadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  [data-ad-placement] {
    margin: 15px 0;
    min-height: 50px;
  }

  .ad-slot .ad-loading {
    min-height: 50px;
  }

  .ad-slot .ad-content {
    padding: 8px;
  }
}
