/* ============================================================
   SiteJobs Vote System — Stylesheet v2
   Matches existing card palette: cream, navy, orange
   ============================================================ */

.sj-vote-container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(232, 117, 32, 0.12);
}

/* ---- Buttons ---- */
.sj-vote-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 11px;
    border-radius: 18px;
    border: 1.5px solid #e0d5c0;
    background: #fffdf5;
    color: #8a7a60;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
    user-select: none;
    line-height: 1.4;
    font-family: inherit;
}

.sj-vote-btn:hover {
    border-color: #c9a227;
    background: #fff8e8;
    color: #6b5d3f;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(201, 162, 39, 0.12);
}

.sj-vote-btn:active {
    transform: translateY(0);
}

/* Like — active state (warm green that fits cream palette) */
.sj-vote-btn.sj-liked {
    background: #eef7ed;
    border-color: #5a9e57;
    color: #2d6a2d;
}

.sj-vote-btn.sj-liked:hover {
    background: #e0eee0;
    border-color: #4a8a47;
}

/* Dislike — active state (warm red, not harsh) */
.sj-vote-btn.sj-disliked {
    background: #fdeeee;
    border-color: #d4604e;
    color: #a8362a;
}

.sj-vote-btn.sj-disliked:hover {
    background: #f9e6e4;
    border-color: #c4503e;
}

/* ---- SVG Icons ---- */
.sj-vote-icon {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    opacity: 0.7;
    transition: opacity 0.18s ease;
}

.sj-vote-btn:hover .sj-vote-icon {
    opacity: 0.85;
}

.sj-vote-btn.sj-liked .sj-vote-icon,
.sj-vote-btn.sj-disliked .sj-vote-icon {
    opacity: 1;
}

/* ---- Vote count ---- */
.sj-vote-count {
    font-variant-numeric: tabular-nums;
    min-width: 14px;
    text-align: center;
}

/* ---- Ratio bar — integrated, not floating ---- */
.sj-vote-ratio {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: 6px;
}

.sj-ratio-bar {
    width: 48px;
    height: 4px;
    border-radius: 2px;
    background: #e8c9c5;
    overflow: hidden;
    position: relative;
}

.sj-ratio-fill {
    height: 100%;
    background: linear-gradient(90deg, #6ba368, #5a9e57);
    border-radius: 2px;
    transition: width 0.35s ease;
}

.sj-ratio-percent {
    font-size: 10.5px;
    color: #b0a48c;
    font-weight: 600;
    min-width: 26px;
}

/* ---- Not logged in state ---- */
.sj-vote-login {
    font-size: 12px;
    color: #a09480;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sj-vote-login a {
    color: #1a3a5c;
    text-decoration: none;
    font-weight: 600;
}

.sj-vote-login a:hover {
    text-decoration: underline;
}

.sj-vote-login .sj-vote-icon {
    width: 13px;
    height: 13px;
    opacity: 0.5;
}

/* ---- Loading state ---- */
.sj-vote-btn.sj-loading {
    opacity: 0.4;
    pointer-events: none;
}

/* ---- Error message ---- */
.sj-vote-error {
    color: #a8362a;
    font-size: 11px;
    margin-left: 6px;
    font-style: italic;
}
