.poll-container {
    border-radius: 12px;
    padding: 20px;
    margin: 15px 0;
    background-color: #f5f5f5;
}

.poll-subtitle {
    color: #999;
    margin-bottom: 20px;
    font-size: 13px;
}

.poll-options {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.poll-option {
    --vote-percent: 0%;
    --poll-bar-color: rgba(100, 100, 100, 0.34);
    transition: all 0.4s ease;
}

/* Voting mode - show inputs */
.poll-option.voting .poll-input {
    display: flex;
}

.poll-option.voting .poll-result {
    display: none;
}

/* Results mode - show results */
.poll-option.voted .poll-input {
    display: none;
}

.poll-option.voted .poll-result {
    display: flex;
}

.poll-input {
    align-items: center;
    cursor: pointer;
    padding: 14px 16px;
    border: 1px solid #FFFFFF;
    border-radius: 8px;
    background: #fff;
    transition: all 0.2s;
    gap: 12px;
    justify-content: space-between;
}

.poll-input input {
    width: 20px;
    height: 20px;
    cursor: pointer;
    flex-shrink: 0;
}

.poll-option-text {
    flex: 1;
    font-size: 15px;
}

.poll-result {
    position: relative;
    overflow: hidden;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    border-radius: 12px;
    transition: all 0.4s ease;
}

.poll-result::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--vote-percent);
    max-width: 100%;
    background: var(--poll-bar-color);
    border-radius: 8px;
    transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 0;
}

.poll-result > * {
    position: relative;
    z-index: 1;
}

/* Unvoted option */
.poll-option.voted .poll-result {
    border: 2px solid transparent;
    background: rgba(100, 100, 100, 0.14);
}

.poll-option.voted .poll-result .poll-option-text {
    font-weight: 400;
    color: inherit;
}

.poll-option.voted .vote-stats {
    color: #999;
}

.vote-stats {
    display: flex;
    align-items: center;
    gap: 6px;
}

.votes-link {
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    color: #0d6efd;
    text-decoration: underline;
    cursor: pointer;
    font: inherit;
}

.votes-link:hover {
    color: #0a58ca;
}

.poll-option.voted.user-voted .votes-link {
    color: #fff;
    text-decoration-color: rgba(255, 255, 255, 0.9);
}

.option-voters {
    display: inline-flex;
    align-items: center;
    margin-right: 4px;
}

.option-voters.hidden {
    display: none;
}

.option-voter-avatar {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid #f9f9f9;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
}

.option-voter-avatar + .option-voter-avatar {
    margin-left: -6px;
}

/* Voted option */
.poll-option.voted.user-voted .poll-result {
    border: 2px solid #2e7d32;
    background: #2e7d32;
}

.poll-option.voted.user-voted {
    --poll-bar-color: rgba(255, 255, 255, 0.24);
}

.poll-option.voted.user-voted .poll-result .poll-option-text {
    font-weight: 600;
    color: #fff;
}

.poll-option.voted.user-voted .vote-stats {
    color: #fff;
}

.poll-option.voted.user-voted .checkmark {
    display: inline;
}

.checkmark {
    display: none;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    color: #4caf50;
    background: #fff;
    border-radius: 50%;
    padding: 2px;
    box-sizing: border-box;
}

.poll-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.vote-summary {
    color: #666;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.vote-summary-count {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
}

.poll-buttons {
    display: flex;
    gap: 10px;
}

.poll-vote-button {
    border-radius: 6px;
    padding: 8px 16px;
}

.poll-vote-button.hidden {
    display: none;
}

.poll-voters-modal {
    position: fixed;
    inset: 0;
    z-index: 1060;
    display: flex;
    align-items: center;
    justify-content: center;
}

.poll-voters-modal.hidden {
    display: none;
}

.poll-voters-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.poll-voters-dialog {
    position: relative;
    background: #fff;
    width: min(92vw, 420px);
    max-height: 72vh;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22);
    display: flex;
    flex-direction: column;
    z-index: 1;
}

.poll-voters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-bottom: 1px solid #e9ecef;
}

.poll-voters-header h6 {
    margin: 0;
    font-size: 15px;
}

.poll-voters-close {
    border: 0;
    background: transparent;
    color: #555;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.poll-voters-list {
    padding: 10px 14px 14px;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.voter-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    color: #1f2937;
    text-decoration: none;
}

.voter-list-item:hover {
    background: #f1f3f5;
}

.voter-list-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.voter-list-empty {
    color: #6b7280;
    padding: 8px 10px;
}
