/* JetEngine Voting System — Frontend Styles */

/* ── Vote Button ─────────────────────────────── */
.jev-vote-wrap {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: inherit;
}

.jev-vote-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border: 2px solid #3b82f6;
    border-radius: 6px;
    background: transparent;
    color: #3b82f6;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, transform 0.1s, opacity 0.15s;
    line-height: 1;
}

.jev-vote-btn:hover:not(:disabled) {
    background: #3b82f6;
    color: #fff;
}

.jev-vote-btn:active:not(:disabled) {
    transform: scale(0.97);
}

.jev-vote-btn:disabled,
.jev-vote-btn.jev-voted {
    border-color: #22c55e;
    color: #22c55e;
    cursor: default;
    opacity: 0.85;
}

.jev-vote-btn.jev-loading {
    opacity: 0.6;
    cursor: wait;
}

.jev-vote-count {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.jev-vote-label {
    font-weight: 400;
    color: #6b7280;
    margin-left: 2px;
}

/* ── Leaderboard ─────────────────────────────── */
.jev-leaderboard-wrap {
    width: 100%;
    font-family: inherit;
}

/* Tabs */
.jev-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.jev-tab {
    padding: 8px 16px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}

.jev-tab:hover {
    color: #111827;
}

.jev-tab.jev-tab-active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
}

/* Table */
.jev-table-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 14px;
    color: #111827;
}

.jev-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.jev-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
}

.jev-list-item:last-child {
    border-bottom: none;
}

.jev-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f3f4f6;
    font-size: 12px;
    font-weight: 700;
    color: #374151;
    flex-shrink: 0;
}

.jev-list-item[data-rank="1"] .jev-rank { background: #fef08a; color: #78350f; }
.jev-list-item[data-rank="2"] .jev-rank { background: #e2e8f0; color: #334155; }
.jev-list-item[data-rank="3"] .jev-rank { background: #fed7aa; color: #7c2d12; }

.jev-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.jev-title {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #111827;
    text-decoration: none;
}

.jev-title:hover {
    color: #3b82f6;
    text-decoration: underline;
}

.jev-count {
    font-size: 14px;
    font-weight: 700;
    color: #3b82f6;
    white-space: nowrap;
    margin-left: auto;
}

.jev-count-label {
    font-weight: 400;
    color: #9ca3af;
    font-size: 12px;
    margin-left: 2px;
}

.jev-empty {
    color: #9ca3af;
    font-size: 14px;
    padding: 20px 0;
}

/* Error toast */
.jev-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    z-index: 9999;
    animation: jev-fadein 0.2s ease;
}

.jev-toast-error   { background: #fee2e2; color: #991b1b; }
.jev-toast-success { background: #dcfce7; color: #166534; }
.jev-toast-info    { background: #dbeafe; color: #1e40af; }

@keyframes jev-fadein {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
