/* Pollab Base CSS */
.pollab-topic-form-section {
    margin-top: 30px;
    padding: 15px;
    background: #fdfdfd;
    border: 1px solid #e1e1e1;
    border-radius: 4px;
}

.pollab-choice-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    gap: 10px;
}

/* Frontend Poll UI */
.pollab-container {
    margin: 30px 0;
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.pollab-title {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 1.4em;
}

.pollab-instructions {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 20px;
}

.pollab-sortable-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.pollab-sortable-item {
    background: #f9f9f9;
    border: 1px solid #eee;
    padding: 12px 15px;
    margin-bottom: 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    cursor: grab;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    user-select: none;
}

.pollab-sortable-item:active {
    cursor: grabbing;
}

.pollab-sortable-item.sortable-ghost {
    opacity: 0.4;
    background: #eef;
}

.pollab-sortable-item.sortable-drag {
    background: #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transform: scale(1.02);
}

.pollab-drag-handle {
    margin-right: 15px;
    color: #aaa;
    font-size: 1.2em;
    cursor: grab;
}

.pollab-standard-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.pollab-standard-list li {
    margin-bottom: 10px;
}

.pollab-standard-list label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

/* ============================================================
   Pollab Survey / Quiz — Frontend
   ============================================================ */

.pollab-survey-wrap {
    margin: 24px 0;
    padding: 24px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    font-family: inherit;
}

.pollab-survey-title {
    margin: 0 0 18px;
    font-size: 1.25em;
    color: #222;
}

/* ── Questions ─────────────────────────────── */
.pollab-question {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.pollab-question:last-of-type { border-bottom: none; }

.pollab-question-text {
    margin: 0 0 10px;
    font-weight: 600;
    color: #333;
}

.pollab-q-num {
    display: inline-block;
    width: 22px;
    height: 22px;
    line-height: 22px;
    text-align: center;
    background: #4a6cf7;
    color: #fff;
    border-radius: 50%;
    font-size: 0.75em;
    margin-right: 6px;
}

/* ── Choices ───────────────────────────────── */
.pollab-choices { list-style: none; padding: 0; margin: 0; }
.pollab-choices li { margin-bottom: 8px; }

.pollab-choices label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #e5e5e5;
    transition: border-color .15s, background .15s;
}

.pollab-choices label:hover { background: #f5f8ff; border-color: #4a6cf7; }

/* ── Ranking ───────────────────────────────── */
.pollab-ranking .pollab-rank-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    margin-bottom: 6px;
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    cursor: grab;
    user-select: none;
}

.pollab-drag-handle { color: #aaa; font-size: 1.1em; }

/* ── Actions ───────────────────────────────── */
.pollab-actions { margin-top: 20px; }

.pollab-submit-btn {
    display: inline-block;
    padding: 10px 28px;
    background: #4a6cf7;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}

.pollab-submit-btn:hover { background: #354fcf; }
.pollab-submit-btn:disabled { opacity: .6; cursor: not-allowed; }

/* ── Feedback / notices ────────────────────── */
.pollab-error  { color: #c0392b; padding: 8px; background: #fdecea; border-radius: 4px; }
.pollab-notice { color: #7d6608; padding: 8px; background: #fef9e7; border-radius: 4px; }

/* ── Results — survey bars ──────────────────── */
.pollab-results { margin-top: 10px; }
.pollab-results h4 { margin: 0 0 16px; color: #333; font-size: 1.1em; }

.pollab-result-question { margin-bottom: 18px; }

.pollab-result-row {
    display: grid;
    grid-template-columns: minmax(100px, 200px) 1fr 80px;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.pollab-result-label { font-size: .9em; color: #333; }

.pollab-result-bar-wrap {
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    height: 16px;
}

.pollab-result-bar {
    height: 100%;
    background: #4a6cf7;
    border-radius: 4px;
    transition: width .4s ease;
    min-width: 2px;
}

.pollab-result-pct { font-size: .85em; color: #555; text-align: right; }

/* ── Results — quiz score ──────────────────── */
.pollab-score-badge {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1.5em;
    font-weight: 700;
    margin-bottom: 20px;
}

.pollab-badge-success { background: #e8f5e9; color: #2e7d32; }
.pollab-badge-warning { background: #fff8e1; color: #f57f17; }
.pollab-badge-danger  { background: #fce4ec; color: #b71c1c; }

.pollab-feedback-question { margin-bottom: 18px; }

.pollab-feedback-question ul { list-style: none; padding: 0; margin: 8px 0 0; }
.pollab-feedback-question li {
    padding: 5px 10px;
    border-radius: 4px;
    margin-bottom: 4px;
}

.pollab-correct-selected { background: #e8f5e9; color: #2e7d32; font-weight: 600; }
.pollab-correct          { background: #e8f5e9; color: #4caf50; font-style: italic; }
.pollab-wrong            { background: #fce4ec; color: #c62828; }

.pollab-q-score { color: #555; font-size: .88em; margin: 0; }

/* ============================================================
   Pollab Survey — WP Admin Builder
   ============================================================ */

#pollab-questions-wrapper { max-width: 860px; }

.pollab-question-block {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 6px;
    margin-bottom: 16px;
    padding: 16px 18px;
}

.pollab-question-block .pollab-question-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.pollab-qi-label {
    display: inline-block;
    background: #4a6cf7;
    color: #fff;
    border-radius: 50%;
    width: 26px; height: 26px;
    line-height: 26px;
    text-align: center;
    font-size: .85em;
    font-weight: 700;
}

