/* site.css — chrome for the online bingo site (SEO content, browse pages, CTAs).
   Loaded AFTER style.css; consumes the theme CSS variables from themes/default.
   The shared console (style.css / app.js) is untouched by this file. */

/* ---------- shared bits ---------- */
.site-info,
.browse-main {
    box-sizing: border-box;
    max-width: 1100px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 4rem;
    color: var(--color-text, #1f2933);
    line-height: 1.6;
}

.site-info h2,
.browse-main h1,
.browse-main h2 {
    font-family: var(--font-display, inherit);
    color: var(--color-text, #1f2933);
}

.site-info a,
.browse-main a { color: var(--color-primary, #2563eb); }

.breadcrumb {
    font-size: 0.9rem;
    color: var(--color-text-muted, #6b7280);
    margin-bottom: 1.25rem;
}
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* ---------- TPT call-to-action ---------- */
/* Reserved "buy on TPT" green — deliberately NOT the themeable blue used by the
   in-app caller buttons, so purchase CTAs never blend in with tool actions and
   stay high-contrast on every theme. */
.tpt-btn {
    display: inline-block;
    background: #059669;
    color: #fff !important;
    font-weight: 700;
    text-decoration: none;
    padding: 0.85rem 1.4rem;
    border-radius: 999px;
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35);
    transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.tpt-btn:hover {
    background: #047857;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(5, 150, 105, 0.45);
}

.tpt-cta {
    background: var(--color-surface, #fff);
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: 14px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}
.tpt-cta h2 { margin-top: 0; }

/* ---------- game-page info section ---------- */
.info-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2.5rem;
    align-items: start;
}
.info-side { display: flex; flex-direction: column; gap: 1.5rem; }

.sample-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}
.sample-list li {
    background: var(--color-surface, #fff);
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: 10px;
    padding: 0.65rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}
.sample-prefix {
    font-size: 0.85rem;
    color: var(--color-text-muted, #6b7280);
    width: 100%;
}
.sample-eq { color: var(--color-text-muted, #6b7280); }

.related-topics ul { list-style: none; padding: 0; margin: 0; }
.related-topics li { margin: 0.35rem 0; }

/* ---------- game cards / topic pills ---------- */
.game-card-list {
    list-style: none;
    padding: 0;
    margin: 1.25rem 0 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.9rem;
}
.game-card a {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    text-decoration: none;
    background: var(--color-surface, #fff);
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: 12px;
    padding: 1rem 1.15rem;
    height: 100%;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.game-card a:hover {
    border-color: var(--color-primary, #2563eb);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}
.game-card-title { font-weight: 700; color: var(--color-text, #1f2933); }
.game-card-meta { font-size: 0.85rem; color: var(--color-text-muted, #6b7280); }

.topic-pills {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.topic-pills a {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    background: var(--color-surface, #fff);
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
    font-size: 0.9rem;
    color: var(--color-text, #1f2933);
}
.topic-pills a:hover { border-color: var(--color-primary, #2563eb); }
.pill-count {
    background: var(--color-bg, #f5f7fa);
    border-radius: 999px;
    padding: 0 0.45rem;
    font-size: 0.75rem;
    color: var(--color-text-muted, #6b7280);
}

.related-games { margin-top: 2.5rem; }
.bundle-cta { margin: 1.5rem 0; display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* Primary purchase CTA at the top of the caller's right rail — the most
   prominent conversion point, persistently visible (rail is sticky) while
   calling. Reserved green, card treatment, value prop on two lines. */
.cards-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    text-decoration: none;
    background: #059669;
    color: #fff;
    border-radius: 14px;
    padding: 0.9rem 1.05rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 6px 18px rgba(5, 150, 105, 0.38);
    transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.cards-cta:hover {
    background: #047857;
    transform: translateY(-2px);
    box-shadow: 0 9px 24px rgba(5, 150, 105, 0.5);
}
.cards-cta svg { flex: 0 0 auto; }
.cards-cta-main { font-weight: 800; font-size: 1rem; line-height: 1.25; text-align: center; }

/* ---------- browse pages (home + hubs) ---------- */
body.browse {
    background: var(--color-bg, #f5f7fa);
    margin: 0;
}
.browse-header {
    display: flex;
    align-items: center;
    padding: 0.85rem 1.5rem;
    background: var(--color-surface, #fff);
    border-bottom: 1px solid var(--color-border, #e5e7eb);
}
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.brand-logo { height: 34px; width: auto; }
.brand-name { font-family: var(--font-display, inherit); font-size: 1.25rem; color: var(--color-text, #1f2933); }
.browse-intro { color: var(--color-text-muted, #6b7280); max-width: 60ch; }

/* Back-to-index link in the caller's right rail. margin-top:auto here + on the
   logo (.grid-pane-logo-link) makes the two flex auto-margins split the free
   space evenly, vertically centering the link between the grid and the logo. */
.grid-pane-back {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-top: auto;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--color-primary, #2563eb);
    text-decoration: none;
}
.grid-pane-back:hover .back-text { text-decoration: underline; }
.grid-pane-back .back-arrow { flex: 0 0 auto; }
/* "Bingo" matches the main BINGO! — dotty display font + the same rainbow */
.back-bingo { font-family: var(--font-display, inherit); }
.back-bingo .bl1 { color: #ef4444; }
.back-bingo .bl2 { color: #f97316; }
.back-bingo .bl3 { color: #eab308; }
.back-bingo .bl4 { color: #22c55e; }
.back-bingo .bl5 { color: #2563eb; }

/* Big, colorful BINGO! hero on home + hub pages */
.site-bingo {
    font-family: var(--font-display, inherit);
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: 0.04em;
    font-size: clamp(3.5rem, 12vw, 7.5rem);
    margin: 0.5rem 0 0.25rem;
}
.site-bingo .sb { display: inline-block; text-shadow: 2px 4px 0 rgba(0, 0, 0, 0.12); }
.site-bingo .sb1 { color: #ef4444; }  /* red */
.site-bingo .sb2 { color: #f97316; }  /* orange */
.site-bingo .sb3 { color: #eab308; }  /* gold */
.site-bingo .sb4 { color: #22c55e; }  /* green */
.site-bingo .sb5 { color: #2563eb; }  /* blue */
.site-bingo .sb6 { color: #a855f7; }  /* purple */
.browse-main .site-bingo + h1 {
    font-size: clamp(1.4rem, 3vw, 2rem);
    margin: 0 0 0.5rem;
    color: var(--color-text, #1f2933);
}

.search-box { margin: 1.5rem 0; }
#game-search {
    width: 100%;
    max-width: 520px;
    box-sizing: border-box;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: 999px;
    background: var(--color-surface, #fff);
    color: var(--color-text, #1f2933);
}
#game-search:focus { outline: 2px solid var(--color-primary, #2563eb); outline-offset: 1px; }

.cluster { margin: 2.5rem 0; }
.sibling-topics { margin-top: 2.5rem; }

/* ---------- footer ---------- */
.site-footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border, #e5e7eb);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--color-text-muted, #6b7280);
}

/* Note: the .mixed-content prose sizing now lives in the shared style.css so the
   offline caller (ActivitySite2) gets it too. */

@media (max-width: 760px) {
    .info-grid { grid-template-columns: 1fr; gap: 1.75rem; }
}

/* The shared caller header lays its controls in one non-wrapping row, which
   overflows on phones (ActivitySite2 targeted desktop/tablet only). The public
   site is mobile-first, so allow the controls to wrap. Online-site override —
   the shared style.css is untouched. */
@media (max-width: 640px) {
    /* Header: long titles must wrap, and the controls must wrap. */
    .app-title { white-space: normal; overflow-wrap: anywhere; }
    .app-controls { flex-wrap: wrap; row-gap: 0.5rem; }
    /* Flex/grid children default to min-width:auto and refuse to shrink below
       their content (long titles, the controls row, KaTeX's non-wrapping math),
       pushing the page sideways. min-width:0 lets them shrink; overflow-x:auto
       lets a too-wide expression scroll in its own box, not the whole page. */
    .app-title, .app-controls,
    .app-main, .content-pane, .question-content, .question-body, .answer-body,
    .info-main, .sample-list, .sample-list li { min-width: 0; }
    .question-body, .answer-body, .sample-list li { max-width: 100%; overflow-x: auto; }
}
