/* =============================================================================
   SPECTRAL41 — shared button system (Prime + $SPECTRAL)

   One "terminal" identity for every clickable action across /prime and
   /spectral: mono, uppercase, single radius (--r-sm), shared hover/active.

   Relies on tokens defined in each page's :root — --mono, --text, --text-2,
   --hairline, --hairline-strong, --accent, --accent-dim, --panel, --r-sm,
   --ease, --shadow-1, --shadow-pop.

   Loaded via <link> BEFORE each page's inline <style>, so page-specific
   geometry (widths, the acquire pill internals, frosted masthead, etc.) can
   still override these without !important.

   Roles:
     .btn (+ --primary / --accent) ... text action buttons (one family)
     .iconbtn (+ --sm) .............. square icon buttons
   Pills / segments (.facet, .mod__tag / #standingTag, .seg__btn) are a
   deliberately SEPARATE role, defined per page — they are NOT .btn.
   ========================================================================== */

/* ---- text action buttons --------------------------------------------------
   Base = ghost (secondary). Accent green is reserved as a semantic signal
   (on-chain / confirm), not a default fill. */
.btn {
  width: 100%;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--mono);
  font-size: 12px; font-weight: 500; letter-spacing: 1px; text-transform: uppercase;
  padding: 11px 16px;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  touch-action: manipulation;
  text-decoration: none;
  transition:
    color .15s var(--ease), background .15s var(--ease),
    border-color .15s var(--ease), box-shadow .15s var(--ease),
    transform .12s var(--ease);
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn:active { transform: scale(.97); }
.btn svg { width: 14px; height: 14px; }

/* primary — the single high-emphasis fill (the "main action") */
.btn--primary {
  background: var(--text); color: #161616;
  border-color: transparent;
  box-shadow: var(--shadow-1);
}
.btn--primary:hover {
  background: var(--text); color: #161616;
  border-color: transparent; box-shadow: var(--shadow-pop);
}

/* accent — on-chain / confirm states (BaseScan link, collected, etc.) */
.btn--accent {
  background: var(--accent-dim); color: var(--accent);
  border-color: var(--accent-dim);
}
.btn--accent:hover { border-color: var(--accent); color: var(--accent); }

.btn[disabled], .btn[aria-disabled="true"] {
  opacity: .4; cursor: not-allowed; box-shadow: none; transform: none;
}

/* loading spinner — attached to the inner .btn__label span */
.btn.is-loading { pointer-events: none; opacity: .65; }
.btn.is-loading .btn__label::after {
  content: ""; display: inline-block; width: 11px; height: 11px; margin-left: 9px;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
  vertical-align: middle; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- icon buttons — square, one style across pages ------------------------ */
.iconbtn, .infobtn, .infomodal__x, .lightbox__x {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; flex-shrink: 0;
  border: 1px solid var(--hairline);
  border-radius: var(--r-sm);
  background: var(--panel);
  color: var(--text-2);
  cursor: pointer;
  touch-action: manipulation;
  transition:
    color .15s var(--ease), background .15s var(--ease),
    border-color .15s var(--ease), transform .12s var(--ease);
}
.iconbtn:hover, .infobtn:hover, .infomodal__x:hover, .lightbox__x:hover {
  color: var(--accent); border-color: var(--hairline-strong);
}
.iconbtn:active, .infobtn:active, .infomodal__x:active, .lightbox__x:active {
  transform: scale(.96);
}
.iconbtn svg, .infobtn svg, .infomodal__x svg, .lightbox__x svg {
  width: 15px; height: 15px;
}
.iconbtn--sm { width: 30px; height: 30px; }
