/**
 * XRPL Home — xrpl-home-feed visual layer (Build 373)
 * Scoped to body.xrpl-home-feed
 */

/**
 * XRPL Home — Vault visual layer (Build 373)
 * Scoped to body.xrpl-home-feed; overrides legacy Lab neon greens safely.
 */

body.xrpl-home-feed {
  --border: rgba(96, 165, 250, 0.28);
  --border2: rgba(139, 92, 246, 0.45);
  --mint: #93c5fd;
  --teal: #60a5fa;
  --green: #7dd3fc;
  --txt: var(--xh-ink, #f4f6ff);
  --muted: var(--xh-ink-muted, #8b95b5);
  --card: var(--xh-surface-solid, #0f1224);
  --panel: var(--xh-midnight-2, #0a0d1a);
  --ui: #141830;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  --shadow2: 0 16px 48px rgba(59, 130, 246, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  --danger: #f87171;
  --warn: #fbbf24;

  font-family: var(--xh-font-body, 'Poppins', system-ui, sans-serif);
  background:
    radial-gradient(ellipse 120% 80% at 20% -10%, rgba(59, 130, 246, 0.14) 0%, transparent 55%),
    radial-gradient(ellipse 90% 60% at 85% 5%, rgba(139, 92, 246, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse 70% 50% at 50% 100%, rgba(217, 70, 239, 0.08) 0%, transparent 45%),
    var(--xh-midnight, #060818);
  color: var(--xh-ink, #f4f6ff);
  min-height: 100dvh;
}

body.xrpl-home-feed a {
  color: var(--xh-blue-bright, #60a5fa);
  text-decoration: none;
}

body.xrpl-home-feed a:hover {
  color: #bfdbfe;
}

/* ── Shell / header ─────────────────────────────────── */
body.xrpl-home-feed #labGlobalHeader.appbar {
  background: rgba(6, 8, 24, 0.88);
  border-bottom: 1px solid var(--xh-glass-border, rgba(255, 255, 255, 0.08));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

body.xrpl-home-feed #labGlobalHeader .brand span {
  font-family: var(--xh-font-display, 'Poppins', sans-serif);
  font-weight: 700;
  letter-spacing: -0.02em;
  background: var(--xh-accent-gradient, linear-gradient(135deg, #3b82f6, #8b5cf6, #d946ef));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

body.xrpl-home-feed #labGlobalHeader .btn-ghost,
body.xrpl-home-feed .btn-ghost {
  color: var(--xh-ink-2, #c8d0e8);
  border: 1px solid var(--xh-glass-border, rgba(255, 255, 255, 0.08));
  background: transparent;
  font-family: var(--xh-font-body, 'Poppins', sans-serif);
  font-weight: 600;
  border-radius: var(--xh-r-md, 14px);
  padding: 8px 10px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

body.xrpl-home-feed #labGlobalHeader .btn-ghost:hover,
body.xrpl-home-feed .btn-ghost:hover,
body.xrpl-home-feed #labGlobalHeader .btn-ghost.nav-active,
body.xrpl-home-feed .btn-ghost.nav-active {
  color: var(--xh-ink, #f4f6ff);
  border-color: rgba(139, 92, 246, 0.45);
  background: var(--xh-glass, rgba(255, 255, 255, 0.04));
  box-shadow: none;
  transform: none;
}

body.xrpl-home-feed #labGlobalHeader .pill,
body.xrpl-home-feed .pill {
  border-color: rgba(139, 92, 246, 0.4);
  background: var(--xh-glass, rgba(255, 255, 255, 0.04));
  color: var(--xh-ink-2, #c8d0e8);
  font-family: var(--xh-font-body, 'Poppins', sans-serif);
}

body.xrpl-home-feed #labGlobalHeader .btn-nav-connect,
body.xrpl-home-feed #labGlobalHeader .lab-wallet-connect-btn,
body.xrpl-home-feed #labGlobalHeader #btnConnectHeader {
  color: var(--xh-ink, #f4f6ff);
  border-color: rgba(139, 92, 246, 0.5);
  background: var(--xh-glass, rgba(255, 255, 255, 0.04));
}

body.xrpl-home-feed .lab-universal-search-input {
  border-color: var(--xh-glass-border) !important;
  background: var(--xh-glass) !important;
  color: var(--xh-ink) !important;
}

body.xrpl-home-feed .lab-nav-drawer,
body.xrpl-home-feed .mobile-nav-drawer {
  background: var(--xh-surface-solid, #0f1224) !important;
  border-right-color: var(--xh-glass-border) !important;
}

body.xrpl-home-feed .lab-nav-drawer a,
body.xrpl-home-feed .lab-nav-drawer-link {
  border-color: var(--xh-glass-border) !important;
  background: var(--xh-glass) !important;
  color: var(--xh-ink-2) !important;
}

body.xrpl-home-feed .lab-nav-drawer a.nav-active,
body.xrpl-home-feed .lab-nav-drawer a:hover,
body.xrpl-home-feed .lab-nav-drawer-link.nav-active,
body.xrpl-home-feed .lab-nav-drawer-link:hover {
  border-color: rgba(139, 92, 246, 0.45) !important;
  background: rgba(139, 92, 246, 0.1) !important;
  color: var(--xh-ink) !important;
  box-shadow: none !important;
}

body.xrpl-home-feed .lab-nav-hamburger {
  border-color: var(--xh-glass-border) !important;
  color: var(--xh-ink-2) !important;
  background: var(--xh-glass) !important;
}

body.xrpl-home-feed .btn-nav-connect,
body.xrpl-home-feed .lab-wallet-connect-btn,
body.xrpl-home-feed #btnConnectHeader,
body.xrpl-home-feed .btn-nav-connect-drawer {
  color: var(--xh-ink, #f4f6ff) !important;
  border-color: rgba(139, 92, 246, 0.5) !important;
  background: var(--xh-glass, rgba(255, 255, 255, 0.04)) !important;
  box-shadow: none !important;
}

body.xrpl-home-feed .nav-mint-dropdown,
body.xrpl-home-feed .mint-dropdown {
  border-color: var(--xh-glass-border) !important;
  background: var(--xh-surface-solid, #0f1224) !important;
}

body.xrpl-home-feed .lab-footer-btn,
body.xrpl-home-feed .lab-footer a {
  color: var(--xh-blue-bright, #60a5fa) !important;
  border-color: var(--xh-glass-border) !important;
}

body.xrpl-home-feed .lab-footer-inner,
body.xrpl-home-feed .lab-beta-footer {
  border-color: var(--xh-glass-border) !important;
  color: var(--xh-ink-muted) !important;
}

body.xrpl-home-feed .dood-agent-fab,
body.xrpl-home-feed .dood-agent-send-btn,
body.xrpl-home-feed .dood-agent-voice-status {
  border-color: rgba(139, 92, 246, 0.45) !important;
}

body.xrpl-home-feed .dood-agent-voice-status {
  color: var(--xh-ink-muted) !important;
}

body.xrpl-home-feed .lab-footer-card {
  border-color: var(--xh-glass-border) !important;
  background: var(--xh-surface) !important;
  box-shadow: var(--shadow) !important;
}

body.xrpl-home-feed .lab-footer-brand-line,
body.xrpl-home-feed .lab-footer-beta-note,
body.xrpl-home-feed .lab-footer-safety-note,
body.xrpl-home-feed .lab-footer-copy {
  color: var(--xh-ink-muted) !important;
}

body.xrpl-home-feed .lab-footer-brand-line strong {
  color: var(--xh-ink) !important;
  font-family: var(--xh-font-display, 'Poppins', sans-serif);
}

body.xrpl-home-feed .lab-footer-build {
  border-color: var(--xh-glass-border) !important;
  background: rgba(59, 130, 246, 0.08) !important;
  color: var(--xh-blue-bright) !important;
}

body.xrpl-home-feed .lab-footer-btn,
body.xrpl-home-feed .lab-footer a,
body.xrpl-home-feed .lab-beta-link {
  color: var(--xh-blue-bright, #60a5fa) !important;
  border-color: var(--xh-glass-border) !important;
}

body.xrpl-home-feed .lab-footer-inner,
body.xrpl-home-feed .lab-beta-footer {
  border-color: var(--xh-glass-border) !important;
  color: var(--xh-ink-muted) !important;
}

body.xrpl-home-feed .dood-agent-send-btn {
  background: var(--xh-accent-gradient) !important;
}

body.xrpl-home-feed .dot-fab-fallback {
  color: var(--xh-purple, #8b5cf6) !important;
  border-color: rgba(139, 92, 246, 0.45) !important;
}


body.xrpl-home-feed .lab-footer-safety-note {
  border-left-color: rgba(139, 92, 246, 0.55) !important;
  background: rgba(59, 130, 246, 0.06) !important;
}
body.xrpl-home-feed .lab-footer-sep { color: rgba(139, 92, 246, 0.35) !important; }

/* ── Layout & typography ───────────────────────────── */
body.xrpl-home-feed .wrap { max-width: 1120px; margin: 0 auto; padding: 20px 16px 64px; }
body.xrpl-home-feed .card {
  background: var(--xh-surface, rgba(15, 18, 36, 0.72)) !important;
  border: 1px solid var(--xh-glass-border) !important;
  border-radius: var(--xh-r-lg, 18px) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow) !important;
}
body.xrpl-home-feed .card.glow {
  border-color: rgba(139, 92, 246, 0.35) !important;
  box-shadow: var(--shadow2) !important;
}
body.xrpl-home-feed h1, body.xrpl-home-feed h2, body.xrpl-home-feed h3,
body.xrpl-home-feed .card h1, body.xrpl-home-feed .card h2, body.xrpl-home-feed .card h3 {
  font-family: var(--xh-font-display, 'Poppins', sans-serif) !important;
  font-weight: 700 !important;
  color: var(--xh-ink) !important;
  text-shadow: none !important;
}
body.xrpl-home-feed .mono {
  font-family: var(--xh-font-display, 'Poppins', sans-serif) !important;
  font-size: clamp(1.25rem, 4vw, 1.6rem) !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
  background: var(--xh-accent-gradient) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  animation: none !important;
}
body.xrpl-home-feed .sub, body.xrpl-home-feed .hint, body.xrpl-home-feed .muted, body.xrpl-home-feed .muted-small {
  color: var(--xh-ink-muted) !important;
}
body.xrpl-home-feed .hr {
  background: linear-gradient(90deg, transparent, var(--xh-glass-highlight), transparent) !important;
}
body.xrpl-home-feed a { color: var(--xh-blue-bright) !important; }

/* ── Buttons ───────────────────────────────────────── */
body.xrpl-home-feed .btn {
  font-family: var(--xh-font-display, 'Poppins', sans-serif) !important;
  font-weight: 700 !important;
  color: #fff !important;
  background: var(--xh-accent-gradient) !important;
  border: 0 !important;
  border-radius: var(--xh-r-md, 14px) !important;
  box-shadow: 0 4px 24px rgba(59, 130, 246, 0.35) !important;
}
body.xrpl-home-feed .btn.secondary, body.xrpl-home-feed .btn-ghost {
  background: transparent !important;
  color: var(--xh-ink) !important;
  border: 1px solid var(--xh-glass-highlight) !important;
  box-shadow: none !important;
}
body.xrpl-home-feed .btn.danger {
  background: transparent !important;
  color: var(--danger) !important;
  border-color: rgba(248, 113, 113, 0.55) !important;
}

/* ── Form controls ─────────────────────────────────── */
body.xrpl-home-feed input, body.xrpl-home-feed select, body.xrpl-home-feed textarea {
  border-color: var(--xh-glass-border) !important;
  background: rgba(10, 13, 26, 0.85) !important;
  color: var(--xh-ink) !important;
  font-family: var(--xh-font-body, 'Poppins', sans-serif) !important;
}
body.xrpl-home-feed input:focus, body.xrpl-home-feed select:focus, body.xrpl-home-feed textarea:focus {
  border-color: rgba(139, 92, 246, 0.55) !important;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15) !important;
}
body.xrpl-home-feed input[type="checkbox"], body.xrpl-home-feed .listed-toggle input {
  accent-color: #8b5cf6 !important;
}

/* ── Chips / tabs ──────────────────────────────────── */
body.xrpl-home-feed .filter-chip, body.xrpl-home-feed .chip, body.xrpl-home-feed .tab, body.xrpl-home-feed .feed-tab, body.xrpl-home-feed .nft-tab-btn {
  border-color: var(--xh-glass-border) !important;
  background: rgba(10, 13, 26, 0.75) !important;
  color: var(--xh-ink-2) !important;
  font-family: var(--xh-font-body, 'Poppins', sans-serif) !important;
}
body.xrpl-home-feed .filter-chip[aria-pressed="true"],
body.xrpl-home-feed .chip.active, body.xrpl-home-feed .tab.active, body.xrpl-home-feed .feed-tab.active,
body.xrpl-home-feed .nft-tab-btn.active {
  border-color: rgba(139, 92, 246, 0.55) !important;
  background: rgba(139, 92, 246, 0.14) !important;
  color: #c4b5fd !important;
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.12) !important;
}

/* ── Tags / pills ──────────────────────────────────── */
body.xrpl-home-feed .tag, body.xrpl-home-feed .pill, body.xrpl-home-feed .badge {
  border-color: var(--xh-glass-border) !important;
  background: var(--xh-glass) !important;
  color: var(--xh-ink-2) !important;
}
body.xrpl-home-feed .tag.powered, body.xrpl-home-feed .pill.good {
  border-color: rgba(196, 181, 253, 0.45) !important;
  color: #c4b5fd !important;
}

/* ── Toast ─────────────────────────────────────────── */
body.xrpl-home-feed .toast { border-color: var(--xh-glass-border) !important; background: var(--xh-surface-solid) !important; }
body.xrpl-home-feed .toast.success { border-color: rgba(139, 92, 246, 0.45) !important; }

/* ── Lab shared ────────────────────────────────────── */
body.xrpl-home-feed .lab-collector-tips, body.xrpl-home-feed .lab-empty-card, body.xrpl-home-feed .empty-state, body.xrpl-home-feed .lab-trust-chip {
  border-color: var(--xh-glass-border) !important;
  background: rgba(10, 13, 26, 0.85) !important;
  color: var(--xh-ink-muted) !important;
}
body.xrpl-home-feed .lab-empty-title, body.xrpl-home-feed .lab-empty-icon { color: var(--xh-blue-bright) !important; }

/* ── Inline legacy overrides ───────────────────────── */
body.xrpl-home-feed h1[style*="#0f0"], body.xrpl-home-feed h2[style*="#0f0"], body.xrpl-home-feed h2[style*="var(--mint)"],
body.xrpl-home-feed h3[style*="#14ff9e"], body.xrpl-home-feed p[style*="#14ff9e"] {
  color: var(--xh-ink) !important;
  text-shadow: none !important;
}
body.xrpl-home-feed input[style*="#00ff"], body.xrpl-home-feed select[style*="#00ff"], body.xrpl-home-feed div[style*="#00ff"],
body.xrpl-home-feed button[style*="#00ff88"], body.xrpl-home-feed button[style*="#00ff99"] {
  border-color: var(--xh-glass-border) !important;
}
body.xrpl-home-feed button[style*="#00ff88"], body.xrpl-home-feed button[style*="#00ff99"],
body.xrpl-home-feed #generativeWalletGateConnect {
  background: var(--xh-accent-gradient) !important;
  color: #fff !important;
  border: none !important;
  font-family: var(--xh-font-body, 'Poppins', sans-serif) !important;
}

/* ── Feed page ─────────────────────────────────────── */
body.xrpl-home-feed .hero-card h1 {
  font-family: var(--xh-font-display, 'Poppins', sans-serif) !important;
  background: var(--xh-accent-gradient) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}
body.xrpl-home-feed .feed-status, body.xrpl-home-feed .feed-stats, body.xrpl-home-feed .feed-stream, body.xrpl-home-feed .feed-personalized,
body.xrpl-home-feed .feed-suggestions-grid > *, body.xrpl-home-feed .feed-card {
  border-color: var(--xh-glass-border) !important;
}
body.xrpl-home-feed #feedWalletGate h2, body.xrpl-home-feed #feedAlertsSection h2, body.xrpl-home-feed #feedSuggestions h2 {
  color: var(--xh-ink) !important;
}
body.xrpl-home-feed .marketplace-badge {
  border-color: rgba(139, 92, 246, 0.45) !important;
  background: rgba(139, 92, 246, 0.12) !important;
  color: #c4b5fd !important;
}
body.xrpl-home-feed .feed-tabs { border-bottom-color: var(--xh-glass-border) !important; }
