/* The suite's header and footer, shared by every module (app/suite.py):
   moved here unchanged from Funny Money's app.css, with .who scoped to the
   bar (the auction uses .who in its own screens), plus the module tabs.
   The palette variables come from each module's app.css. */

/* ---- bands */
/* The bar is steel gray like the club email's band, tall enough that the
   logo (548x331, ~1.66:1) shows at its natural shape: height is set and
   width follows, never the other way round.

   Three columns, 1fr | auto | 1fr: the outer two are always equal, so the
   title sits on the page's centre line whatever the logo or operator name
   measure. The operator name truncates rather than widen its column. */
.bar {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  background: var(--steel); color: var(--on-dark);
  padding: 14px 16px; min-height: 92px; border-bottom: 3px solid var(--orange);
}
.brand { justify-self: start; display: flex; color: inherit; text-decoration: none; }
.brand img { height: 64px; width: auto; display: block; }
.bar-title {
  font-family: var(--serif); font-size: 1.6rem; line-height: 1.2; letter-spacing: .03em;
  text-align: center; white-space: nowrap;
}
.bar-right {
  justify-self: end; min-width: 0; max-width: 100%;
  display: flex; flex-direction: column; align-items: flex-end; gap: 2px;
}
.bar .who {
  font-size: .9rem; color: var(--on-dark); max-width: 100%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-decoration: none; border-bottom: 1px dotted var(--on-dark-muted);  /* opens the profile */
}
.bar .who:hover { border-bottom-style: solid; }
.bar button.link { color: var(--on-dark); white-space: nowrap; }
@media (max-width: 600px) {
  .bar-title { font-size: 1.25rem; }
}
@media (max-width: 440px) {
  .bar { gap: 8px; padding: 12px; }
  .brand img { height: 52px; }
  .bar-title { font-size: 1.1rem; }
  .bar .who { font-size: .8rem; }
  .bar button.link { font-size: .8rem; }
}
/* Below ~380px one line of title leaves the outer columns narrower than the
   logo, which would push the title off centre; two lines free the room. */
@media (max-width: 380px) {
  .bar-title { white-space: normal; max-width: 7em; }
}
@media (max-width: 350px) {
  .brand img { height: 44px; }
  .bar-title { font-size: 1rem; }
}
/* Signed out, the login screen carries the logo itself: no bar, no footer. */
body.signed-out .bar, body.signed-out .footer { display: none; }
.footer {
  background: var(--steel); color: var(--on-dark); text-align: center;
  font-family: var(--serif); font-size: .85rem; letter-spacing: .1em; text-transform: uppercase;
  padding: 12px 16px;
}

body.signed-out .modules { display: none; }

/* ---- module tabs: Funny Money | Auction. With tabs, the orange rule moves
   from under the bar to under the tabs. */
.bar.with-tabs { border-bottom: 0; }
.modules {
  display: flex; gap: 4px; padding: 0 16px;
  background: var(--navy); border-bottom: 3px solid var(--orange);
}
.modules a {
  color: var(--on-dark-muted); text-decoration: none; padding: 9px 16px;
  font-weight: 600; letter-spacing: .02em; white-space: nowrap;
}
.modules a:hover { color: var(--on-dark); }
.modules a.on { color: var(--on-dark); box-shadow: inset 0 -3px 0 var(--orange); }
.new-badge {
  display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 2px; vertical-align: 2px;
  background: var(--orange); color: var(--navy); font-size: .65rem; font-weight: 800; letter-spacing: .08em;
}
@media (max-width: 440px) {
  .modules { padding: 0 8px; }
  .modules a { padding: 8px 12px; }
}
