//
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
//
//
// Adaptable Quiz style sheet
//
// @package    theme_adaptable
// @copyright  &copy; 2025 - G J Barnard
// @author     G J Barnard - {@link http://moodle.org/user/profile.php?id=442195}
// @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
//

// Quiz navigation.
//   Published by Tim Hunt in the moodle forum
//   Some styles are modified for Adaptable
//   Important!: Some colours are hardcoded
//

.que {
    .formulation {
        background-color: transparent !important;
        border: 1px solid var(--ad-main-colour) !important;
        color: var(--ad-font-colour);
    }

    .info {
        background-color: transparent !important;
        border: 1px solid var(--ad-main-colour) !important;
    }
}

.path-mod-quiz #mod_quiz_navblock {
    .qn_buttons {
        margin-right: -14px;
    }

    .qnbutton {
        background: none;
        background-color: var(--ad-main-colour);
        border: 0;
        border-radius: 4px;
        color: var(--ad-link-colour) !important;
        font-size: 14px;
        font-weight: bold;
        height: 45px;
        line-height: 25px !important;
        margin: 0 5px 5px 0;
        width: 35px;

        .thispageholder {
            border: 1px solid #999;
            border-radius: 4px;
            z-index: 1;
        }

        &.thispage .thispageholder {
            border: 3px solid #1f536b;
        }

        &.flagged .thispageholder {
            background: url([[pix:theme|mod/quiz/flag-on]]) 20px 0 no-repeat;
        }

        .trafficlight {
            background: #fff none center 4px / 10px no-repeat scroll;
            border: 0;
            height: 20px;
            margin-top: 25px;
        }

        // Not yet answered.
        &.notyetanswered .trafficlight,
        &.invalidanswer .trafficlight {
            background-color: #fff;
        }

        // Correct answer.
        &.correct .trafficlight {
            background-color: #8bc34a;
        }

        // Blocked.
        &.blocked .trafficlight {
            background-color: #000;
        }

        // Wrong answer.
        &.notanswered .trafficlight,
        &.incorrect .trafficlight {
            background-color: #f44336;
        }

        // Partially correct.
        &.partiallycorrect .trafficlight {
            background-color: #ff9800;
        }

        // Answered.
        &.complete .trafficlight,
        &.answersaved .trafficlight,
        &.requiresgrading .trafficlight {
            background-color: #999;
        }
    }
}

// Fix user image in quiz report.
#page-mod-quiz-report table {
    &#attempts td,
    &.quizresponseanalysis td {
        max-width: 100%;
        min-width: 30px;
    }
}
