/**
 * Poll Styles for Phish.net Forum (Bootstrap 3)
 */

/* Container */
.poll-container {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin: 15px 0;
    padding: 15px;
    font-family: inherit;
}

.poll-container h4 {
    margin: 0 0 15px 0;
    font-size: 1.1em;
    font-weight: bold;
    color: #333;
}

/* Question */
.poll-question {
    font-weight: bold;
    margin-bottom: 15px;
    font-size: 1.05em;
    color: #444;
}

/* ---------- Voting options ---------- */
.poll-options { margin-bottom: 15px; }

/* Make the whole row clickable and pretty */
.poll-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid #e5e5e5 !important;   /* override list-group-item */
    border-radius: 6px;                      /* soften corners */
    margin-bottom: 10px;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.poll-option:hover {
    background: #f9fbff;
    border-color: #dbe7ff !important;
}
.poll-option:focus-within {
    box-shadow: 0 0 0 3px rgba(51,122,183,.15);
    border-color: #bcd5f6 !important;
}

/* Hide native input but keep accessible via label */
.poll-option input[type="radio"],
.poll-option input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* Custom control (radio/checkbox) */
.poll-option .control {
    width: 20px;
    height: 20px;
    border: 2px solid #b3c7e6;
    border-radius: 50%;               /* default: radio look */
    display: inline-block;
    position: relative;
    flex: 0 0 20px;
    transition: border-color .15s ease, background .15s ease;
}

/* inner dot / check */
.poll-option .control:after {
    content: "";
    position: absolute;
    top: 50%; left: 50%;
    width: 10px; height: 10px;
    margin: -5px 0 0 -5px;
    border-radius: 50%;
    background: transparent;
    transform: scale(0.4);
    transition: background .15s ease, transform .15s ease;
}

/* Text */
.poll-option .label-text {
    font-size: 15px;
    line-height: 1.3;
}

/* Checked (radio) */
.poll-option input[type="radio"]:checked + .control {
    border-color: #337ab7;
    background: #eaf2fb;
}
.poll-option input[type="radio"]:checked + .control:after {
    background: #337ab7;
    transform: scale(1);
}
.poll-option input[type="radio"]:checked ~ .label-text {
    font-weight: 600;
}

/* Checked (checkbox) — squared style */
.poll-option input[type="checkbox"] + .control {
    border-radius: 4px;               /* checkbox look */
}
.poll-option input[type="checkbox"]:checked + .control {
    border-color: #337ab7;
    background: #eaf2fb;
}
.poll-option input[type="checkbox"]:checked + .control:after {
    width: 12px; height: 6px;         /* draw a checkmark */
    margin: -6px 0 0 -6px;
    border-radius: 0;
    background: transparent;
    border: 3px solid #337ab7;
    border-top: none; border-right: none;
    transform: rotate(-45deg) scale(1);
}
.poll-option input[type="checkbox"]:checked ~ .label-text {
    font-weight: 600;
}

/* Button spacing */
.poll-vote-btn,
.poll-results-btn {
    margin-right: 8px;
    margin-top: 6px;
}

/* ---------- Results ---------- */
.poll-results { margin-top: 15px; display: none; }
.poll-results h4 {
    margin-bottom: 15px;
    font-size: 1em;
    color: #666;
}
.poll-result-item { margin-bottom: 12px; }
.poll-result-text {
    font-weight: 600;
    margin-bottom: 4px;
    color: #333;
}
.poll-result-bar {
    background: #e9ecef;
    border-radius: 6px;
    height: 10px;
    position: relative;
    margin: 6px 0;
    overflow: hidden;
}
.poll-result-fill {
    background: #337ab7;
    height: 100%;
    transition: width .4s ease;
    min-width: 2px;
}
.poll-result-stats {
    font-size: 0.85em;
    color: #666;
    text-align: right;
}

/* Meta / voted indicator */
.poll-meta { margin-top: 8px; color: #666; }
.voted-indicator {
    display: inline-block;
    margin-left: 8px;
    color: #2e7d32;
    font-weight: 600;
}

/* ---------- Creation form (unchanged except tidy) ---------- */
.poll-creation-form {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 20px;
    margin: 15px 0;
    display: none;
}
.poll-creation-form h4 { margin: 0 0 15px 0; color: #495057; }
.poll-form-group { margin-bottom: 15px; }
.poll-form-group label { display: block; margin-bottom: 5px; font-weight: 500; color: #495057; }
.poll-form-group input,
.poll-form-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 0.9em;
}
.poll-options-container { margin-bottom: 15px; }
.poll-option-input { display: flex; margin-bottom: 8px; align-items: center; gap: 10px; }
.poll-option-input input { flex: 1; }
.poll-option-input .remove-poll-option {
    background: #dc3545; color: #fff; border: none; border-radius: 4px; padding: 6px 12px; font-size: .8em; cursor: pointer;
}
.poll-option-input .remove-poll-option:hover { background: #c82333; }
.poll-form-actions { display: flex; gap: 10px; align-items: center; }
.add-poll-option, .toggle-poll-form {
    background: #6c757d; color: #fff; border: none; border-radius: 4px; padding: 8px 16px; font-size: .9em; cursor: pointer; text-decoration: none; display: inline-block;
}
.add-poll-option:hover, .toggle-poll-form:hover { background: #545b62; color: #fff; text-decoration: none; }

/* Messages */
.poll-message { margin-bottom: 15px; padding: 10px; border-radius: 4px; font-size: .9em; }
.poll-message.alert-success { background: #d4edda; border: 1px solid #c3e6cb; color: #155724; }
.poll-message.alert-danger  { background: #f8d7da; border: 1px solid #f5c6cb; color: #721c24; }

/* Expired notice */
.poll-expired {
    color: #856404; background: #fff3cd; border: 1px solid #ffeaa7; border-radius: 4px;
    padding: 8px 12px; margin-top: 10px; font-size: .9em;
}

/* Dark theme support */
.theme-dark .poll-container { background: #2d3339; border-color: #495057; color: #fff; }
.theme-dark .poll-container h4,
.theme-dark .poll-question,
.theme-dark .poll-result-t
