/**
 * Shell layouts for ad placement
 * Templates: single-left (default), double-ad, content-only
 * Responsive: wide (both ads) -> medium (left only) -> narrow (no ads)
 */

/* Prevent body scrolling */
html, body {
  height: 100%;
  overflow: hidden;
}

/* === Single Ad Left (default) === */
.shell-wrapper {
  display: grid;
  grid-template-columns: 200px 1fr 200px;
  gap: 30px;
  height: 100vh;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  overflow: hidden;
}

/* === Double Ad Template === */
.shell-wrapper.double-ad {
  grid-template-columns: 200px 1fr 200px;
}

.shell-wrapper.double-ad .shell-spacer {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  overflow: hidden;
}

/* Ad columns (left and right) */
.ad-sidebar {
  grid-column: 1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 20px 0 20px 20px;
  overflow: hidden;
}

.ad-right {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding: 20px 20px 20px 0;
  overflow: hidden;
}

/* Hidden state for paid users */
.ad-sidebar.ad-hidden,
.ad-right.ad-hidden {
  visibility: hidden;
}

.ad-sidebar .ad-container {
  background: #1a1f26;
  border: 1px solid #2d3748;
  border-radius: 6px;
  padding: 8px;
  overflow: hidden;
}

.ad-sidebar .ad-label {
  font-size: 9px;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  text-align: center;
}

.ad-sidebar .ad-slot {
  width: 160px;
  height: 600px;
  overflow: hidden;
}

/* Middle column - content (fills height, flex column for internal scrolling) */
.shell-content {
  grid-column: 2;
  min-width: 0;
  padding: 20px 20px 20px 0;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  /* Override page's max-width to fill available space */
  max-width: none !important;
}

/* Right column - empty spacer for symmetry (no scroll) */
.shell-spacer {
  grid-column: 3;
  overflow: hidden;
}

/* Medium screens - hide right spacer, keep ad */
@media (max-width: 1300px) {
  .shell-wrapper {
    grid-template-columns: 200px 1fr;
  }

  .shell-wrapper .shell-spacer {
    display: none;
  }

  .shell-wrapper.double-ad {
    grid-template-columns: 200px 1fr 0;
  }

  .shell-wrapper.double-ad .ad-right {
    display: none;
  }

  .shell-content {
    padding: 20px;
  }
}

/* Narrow screens - collapse to single column, no ads */
@media (max-width: 1100px) {
  html, body {
    height: auto;
    overflow: auto;
  }

  .shell-wrapper,
  .shell-wrapper.double-ad {
    display: block;
    height: auto;
    overflow: visible;
  }

  .ad-sidebar,
  .ad-right {
    display: none;
  }

  .shell-spacer {
    display: none;
  }

  .shell-content {
    padding: 20px;
    overflow: visible;
    height: auto;
  }
}
