/* The banner (5 Nov 2026; static/banner.js). Three looks that read on the light and the dark site alike, because each
   brings its own ground: plain is the felt green, sale is gold, alert is red. Top sits in the page above the header;
   bottom is fixed with room kept under the page; a side card floats at the middle of the left or right edge and is a
   bottom strip on a narrow screen. At the table (the .app box fills the screen) the box gives up the banner's height. */
.mj-banner {
  --mj-b-ground: #1d4a38; --mj-b-ink: #fbf6ea; --mj-b-link: #ffe39a; --mj-b-btn: #f2c14e; --mj-b-btn-ink: #1d2a22;
  position: relative; z-index: 900; box-sizing: border-box; width: 100%;
  background: var(--mj-b-ground); color: var(--mj-b-ink);
  font: 600 16px/1.35 "Nunito", "Segoe UI", system-ui, -apple-system, sans-serif;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.15);
}
.mj-banner[hidden] { display: none; }
.mj-banner-sale { --mj-b-ground: #f2c14e; --mj-b-ink: #2b1d05; --mj-b-link: #6b2d00; --mj-b-btn: #1d4a38; --mj-b-btn-ink: #fbf6ea; }
.mj-banner-alert { --mj-b-ground: #a3302a; --mj-b-ink: #fff7f2; --mj-b-link: #ffe0c2; --mj-b-btn: #fff7f2; --mj-b-btn-ink: #7a1f1a; }
.mj-banner-inner {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  max-width: 1200px; margin: 0 auto; padding: 8px 48px 8px 16px; min-height: 44px; box-sizing: border-box;
}
.mj-banner-icon { flex: 0 0 auto; width: 32px; height: 32px; object-fit: contain; font-size: 26px; line-height: 32px; text-align: center; }
.mj-banner-words { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; min-width: 0; }
.mj-banner-text { overflow-wrap: anywhere; }
.mj-banner-text a { color: var(--mj-b-link); text-decoration: underline; text-underline-offset: 2px; }
.mj-banner-text strong { font-weight: 800; }
.mj-banner-clock { font-variant-numeric: tabular-nums; font-weight: 800; white-space: nowrap; }
.mj-banner-button {
  flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 36px; padding: 4px 16px; border-radius: 999px;
  background: var(--mj-b-btn); color: var(--mj-b-btn-ink); text-decoration: none; font-weight: 800; white-space: nowrap;
}
.mj-banner-button:hover { filter: brightness(1.06); }
.mj-banner a:focus-visible, .mj-banner button:focus-visible { outline: 3px solid var(--mj-b-link); outline-offset: 2px; }
.mj-banner-close {
  position: absolute; top: 50%; right: 8px; transform: translateY(-50%);
  width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 50%;
  background: transparent; color: inherit; cursor: pointer; opacity: 0.85;
}
.mj-banner-close:hover { opacity: 1; background: rgba(0, 0, 0, 0.12); }

/* bottom */
.mj-banner-at-bottom, .mj-banner-as-bottom { position: fixed; left: 0; right: 0; bottom: 0; box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2); }
body.mj-banner-bottom { padding-bottom: var(--mj-banner-h, 0px); }

/* the sides: a card at the middle of the edge */
@media (min-width: 900px) {
  .mj-banner-at-left, .mj-banner-at-right {
    position: fixed; top: 50%; transform: translateY(-50%); width: 240px; border-radius: 14px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
  }
  .mj-banner-at-left { left: 12px; }
  .mj-banner-at-right { right: 12px; }
  .mj-banner-at-left .mj-banner-inner, .mj-banner-at-right .mj-banner-inner {
    flex-direction: column; text-align: center; padding: 40px 18px 18px; gap: 10px;
  }
  .mj-banner-at-left .mj-banner-icon, .mj-banner-at-right .mj-banner-icon { width: 56px; height: 56px; font-size: 44px; line-height: 56px; }
  .mj-banner-at-left .mj-banner-words, .mj-banner-at-right .mj-banner-words { flex-direction: column; align-items: center; }
  .mj-banner-at-left .mj-banner-close, .mj-banner-at-right .mj-banner-close { top: 6px; right: 6px; transform: none; }
}
@media (max-width: 899.98px) {
  .mj-banner-at-left, .mj-banner-at-right { position: fixed; left: 0; right: 0; bottom: 0; box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2); }
}

/* the table's box fills the screen; it gives up the banner's height */
@media (min-width: 1000.02px) {
  body.mj-banner-top > .app, body.mj-banner-bottom > .app { height: calc(100dvh - var(--mj-banner-h, 0px)); }
}
@media (max-width: 560px) {
  .mj-banner { font-size: 15px; }
  .mj-banner-inner { padding: 6px 44px 6px 12px; gap: 8px; }
}

@media (prefers-reduced-motion: no-preference) {
  .mj-banner-at-top, .mj-banner-at-bottom, .mj-banner-as-bottom { animation: mj-banner-in 220ms ease-out both; }
  @keyframes mj-banner-in { from { opacity: 0; } to { opacity: 1; } }
}
@media print { .mj-banner { display: none !important; } }
