/* ================================================================
   SUDOKU — Ad Placeholder Styles  (theme-aware via CSS vars)
   Fonts: loaded via Google Fonts CDN (Crimson Pro, DM Sans)
================================================================ */

/* Default fallback colors — overridden by JS query-param injection */
:root {
  --sponsor-bg: #f7f3ec;
  --sponsor-surf: rgba(0, 0, 0, 0.25);
  --sponsor-text: #2a2520;
  --sponsor-acc: #c0522a;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  background: transparent !important;
}
html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}
body {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  font-family: "DM Sans", sans-serif;
  background: var(--sponsor-surf);
  color: var(--sponsor-text);
}

/* ── Topbar (mirrors game's .page-header) ── */
.sponsor-page-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 18px 12px;
  border-bottom: 1px solid rgba(128, 128, 128, 0.18);
  flex-shrink: 0;
  text-align: center;
}
.sponsor-page-title {
  font-family: "Crimson Pro", Georgia, serif;
  font-size: clamp(1.1rem, 4vw, 1.5rem);
  font-weight: 600;
  color: var(--sponsor-text);
  letter-spacing: 0.02em;
  text-align: center;
}

/* ── Ad body fills remaining space ── */
.sponsor-body {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}

/* Corner brackets (outer frame) */
.bracket {
  position: absolute;
  width: 10px;
  height: 10px;
}
.bracket.tl {
  top: 6px;
  left: 6px;
  border-top: 1px solid rgba(128, 128, 128, 0.2);
  border-left: 1px solid rgba(128, 128, 128, 0.2);
}
.bracket.tr {
  top: 6px;
  right: 6px;
  border-top: 1px solid rgba(128, 128, 128, 0.2);
  border-right: 1px solid rgba(128, 128, 128, 0.2);
}
.bracket.bl {
  bottom: 6px;
  left: 6px;
  border-bottom: 1px solid rgba(128, 128, 128, 0.2);
  border-left: 1px solid rgba(128, 128, 128, 0.2);
}
.bracket.br {
  bottom: 6px;
  right: 6px;
  border-bottom: 1px solid rgba(128, 128, 128, 0.2);
  border-right: 1px solid rgba(128, 128, 128, 0.2);
}

.inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

/* Dashed-border ad slot */
.sponsor-box {
  position: relative;
  width: calc(100% - 20px);
  height: calc(100% - 20px);
  border: 1px dashed rgba(128, 128, 128, 0.25);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Corner brackets inside the dashed box */
.sponsor-box-corner {
  position: absolute;
  width: 9px;
  height: 9px;
}
.sponsor-box-tl {
  top: -1px;
  left: -1px;
  border-top: 2px solid var(--sponsor-acc);
  border-left: 2px solid var(--sponsor-acc);
  opacity: 0.5;
}
.sponsor-box-tr {
  top: -1px;
  right: -1px;
  border-top: 2px solid var(--sponsor-acc);
  border-right: 2px solid var(--sponsor-acc);
  opacity: 0.5;
}
.sponsor-box-bl {
  bottom: -1px;
  left: -1px;
  border-bottom: 2px solid var(--sponsor-acc);
  border-left: 2px solid var(--sponsor-acc);
  opacity: 0.5;
}
.sponsor-box-br {
  bottom: -1px;
  right: -1px;
  border-bottom: 2px solid var(--sponsor-acc);
  border-right: 2px solid var(--sponsor-acc);
  opacity: 0.5;
}

.sponsor-box-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 12px;
  text-align: center;
}

.sponsor-eyebrow {
  font-size: 7px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--sponsor-text);
  opacity: 0.35;
  margin-bottom: 6px;
}
.sponsor-dims {
  font-family: "Crimson Pro", Georgia, serif;
  font-size: clamp(14px, 3.5vw, 20px);
  font-weight: 600;
  color: var(--sponsor-acc);
  letter-spacing: 0.04em;
}
.sponsor-format {
  font-size: 8px;
  letter-spacing: 0.12em;
  color: var(--sponsor-text);
  opacity: 0.22;
  margin-top: 2px;
}
.sponsor-note {
  font-size: 7px;
  letter-spacing: 0.08em;
  color: var(--sponsor-text);
  opacity: 0.16;
  margin-top: 8px;
  font-style: italic;
}

/* ── Small Mobile ── */
@media (max-width: 480px) {
  .sponsor-eyebrow {
    font-size: 5px;
    margin-bottom: 3px;
  }
  .sponsor-dims {
    font-size: 11px;
  }
  .sponsor-format {
    font-size: 5px;
  }
  .sponsor-note {
    font-size: 5px;
    margin-top: 4px;
  }
  .sponsor-box-content {
    gap: 2px;
    padding: 6px;
  }
  .bracket {
    width: 7px;
    height: 7px;
  }
  .sponsor-page-header {
    padding: 10px 12px 8px;
  }
}
/* ── Mobile ── */
@media (min-width: 481px) and (max-width: 768px) {
  .sponsor-eyebrow {
    font-size: 6px;
  }
  .sponsor-dims {
    font-size: 13px;
  }
  .sponsor-format {
    font-size: 6px;
  }
  .sponsor-note {
    font-size: 6px;
    margin-top: 5px;
  }
  .sponsor-box-content {
    gap: 3px;
    padding: 9px;
  }
}
