/* ====================================================================
   notagrouch BBS — frontend helpers
   theme.json handles palette + typography + layout. This file adds the
   bits that can't be expressed via theme.json:
   - responsive show/hide for the desktop vs mobile ANSI header
   - the blinking BBS prompt cursor
   - sharp-everything rule (border-radius: 0)
   - selection colors
   ==================================================================== */

*,
*::before,
*::after {
  border-radius: 0;
}

::selection {
  background-color: var(--wp--preset--color--bbs-cyan);
  color: var(--wp--preset--color--bbs-blue-bg);
}

/* Responsive header pair — desktop > 768px shows the big box; mobile shows compact. */
.bbs-ansi-desktop { display: none; }
.bbs-ansi-mobile  { display: block; }

@media (min-width: 768px) {
  .bbs-ansi-desktop { display: block; }
  .bbs-ansi-mobile  { display: none; }
}

/* ANSI box pre block — kill default WP preformatted padding/background so the
   yellow box-drawing renders on the BBS blue canvas. */
.bbs-ansi-box {
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0 0 2rem 0;
  text-align: center;
  white-space: pre;
  color: var(--wp--preset--color--bbs-yellow);
  overflow-x: hidden;
  font-family: var(--wp--preset--font-family--mono);
}

.bbs-ansi-desktop {
  line-height: 1.25;
  font-size: var(--wp--preset--font-size--base);
}

.bbs-ansi-mobile {
  line-height: 1;
  font-size: var(--wp--preset--font-size--xs);
}

/* Header bar — amber/black, full bleed, 4rem tall on desktop. Matches
   the live site's <header class="hidden md:flex bg-amber-bg h-16 ..."> */
.bbs-header-bar {
  background-color: var(--wp--preset--color--amber-bg);
  border-bottom: 1px solid var(--wp--preset--color--outline-variant);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
}

@media (min-width: 768px) {
  .bbs-header-bar {
    height: 4rem;
    padding: 0 2rem;
  }
}

.bbs-header-bar a.bbs-wordmark {
  color: var(--wp--preset--color--bbs-yellow);
  font-weight: 700;
  letter-spacing: -0.05em;
  text-decoration: none;
  font-family: var(--wp--preset--font-family--mono);
}

.bbs-header-bar .bbs-sysop-line {
  color: var(--wp--preset--color--slate-dimmed);
  font-size: var(--wp--preset--font-size--xs);
}

/* Main canvas — 720px max, centered, flex-grow so footer hugs viewport bottom. */
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--wp--preset--font-family--mono);
  background-color: var(--wp--preset--color--bbs-blue-bg);
  color: var(--wp--preset--color--on-surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.bbs-canvas {
  flex: 1 0 auto;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .bbs-canvas { padding: 2rem; }
}

/* Numbered-link main menu — (1) Latest Posts, (2) About, (3) Archives */
.bbs-menu { display: flex; flex-direction: column; gap: 0.5rem; }
.bbs-menu a {
  display: flex;
  align-items: center;
  padding: 0.5rem;
  color: var(--wp--preset--color--on-surface);
  text-decoration: none;
  transition: background-color 0.15s;
}
.bbs-menu a:hover {
  background-color: var(--wp--preset--color--primary-container);
  color: var(--wp--preset--color--on-primary-container);
}
.bbs-menu a:hover .bbs-menu-num,
.bbs-menu a:hover .bbs-menu-hint {
  color: var(--wp--preset--color--on-primary-container);
}
.bbs-menu-num {
  color: var(--wp--preset--color--bbs-cyan);
  margin-right: 1rem;
  font-weight: 700;
}
.bbs-menu-label { flex: 1; }
.bbs-menu-hint {
  display: none;
  color: var(--wp--preset--color--slate-dimmed);
  font-size: var(--wp--preset--font-size--xs);
  margin-left: 1rem;
}
@media (min-width: 768px) { .bbs-menu-hint { display: inline; } }

/* Blinking prompt cursor */
@keyframes bbs-pulse { 50% { opacity: 0.5; } }
.bbs-prompt {
  margin-top: auto;
  padding-top: 2rem;
  display: flex;
  align-items: center;
  color: var(--wp--preset--color--bbs-cyan);
}
.bbs-cursor {
  display: inline-block;
  width: 1ch;
  height: 1.25rem;
  margin-left: 0.5rem;
  background-color: var(--wp--preset--color--bbs-yellow);
  animation: bbs-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Section heading — yellow, underlined, uppercase, wide-tracked */
.bbs-section-heading {
  color: var(--wp--preset--color--bbs-yellow);
  text-decoration: underline;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

/* Footer — minimal slate line, centered */
.bbs-footer {
  border-top: 1px solid var(--wp--preset--color--outline-variant);
  padding: 1rem;
  text-align: center;
  color: var(--wp--preset--color--slate-dimmed);
  font-size: var(--wp--preset--font-size--xs);
  font-family: var(--wp--preset--font-family--mono);
}
.bbs-footer a {
  color: var(--wp--preset--color--bbs-cyan);
  text-decoration: none;
}
.bbs-footer a:hover { text-decoration: underline; }
