/* ==========================================================================
   Narod se pita — voting UI
   ========================================================================== */

/* ----- Vote stack (up/down arrows on each problem card) ----- */
.nsp-vote-stack {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-left: 12px;
    flex-shrink: 0;
}

.nsp-vote-btn {
    width: 36px;
    height: 30px;
    border: 1px solid #d8dde8;
    background: #ffffff;
    border-radius: 6px;
    color: #6b7385;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease, transform .1s ease;
    line-height: 0;
}

.nsp-vote-btn:hover {
    background: #f3f6fc;
    color: #2c4cdb;
    border-color: #b9c3df;
}

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

.nsp-vote-btn svg {
    width: 16px;
    height: 16px;
    display: block;
    fill: currentColor;
    pointer-events: none;
}

.nsp-vote-btn.nsp-vote-up.nsp-active {
    background: #2c4cdb;
    color: #ffffff;
    border-color: #2c4cdb;
}

.nsp-vote-btn.nsp-vote-down.nsp-active {
    background: #d63b3b;
    color: #ffffff;
    border-color: #d63b3b;
}

/* ----- Problem rows (cards) ----- */
.nsp-problems-wrap {
    width: 100%;
}

.nsp-problems {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nsp-problem {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: #ffffff;
    border: 1px solid #e6e9f0;
    border-radius: 12px;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.nsp-problem:hover {
    border-color: #c7cee0;
    box-shadow: 0 1px 4px rgba(20, 30, 60, 0.05);
}

.nsp-problem-rank {
    font-size: 14px;
    font-weight: 600;
    color: #9099ad;
    width: 28px;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

.nsp-problem-body {
    flex: 1;
    min-width: 0;
}

.nsp-problem-title {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #1a2240;
    text-decoration: none;
    line-height: 1.35;
    margin-bottom: 6px;
}

.nsp-problem-title:hover {
    color: #2c4cdb;
    text-decoration: underline;
}

.nsp-problem-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: 13px;
    color: #6b7385;
}

.nsp-cat-pill {
    display: inline-block;
    background: #eef1fb;
    color: #2c4cdb;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
}

.nsp-meta-dot {
    position: relative;
    padding-left: 12px;
}

.nsp-meta-dot::before {
    content: "·";
    position: absolute;
    left: 4px;
    color: #b9bfd0;
}

.nsp-problem-score {
    font-size: 22px;
    font-weight: 700;
    color: #1a2240;
    min-width: 70px;
    text-align: right;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

/* ----- Empty-state callout ----- */
.nsp-callout {
    padding: 24px;
    background: #f7f8fc;
    border: 1px dashed #c7cee0;
    border-radius: 12px;
    color: #4b556e;
}

.nsp-callout a {
    color: #2c4cdb;
    font-weight: 600;
}

/* ----- Toast notifications ----- */
.nsp-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: #1A1A1A;
    color: #F4F1EA;
    padding: 12px 18px;
    border-radius: 8px;
    font-family: 'Public Sans', sans-serif;
    font-size: 14px;
    z-index: 9999;
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}

/* ----- Score pulse animation on vote ----- */
.nsp-vote--pulse .nsp-problem-score,
.nsp-vote--pulse .nsp-vote__score {
    animation: nsp-pulse .25s ease-out;
}

@keyframes nsp-pulse {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.18); }
    100% { transform: scale(1); }
}

/* ----- Responsive ----- */
@media (max-width: 640px) {
    .nsp-problem {
        flex-wrap: wrap;
        gap: 10px;
        padding: 14px 16px;
    }
    .nsp-problem-rank {
        font-size: 13px;
        width: 22px;
    }
    .nsp-problem-title {
        font-size: 15px;
    }
    .nsp-problem-score {
        font-size: 18px;
        min-width: 48px;
    }
    .nsp-vote-btn {
        width: 32px;
        height: 28px;
    }
}
