/*
 * THE HEADER AND FOOTER ON EVERY SHEEPSHEAD CLUB PAGE (scripts/site-chrome.mjs
 * stamps the markup; Brad, 8 Nov: "Shouldn't we have a canonical persistent
 * header and footer?"). The pages each carry their own styles and colors, so
 * these rules name their colors outright rather than lean on a page's tokens.
 * The footer's rules are the lobby's (style.css .footer-links and the credit
 * line), as Euchre Room and Bid Whist Live carry them; site-chrome.test.ts
 * holds them together.
 */

/* ---- header: the wordmark home, the site's links, Play now ---- */
.site-header {
  box-sizing: border-box;
  display: flex; align-items: center; gap: 1.2rem;
  max-width: 1000px; margin: 0 auto; padding: 0.7rem 1rem;
  border-bottom: 1px solid rgba(44, 68, 52, 0.7);
  font-family: 'Trebuchet MS', 'Segoe UI', system-ui, sans-serif;
  text-align: left;
}
.site-header .sh-brand {
  display: inline-flex; align-items: center; gap: 0.45rem; flex: 0 0 auto;
  color: #e8e6dd; text-decoration: none;
  font-family: Georgia, 'Times New Roman', serif; font-weight: 700; font-size: 1rem; letter-spacing: 0.06em;
}
.site-header .sh-brand img { width: 22px; height: 22px; display: block; }
.site-header .sh-brand:hover { color: #e8b94f; }
.site-header .sh-links { display: flex; flex-wrap: wrap; gap: 0.2rem 1rem; flex: 1 1 auto; }
.site-header .sh-links a { color: #9fb3a4; text-decoration: none; font-size: 0.85rem; white-space: nowrap; }
.site-header .sh-links a:hover { color: #e8b94f; }
.site-header .sh-play {
  flex: 0 0 auto; margin-left: auto;
  padding: 0.4rem 1rem; border-radius: 999px;
  background: #e8b94f; color: #1a1408; text-decoration: none; font-weight: 700; font-size: 0.9rem;
}
.site-header .sh-play:hover { background: #f1c766; }

/* ---- footer: the lobby's, three named groups and one credit line ---- */
.site-footer {
  box-sizing: border-box;
  margin: 2.4rem auto 1.6rem; max-width: 1000px; padding: 1.4rem 1rem 0;
  border-top: 1px solid rgba(44, 68, 52, 0.7);
  color: #6f8678; font-family: 'Trebuchet MS', 'Segoe UI', system-ui, sans-serif; font-size: 0.85rem; text-align: center;
}
.site-footer a { color: #8aa392; }
.site-footer a:hover { color: #e8b94f; }
.site-footer .footer-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 15rem));
  justify-content: center;
  gap: 1rem 2.5rem;
  text-align: left;
}
.site-footer .foot-group { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 0.25rem 0.9rem; }
/* Sheepshead's .small-link size. */
.site-footer .foot-group a { font-size: 0.78rem; }
.site-footer .foot-head {
  flex-basis: 100%;
  color: #e8b94f;
  opacity: 0.8;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.site-footer .studio-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.2rem;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: #8a9b8e;
}
.site-footer .studio-logo { height: 30px; width: 30px; border-radius: 50%; opacity: 0.95; }
.site-footer .copyright { color: #6f8678; }
.site-footer .pip { color: #e8b94f; opacity: 0.7; }
.site-footer .hub-link {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 0.85rem;
  color: #e8b94f;
}

/* ---- a phone: the wordmark and Play now on top, the links in a row under ---- */
@media only screen and (max-width: 640px) {
  .site-header { flex-wrap: wrap; gap: 0.5rem 0.8rem; padding: 0.6rem 0.9rem; }
  /* One row that scrolls sideways, with no scrollbar drawn under it; the right
     edge fades so a cut-off link reads as "more this way". */
  .site-header .sh-links {
    order: 3; flex: 1 1 100%; gap: 0 0.9rem; overflow-x: auto; flex-wrap: nowrap;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(to right, #000 85%, transparent);
    mask-image: linear-gradient(to right, #000 85%, transparent);
  }
  .site-header .sh-links::-webkit-scrollbar { display: none; }
  .site-footer .footer-links { grid-template-columns: minmax(0, 1fr); gap: 1rem; text-align: center; }
  .site-footer .foot-group { justify-content: center; row-gap: 0; }
  /* The credit line wraps here, copyright under the hub link: no dot left at the end of a line. */
  .site-footer .studio-line .pip { display: none; }
}
@media only screen and (pointer: coarse) {
  .site-header .sh-links a, .site-footer .foot-group a { display: inline-flex; align-items: center; min-height: 40px; }
  .site-header .sh-play, .site-header .sh-brand { min-height: 40px; display: inline-flex; align-items: center; }
}

/* ---- on paper, neither ---- */
@media print {
  .site-header, .site-footer { display: none !important; }
}
