/* Jacob Frees Evolves Polls — Midnight Purple Brand Theme
   Dark mode native. No light mode. Ever.
   Colors: #08070f bg, #110e22 panel, #1a1538 elevated, #7c5cff accent
   Gradient: #2d1b69 → #7c5cff → #fffb00 → #ff0000
*/

.jfp-poll {
    background: #110e22;
    border: 1px solid #1a1538;
    border-radius: 12px;
    padding: 32px;
    margin: 24px 0;
    max-width: 640px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #f4f4f8;
    position: relative;
    overflow: hidden;
}

.jfp-poll::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #2d1b69, #7c5cff, #fffb00, #ff0000);
}

.jfp-poll-question {
    font-size: 1.375rem;
    font-weight: 700;
    color: #f4f4f8;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.jfp-poll-desc {
    color: #a8a4b8;
    font-size: 0.9375rem;
    margin: 0 0 24px 0;
    line-height: 1.5;
}

.jfp-poll-badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.jfp-badge-closed {
    background: #2d1b69;
    color: #a8a4b8;
}

.jfp-badge-open {
    background: rgba(124, 92, 255, 0.15);
    color: #7c5cff;
}

/* Vote Options */
.jfp-poll-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.jfp-poll-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: #1a1538;
    border: 1px solid #2d1b69;
    border-radius: 8px;
    color: #f4f4f8;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    width: 100%;
    font-family: inherit;
}

.jfp-poll-option:hover {
    border-color: #7c5cff;
    background: #211b4a;
}

.jfp-poll-option.jfp-selected {
    border-color: #7c5cff;
    background: rgba(124, 92, 255, 0.12);
    box-shadow: 0 0 0 1px #7c5cff;
}

.jfp-poll-option-check {
    font-size: 1.125rem;
    color: #7c5cff;
    margin-left: 12px;
}

.jfp-poll-option.jfp-selected .jfp-poll-option-check {
    color: #fffb00;
}

/* Submit Button */
.jfp-poll-submit {
    display: inline-block;
    padding: 12px 28px;
    background: #7c5cff;
    color: #08070f;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: inherit;
}

.jfp-poll-submit:hover {
    background: #fffb00;
    color: #08070f;
}

.jfp-poll-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.jfp-btn-primary {
    background: #7c5cff;
    color: #08070f;
}

.jfp-btn-ghost {
    background: transparent;
    color: #7c5cff;
    border: 1px solid #7c5cff;
}

.jfp-btn-ghost:hover {
    background: #7c5cff;
    color: #08070f;
}

/* Results */
.jfp-poll-results {
    margin-top: 24px;
}

.jfp-poll-total {
    font-size: 0.8125rem;
    color: #a8a4b8;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.jfp-result-row {
    margin-bottom: 14px;
}

.jfp-result-label {
    font-size: 0.875rem;
    color: #f4f4f8;
    margin-bottom: 4px;
    font-weight: 500;
}

.jfp-result-bar-wrap {
    position: relative;
    background: #08070f;
    border-radius: 6px;
    height: 28px;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 0 10px;
}

.jfp-result-bar {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    background: linear-gradient(90deg, #2d1b69, #7c5cff);
    border-radius: 6px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
}

.jfp-result-leader .jfp-result-bar {
    background: linear-gradient(90deg, #7c5cff, #fffb00);
}

.jfp-result-pct {
    position: relative;
    z-index: 1;
    font-size: 0.8125rem;
    font-weight: 700;
    color: #f4f4f8;
    margin-right: 8px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.jfp-result-count {
    position: relative;
    z-index: 1;
    font-size: 0.75rem;
    color: #a8a4b8;
    margin-left: auto;
}

.jfp-poll-voted-msg {
    color: #7c5cff;
    font-size: 0.875rem;
    margin: 0 0 16px 0;
    font-weight: 500;
}

.jfp-no-votes {
    color: #a8a4b8;
    font-style: italic;
    font-size: 0.875rem;
}

/* Comments */
.jfp-poll-comments {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #1a1538;
}

.jfp-comments-title {
    font-size: 1rem;
    font-weight: 600;
    color: #f4f4f8;
    margin: 0 0 16px 0;
}

.jfp-comments-count {
    display: inline-block;
    background: #1a1538;
    color: #7c5cff;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 8px;
    vertical-align: middle;
}

.jfp-comments-list {
    margin-bottom: 20px;
}

.jfp-comments-list .comment {
    padding: 12px 0;
    border-bottom: 1px solid #1a1538;
}

.jfp-comments-list .comment:last-child {
    border-bottom: none;
}

.jfp-comments-list .comment-author {
    font-weight: 600;
    color: #7c5cff;
    font-size: 0.875rem;
    margin-bottom: 4px;
}

.jfp-comments-list .comment-content {
    color: #f4f4f8;
    font-size: 0.875rem;
    line-height: 1.5;
}

.jfp-no-comments {
    color: #a8a4b8;
    font-style: italic;
    font-size: 0.8125rem;
    margin: 0 0 16px 0;
}

.jfp-comment-form {
    margin-top: 16px;
}

.jfp-comment-input {
    width: 100%;
    background: #08070f;
    border: 1px solid #1a1538;
    border-radius: 8px;
    padding: 12px;
    color: #f4f4f8;
    font-size: 0.875rem;
    font-family: inherit;
    resize: vertical;
    min-height: 60px;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.jfp-comment-input:focus {
    outline: none;
    border-color: #7c5cff;
}

.jfp-comment-form-row {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.jfp-comment-name {
    flex: 1;
    min-width: 120px;
    background: #08070f;
    border: 1px solid #1a1538;
    border-radius: 8px;
    padding: 10px 12px;
    color: #f4f4f8;
    font-size: 0.8125rem;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.jfp-comment-name:focus {
    outline: none;
    border-color: #7c5cff;
}

.jfp-comment-submit {
    padding: 10px 20px;
    font-size: 0.8125rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    font-weight: 600;
}

.jfp-comment-status {
    font-size: 0.75rem;
    color: #a8a4b8;
    margin: 8px 0 0 0;
    min-height: 16px;
}

.jfp-comment-status.jfp-success {
    color: #22c55e;
}

.jfp-comment-status.jfp-error {
    color: #ff0000;
}

.jfp-error {
    color: #ff0000;
    font-size: 0.875rem;
    padding: 16px;
    background: #110e22;
    border-radius: 8px;
}

/* Mobile */
@media (max-width: 768px) {
    .jfp-poll {
        padding: 20px;
        margin: 16px 0;
    }

    .jfp-poll-question {
        font-size: 1.125rem;
    }

    .jfp-poll-option {
        padding: 12px 14px;
        font-size: 0.875rem;
    }

    .jfp-comment-form-row {
        flex-direction: column;
        align-items: stretch;
    }

    .jfp-comment-submit {
        width: 100%;
    }
}