.quiz-description {
    margin: 20px 0;
    padding: 15px;
    border: 1px solid #f1eeee;
    border-radius: 4px;
    background-color: #ffffff;
}

.quiz-description p {
    margin: 0 0 10px;
}

.quiz-description p:last-child {
    margin-bottom: 0;
}

.studiare-quiz .quiz-page {
    margin-bottom: 20px;
}

.studiare-quiz .quiz-pagination {
    margin-top: 20px;
    text-align: center;
}

.studiare-quiz .quiz-pagination button {
    padding: 10px 20px;
    margin: 0 5px;
    background-color: #0073aa;
    color: white;
    border: none;
    cursor: pointer;
}

.studiare-quiz .quiz-pagination .button.submit {
    background-color: #8BC34A;
}

.studiare-quiz .quiz-pagination button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.studiare-quiz .quiz-question {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #e5e5e5;
    border-radius: 5px;
    background-color: #fff;
}

.studiare-quiz .quiz-question-image {
    margin-bottom: 15px;
}

.studiare-quiz .quiz-question-image img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}

.studiare-quiz .quiz-question-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.studiare-quiz .quiz-question-description {
    margin-bottom: 15px;
    color: #555;
    font-size: 14px;
    line-height: 1.5;
}

.studiare-quiz .quiz-timer {
    margin: 20px 0;
    padding: 10px;
    border: 1px solid #ffeeba;
    border-radius: 5px;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    background-color: #fff3cd;
    color: #856404;
}

.studiare-quiz .quiz-timer .timer-display {
    display: inline-block;
    color: #856404;
    font-weight: 700;
    font-size: 22px;
    direction: ltr;
}

.studiare-quiz .quiz-timer .timer-minutes,
.studiare-quiz .quiz-timer .timer-seconds {
    display: inline-block;
    min-width: 20px;
    text-align: right;
}

.studiare-quiz .quiz-start {
    text-align: center;
    margin-bottom: 20px;
}

.studiare-quiz .start-quiz-button {
    padding: 12px 30px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.studiare-quiz .start-quiz-button:hover {
    background-color: #218838;
}

.studiare-quiz .quiz-pre-start {
    text-align: center;
    margin-bottom: 20px;
}

.studiare-quiz .quiz-pre-start p {
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
}

.studiare-quiz .quiz-start-countdown {
    padding: 20px;
    background: linear-gradient(135deg, #f0f4ff 0%, #e6f0ff 100%);
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    font-size: 22px;
    font-weight: 700;
    color: #005f99 !important;
    text-align: center;
    direction: rtl;
}

.studiare-quiz .quiz-start-countdown .countdown-display {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 10px 15px;
    border-radius: 8px;
    margin: 0 5px;
}

.studiare-quiz .quiz-start-countdown .countdown-days,
.studiare-quiz .quiz-start-countdown .countdown-hours,
.studiare-quiz .quiz-start-countdown .countdown-minutes,
.studiare-quiz .quiz-start-countdown .countdown-seconds {
    display: inline-block;
    min-width: 40px;
    text-align: center;
    background-color: #0073aa;
    color: #ffffff;
    padding: 5px 8px;
    border-radius: 5px;
    margin: 0 3px;
    font-size: 18px;
}

.studiare-quiz .quiz-ended {
    text-align: center;
    margin-bottom: 20px;
}

.studiare-quiz .quiz-ended p {
    font-size: 18px;
    color: #d9534f;
    font-weight: 600;
}

.quiz-previous-results {
    background: #E3F2FD;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.studiare-quiz .quiz-restricted {
    text-align: center;
    margin: 20px 0;
    background: #fff3f3;
    border-radius: 5px;
    padding: 25px 15px;
}

.studiare-quiz .quiz-restricted p {
    font-size: 18px;
    color: #d9534f;
    font-weight: 600;
    margin-bottom: 10px;
}

.studiare-quiz .quiz-login-link,
.studiare-quiz .quiz-product-link {
    display: inline-block;
    padding: 10px 20px;
    background-color: #0073aa;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    margin: 5px;
}

.studiare-quiz .quiz-login-link:hover,
.studiare-quiz .quiz-product-link:hover {
    background-color: #005177;
}

.studiare-quiz #quiz-result {
    margin-top: 20px;
}

.studiare-quiz .quiz-controls {
    margin-top: 20px;
    text-align: center;
}

.studiare-quiz-results {
    margin-bottom: 20px;
}

.studiare-quiz-results-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.studiare-quiz-results-table th,
.studiare-quiz-results-table td {
    border: 1px solid #e0e0e0;
    padding: 10px;
    text-align: left;
}

.studiare-quiz-results-table th {
    background-color: #f4f4f4;
    font-weight: bold;
}

.studiare-quiz-results-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.studiare-quiz-results-table td {
    vertical-align: middle;
    padding: 10px;
}

.quiz-attempts-details {
    margin-top: 10px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f9f9f9;
}

.quiz-attempt {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.quiz-attempt:last-child {
    border-bottom: none;
}

.quiz-attempt p {
    margin: 5px 0;
}

.show-all-attempts {
    margin-top: 10px;
    padding: 5px 10px;
    background-color: #0073aa;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.show-all-attempts:hover {
    background-color: #005d87;
}

.quiz-stats-table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
}

.quiz-stats-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: center;
}

.quiz-stats-table tr:first-child td {
    font-weight: bold;
    background-color: #f0f0f0;
}

.quiz-stats-table tr:last-child td {
    background-color: #f9f9f9;
}

/* Styles for pass/fail status */
.status-passed {
    color: #28a745;
    font-weight: 600;
}

.status-failed {
    color: #d9534f;
    font-weight: 600;
}

/* Style for status column in results table */
.quiz-status {
    font-size: 14px;
    text-align: center;
}

/* Styles for modal */
.quiz-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.quiz-modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    border-radius: 5px;
    position: relative;
}

.quiz-modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.quiz-modal-close:hover,
.quiz-modal-close:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

/* Accordion styles */

.quiz-results-accordion .sc-accordion-toggle {
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 12px 15px;
    width: 100%;
    text-align: left;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    transition: background-color 0.3s, border-color 0.3s;
    position: relative;
}

.quiz-results-accordion .sc-accordion-toggle:hover {
    background-color: #e8e8e8;
    border-color: #ccc;
}

.quiz-results-accordion .sc-accordion-toggle::after {
    content: "\f107";
    font-family: "Font Awesome 5 Pro";
    font-size: 12px;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s;
}

.quiz-results-accordion .sc-accordion-toggle.active::after {
    content: "\f107";
    font-family: "Font Awesome 5 Pro";
    transform: translateY(-50%) rotate(180deg);
}

.quiz-results-accordion .accordion-content {
    display: none;
    padding: 15px;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    background-color: #fff;
}

.quiz-results-accordion .accordion-content.active {
    display: block;
}

.quiz-results-accordion .quiz-result-entry {
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    margin-bottom: 10px;
    background-color: #f9f9f9;
}

.quiz-results-accordion .quiz-result-entry:last-child {
    margin-bottom: 0;
}

.quiz-results-accordion .quiz-result-entry p {
    margin: 5px 0;
}

.studiare-quiz .quiz-question {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    background-color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    direction: rtl;
}

.studiare-quiz .quiz-question h4 {
    font-size: 20px;
    color: #1976d2;
    margin-bottom: 10px;
}

.studiare-quiz .quiz-question-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.studiare-quiz .quiz-question-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

.studiare-quiz .quiz-question label {
    display: flex;
    align-items: center;
    background: #f7f7f7;
    border-radius: 6px;
    padding: 12px 34px;
    margin-bottom: 12px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid transparent;
}

.studiare-quiz .quiz-question input[type="radio"] {
    display: none;
}

.studiare-quiz .quiz-question input[type="radio"]:checked + label {
    background-color: #e3f2fd;
    border-color: #90caf9;
    color: #0d47a1;
}

.studiare-quiz .quiz-question input[type="radio"]:checked + label::before {
    content: "✔";
    font-weight: bold;
    color: green;
    position: absolute;
    left: 15px;
    font-size: 18px;
}

.studiare-quiz .quiz-question label:hover {
    background-color: #eeeeee;
}

.studiare-quiz .quiz-question label::before {
    content: "\f0c8";
    font-family: 'Font Awesome 5 Pro';
    font-weight: bold;
    color: #cccccc;
    position: absolute;
    left: 10px;
    font-size: 18px;
}

.studiare-quiz .quiz-question label.selected {
    background-color: #e3f2fd;
    border-color: #90caf9;
    color: #0d47a1;
    position: relative;
}

.studiare-quiz .quiz-question label.selected::before {
    content: "\f14a";
    font-weight: bold;
    color: green;
    position: absolute;
    font-size: 18px;
}



/* RTL support for Studiare theme */
body.rtl .studiare-quiz-results-table th,
body.rtl .studiare-quiz-results-table td {
    text-align: right;
}

body.rtl .quiz-status {
    text-align: center;
}

body.rtl .quiz-modal-close {
    float: left;
}

body.rtl .quiz-results-accordion .sc-accordion-toggle {
    text-align: right;
}

body.rtl .quiz-results-accordion .sc-accordion-toggle::after {
    right: auto;
    left: 15px;
}

body.rtl .studiare-quiz .quiz-question label::before {
    right: 10px;
    left: auto;
}

/* Dark mode support for Studiare theme */
body.scdarkcolors .quiz-description,
body.scdarkcolors .quiz-attempts-details,
body.scdarkcolors .quiz-attempt,
body.scdarkcolors .quiz-results-accordion .accordion-content,
body.scdarkcolors .quiz-previous-results,
body.scdarkcolors .studiare-quiz .quiz-restricted,
body.scdarkcolors .studiare-quiz .quiz-question label:hover,
body.scdarkcolors .studiare-quiz .quiz-question label.selected{
    background-color: var(--dark_secondary_color);
    border-color: var(--dark_primary_color);
    color: #fff;
}

body.scdarkcolors .studiare-quiz .quiz-question,
body.scdarkcolors .quiz-stats-table tr:last-child td,
body.scdarkcolors .quiz-modal-content,
body.scdarkcolors .studiare-quiz .quiz-start-countdown,
body.scdarkcolors .studiare-quiz .quiz-timer,
body.scdarkcolors .quiz-results-accordion .sc-accordion-toggle {
    background-color: var(--dark_secondary_color);
    border-color: var(--dark_primary_color);
    color: #fff;
}

body.scdarkcolors .studiare-quiz-results-table th,
body.scdarkcolors .studiare-quiz-results-table tr:nth-child(even),
body.scdarkcolors .quiz-stats-table tr:first-child td {
    background-color: var(--dark_primary_color);
    color: #fff;
}

body.scdarkcolors .studiare-quiz-results-table td,
body.scdarkcolors .studiare-quiz-results-table th,
body.scdarkcolors .quiz-stats-table td,
body.scdarkcolors .quiz-results-accordion .sc-accordion-toggle {
    border-color: var(--dark_primary_color);
}

body.scdarkcolors .quiz-results-accordion .sc-accordion-toggle:hover,
body.scdarkcolors .studiare-quiz .quiz-question label{
    background-color: var(--dark_primary_color);
}

body.scdarkcolors .quiz-result-details:hover,
body.scdarkcolors .studiare-quiz-results-table a.quiz-result-details:hover {
    color: #fff;
}

body.scdarkcolors .quiz-modal-close {
    color: #ccc;
}

body.scdarkcolors .quiz-modal-close:hover,
body.scdarkcolors .quiz-modal-close:focus {
    color: #fff;
}

body.scdarkcolors .studiare-quiz .quiz-question-description,
body.scdarkcolors .studiare-quiz .quiz-pre-start p,
body.scdarkcolors .studiare-quiz .quiz-ended p,
body.scdarkcolors .studiare-quiz .quiz-restricted p,
body.scdarkcolors .quiz-attempt p,
body.scdarkcolors .quiz-results-accordion .quiz-result-entry p {
    color: #ddd;
}

body.scdarkcolors .quiz-result-entry, body.scdarkcolors .quiz-attempt {
    background-color: var(--dark_primary_color);
    border-color: var(--dark_border_color);
}