/* ────────────────────────────────────────────────────────────────
   FOOTER
──────────────────────────────────────────────────────────────── */
.main-footer {
  margin-top: 0;
  flex-shrink: 0;
  padding: 32px 0 0;
  border-top: 1px solid var(--border-color);
  background: var(--bg-sidebar);
  width: 100%;
  box-sizing: border-box;
}
.footer-inner {
  /* Align footer content to the same 1280px centered column as the main
     page content (.lobby / page sections) and the header. On desktop the
     side gutters (clamp(16px, 2.2vw, 32px)) are added in the SIDEBAR OFFSET
     block below, with max-width grown by the same amount so the content
     column itself stays 1280px. */
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 0 24px;
  box-sizing: border-box;
  width: 100%;
}

/* ── TOP: info + link columns ── */
.footer-top {
  display: flex;
  gap: 80px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border-color);
}

.footer-info {
  flex: 0 0 320px;
  max-width: 320px;
}
.footer-logo {
  margin-bottom: 18px;
}
.footer-logo img {
  height: 52px;   /* the Solz script logo (2026-10-10) */
  width: auto;
  display: block;
  object-fit: contain;
  object-position: left center;
  /* Matches the current logo file (mobile-header/icons/logo.png / .avif, 515x160 — TRAP in the
     Duel-style wordmark, 2026-10-08; before that 718x160 for the
     TRAP logo with the blue bar in the A, 2026-10-08).
     The old 626/120 box was wider than the logo, so the logo sat ~21px in from
     the tagline's left edge. */
  aspect-ratio: 515 / 160;
}
.footer-tagline {
  margin: 0 0 22px;
  font-size: var(--fs-xs);
  line-height: 1.65;
  color: var(--text-muted-2);
  max-width: 280px;
}

/* emails */
.footer-emails {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 22px;
}
.footer-email {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: var(--fs-sm);
  text-decoration: none;
  transition: color var(--dur-fast, .16s) var(--ease-out, cubic-bezier(.33,1,.68,1));
}
.footer-email:hover {
  color: var(--text-bright);
}
.footer-email svg {
  flex-shrink: 0;
  opacity: 0.55;
}

/* social icons */
.footer-socials {
  display: flex;
  gap: 8px;
}
.footer-social-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-decoration: none;
  transition: background var(--dur-fast, .16s) var(--ease-out, cubic-bezier(.33,1,.68,1)), border-color var(--dur-fast, .16s) var(--ease-out, cubic-bezier(.33,1,.68,1)), color var(--dur-fast, .16s) var(--ease-out, cubic-bezier(.33,1,.68,1));
}
.footer-social-icon:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--bg-elevated-hover);
  color: #fff;
}

/* ── LINK COLUMNS ── */
.footer-links {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 28px;
  align-items: start;
}
.footer-col-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--text-bright);
  margin-bottom: 18px;
  background: none;
  border: none;
  padding: 0;
  cursor: default;
  font-family: inherit;
}
.footer-col-chevron { display: none; }
.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.footer-col li { margin: 0; }
.footer-col a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: var(--fs-sm);
  display: block;
  padding: 5px 0;
  transition: color var(--dur-fast, .16s) var(--ease-out, cubic-bezier(.33,1,.68,1));
}
.footer-col a:hover {
  color: var(--text-bright);
}

/* ── PAYMENTS BAND: the label, the coins, the 18+ badge (2026-10-15) ── */
.footer-payments {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-color);
}
.footer-pay-label {
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-dim);
  white-space: nowrap;
}
.footer-coins {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 18px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-coin { display: flex; margin: 0; }
.footer-adult {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-xs);
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
}
.footer-adult b {
  display: inline-grid;
  place-items: center;
  min-width: 32px;
  height: 26px;
  padding: 0 4px;
  font-size: 13px;
  color: var(--text-bright);
  border: 2px solid currentColor;
  border-radius: 2px;
}
.footer-adult:hover { color: var(--text-bright); }
.footer-coin-icon {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
  opacity: 0.7;
  filter: grayscale(0.15);
  transition: opacity var(--dur-fast, .16s) var(--ease-out, cubic-bezier(.33,1,.68,1)), filter var(--dur-fast, .16s) var(--ease-out, cubic-bezier(.33,1,.68,1)), transform var(--dur-fast, .16s) var(--ease-out, cubic-bezier(.33,1,.68,1));
}
.footer-coin-icon:hover {
  opacity: 1;
  filter: grayscale(0);
  transform: translateY(-1px);
}

/* ── BOTTOM: copyright + quick legal ── */
.footer-bottom {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  padding-top: 20px;
  font-size: var(--fs-xs);
  color: var(--text-dim);
}
.footer-copyright {
  flex: 1 1 auto;
  min-width: 200px;
  color: var(--text-dim);
}
.footer-bottom-links { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; }
.footer-bottom-link {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--dur-fast, .16s) var(--ease-out, cubic-bezier(.33,1,.68,1));
}
.footer-bottom-link:hover {
  color: var(--text-bright);
}

/* ── SIDEBAR OFFSET (desktop) ── */
@media (min-width: 769px) {
  body.sidebar-open .main-footer { margin-left: var(--sidebar-w); width: calc(100% - var(--sidebar-w)); }
  body:not(.sidebar-open) .main-footer { margin-left: 52px; width: calc(100% - 52px); }
  /* Same duration + curve as the sidebar width and .main-content, so the edges move together. */
  .main-footer { transition: margin-left var(--dur-sidebar, .4s) var(--ease-sidebar), width var(--dur-sidebar, .4s) var(--ease-sidebar); }
  /* Side gutters so the footer never touches the sidebar or the window edge (1441–1552px, e.g. 1536px);
     the content column itself stays 1280px max, aligned with the header. */
  .footer-inner { padding-left: clamp(16px, 2.2vw, 32px); padding-right: clamp(16px, 2.2vw, 32px); max-width: calc(1280px + 2 * clamp(16px, 2.2vw, 32px)); }
}

/* ── TABLET ── */
@media (max-width: 1024px) and (min-width: 769px) {
  .footer-top { gap: 48px; }
  .footer-info { flex: 0 0 260px; }
  .footer-links { gap: 24px; }
}

/* ── MOBILE ── */
@media (max-width: 768px) {
  .main-footer {
    padding: 28px 0 0;
    width: 100%;
  }
  .footer-inner {
    padding: 0 16px calc(16px + 70px + env(safe-area-inset-bottom, 0px));
  }
  /* the link accordion ends with its own divider: no second line 24px under it (site-UI audit 2026-10-09,
     mobile QA SHELL-30: an empty bordered strip under LEGAL) */
  .footer-top {
    flex-direction: column;
    gap: 28px;
    padding-bottom: 0;
    border-bottom: 0;
  }
  .footer-info {
    flex: none;
    max-width: 100%;
  }
  .footer-tagline { max-width: 100%; }
  .footer-links {
    grid-template-columns: 1fr;
    gap: 0;
    border-top: 1px solid var(--border-color);
  }
  .footer-col {
    border-bottom: 1px solid var(--border-color);
  }
  .footer-col-title {
    cursor: pointer;
    margin-bottom: 0;
    padding: 16px 4px;
    font-size: var(--fs-xs);
    letter-spacing: 1.2px;
    -webkit-tap-highlight-color: transparent;
  }
  .footer-col-chevron {
    display: block;
    color: var(--text-dim);
    transition: transform .24s var(--ease-premium);
    flex-shrink: 0;
  }
  .footer-col.open .footer-col-chevron { transform: rotate(180deg); }
  .footer-col-list {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--dur-modal, .3s) var(--ease-out, cubic-bezier(.33,1,.68,1)), padding var(--dur-modal, .3s) var(--ease-out, cubic-bezier(.33,1,.68,1));
    padding: 0 4px;
    gap: 0;
  }
  .footer-col.open .footer-col-list {
    max-height: 500px;
    padding: 0 4px 12px;
  }
  .footer-col a {
    padding: 8px 0;
    font-size: var(--fs-sm);
    color: var(--text-muted);
  }
  .footer-col a:hover { color: #fff; }

  .footer-payments {
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    padding: 18px 0;
  }
  .footer-coins {
    justify-content: center;
    flex-wrap: nowrap;
    gap: 10px;
  }
  .footer-coin-icon {
    width: 24px;
    height: 24px;
  }
  /* Hide DOGE (7th) and BNB (8th) on mobile so all payment icons fit in one row (order: COINS in Footer.tsx) */
  .footer-coins .footer-coin:nth-child(7),
  .footer-coins .footer-coin:nth-child(8) {
    display: none;
  }

  /* The copyright is legal text: it gets its own full-width line (wrapping if it must),
     the three links sit in a row under it. Never cut with an ellipsis. */
  .footer-bottom {
    gap: 4px 12px;
    padding-top: 16px;
    font-size: var(--fs-xs);
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
  }
  .footer-copyright {
    flex: 1 0 100%;
    min-width: 0;
    font-size: var(--fs-xs);
    line-height: 1.5;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .footer-bottom-link {
    font-size: var(--fs-xs);
    white-space: nowrap;
    flex-shrink: 0;
  }
  .footer-bottom-links { gap: 4px 12px; }
}

/* ── TOUCH SCREENS: every footer link is a full 44px tap target (phones, tablets, a phone in
   landscape). Mouse / trackpad layouts keep the compact desktop sizes. ── */
@media (pointer: coarse) {
  .footer-emails { gap: 0; }
  .footer-email { min-height: 44px; }
  .footer-socials { gap: 10px; }
  .footer-social-icon { width: 44px; height: 44px; }
  .footer-col a { display: flex; align-items: center; min-height: 44px; padding-top: 0; padding-bottom: 0; }
  .footer-col-title { min-height: 44px; }
  .footer-bottom-link { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding: 0 4px; }
  /* first link lines up with the copyright's left edge despite its 4px padding */
  .footer-bottom-links .footer-bottom-link:first-child { margin-left: -4px; }
  .footer-adult { min-height: 44px; }
}
@media (pointer: coarse) and (max-width: 768px) {
  .footer-bottom { padding-top: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .main-footer, .footer-email, .footer-social-icon, .footer-col a, .footer-coin-icon, .footer-bottom-link, .footer-col-chevron, .footer-col-list { transition: none; }
  .footer-coin-icon:hover { transform: none; }
}
