/* WE Quiz Frontend Styles */

.weq-quiz {
    border: 1px solid #ddd;
    padding: 20px;
    border-radius: 8px;
    max-width: 800px;
    margin: 20px auto;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.weq-quiz-header {
    margin-bottom: 30px;
    text-align: center;
}

.weq-quiz-header h2 {
    color: #333;
    margin-bottom: 15px;
}

.weq-quiz-description {
    color: #666;
    margin-bottom: 20px;
}

.weq-timer {
    background: #f8f9fa;
    padding: 10px 15px;
    border-radius: 5px;
    border-left: 4px solid #007cba;
    margin-bottom: 20px;
}

#weq-timer-display {
    font-size: 18px;
    font-weight: bold;
    color: #d63638;
}

.weq-questions {
    margin-bottom: 30px;
}

.weq-q {
    margin-bottom: 25px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 6px;
    border-left: 4px solid #007cba;
}

.weq-q-number {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    margin-bottom: 8px;
    font-weight: 600;
}

.weq-q-title {
    font-size: 16px;
    margin-bottom: 10px;
    color: #333;
}

.weq-q-text {
    margin-bottom: 15px;
    line-height: 1.6;
    color: #555;
}

.weq-q-marks {
    font-size: 12px;
    color: #666;
    font-style: italic;
    margin-top: 10px;
}

.weq-opts {
    margin-left: 10px;
}

.weq-opt {
    display: block;
    margin: 10px 0;
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.weq-opt:hover {
    background: #f0f8ff;
    border-color: #007cba;
}

.weq-opt input[type="radio"],
.weq-opt input[type="checkbox"] {
    margin-right: 8px;
}

.weq-opt label {
    cursor: pointer;
    display: inline;
    font-weight: normal;
}

.weq-form {
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.weq-user-info {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.weq-name,
.weq-email {
    flex: 1;
    min-width: 200px;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.weq-name:focus,
.weq-email:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 1px #007cba;
}

.weq-submit {
    background: #007cba;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.weq-submit:hover {
    background: #005a87;
}

.weq-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.weq-result {
    margin-top: 20px;
    padding: 20px;
    background: #f0f8ff;
    border: 1px solid #007cba;
    border-radius: 6px;
}

.weq-result-content h3 {
    color: #007cba;
    margin-bottom: 15px;
    text-align: center;
}

.weq-score-summary {
    text-align: center;
    margin-bottom: 20px;
}

.weq-score-summary p {
    margin: 8px 0;
    font-size: 16px;
}

.weq-pass-status {
    font-size: 18px;
    padding: 10px;
    border-radius: 4px;
    margin-top: 15px;
}

.weq-passed {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.weq-failed {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.weq-feedback {
    margin-top: 20px;
    border-top: 1px solid #ddd;
    padding-top: 20px;
}

.weq-feedback h4 {
    color: #333;
    margin-bottom: 15px;
}

.weq-feedback-item {
    margin-bottom: 20px;
    padding: 15px;
    background: #fff;
    border-radius: 4px;
    border-left: 3px solid #007cba;
}

.weq-feedback-item p {
    margin: 5px 0;
}

.weq-correct-answer {
    color: #155724;
    font-weight: 600;
}

/* Leaderboard Styles */
.weq-leaderboard {
    max-width: 600px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.weq-leaderboard h3 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
}

.weq-leaderboard-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.weq-leaderboard-item {
    display: flex;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    background: #f9f9f9;
    border-radius: 6px;
    border-left: 4px solid #ddd;
}

.weq-leaderboard-item.weq-top-1 {
    border-left-color: #ffd700;
    background: #fffbf0;
}

.weq-leaderboard-item.weq-top-2 {
    border-left-color: #c0c0c0;
    background: #f8f8f8;
}

.weq-leaderboard-item.weq-top-3 {
    border-left-color: #cd7f32;
    background: #faf7f0;
}

.weq-rank {
    font-size: 18px;
    font-weight: bold;
    color: #666;
    margin-right: 15px;
    min-width: 30px;
}

.weq-top-1 .weq-rank {
    color: #ffd700;
}

.weq-top-2 .weq-rank {
    color: #c0c0c0;
}

.weq-top-3 .weq-rank {
    color: #cd7f32;
}

.weq-details {
    flex: 1;
}

.weq-name {
    font-size: 16px;
    color: #333;
    margin-bottom: 5px;
}

.weq-score {
    font-size: 14px;
    color: #666;
    margin-bottom: 3px;
}

.weq-date {
    font-size: 12px;
    color: #999;
}

/* Responsive Design */
@media (max-width: 600px) {
    .weq-quiz {
        margin: 10px;
        padding: 15px;
    }
    
    .weq-user-info {
        flex-direction: column;
    }
    
    .weq-name,
    .weq-email {
        min-width: auto;
    }
    
    .weq-leaderboard {
        margin: 10px;
        padding: 15px;
    }
    
    .weq-leaderboard-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .weq-rank {
        margin-bottom: 5px;
    }
}
