/* Estilos para el Test Creator Plugin */

.test-creator-container {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.test-creator-container h2 {
    color: #333;
    margin-bottom: 20px;
    border-bottom: 2px solid #007cba;
    padding-bottom: 10px;
}

.test-description {
    margin-bottom: 30px;
    padding: 15px;
    background: #f8f9fa;
    border-left: 4px solid #007cba;
    border-radius: 4px;
}

.test-question {
    margin-bottom: 30px;
    padding: 20px;
    background: #fafafa;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.test-question h4 {
    color: #333;
    margin-bottom: 15px;
    font-size: 18px;
}

.test-answer {
    display: block;
    margin-bottom: 10px;
    padding: 10px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.test-answer:hover {
    background: #f0f8ff;
    border-color: #007cba;
}

.test-answer input[type="radio"] {
    margin-right: 10px;
}

.test-answer.selected {
    background: #e3f2fd;
    border-color: #007cba;
}

.test-submit-btn {
    background: #007cba;
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
    display: block;
    margin: 30px auto 0;
}

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

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

.test-result {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.test-result h3 {
    color: #007cba;
    margin-bottom: 20px;
}

.result-content {
    margin-bottom: 20px;
}

.result-content h4 {
    color: #333;
    margin-bottom: 10px;
}

.result-content p {
    line-height: 1.6;
    color: #666;
}

.test-restart-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.test-restart-btn:hover {
    background: #218838;
}

/* Estilos para el admin */
.question-item {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f9f9f9;
}

.question-item h4 {
    margin-top: 0;
    color: #333;
}

.answers-container {
    margin-top: 15px;
}

.answer-item {
    margin-bottom: 10px;
    padding: 10px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.answer-item input[type="text"] {
    margin-right: 10px;
}

.answer-item input[type="number"] {
    margin-right: 10px;
}

.add-answer, .remove-answer, .remove-question {
    background: #007cba;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    margin-right: 5px;
}

.remove-answer, .remove-question {
    background: #dc3545;
}

.add-answer:hover {
    background: #005a87;
}

.remove-answer:hover, .remove-question:hover {
    background: #c82333;
}

#add-question {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 20px;
}

#add-question:hover {
    background: #218838;
}

.result-item {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f9f9f9;
}

.result-item input[type="number"] {
    width: 80px;
    margin-right: 15px;
}

.result-item input[type="text"] {
    margin-bottom: 10px;
}

.result-item textarea {
    margin-bottom: 10px;
}

.remove-result {
    background: #dc3545;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.remove-result:hover {
    background: #c82333;
}

#add-result {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-top: 20px;
}

#add-result:hover {
    background: #218838;
}

/* Loader */
.test-loading {
    text-align: center;
    padding: 20px;
}

.test-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .test-creator-container {
        margin: 10px;
        padding: 15px;
    }
    
    .test-question {
        padding: 15px;
    }
    
    .test-submit-btn {
        width: 100%;
    }
    
    .answer-item input[type="text"] {
        width: 100%;
        margin-bottom: 5px;
    }
}