/* ============================================================
   FS25 Portal — Advertisement slots
   Depends on: 01-tokens.css, 03-layout.css
   ============================================================ */

/* ============================================================
   Layout: two-column grid for pages with a sidebar
   ------------------------------------------------------------
   The main content gets the full width and the sidebar sits to
   the right. On narrow screens the sidebar drops below.
   ============================================================ */

.content-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--s6);
  align-items: start;
}

/* When the sidebar column is absent (or empty on small screens),
   the content spans the full width. */
.content-with-sidebar > .content-main {
  min-width: 0;
}

/* ============================================================
   Sidebar ad container
   ============================================================ */

.ad-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--s5);
  position: sticky;
  top: calc(var(--nav-height) + var(--s5));
}

/* ============================================================
   Individual ad slot
   ============================================================ */

.ad-slot {
  width: 100%;
}

.ad-slot .ad-badge {
  font-family: var(--font-mono);
  font-size: var(--fs-2xs);
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: var(--s2);
}

.ad-slot .ad-content {
  width: 100%;
  overflow: hidden;
  border-radius: var(--r);
  background: var(--surface-2);
  /* AdSense responsive ads need this to be treated as a block */
}

/* Default size hint for ad containers so the layout reserves space
   even before the ad script loads. AdSense responsive units will
   override this with their own dimensions. */
.ad-slot-sidebar_top .ad-content {
  min-height: 250px;
}

.ad-slot-sidebar_bottom .ad-content {
  min-height: 250px;
}

/* ============================================================
   Placeholder (shown when no ad code is configured)
   ============================================================ */

.ad-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  border: var(--hairline) dashed var(--border);
  border-radius: var(--r);
  background: var(--surface);
}

.ad-placeholder-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s2);
  padding: var(--s5);
  text-align: center;
}

.ad-placeholder svg {
  opacity: 0.2;
}

.ad-placeholder-text {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ad-placeholder-link {
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  color: var(--amber);
  text-decoration: underline;
  margin-top: var(--s1);
}

.ad-placeholder-link:hover {
  color: var(--amber-bright);
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 960px) {
  .content-with-sidebar {
    grid-template-columns: 1fr;
  }

  .ad-sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--s4);
  }

  .ad-slot .ad-content {
    min-height: 120px;
  }
}

@media (max-width: 600px) {
  .ad-sidebar {
    grid-template-columns: 1fr;
  }
}
