/* STV Poll – Public ballot styles */

.stv-ballot-wrap {
    max-width: 680px;
    margin: 32px auto;
    padding: 0 16px;
    font-family: inherit;
}

.stv-ballot-header { margin-bottom: 24px; }
.stv-poll-title { font-size: 1.6em; margin-bottom: 8px; }
.stv-poll-description { color: #555; line-height: 1.6; }

.stv-message {
    padding: 14px 18px;
    border-radius: 6px;
    margin-bottom: 18px;
    line-height: 1.5;
}
.stv-message--info    { background: #e8f4fd; border-left: 4px solid #4a90d9; color: #1b5e8b; }
.stv-message--success { background: #d7f0dd; border-left: 4px solid #46a35b; color: #1a4f27; }
.stv-message--warning { background: #fef8e7; border-left: 4px solid #f0b429; color: #7a5c00; }
.stv-message--error   { background: #fce8e8; border-left: 4px solid #d94040; color: #6e1515; }

.stv-ballot-instructions {
    background: #f6f7f7;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 14px 18px;
    margin-bottom: 20px;
    font-size: .95em;
    color: #444;
    line-height: 1.6;
}

.stv-rank-prompt { margin-bottom: 10px; }

/* Ranked list */
.stv-rank-list {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
}

.stv-rank-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    margin-bottom: 6px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    cursor: grab;
    transition: box-shadow .15s, background .15s;
    user-select: none;
}
.stv-rank-item:hover { border-color: #72aee6; box-shadow: 0 2px 6px rgba(0,0,0,.08); }
.stv-rank-item.ui-sortable-helper {
    box-shadow: 0 6px 18px rgba(0,0,0,.18);
    background: #f0f7ff;
    border-color: #4a90d9;
}
.stv-rank-item.stv-excluded {
    opacity: .45;
    background: #f9f9f9;
}

.stv-rank-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #4a90d9;
    color: #fff;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}
.stv-rank-item.stv-excluded .stv-rank-number { background: #bbb; }

.stv-drag-handle {
    color: #aaa;
    font-size: 18px;
    flex-shrink: 0;
    cursor: grab;
}

.stv-candidate-name { flex: 1; font-size: 1em; }

.stv-rank-arrows {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.stv-rank-arrows button {
    background: none;
    border: 1px solid #ddd;
    border-radius: 3px;
    cursor: pointer;
    padding: 0 5px;
    line-height: 1.3;
    font-size: 11px;
    color: #555;
}
.stv-rank-arrows button:hover { background: #e7f0fb; border-color: #72aee6; }

.stv-exclude-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: .85em;
    color: #777;
    cursor: pointer;
    white-space: nowrap;
}

/* Submit button */
.stv-submit-row { margin-top: 10px; }
.stv-btn {
    display: inline-block;
    padding: 12px 28px;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, opacity .2s;
}
.stv-btn--primary { background: #4a90d9; color: #fff; }
.stv-btn--primary:hover { background: #3676b8; }
.stv-btn:disabled { opacity: .6; cursor: not-allowed; }

/* Poll status shortcode */
.stv-poll-status {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 18px 22px;
    margin: 16px 0;
}
.stv-poll-status__title { margin-top: 0; }
.stv-poll-status__winners ul { margin: 6px 0 0; padding-left: 20px; }
