/* Vote Widget */
.vote-widget {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.vote-widget--inline {
    flex-direction: row;
    gap: 4px;
}

.vote-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    background: none;
    border-radius: var(--radius);
    color: var(--color-text-muted);
    cursor: pointer;
    transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

.vote-btn:hover {
    background-color: var(--color-bg-alt);
    transform: scale(1.15);
}

.vote-btn:active {
    transform: scale(0.9);
}

.vote-btn--sm {
    width: 22px;
    height: 22px;
}

.vote-btn__icon {
    width: 18px;
    height: 18px;
}

.vote-btn--sm .vote-btn__icon {
    width: 14px;
    height: 14px;
}

/* Upvote active - purple glow */
.vote-btn--up:hover {
    color: var(--color-accent);
    background-color: rgba(124, 92, 191, 0.1);
}

.vote-btn--up.vote-btn--active {
    color: var(--color-accent);
    background-color: rgba(124, 92, 191, 0.12);
    box-shadow: 0 0 10px rgba(124, 92, 191, 0.35), 0 0 20px rgba(124, 92, 191, 0.15);
}

.vote-btn--up.vote-btn--active:hover {
    box-shadow: 0 0 14px rgba(124, 92, 191, 0.5), 0 0 28px rgba(124, 92, 191, 0.2);
}

/* Downvote active - red glow */
.vote-btn--down:hover {
    color: var(--color-danger);
    background-color: rgba(229, 72, 77, 0.08);
}

.vote-btn--down.vote-btn--active {
    color: var(--color-danger);
    background-color: rgba(229, 72, 77, 0.1);
    box-shadow: 0 0 10px rgba(229, 72, 77, 0.3), 0 0 20px rgba(229, 72, 77, 0.12);
}

.vote-btn--down.vote-btn--active:hover {
    box-shadow: 0 0 14px rgba(229, 72, 77, 0.45), 0 0 28px rgba(229, 72, 77, 0.18);
}

/* Score styling */
.vote-score {
    font-size: var(--font-size-sm);
    font-weight: 700;
    font-family: var(--font-display);
    color: var(--color-text);
    min-width: 20px;
    text-align: center;
    line-height: 1;
    transition: transform 0.2s ease, color 0.2s ease;
}

.vote-score--sm {
    font-size: 0.75rem;
    min-width: 16px;
}

/* Score color when voted */
.vote-widget:has(.vote-btn--up.vote-btn--active) .vote-score {
    color: var(--color-accent);
}

.vote-widget:has(.vote-btn--down.vote-btn--active) .vote-score {
    color: var(--color-danger);
}

/* Vote pop animation - applied via JS */
@keyframes vote-pop {
    0% { transform: scale(1); }
    40% { transform: scale(1.35); }
    70% { transform: scale(0.95); }
    100% { transform: scale(1); }
}

@keyframes score-bump {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.vote-btn--pop {
    animation: vote-pop 0.35s ease;
}

.vote-score--bump {
    animation: score-bump 0.3s ease;
}

/* Light theme adjustments */
[data-theme="light"] .vote-btn--up.vote-btn--active {
    box-shadow: 0 0 8px rgba(124, 92, 191, 0.25), 0 0 16px rgba(124, 92, 191, 0.1);
}

[data-theme="light"] .vote-btn--down.vote-btn--active {
    box-shadow: 0 0 8px rgba(205, 43, 49, 0.2), 0 0 16px rgba(205, 43, 49, 0.08);
}
