/* TOLIMO Reading Comprehension Quiz Styles */

/* Toolbar */
.trcq-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: blue;
    position: sticky;
    padding: 10px;
    top: 0;
    z-index: 10;
    gap: 15px;
}

.trcq-timer {
    font-size: 18px;
    font-weight: bold;
    color: white;
    white-space: nowrap;
}

.trcq-timer.warning {
    color: red;
}

.trcq-score {
    font-size: 18px;
    font-weight: bold;
    color: red;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.trcq-passage-indicator {
    font-size: 16px;
    font-weight: 700;
    color: white;
    flex-grow: 1;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trcq-quiz-buttons {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

/* Instruction Section */
.trcq-instruction-section {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border-left: 4px solid #0073aa;
    border-radius: 4px;
}

.trcq-instruction-section p {
    margin: 0 0 10px 0;
}

.trcq-instruction-section img,
.trcq-instruction-section video,
.trcq-instruction-section audio {
    max-width: 100%;
    height: auto;
    margin: 10px 0;
}

/* Main Container */
.trcq-question-reading-container {
    display: flex;
    flex-direction: row;
    height: calc(100vh - 60px);
    overflow: hidden;
}

/* Question Column */
.trcq-question-text {
    width: 40%;
    max-height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 10px;
    border: 1px solid #ccc;
    background-color: #fff;
}

.trcq-question-text.multiple-choice,
.trcq-question-text.listening-gap-fill {
    width: 100%;
}

.trcq-question-text.with-script {
    width: 50%;
}

/* Reading Column */
.trcq-reading-text {
    width: 60%;
    max-height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 10px;
    border: 0px solid #ccc;
    display: block;
    transition: width 0.3s ease;
}

.trcq-reading-text.hidden {
    width: 0;
    display: none;
}

.trcq-reading-text.show-script {
    width: 60%;
    display: block;
}

/* Passage and Script Content */
.trcq-reading-text .passage,
.trcq-reading-text .script {
    font-family: sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: black;
    line-height: 1.6;
}

.trcq-reading-text .passage table {
    border-collapse: collapse;
    width: 100%;
    margin: 10px 0;
}

.trcq-reading-text .passage table,
.trcq-reading-text .passage th,
.trcq-reading-text .passage td {
    border: 1px solid #ddd;
    padding: 8px;
}

.trcq-reading-text .passage th {
    background-color: #f2f2f2;
}

.trcq-reading-text .passage p {
    margin: 0 0 1em 0;
    margin-top: 15px;
}



/* Question Containers */
.trcq-question-container {
    display: none;
    margin-bottom: 30px;
    padding: 20px;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.trcq-question-container.active {
    display: block;
}

.trcq-question-container strong {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 18px;
    font-weight: bold;
    color: #000;
    display: block;
    line-height: 1.6;
    margin-bottom: 20px;
}

.trcq-question-container label {
    display: block;
    margin: 12px 0;
    padding: 12px 15px;
    background-color: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.trcq-question-container label:hover {
    background-color: #e9f7fe;
    border-color: #0073aa;
}

.trcq-question-container label input[type="radio"] {
    margin-right: 10px;
    transform: scale(1.2);
}

.trcq-question-container label.trcq-correct {
    background-color: #30e67f !important; /* Dark green */
    border-color: #003300 !important;
    color: white !important; /* Optional: make text white for contrast */
}

.trcq-question-container label.trcq-incorrect {
    background-color: #f8d7da !important;
    border-color: #dc3545 !important;
    color: #721c24 !important;
}


.trcq-passage,
.trcq-script {
    display: none;
}

.trcq-passage.active,
.trcq-script.active {
    display: block;
}

/* Feedback */
.trcq-feedback-section {
    margin-top: 30px;
    padding: 10px;
    border-top: 1px solid #ccc;
}

.trcq-feedback-item {
    margin-bottom: 10px;
    font-size: 16px;
}

.trcq-feedback-item.correct {
    color: green;
}

.trcq-feedback-item.incorrect {
    color: red;
}

.trcq-feedback-item.unattempted {
    color: red;
}

.trcq-feedback {
    margin-top: 10px;
    font-weight: normal;
    display: none;
    font-size: 18px;
    color: Blue;
}

/* Highlighting */
.trcq-highlight {
    background-color: yellow;
    padding: 2px 5px;
    border-radius: 4px;
}

.trcq-correct {
    background-color: #004d00; /* Darker green */
    padding: 5px;
    border-radius: 3px;
}

.trcq-incorrect {
    background-color: lightcoral;
    padding: 5px;
    border-radius: 3px;
}

/* Buttons */
.trcq-button {
    padding: 5px 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    background-color: #0073aa;
    color: white;
}

.trcq-button:disabled {
    background-color: #f0f0f0;
    color: #ccc;
    cursor: not-allowed;
}

.trcq-button.active {
    background-color: green;
    color: white;
}

.trcq-submit-button {
    background-color: #4CAF50;
    color: white;
}

.trcq-show-script-button {
    background-color: #ff9800;
}

/* Cloze Test Styles */
.trcq-cloze-text {
    font-family: Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    max-width: 800px;
    margin: 20px auto;
}

.trcq-cloze-text p {
    margin: 0;
    white-space: normal;
}

.trcq-cloze-placeholder {
    display: inline-block;
    width: 100px;
    text-align: center;
    border: 1px solid #000;
    border-radius: 0;
    background-color: #e0e0e0;
    padding: 2px 8px;
    cursor: pointer;
    font-weight: bold;
    color: #333;
}

.trcq-cloze-placeholder:hover {
    background-color: #d0d0d0;
}

.trcq-cloze-input {
    width: 100px;
    padding: 2px 8px;
    border: 1px solid #000;
    border-radius: 0;
    font-size: 16px;
    background-color: #fff;
    outline: none;
    box-sizing: border-box;
    vertical-align: middle;
}

.trcq-cloze-input:focus {
    border-color: #000;
    background-color: #fff;
}

.trcq-cloze-input.correct {
    background-color: lightgreen;
}

.trcq-cloze-input.incorrect {
    background-color: lightcoral;
}

.trcq-cloze-input.unattempted {
    color: red;
    background-color: transparent;
}

.trcq-cloze-container {
    display: inline-block;
    margin: 0 4px;
    vertical-align: middle;
}

.trcq-highlighting-section {
    display: none;
}

/* Quiz Form */
.trcq-quiz-form {
    margin: 0;
    padding: 0;
}

/* Accessibility */
.trcq-quiz-form input[type="radio"],
.trcq-quiz-form input[type="text"] {
    margin-right: 8px;
}

.trcq-quiz-form label {
    cursor: pointer;
    user-select: none;
}

