/**
 * AIMarker Practice Quiz Styles
 *
 * @package AIMarker
 * @since 1.0.0
 */

/* Practice Quiz Container */
.aimarker-practice-quiz-container,
.aimarker-practice-history-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.aimarker-practice-quiz-header,
.aimarker-practice-history-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.aimarker-practice-quiz-header h2,
.aimarker-practice-history-header h2 {
    margin: 0;
    color: #333;
    font-size: 28px;
    font-weight: 600;
}

/* Quiz Setup Form */
.aimarker-quiz-setup {
    padding: 20px;
}

.aimarker-form-group {
    margin-bottom: 20px;
}

.aimarker-form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
    font-size: 14px;
}

.aimarker-form-group select,
.aimarker-form-group input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.aimarker-form-group select:focus,
.aimarker-form-group input[type="text"]:focus {
    outline: none;
    border-color: #0073aa;
}

/* Buttons */
.aimarker-button {
    display: inline-block;
    padding: 12px 24px;
    background: #f7f7f7;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.aimarker-button:hover {
    background: #f0f0f0;
}

.aimarker-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.aimarker-button-primary {
    background: #0073aa;
    border-color: #0073aa;
    color: #fff;
}

.aimarker-button-primary:hover {
    background: #005177;
}

.aimarker-button-success {
    background: #46b450;
    border-color: #46b450;
    color: #fff;
}

.aimarker-button-success:hover {
    background: #3a9a42;
}

.aimarker-button-danger {
    background: #dc3232;
    border-color: #dc3232;
    color: #fff;
}

.aimarker-button-danger:hover {
    background: #b82b2b;
}

/* Quiz Questions */
.aimarker-quiz-questions {
    padding: 20px;
}

.aimarker-quiz-progress {
    margin-bottom: 30px;
}

.aimarker-progress-bar {
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.aimarker-progress-fill {
    height: 100%;
    background: #0073aa;
    transition: width 0.3s ease;
}

.aimarker-progress-text {
    text-align: center;
    color: #666;
    font-size: 14px;
}

.aimarker-question-container {
    margin-bottom: 30px;
}

.aimarker-question {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.aimarker-question-type {
    display: inline-block;
    padding: 4px 12px;
    background: #0073aa;
    color: #fff;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 12px;
}

.aimarker-question-text {
    font-size: 16px;
    color: #333;
    line-height: 1.6;
    margin-bottom: 20px;
}

.aimarker-question-options {
    list-style: none;
    padding: 0;
    margin: 0;
}

.aimarker-question-options li {
    margin-bottom: 12px;
}

.aimarker-option-label {
    display: flex;
    align-items: center;
    padding: 12px;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.aimarker-option-label:hover {
    border-color: #0073aa;
    background: #f0f8ff;
}

.aimarker-option-label input[type="radio"],
.aimarker-option-label input[type="checkbox"] {
    margin-right: 12px;
    cursor: pointer;
}

.aimarker-option-label.selected {
    border-color: #0073aa;
    background: #e6f3ff;
}

.aimarker-fill-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.aimarker-fill-input:focus {
    outline: none;
    border-color: #0073aa;
}

/* Quiz Navigation */
.aimarker-quiz-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.aimarker-quiz-navigation .aimarker-button {
    min-width: 120px;
}

/* Quiz Results */
.aimarker-quiz-results {
    padding: 20px;
}

.aimarker-results-header {
    text-align: center;
    margin-bottom: 30px;
}

.aimarker-results-header h3 {
    margin: 0;
    color: #333;
    font-size: 24px;
}

.aimarker-results-summary {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 30px;
    padding: 30px;
    background: #f9f9f9;
    border-radius: 8px;
}

.aimarker-result-score,
.aimarker-result-correct {
    text-align: center;
}

.aimarker-score-value,
.aimarker-correct-value {
    font-size: 48px;
    font-weight: 700;
    color: #0073aa;
    margin-bottom: 8px;
}

.aimarker-score-label,
.aimarker-correct-label {
    font-size: 14px;
    color: #666;
}

.aimarker-results-details {
    margin-bottom: 30px;
}

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

.aimarker-result-item.correct {
    border-left-color: #46b450;
}

.aimarker-result-item.incorrect {
    border-left-color: #dc3232;
}

.aimarker-result-question {
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.aimarker-result-answer {
    margin: 8px 0;
    font-size: 14px;
}

.aimarker-result-answer span {
    font-weight: 500;
    color: #666;
}

.aimarker-result-answer .correct {
    color: #46b450;
}

.aimarker-result-answer .incorrect {
    color: #dc3232;
}

.aimarker-result-explanation {
    margin-top: 10px;
    padding: 12px;
    background: #fff;
    border-radius: 4px;
    font-size: 14px;
    color: #555;
}

.aimarker-results-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* Practice History */
.aimarker-history-list {
    min-height: 200px;
}

.aimarker-history-item {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 15px;
    border-left: 4px solid #0073aa;
    cursor: pointer;
    transition: all 0.3s;
}

.aimarker-history-item:hover {
    background: #f0f8ff;
    transform: translateX(5px);
}

.aimarker-history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.aimarker-history-subject {
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

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

.aimarker-history-info {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: #666;
}

.aimarker-history-info span {
    display: flex;
    align-items: center;
}

.aimarker-history-score {
    font-weight: 600;
    color: #0073aa;
}

.aimarker-history-pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.aimarker-pagination-btn {
    padding: 8px 16px;
    background: #f7f7f7;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.aimarker-pagination-btn:hover {
    background: #f0f0f0;
}

.aimarker-pagination-btn.active {
    background: #0073aa;
    border-color: #0073aa;
    color: #fff;
}

.aimarker-pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Modal */
.aimarker-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.aimarker-modal-content {
    background: #fff;
    border-radius: 8px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.aimarker-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.aimarker-modal-header h3 {
    margin: 0;
    color: #333;
}

.aimarker-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    transition: color 0.3s;
}

.aimarker-modal-close:hover {
    color: #333;
}

.aimarker-modal-body {
    padding: 20px;
}

/* Messages */
.aimarker-message {
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.aimarker-error {
    background: #fff5f5;
    border: 1px solid #fecaca;
    color: #dc3232;
}

.aimarker-success {
    background: #f0fff4;
    border: 1px solid #9ae6b4;
    color: #46b450;
}

.aimarker-info {
    background: #ebf8ff;
    border: 1px solid #bee3f8;
    color: #0073aa;
}

/* Loading */
.aimarker-loading {
    text-align: center;
    padding: 40px;
    color: #999;
}

/* Responsive */
@media (max-width: 768px) {
    .aimarker-practice-quiz-container,
    .aimarker-practice-history-container {
        padding: 15px;
    }
    
    .aimarker-results-summary {
        flex-direction: column;
        gap: 20px;
    }
    
    .aimarker-history-info {
        flex-direction: column;
        gap: 8px;
    }
    
    .aimarker-quiz-navigation {
        flex-direction: column;
        gap: 10px;
    }
    
    .aimarker-quiz-navigation .aimarker-button {
        width: 100%;
    }
}
