/* components.css — RSFW shared UI components: cards, buttons, badges, grids,
   avatars, toasts, stat bars. Loaded on every page after site.css + header.css.
   Page-specific styles (e.g. loadouts.css, points.css) load after this. */

/* ── Cards ─────────────────────────────────────────────────────────────── */
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.card:hover { border-color: rgba(139,92,246,0.4); }
.card-link-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.card-link-center { text-align: center; }
.card-body { padding: 8px 0; }
.card-title { color: #fff; font-size: 1.05rem; font-weight: 700; margin-bottom: 6px; }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    border: none;
    border-radius: 8px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    min-height: 44px; /* a11y touch target */
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
    background: linear-gradient(135deg, var(--primary-purple), var(--accent-purple));
    color: #fff;
}
.btn-primary:hover { box-shadow: 0 6px 20px rgba(139,92,246,0.35); }
.btn-secondary {
    background: rgba(255,255,255,0.07);
    border: 1px solid var(--border-color);
    color: var(--text-light);
}
.btn-secondary:hover { background: rgba(139,92,246,0.15); color: #fff; }
.btn-danger { background: var(--accent-red); color: #fff; }
.btn-danger:hover { background: var(--accent-red-dark); }
.btn-success { background: var(--success); color: #fff; }
.btn-sm { padding: 7px 14px !important; font-size: 0.82rem !important; min-height: 36px; }

/* ── Badges & pills ────────────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    background: rgba(139,92,246,0.18);
    color: var(--light-purple);
    border: 1px solid rgba(139,92,246,0.25);
}
.badge-danger { background: rgba(239,68,68,0.16); color: #fca5a5; border-color: rgba(239,68,68,0.3); }
.badge-success{ background: rgba(16,185,129,0.16); color: #6ee7b7; border-color: rgba(16,185,129,0.3); }
.badge-warning{ background: rgba(245,158,11,0.16); color: #fcd34d; border-color: rgba(245,158,11,0.3); }

/* ── Grids ─────────────────────────────────────────────────────────────── */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}
@media (max-width: 768px) {
    .cards-grid { grid-template-columns: 1fr; gap: 12px; }
}

/* ── Avatars ───────────────────────────────────────────────────────────── */
.avatar-lg-centered,
.avatar-lg-purple {
    width: 72px; height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(139,92,246,0.45);
    display: block;
    margin: 0 auto 10px;
}

/* ── Stat bars (used by loadouts + profile) ────────────────────────────── */
.stat-bar {
    height: 6px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    overflow: hidden;
}
.stat-bar-fill { height: 100%; border-radius: 999px; transition: width 0.3s; }
.stat-bar-fill.high { background: linear-gradient(90deg, #10b981, #34d399); }
.stat-bar-fill.mid  { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.stat-bar-fill.low  { background: linear-gradient(90deg, #ef4444, #f87171); }

/* ── Muted footer links ────────────────────────────────────────────────── */
.muted-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.78rem;
    transition: color 0.2s;
}
.muted-link:hover { color: var(--light-purple); }

/* ── Flex utilities ────────────────────────────────────────────────────── */
.flex-1-min0    { flex: 1; min-width: 0; }
.flex-shrink-0  { flex-shrink: 0; }
.no-underline   { text-decoration: none !important; }
.cursor-pointer { cursor: pointer; }
.d-block        { display: block; }
.d-none         { display: none; }
