/* SnowRSPS WEB-OPTIMIZE-11 — layout locks, font fallbacks, a11y helpers.
   Additive. Does not restyle colours or typography. */

/* Lock the top announcement ticker so web-font swap cannot push the page down (desktop CLS). */
.marquee-system {
  height: 30px !important;
  min-height: 30px !important;
  max-height: 30px !important;
  overflow: hidden !important;
  contain: strict;
  line-height: 30px;
  box-sizing: border-box;
}
.marquee-system .ticker-text {
  line-height: 30px;
  font-size: 13px;
  max-height: 30px;
}

/* Reserve the Live Drops meta row so "just now" cannot shift the heading. */
.wo7-drop-meta {
  min-height: 1.25em;
  min-width: 7.5rem;
}
.wo7-drop-sync { min-width: 5.5rem; display: inline-block; }

/* Translate control is position:fixed; keep a stable box anyway. */
#google_translate_element {
  width: 118px;
  height: 34px;
  overflow: hidden;
}

/* Vote page: reserve space for the React app so the "How voting works" section does not jump. */
body.snow-wo4 #root,
#root {
  min-height: 100vh;
}
#root .osrs-panel,
#root .min-h-screen {
  min-height: 28rem;
}

/* Metric-matched fallbacks so Orbitron / Rajdhani / Share Tech Mono swap less when late. */
@font-face {
  font-family: "Orbitron Fallback";
  src: local("Arial"), local("Helvetica Neue"), local("sans-serif");
  size-adjust: 108%;
  ascent-override: 92%;
  descent-override: 22%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Rajdhani Fallback";
  src: local("Segoe UI"), local("Arial"), local("sans-serif");
  size-adjust: 102%;
  ascent-override: 95%;
  descent-override: 24%;
  line-gap-override: 0%;
}

/* Donate shop: contain font-driven reflow where possible. */
#snowShop, #snowStoreMain { overflow-anchor: none; }

/* =================================================================
   WO12 — Donate CLS, mobile layout, visible background
   Additive. Desktop two-column shop is unchanged at min-width 901px.
   ================================================================= */

/* ---- 1) OSRS GP banner: reserve the measured height so wrap/font
      cannot collapse 360→261 (mobile CLS 0.30). Desktop row is 128px. */
.osrs-gp-banner {
  box-sizing: border-box;
  min-height: 128px;
}
@media (max-width: 900px) {
  .osrs-gp-banner {
    min-height: 270px;
  }
  /* .ui17-sub grew 76→101px when Inter swapped in (footer still display=swap). */
  .ui17-header .ui17-sub,
  .page-header .ui17-sub {
    min-height: 102px;
  }
}
@media (max-width: 400px) {
  .osrs-gp-banner { min-height: 340px; }
}

/* ---- 2) Background: .northern-lights was position:fixed; z-index:-1
      behind an opaque body background, so the aurora never showed.
      After some layout passes it also computed position:relative; height:0
      because the beams are position:absolute and the parent had no height.
      Put the homepage still (slide7 poster) on the lights layer, z-index 0. */
html { background-color: #041018; }
body.snow-wo4.wo4-donate {
  background-color: transparent !important;
}
.northern-lights {
  position: fixed !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 100vh !important;
  min-height: 100dvh !important;
  z-index: 0 !important;
  pointer-events: none !important;
  opacity: 1 !important;
  background-color: #041018 !important;
  background-image:
    linear-gradient(180deg, rgba(4,16,24,0.42) 0%, rgba(6,8,16,0.62) 45%, rgba(6,6,10,0.82) 100%),
    url("/bin/videos/slide7-2026-v12-poster.webp") !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}
body.snow-mobile .northern-lights,
html.snow-mobile .northern-lights {
  opacity: 1 !important;
}
body.snow-mobile .northern-lights .light-beam,
html.snow-mobile .northern-lights .light-beam {
  opacity: 0.45 !important;
  filter: blur(48px) !important;
}
#snowStoreMain { position: relative; z-index: 1; }

/* ---- 3) Mobile store layout: neon-rgb uses minmax(150px,1fr) under 900px,
      which packs two 188×420 cards on a 375px phone (desktop catalog, shrunk).
      Force one readable column, a tappable fixed cart chip, no horizontal scroll.
      Desktop (≥901px and not .snow-mobile) is unchanged. */
@media (max-width: 900px) {
  html, body, body.wo4-donate {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: clip !important;
  }
  .main-wrapper.ui17-wrap {
    grid-template-columns: 1fr !important;
    grid-template-areas:
      "header"
      "banner"
      "trust"
      "ticker"
      "shop"
      "side"
      "faq" !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  .main-wrapper.ui17-wrap > * {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }
  .store-title-aurora,
  .ui17-header h1,
  .page-header h1 {
    overflow-wrap: anywhere;
    word-break: break-word;
    max-width: 100%;
  }
  /* Keep "Tap for preview" inside the 200px photo box, not over the title. */
  .product-card .card-preview-hint,
  body.snow-mobile .product-card .card-preview-hint,
  html.snow-mobile .product-card .card-preview-hint {
    bottom: auto !important;
    top: 150px !important;
    -webkit-transform: translateX(-50%) !important;
    transform: translateX(-50%) !important;
  }
  .shop-grid {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }
  .shop-grid .product-card {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 0 !important;
  }
  .card-image-box,
  .card-image-box.has-photo.photo-hero,
  body.snow-mobile .card-image-box.has-photo.photo-hero,
  html.snow-mobile .card-image-box.has-photo.photo-hero {
    height: 200px !important;
    max-height: 200px !important;
    overflow: hidden !important;
  }
  .wo4-desktop-link { display: none !important; }
  .mobile-cart-fab {
    display: inline-flex !important;
    position: fixed !important;
    z-index: 100050 !important;
  }
  .top-cart-btn { display: none !important; }
}

/* Coarse-pointer phones that "Request Desktop Website" (width > 900)
   still get a single column via the existing snow-mobile class. */
html.snow-mobile .main-wrapper.ui17-wrap,
body.snow-mobile .main-wrapper.ui17-wrap {
  grid-template-columns: 1fr !important;
}
html.snow-mobile .shop-grid,
body.snow-mobile .shop-grid {
  grid-template-columns: 1fr !important;
}
html.snow-mobile .mobile-cart-fab,
body.snow-mobile .mobile-cart-fab {
  display: inline-flex !important;
  position: fixed !important;
}
html.snow-mobile .top-cart-btn,
body.snow-mobile .top-cart-btn {
  display: none !important;
}
@media (min-width: 901px) {
  body:not(.snow-mobile) .mobile-cart-fab { display: none !important; }
}

/* ---- 4) Desktop shop images: lock the photo box so 1000×1000 catalog
      PNGs cannot inflate #snowShop before neon-rgb finishes (part of CLS 0.52). */
#snowShop .card-image-box {
  overflow: hidden !important;
}
#snowShop .card-image-box img {
  max-width: 92% !important;
  max-height: 92% !important;
  width: auto !important;
  height: auto !important;
}

/* ---- 5) alert.php h4→h3: keep the same gold/red/blue title look. */
.alert-text h3 {
  margin: 0 0 5px 0;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 800;
  font-size: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 1;
}
.card-gold h3 { color: #FFD700; text-shadow: 0 0 15px rgba(255, 215, 0, 0.4); }
.card-red h3 { color: #FF4500; text-shadow: 0 0 15px rgba(255, 69, 0, 0.4); }
.card-blue h3 { color: #3b82f6; text-shadow: 0 0 15px rgba(59, 130, 246, 0.4); }
