/* -------------------------------------- */
/* Warm Grey Palette (no blue tones)      */
/* Accent Option 3 (minimal)              */
/* -------------------------------------- */
/* 
Light bg:          #f7f5f2
Light border:      #e8e6e2
Mid bg:            #ece9e4
Mid border:        #d8d5d0
Hover bg:          #e2dfda
Text dark:         #2f2d2b
Text medium:       #4a4744
Minimal accent:    #7d786f
Minimal sel bg:    #e2dfda
*/

/* Quiztime Frontend Styles */
.quiztime-quiz {
    margin: 0 auto;
    padding: 20px 0;
}

.quiztime-options {
	margin-top: 20px;
}

.quiztime-status-loading {
    border-radius: 15px;
}

.quiztime-notice {
    padding: 20px;
    background: #f7f5f2;
    border: 1px solid #d8d5d0;
    border-radius: 15px;
    color: #4a4744;
    text-align: center;
}

/* Question Container */
.quiztime-question {
    padding: 25px 0;
    border-bottom: 1px solid #e8e6e2;
}

.quiztime-question:last-child {
    border-bottom: none;
}

.quiztime-question-content {
    margin: 10px 0;
}

.quiztime-question-text {
    font-size: 18px;
    line-height: 1.6;
    color: #2f2d2b;
    margin: 0;
    display: inline;
}

/* True/False Container */
.quiztime-tf-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

/* Short Answer Container */
.quiztime-sa-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.quiztime-sa-input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.quiztime-sa-input {
    padding: 12px 16px;
    font-size: 16px;
    border: 1px solid #e8e6e2;
    border-radius: 15px;
    background: #f7f5f2;
    color: #2f2d2b;
    min-width: 200px;
    transition: all 0.2s ease;
}

.quiztime-sa-input:focus {
    outline: none;
    border-color: #d8d5d0;
    background: #ffffff;
}

.quiztime-sa-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.quiztime-sa-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: #f7f5f2;
    border: 1px solid #e8e6e2;
    border-radius: 15px;
    color: #2f2d2b;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.quiztime-sa-submit:hover:not(:disabled) {
    background: #e2dfda;
    transform: translateY(-1px);
}

.quiztime-sa-submit:active:not(:disabled) {
    transform: translateY(0);
}

.quiztime-sa-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.quiztime-sa-submit svg {
    display: block;
}

/* Options (True/False and Multiple Choice) */
.quiztime-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quiztime-options-tf {
    flex-direction: row;
    gap: 15px;
    flex-shrink: 0;
}

.quiztime-option {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: #f7f5f2;
    border: 1px solid #e8e6e2;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quiztime-option:hover {
    background: #e2dfda;
    border-color: #d8d5d0;
}

/* Minimal accent: no strong highlight, just deeper warm grey */
.quiztime-option input[type="radio"]:checked {
    accent-color: #7d786f;
}

.quiztime-option input[type="radio"]:checked ~ .quiztime-option-label {
    background: #e2dfda;
    border-color: #7d786f;
}

.quiztime-option input[type="radio"] {
    margin-right: 12px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    flex-shrink: 0;
    outline: none;
}

.quiztime-option input[type="radio"]:focus {
    outline: none;
}

.quiztime-option-text {
    font-size: 16px;
    font-weight: 500;
    color: #4a4744;
    user-select: none;
    flex: 1;
}

.quiztime-option input[type="radio"]:checked ~ .quiztime-option-text {
    color: #2f2d2b;
    font-weight: 600;
}

/* Feedback */
.quiztime-question-feedback {
    margin-top: 15px;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid;
}

.quiztime-question-feedback.quiztime-correct {
    background: #ecefe8;
    border-left-color: #8aa67a;
}

.quiztime-question-feedback.quiztime-incorrect {
    background: #f4e8e8;
    border-left-color: #c06a6a;
}

.quiztime-feedback-result {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.quiztime-correct {
    color: #6e8d5e;
}

.quiztime-incorrect {
    color: #b34a4a;
}

.quiztime-feedback-explanation {
    margin-top: 10px;
    color: #4a4744;
    line-height: 1.6;
    font-size: 15px;
}

/* Actions */
.quiztime-question-actions {
    margin-top: 15px;
}

.quiztime-quiz-actions {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.quiztime-btn {
    padding: 15px 20px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    background: #f7f5f2;
    color: #2f2d2b;
    border: 1px solid #e8e6e2;
    border-radius: 15px;
    transition: all 0.2s ease;
}

.quiztime-btn:hover:not(:disabled) {
    background: #e2dfda;
    border-color: #d8d5d0;
}

.quiztime-btn:active:not(:disabled) {
    transform: translateY(0);
}

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

.quiztime-load-more {
    background: #f7f5f2;
    color: #2f2d2b;
    border: 1px solid #e8e6e2;
}

.quiztime-load-more:hover:not(:disabled) {
    background: #e2dfda;
    border-color: #d8d5d0;
}

/* Results Section */
.quiztime-results {
    padding: 30px 0;
}

.quiztime-results-title {
    font-size: 24px;
    font-weight: 700;
    color: #2f2d2b;
    margin-bottom: 20px;
}

.quiztime-score {
    margin-bottom: 30px;
    padding: 25px;
    background: #f7f5f2;
    border-radius: 15px;
    border: 1px solid #e8e6e2;
}

/* Score Circle */
.quiztime-score-circle {
    width: 120px;
    height: 120px;
    margin: 0 auto 15px;
    border-radius: 50%;
    background: #e2dfda;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid #c8c5c0;
}

.quiztime-score-value {
    font-size: 36px;
    font-weight: 700;
    color: #2f2d2b;
}

.quiztime-score-text {
    font-size: 18px;
    margin: 0;
    text-align: center;
    color: #4a4744;
}

/* Results Details */
.quiztime-results-details {
    margin-bottom: 20px;
}

.quiztime-result-item {
    padding: 20px;
    margin-bottom: 15px;
    background: #f7f5f2;
    border-radius: 6px;
    border-left: 4px solid #e8e6e2;
}

.quiztime-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.quiztime-result-number {
    font-weight: 600;
    color: #6e6a65;
}

.quiztime-status-correct {
    color: #6e8d5e;
    font-weight: 600;
}

.quiztime-status-incorrect {
    color: #b34a4a;
    font-weight: 600;
}

.quiztime-result-question {
    font-size: 16px;
    font-weight: 500;
    color: #2f2d2b;
    margin-bottom: 10px;
}

.quiztime-result-answer {
    padding: 12px;
    background: #ffffff;
    border-radius: 4px;
    margin-bottom: 10px;
    font-size: 15px;
    color: #2f2d2b;
}

.quiztime-result-answer p {
    margin: 5px 0;
}

.quiztime-result-explanation {
    margin-top: 10px;
    padding: 12px;
    background: #f9f4e7;
    border-left: 3px solid #d6b97a;
    border-radius: 4px;
    color: #6b5a3c;
    line-height: 1.6;
    font-size: 14px;
}

.quiztime-restart-quiz {
    display: inline-block;
}

/* Responsive Design */
@media (max-width: 768px) {
    .quiztime-quiz {
        padding: 15px;
    }
    
    .quiztime-tf-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .quiztime-sa-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .quiztime-sa-input-wrapper {
        width: 100%;
    }
    
    .quiztime-sa-input {
        flex: 1;
        min-width: 0;
    }
    
    .quiztime-options-tf {
        flex-direction: column;
        width: 100%;
    }
    
    .quiztime-option {
        padding: 12px 16px;
    }
    
    .quiztime-question-text {
        display: block;
        margin-bottom: 10px;
    }
}


/* Quiz Generator Styles */
.quiztime-quiz-generator {
    margin: 30px 0;
    padding: 0;
    background: transparent;
}

.quiztime-generator-form {
    width: 100%;
}

.quiztime-generator-input-wrapper {
    display: flex;
    gap: 15px;
    align-items: stretch;
}

/* Input */
.quiztime-generator-input {
    flex: 1;
    padding: 15px 20px;
    font-size: 16px;
    line-height: 1.5;
    font-weight: 400;
    color: #2f2d2b;
    background: #f7f5f2;
    border: 1px solid #e8e6e2;
    border-radius: 16px;
    transition: all 0.2s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.quiztime-generator-input:focus {
    outline: none;
    background: #ffffff;
    border-color: #d8d5d0;
}

.quiztime-generator-input:disabled {
    background-color: #f0eeeb;
    cursor: not-allowed;
    opacity: 0.6;
}

.quiztime-generator-input::placeholder {
    color: #9c9994;
}

/* Button */
.quiztime-generator-button {
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.5;
    color: #2f2d2b;
    background: #f7f5f2;
    border: 1px solid #e8e6e2;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.quiztime-generator-button:hover:not(:disabled) {
    background: #e2dfda;
    border-color: #d8d5d0;
}

.quiztime-generator-button:active:not(:disabled) {
    transform: translateY(0);
}

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

/* Status Boxes */
.quiztime-generator-status {
    margin-top: 16px;
    padding: 15px 20px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

/* Loading */
.quiztime-status-loading {
    background: #f7f5f2;
    color: #4a4744;
    border: 1px solid #e8e6e2;
}

/* Success */
.quiztime-status-success {
    background: #ebece5;
    color: #42663d;
    border: 1px solid #d1d5c8;
}

/* Error */
.quiztime-status-error {
    background: #f4e8e8;
    color: #a23a3a;
    border: 1px solid #e2b3b3;
}

/* Responsive */
@media (max-width: 640px) {
    .quiztime-generator-input-wrapper {
        flex-direction: column;
    }

    .quiztime-generator-button {
        width: 100%;
    }
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    .quiztime-quiz-generator {
        background: transparent;
    }
    
    .quiztime-generator-input {
        background: #2f2d2b !important;
        border-color: #4a4744;
        color: #f7f5f2;
    }
    
    .quiztime-generator-input:focus {
        background: #3a3836;
        border-color: #7d786f;
    }
    
    .quiztime-generator-input::placeholder {
        color: #9e9a94;
    }
    
    .quiztime-generator-button {
        background: #2f2d2b;
        border-color: #4a4744;
        color: #e8e6e2;
    }
    
    .quiztime-generator-button:hover:not(:disabled) {
        background: #3a3836;
        border-color: #6a6763;
    }

    .quiztime-status-loading {
        background: #1b1b1b;
        color: #e8e6e2;
        border: 1px solid #4a4744;
    }

    .quiztime-status-success {
        background: #2f3028;
        color: #9cc08a;
        border: 1px solid #5f705a;
    }

    .quiztime-status-error {
        background: #3a2c2c;
        color: #d3a1a1;
        border: 1px solid #7a5555;
    }
}


/* -------------------------------------- */
/* Dark Mode (Warm Grey minimal accent)   */
/* -------------------------------------- */
@media (prefers-color-scheme: dark) {

    .quiztime-option {
        background: #2f2d2b;
        border-color: #4a4744;
        color: #e8e6e2;
    }

    .quiztime-option:hover {
        background: #3a3836;
        border-color: #6a6763;
    }

    .quiztime-option-text {
        color: #e8e6e2;
    }

    .quiztime-option input[type="radio"] {
        accent-color: #7d786f;
    }

    .quiztime-option input[type="radio"]:checked ~ .quiztime-option-label {
        background: #3a3836;
        border-color: #7d786f;
    }

    .quiztime-option input[type="radio"]:checked ~ .quiztime-option-text {
        color: #ffffff;
    }

    /* Short Answer Dark Mode */
    .quiztime-sa-input {
        background: #2f2d2b;
        border-color: #4a4744;
        color: #e8e6e2;
    }

    .quiztime-sa-input:focus {
        background: #3a3836;
        border-color: #7d786f;
    }

    .quiztime-sa-submit {
        background: #3a3836;
        border-color: #4a4744;
        color: #e8e6e2;
    }

    .quiztime-sa-submit:hover:not(:disabled) {
        background: #4a4744;
        border-color: #6a6763;
    }

    /* Buttons */
    .quiztime-btn,
    .quiztime-load-more {
        background: #2f2d2b;
        border-color: #4a4744;
        color: #e8e6e2;
    }

    .quiztime-btn:hover:not(:disabled),
    .quiztime-load-more:hover:not(:disabled) {
        background: #3a3836;
        border-color: #6a6763;
    }

    /* Generator */
    .quiztime-generator-input {
        background: #2f2d2b !important;
        border-color: #4a4744;
        color: #f7f5f2;
    }
    
    .quiztime-generator-input:focus {
        background: #3a3836;
        border-color: #7d786f;
    }
    
    .quiztime-generator-input::placeholder {
        color: #9e9a94;
    }
    
    .quiztime-generator-button {
        background: #2f2d2b;
        border-color: #4a4744;
        color: #e8e6e2;
    }
    
    .quiztime-generator-button:hover:not(:disabled) {
        background: #3a3836;
        border-color: #6a6763;
    }
	
	.quiztime-question { 
        border-color: #4a4744;
    }
	
	.quiztime-status-loading {
	    background: #1b1b1b;
        color: #e8e6e2;
        border: 1px solid #4a4744;
	}
}
