/* Banner placements: donor recognition, referral promos, own marketing.
   Same hand-drawn language as the rest of the site, so a sponsor slot reads as
   part of the paper rather than as an ad iframe dropped on top of it. */

.slot {
  margin: 0 0 26px;
}

.slot:empty {
  /* An empty slot must take no space at all, or the page grows gaps wherever a
     banner could have been. */
  display: none;
}

/* --- shared banner shell --------------------------------------------------- */

.banner {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 16px 20px;
  border: 3px dashed var(--ink);
  border-radius: 14px;
  background: rgba(255, 255, 255, .58);
  position: relative;
  text-decoration: none;
  color: inherit;
  transition: transform .12s ease;
}

a.banner:hover {
  transform: rotate(-.35deg) translateY(-1px);
}

/* Two banners in one slot need breathing room, and the rotated `note` theme
   needs more than the others or its corner overlaps the box below. */
.slot > .banner + .banner { margin-top: 18px; }
.slot > .banner.note + .banner,
.slot > .banner + .banner.note { margin-top: 30px; }

.banner .art {
  flex: none;
  width: 92px;
  height: 92px;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
  padding: 6px;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, .12);
}

.banner .txt { min-width: 0; flex: 1; }

.banner .head {
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: 30px;
  line-height: 1.1;
}

.banner .sub {
  font-size: 18px;
  color: #4A5468;
  margin-top: 2px;
}

.banner .cta {
  flex: none;
  font-family: 'Permanent Marker', cursive;
  font-size: 20px;
  color: var(--green);
  border-bottom: 4px solid var(--greenHi);
  white-space: nowrap;
  padding-bottom: 2px;
}

/* --- themes -------------------------------------------------------------- */

/* taped sticky note, like the card's WATCH MONDAY panel */
.banner.note {
  background: var(--note);
  border: 0;
  border-radius: 2px;
  transform: rotate(-.6deg);
  box-shadow: 3px 5px 0 rgba(0, 0, 0, .10);
}

.banner.note::before {
  content: '';
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%) rotate(-3deg);
  width: 110px;
  height: 26px;
  background: rgba(167, 139, 214, .5);
}

.banner.note .head { color: #8A6A12; }
.banner.note .cta { color: #8A6A12; border-bottom-color: #D9C05A; }

/* heavier, marker-drawn box for announcements */
.banner.marker {
  border-style: solid;
  border-color: var(--purple);
  background: rgba(255, 255, 255, .7);
}

.banner.marker .head { color: var(--purple); }
.banner.marker .cta { color: var(--purple); border-bottom-color: #D5CBF2; }

/* --- sponsored disclosure -------------------------------------------------
   Referral and affiliate placements must be identifiable as paid. This is
   rendered from the API's is_sponsored flag, which the server forces on for
   promo banners, so it cannot be dropped by editing the page. */

.banner .tag {
  position: absolute;
  top: -11px;
  right: 14px;
  font-family: 'Patrick Hand', cursive;
  font-size: 14px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #6B7280;
  background: var(--paper);
  border: 2px solid #C9CFDA;
  border-radius: 999px;
  padding: 1px 10px;
}

/* --- top strip ------------------------------------------------------------ */

.slot-top .banner {
  padding: 12px 18px;
  border-width: 3px;
}

.slot-top .banner .head { font-size: 26px; }
.slot-top .banner .art { width: 58px; height: 58px; }

/* --- donor wall ----------------------------------------------------------- */

.donor-wall {
  border: 3px dashed var(--green);
  border-radius: 18px;
  background: rgba(255, 255, 255, .45);
  padding: 18px 22px 22px;
}

.donor-wall > .cap {
  display: inline-block;
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: 32px;
  padding: 1px 12px;
  position: relative;
  margin-bottom: 4px;
}

.donor-wall > .cap::before {
  content: '';
  position: absolute;
  inset: 5px -4px 3px;
  background: var(--greenHi);
  transform: rotate(-1deg);
  border-radius: 3px;
  z-index: -1;
}

.donor-wall > .lede {
  color: var(--muted);
  font-size: 17px;
  margin: 0 0 14px;
}

.donor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
}

.donor-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 14px 12px;
  background: rgba(255, 255, 255, .75);
  border: 2px dashed var(--edge);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: transform .12s ease;
}

a.donor-tile:hover { transform: rotate(-.6deg); }

.donor-tile img {
  width: 76px;
  height: 76px;
  object-fit: contain;
}

.donor-tile .name {
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: 24px;
  line-height: 1.1;
}

.donor-tile .note-line {
  font-size: 16px;
  color: var(--muted);
}

/* Placeholder shown to an admin when a slot has nothing in it, so an empty
   donor wall is obviously configurable rather than broken. */
.slot-hint {
  border: 3px dashed #C9CFDA;
  border-radius: 14px;
  padding: 14px 18px;
  color: var(--muted);
  font-size: 17px;
  background: rgba(255, 255, 255, .4);
}

.slot-hint a { color: var(--blue); }

@media (max-width: 620px) {
  .banner { flex-wrap: wrap; }
  .banner .cta { width: 100%; }
  .banner .art { width: 64px; height: 64px; }
  .banner .head { font-size: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  a.banner:hover, a.donor-tile:hover { transform: none; }
}
