/**
 * Poll Plugin Styles
 *
 * This file contains styles for the Poll plugin UI components.
 * Styles include poll display, voting interface, and results visualization.
 */

/* Poll Container */
.poll-container {
    margin: 20px 0;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f9f9f9;
}

/* Poll Header */
.poll-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.poll-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 5px 0;
}

.poll-meta {
    font-size: 0.875rem;
    color: #666;
}

/* Poll Question */
.poll-question {
    font-size: 1.1rem;
    font-weight: 500;
    color: #444;
    margin-bottom: 15px;
}

/* Poll Options */
.poll-options {
    list-style: none;
    padding: 0;
    margin: 0;
}

.poll-option {
    margin-bottom: 10px;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background-color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.poll-option:hover {
    background-color: #f0f0f0;
    border-color: #ccc;
}

.poll-option.selected {
    background-color: #e3f2fd;
    border-color: #2196f3;
}

.poll-option.disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

/* Poll Option Radio Button */
.poll-option-radio,
.poll-option-checkbox {
    margin-right: 10px;
    cursor: pointer;
}

/* Poll Results */
.poll-results {
    margin-top: 15px;
}

.poll-result-item {
    margin-bottom: 12px;
}

.poll-result-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 0.95rem;
}

.poll-result-text {
    font-weight: 500;
    color: #444;
}

.poll-result-count {
    color: #666;
}

.poll-result-bar-container {
    height: 24px;
    background-color: #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
}

.poll-result-bar {
    height: 100%;
    background: linear-gradient(90deg, #2196f3 0%, #1976d2 100%);
    transition: width 0.5s ease;
}

.poll-result-bar.winner {
    background: linear-gradient(90deg, #4caf50 0%, #388e3c 100%);
}

/* Poll Actions */
.poll-actions {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.poll-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.poll-btn i {
    font-size: 0.85rem;
}

.poll-btn-primary {
    background-color: #2196f3;
    color: white;
}

.poll-btn-primary:hover {
    background-color: #1976d2;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.poll-btn-secondary {
    background-color: #757575;
    color: white;
}

.poll-btn-secondary:hover {
    background-color: #616161;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.poll-btn-danger {
    background-color: #f44336;
    color: white;
}

.poll-btn-danger:hover {
    background-color: #d32f2f;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.poll-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* Edit Vote Button Specific Styles */
#poll-edit-vote-btn {
    background-color: #ff9800;
    color: white;
}

#poll-edit-vote-btn:hover {
    background-color: #f57c00;
}

/* Cancel Button Specific Styles */
#poll-cancel-edit-btn {
    background-color: #9e9e9e;
    color: white;
}

#poll-cancel-edit-btn:hover {
    background-color: #757575;
}

/* Update Vote Button Specific Styles */
#poll-update-vote-btn {
    background-color: #4caf50;
    color: white;
}

#poll-update-vote-btn:hover {
    background-color: #388e3c;
}

/* Poll Status */
.poll-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.poll-status-active {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.poll-status-closed {
    background-color: #ffebee;
    color: #c62828;
}

/* Poll Multiple Choice Badge */
.poll-multiple-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    background-color: #e3f2fd;
    color: #1565c0;
    margin-left: 8px;
}

/* Poll Creation Form */
.poll-create-form {
    padding: 20px;
    background-color: #f5f5f5;
    border-radius: 8px;
}

.poll-form-group {
    margin-bottom: 15px;
}

.poll-form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

.poll-form-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.95rem;
}

.poll-form-input:focus {
    outline: none;
    border-color: #2196f3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.poll-options-list {
    margin-bottom: 15px;
}

.poll-option-input {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.poll-option-input input {
    flex: 1;
    margin-right: 10px;
}

.poll-option-remove {
    padding: 6px 10px;
    background-color: #f44336;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
}

.poll-option-remove:hover {
    background-color: #d32f2f;
}

.poll-add-option {
    padding: 8px 16px;
    background-color: #4caf50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

.poll-add-option:hover {
    background-color: #388e3c;
}

/* Poll Messages */
.poll-message {
    padding: 10px 15px;
    margin-bottom: 15px;
    border-radius: 4px;
    font-size: 0.9rem;
}

.poll-message-success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.poll-message-error {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.poll-message-info {
    background-color: #e3f2fd;
    color: #1565c0;
    border: 1px solid #bbdefb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .poll-container {
        padding: 15px;
    }

    .poll-title {
        font-size: 1.1rem;
    }

    .poll-question {
        font-size: 1rem;
    }

    .poll-actions {
        flex-direction: column;
    }

    .poll-btn {
        width: 100%;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.poll-container {
    animation: fadeIn 0.3s ease;
}

@keyframes progressAnimation {
    from {
        width: 0%;
    }
}

.poll-result-bar {
    animation: progressAnimation 0.5s ease;
}
