/* ================================================================
   BOUNTY BOARD — Bug Bounty Panel Styles
   ================================================================

   Estilos para o painel de bounty no right panel.
   Usa CSS vars do tema existente (dark/light).

   ================================================================ */

/* --- Tab badge (generic, reusable) -------------------------------- */

.tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    margin-left: 4px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
    background: #e74c3c;
    color: #fff;
}

.tab-badge:empty,
.tab-badge[data-count="0"] {
    display: none;
}

/* --- Panel layout ------------------------------------------------- */

.bounty-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    font-size: 12px;
    color: var(--text-color, #ccc);
}

/* --- Stats row ---------------------------------------------------- */

.bounty-stats-row {
    display: flex;
    gap: 2px;
    padding: 8px;
    border-bottom: 1px solid var(--border-color, #333);
    flex-wrap: wrap;
}

.bounty-stat {
    flex: 1;
    min-width: 60px;
    text-align: center;
    padding: 4px 2px;
    border-radius: 4px;
    background: var(--bg-secondary, rgba(255,255,255,0.03));
}

.bounty-stat-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-color, #eee);
}

.bounty-stat-label {
    font-size: 10px;
    color: var(--text-muted, #888);
    margin-top: 2px;
}

/* --- Toolbar / filters -------------------------------------------- */

.bounty-toolbar {
    display: flex;
    gap: 4px;
    padding: 6px 8px;
    border-bottom: 1px solid var(--border-color, #333);
    align-items: center;
    flex-wrap: wrap;
}

.bounty-toolbar select {
    flex: 1;
    min-width: 70px;
    font-size: 11px;
    padding: 3px 4px;
    border-radius: 3px;
    border: 1px solid var(--border-color, #444);
    background: var(--bg-primary, #1a1a2e);
    color: var(--text-color, #ccc);
}

.bounty-toolbar .bounty-create-btn {
    padding: 3px 8px;
    font-size: 11px;
    border-radius: 3px;
    border: 1px solid var(--accent-color, #28c7fa);
    background: transparent;
    color: var(--accent-color, #28c7fa);
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}

.bounty-toolbar .bounty-create-btn:hover {
    background: rgba(40, 199, 250, 0.1);
}

.bounty-toolbar .bounty-create-btn-service {
    border-color: #3498db;
    color: #3498db;
}

.bounty-toolbar .bounty-create-btn-service:hover {
    background: rgba(52, 152, 219, 0.1);
}

/* --- Category filter chips ---------------------------------------- */

.bounty-category-row {
    display: flex;
    gap: 4px;
    padding: 4px 6px;
    border-bottom: 1px solid var(--border-color, rgba(255,255,255,0.07));
}

.bounty-category-chip {
    padding: 2px 8px;
    font-size: 10px;
    border-radius: 10px;
    border: 1px solid var(--border-color, rgba(255,255,255,0.15));
    background: transparent;
    color: var(--text-muted, #999);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.bounty-category-chip.active {
    background: var(--accent-color, #28c7fa);
    color: #000;
    border-color: var(--accent-color, #28c7fa);
}

.bounty-category-chip:hover:not(.active) {
    background: rgba(255,255,255,0.06);
    color: var(--text-primary, #e0e0e0);
}

/* --- Card list ---------------------------------------------------- */

.bounty-list {
    overflow-y: auto;
    flex: 1;
    padding: 4px 0;
}

.bounty-empty {
    padding: 24px;
    text-align: center;
    color: var(--text-muted, #888);
    font-size: 12px;
}

/* --- Bounty card -------------------------------------------------- */

.bounty-card {
    display: flex;
    gap: 8px;
    padding: 8px;
    margin: 2px 6px;
    border-radius: 4px;
    border: 1px solid var(--border-color, #333);
    background: var(--bg-secondary, rgba(255,255,255,0.02));
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.bounty-card:hover {
    background: var(--hover-bg, rgba(255,255,255,0.05));
    border-color: var(--accent-color, #28c7fa);
}

.bounty-card.selected {
    background: var(--selection-bg, rgba(52,152,219,0.12));
    border-color: var(--accent-color, #28c7fa);
}

/* Severity color strip on left */
.bounty-card-strip {
    width: 4px;
    border-radius: 2px;
    flex-shrink: 0;
    align-self: stretch;
}

.bounty-card-body {
    flex: 1;
    min-width: 0;
}

.bounty-card-header {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 4px;
}

.bounty-card-title {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.bounty-card-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

/* --- Tier badge --------------------------------------------------- */

.bounty-tier-badge {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
}

.bounty-tier-badge.tier-bronze {
    background: rgba(205, 127, 50, 0.15);
    color: #cd7f32;
}

.bounty-tier-badge.tier-silver {
    background: rgba(192, 192, 192, 0.15);
    color: #c0c0c0;
}

.bounty-tier-badge.tier-gold {
    background: rgba(255, 215, 0, 0.15);
    color: #ffd700;
}

.bounty-tier-badge.tier-platinum {
    background: rgba(229, 228, 226, 0.15);
    color: #e5e4e2;
}

.bounty-tier-badge.tier-service {
    background: rgba(52, 152, 219, 0.15);
    color: #3498db;
}

/* --- Chips (flag type, status) ------------------------------------ */

.bounty-chip {
    display: inline-block;
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 3px;
    white-space: nowrap;
}

.bounty-chip-status {
    background: rgba(231, 76, 60, 0.12);
    color: #e74c3c;
}

.bounty-chip-status.status-in_progress {
    background: rgba(243, 156, 18, 0.12);
    color: #f39c12;
}

.bounty-chip-status.status-resolved {
    background: rgba(46, 204, 113, 0.12);
    color: #2ecc71;
}

.bounty-chip-status.status-wontfix {
    background: rgba(149, 165, 166, 0.12);
    color: #95a5a6;
}

.bounty-chip-status.status-planned {
    background: rgba(52, 152, 219, 0.12);
    color: #3498db;
}

.bounty-chip-flag {
    background: rgba(52, 152, 219, 0.1);
    color: var(--text-muted, #999);
}

/* --- Card actions ------------------------------------------------- */

.bounty-card-actions {
    display: flex;
    gap: 4px;
    margin-top: 6px;
}

.bounty-card-actions button {
    padding: 2px 6px;
    font-size: 10px;
    border-radius: 3px;
    border: 1px solid var(--border-color, #444);
    background: transparent;
    color: var(--text-color, #ccc);
    cursor: pointer;
    transition: background 0.15s;
}

.bounty-card-actions button:hover {
    background: rgba(255,255,255,0.08);
}

.bounty-card-actions button.btn-claim {
    border-color: #2ecc71;
    color: #2ecc71;
}

.bounty-card-actions button.btn-claim:hover {
    background: rgba(46, 204, 113, 0.1);
}

.bounty-card-actions button.btn-resolve {
    border-color: #3498db;
    color: #3498db;
}

.bounty-card-actions button.btn-verify {
    border-color: #f39c12;
    color: #f39c12;
}

/* --- Leaderboard -------------------------------------------------- */

.bounty-leaderboard {
    border-top: 1px solid var(--border-color, #333);
}

.bounty-leaderboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 8px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted, #aaa);
    user-select: none;
}

.bounty-leaderboard-header:hover {
    color: var(--text-color, #eee);
}

.bounty-leaderboard-body {
    max-height: 200px;
    overflow-y: auto;
}

.bounty-leaderboard-body.collapsed {
    display: none;
}

.bounty-lb-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    font-size: 11px;
    border-bottom: 1px solid var(--border-color, rgba(255,255,255,0.03));
}

.bounty-lb-rank {
    width: 20px;
    text-align: center;
    font-weight: 700;
    color: var(--text-muted, #888);
}

.bounty-lb-rank.rank-1 { color: #ffd700; }
.bounty-lb-rank.rank-2 { color: #c0c0c0; }
.bounty-lb-rank.rank-3 { color: #cd7f32; }

.bounty-lb-user {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bounty-lb-points {
    font-weight: 600;
    color: var(--accent-color, #28c7fa);
}

.bounty-lb-resolved {
    font-size: 10px;
    color: var(--text-muted, #888);
}

/* --- Light theme overrides ---------------------------------------- */

[data-theme="light"] .bounty-card {
    border-color: var(--border-color, #ddd);
    background: var(--bg-secondary, rgba(0,0,0,0.02));
}

[data-theme="light"] .bounty-card:hover {
    background: var(--hover-bg, rgba(0,0,0,0.04));
}

[data-theme="light"] .bounty-toolbar select {
    background: var(--bg-primary, #fff);
}

/* --- Statusbar bounty indicator ----------------------------------- */

#status-bounties {
    cursor: pointer;
}

#status-bounties:hover {
    color: var(--accent-color, #28c7fa);
}

/* --- Evidence thumbnails ------------------------------------------ */

.bounty-evidence-row {
    display: flex;
    gap: 4px;
    margin-top: 4px;
    align-items: center;
}

.bounty-evidence-thumb {
    width: 40px;
    height: 28px;
    object-fit: cover;
    border-radius: 3px;
    border: 1px solid var(--border-color, #444);
    cursor: pointer;
    opacity: 0.85;
    transition: opacity 0.15s, border-color 0.15s;
}

.bounty-evidence-thumb:hover {
    opacity: 1;
    border-color: var(--accent-color, #28c7fa);
}

/* --- Screenshot button -------------------------------------------- */

.bounty-card-actions button.btn-screenshot {
    border-color: #9b59b6;
    color: #9b59b6;
}

.bounty-card-actions button.btn-screenshot:hover {
    background: rgba(155, 89, 182, 0.1);
}
