/* ===== Generic UI components ===== */

.card {
    background: var(--card); border: 1px solid var(--gray2); border-radius: 24px;
    padding: 24px; backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* ---- Buttons ---- */
.btn-pill {
    border-radius: 10px; padding: 6px 12px; font-size: 10px; font-weight: 800; letter-spacing: 1px;
    border: 1px solid var(--gray2); background: rgba(255, 255, 255, 0.04); color: var(--gray);
    cursor: pointer; transition: transform 0.15s, background 0.15s;
}
.btn-pill:active { transform: scale(0.95); }
.btn-pill.cyan { background: rgba(0, 212, 255, 0.15); color: var(--cyan); border-color: rgba(0, 212, 255, 0.3); }
.btn-pill.red { background: rgba(255, 56, 101, 0.15); color: var(--red); border-color: rgba(255, 56, 101, 0.3); }
.btn-pill.green { background: rgba(0, 255, 157, 0.15); color: var(--green); border-color: rgba(0, 255, 157, 0.3); }
.btn-pill.gold { background: rgba(255, 209, 102, 0.15); color: var(--gold); border-color: rgba(255, 209, 102, 0.3); }
.btn-pill:disabled { opacity: 0.5; cursor: not-allowed; }

.refresh-btn {
    background: rgba(0, 212, 255, 0.15); color: var(--cyan);
    border: 1px solid rgba(0, 212, 255, 0.3); border-radius: 10px;
    padding: 6px 12px; font-size: 10px; font-weight: 800; letter-spacing: 1px;
    cursor: pointer; transition: all 0.15s;
}
.refresh-btn:active { transform: scale(0.95); }
.refresh-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.copy-btn {
    background: rgba(0, 212, 255, 0.15); color: var(--cyan);
    border: 1px solid rgba(0, 212, 255, 0.3); border-radius: 8px;
    padding: 4px 10px; font-size: 10px; font-weight: 700; letter-spacing: 1px;
    cursor: pointer; transition: all 0.15s;
}
.copy-btn:active { transform: scale(0.95); }
.copy-btn.ok { background: rgba(0, 255, 157, 0.15); color: var(--green); border-color: rgba(0, 255, 157, 0.3); }

/* ---- Badges ---- */
.badge {
    display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 9px; font-weight: 800;
    letter-spacing: 1px;
}
.badge.cyan { background: rgba(0, 212, 255, 0.15); color: var(--cyan); }
.badge.violet { background: rgba(179, 102, 255, 0.15); color: var(--violet); }
.badge.green { background: rgba(0, 255, 157, 0.15); color: var(--green); }
.badge.red { background: rgba(255, 56, 101, 0.15); color: var(--red); }
.badge.gold { background: rgba(255, 209, 102, 0.15); color: var(--gold); }

/* Score badge used on wallets/traders */
.score-badge {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 32px; height: 22px; padding: 0 8px; border-radius: 11px;
    font-size: 11px; font-weight: 900;
    background: rgba(255, 209, 102, 0.15); color: var(--gold);
    border: 1px solid rgba(255, 209, 102, 0.3);
}
.status-tag {
    display: inline-block; padding: 2px 6px; border-radius: 6px; font-size: 9px;
    font-weight: 700; letter-spacing: 1px;
}
.status-tag.banned { background: rgba(255, 56, 101, 0.15); color: var(--red); }
.status-tag.whitelisted { background: rgba(0, 255, 157, 0.15); color: var(--green); }

/* ---- Toggle ---- */
.toggle { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute; cursor: pointer; inset: 0;
    background-color: rgba(255, 255, 255, 0.15); transition: 0.2s; border-radius: 12px;
}
.toggle-slider::before {
    position: absolute; content: ''; height: 18px; width: 18px;
    left: 3px; bottom: 3px; background-color: #fff; transition: 0.2s; border-radius: 50%;
}
.toggle input:checked + .toggle-slider { background-color: var(--green); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ---- Avatar ---- */
.avatar {
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--cyan), var(--violet));
    color: #000; font-weight: 900; flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(0, 212, 255, 0.25);
}
.avatar.sm { width: 28px; height: 28px; font-size: 12px; }
.avatar.md { width: 36px; height: 36px; font-size: 15px; }
.avatar.lg { width: 48px; height: 48px; font-size: 19px; }

/* ---- Sparkline svg ---- */
.sparkline { display: block; }
.sparkline path.line { fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.sparkline path.area { opacity: 0.5; }

/* ---- Network icon (per-wallet) — circular badge that hosts the brand SVG ---- */
.network-icon {
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%; flex-shrink: 0;
    font-weight: 900; line-height: 1;
    background: rgba(0,0,0,0.35);
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.04);
}
.network-icon.sm { width: 20px; height: 20px; }
.network-icon.md { width: 26px; height: 26px; }
.network-icon.lg { width: 36px; height: 36px; }
.network-icon.solana {
    /* Subtle outer glow that matches the brand gradient */
    box-shadow: 0 2px 12px rgba(220, 31, 255, 0.25), 0 2px 12px rgba(0, 255, 163, 0.15), inset 0 1px 0 rgba(255,255,255,0.04);
}
.network-icon svg { display: block; }

/* Network picker chip (used in wallet creation form) */
.network-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.network-chip {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 12px; border-radius: 12px;
    background: rgba(255,255,255,0.04); border: 1px solid var(--gray2);
    font-size: 11px; font-weight: 800; letter-spacing: 1px; cursor: pointer;
    color: var(--gray); transition: all 0.15s;
}
.network-chip:hover { color: #fff; }
.network-chip.selected {
    background: linear-gradient(135deg, rgba(153,69,255,0.12), rgba(20,241,149,0.08));
    border-color: rgba(153,69,255,0.4);
    color: #fff;
    box-shadow: 0 4px 14px rgba(153,69,255,0.15);
}
.network-chip.disabled { opacity: 0.45; cursor: not-allowed; }

/* ---- Mini horizontal meter bar (used everywhere for percentages) ---- */
.meter {
    height: 5px; border-radius: 3px;
    background: rgba(255, 255, 255, 0.06); overflow: hidden;
}
.meter-fill {
    height: 100%; border-radius: 3px;
    transition: width 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.meter-fill.good { background: linear-gradient(90deg, rgba(0,255,157,0.4), var(--green)); box-shadow: 0 0 8px rgba(0,255,157,0.3); }
.meter-fill.bad { background: linear-gradient(90deg, var(--red), rgba(255,56,101,0.4)); box-shadow: 0 0 8px rgba(255,56,101,0.3); }
.meter-fill.cyan { background: linear-gradient(90deg, rgba(0,212,255,0.4), var(--cyan)); box-shadow: 0 0 8px rgba(0,212,255,0.3); }
.meter-fill.violet { background: linear-gradient(90deg, rgba(179,102,255,0.4), var(--violet)); box-shadow: 0 0 8px rgba(179,102,255,0.3); }
.meter-fill.gold { background: linear-gradient(90deg, rgba(255,209,102,0.4), var(--gold)); box-shadow: 0 0 8px rgba(255,209,102,0.3); }

/* ---- Animated tick flash on live value updates ---- */
@keyframes tickFlash {
    0% { transform: scale(1.05); }
    100% { transform: scale(1); }
}
.tick-flash { animation: tickFlash 0.5s ease; }
