/**
// This file is part of mod_openbook for Moodle - http://moodle.org/
//
// It 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.
//
// It 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
// If not, see <http://www.gnu.org/licenses/>.
*/
/**
 * Styles for mod_openbook
 *
 * @package       mod_openbook
 * @author        University of Geneva, E-Learning Team
 * @author        Academic Moodle Cooperation {@link http://www.academic-moodle-cooperation.org}
 * @copyright     2025 University of Geneva {@link http://www.unige.ch}
 * @license       http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
 */

/* General Styles */

#page-mod-openbook-view div.availability {
    margin-bottom: 10px;
    margin-left: 10px;
}

#page-mod-openbook-view div.availability div {
    clear: both;
}

#page-mod-openbook-view div.availability span {
    display: block;
    float: left;
    min-width: 170px;
}

#page-mod-openbook-view div.assignurl {
    margin-bottom: 10px;
    margin-left: 10px;
}

#page-mod-openbook-view div.assignurl div.singlebutton,
#page-mod-openbook-view div.assignurl div.singlebutton form,
#page-mod-openbook-view div.assignurl div.singlebutton form div {
    display: inline;
}

#page-mod-openbook-view div.assignurl div.singlebutton form div {
    padding-left: 10px;
}

#page-mod-openbook-view fieldset#id_myfiles table {
    margin-left: 8px;
}

#page-mod-openbook-view fieldset#id_myfiles table#myfilestable td {
    padding: 5px;
}

/* scroll table if page is too small */
#page-mod-openbook-view div#id_allfiles {
    border: 1px solid #d0d3ca;
    margin: 10px;
    padding: 10px;
}

#page-mod-openbook-view div#id_allfiles div.legend {
    background-color: #fff;
    font-weight: bold;
    margin-top: -20px;
    padding: 2px 5px;
    position: absolute;
}

/* .. ie */
.ie#page-mod-openbook-view fieldset#id_allfiles {
    display: block;
}

/* end scroll */

#page-mod-openbook-view fieldset#id_allfiles div div.no-overflow {
    margin-bottom: 1em;
    padding-bottom: 0;
}

#page-mod-openbook-view fieldset#id_allfiles table#attempts {
    margin-bottom: 0;
}

#page-mod-openbook-view fieldset#id_allfiles table#attempts span.timemodified {
    font-size: 0.9em;
    font-style: italic;
}

#page-mod-openbook-view fieldset#id_allfiles {
    padding-top: 4px;
}

#page-mod-openbook-view div.mod-openbook-download-link {
    text-align: right;
}

#page-mod-openbook-view div#id_allfiles table#attempts th.c0,
#page-mod-openbook-view div#id_allfiles table#attempts td.c0 {
    text-align: center;
}

#page-mod-openbook-view table.filetable,
#page-mod-openbook-view table.filetable td,
#page-mod-openbook-view table.filetable tr,
#page-mod-openbook-view table.statustable,
#page-mod-openbook-view table.statustable td,
#page-mod-openbook-view table.statustable tr,
#page-mod-openbook-view table.permissionstable,
#page-mod-openbook-view table.permissionstable td,
#page-mod-openbook-view table.permissionstable tr {
    border-width: 0;
    padding: 1px 3px 1px 1px;
    white-space: nowrap;
    height: 2.5rem !important; /* stylelint-disable-line declaration-no-important */
}

#page-mod-openbook-view table.statustable tbody td,
#page-mod-openbook-view table.permissionstable tbody td,
#page-mod-openbook-view table.filetable tbody td {
    background-color: transparent;
}

#page-mod-openbook-view table.statustable td,
#page-mod-openbook-view table.filetable td {
    height: 30px;
}

#page-mod-openbook-view table.statustable {
    text-align: center;
    width: 100%;
}

#page-mod-openbook-view table.permissionstable {
    text-align: left;
    width: 100%;
}

#page-mod-openbook-view table.permissionstable select {
    margin-bottom: 0;
}

#page-mod-openbook-view div.withselection select {
    margin-left: 4px;
    margin-right: 4px;
}

#page-mod-openbook-view .visibilitysaver {
    float: right;
}

#page-mod-openbook-view #dates {
    border-width: 0;
}

#page-mod-openbook-view #dates .c0 {
    text-align: left;
}

#page-mod-openbook-view #dates td {
    padding-bottom: 0;
    padding-top: 0;
}

#page-mod-openbook-upload .fstatic,
#page-mod-openbook-upload .fstaticlabel {
    font-style: italic;
}

#page-mod-openbook-view fieldset#id_myfiles .notice {
    font-style: italic;
    margin-bottom: 6px;
    padding: 8px;
}

#page-mod-openbook-mod select[name=importfrom] option[disabled] {
    color: #999;
}

.path-mod-openbook .openbooks table tr:nth-of-type(2n+1),
.path-mod-openbook .openbooks table tr:hover {
    background-color: transparent;
}

.path-mod-openbook .statustable .approvaldetails {
    display: none;
}

.path-mod-openbook .statustable .approvaldetails img {
    cursor: pointer;
}

.path-mod-openbook .openbookoverlay table {
    margin-left: auto;
    margin-right: auto;
}

.path-mod-openbook .openbookoverlay table td,
.path-mod-openbook .openbookoverlay table th {
    padding: 0 5px;
}

.path-mod-openbook .openbookoverlay table td,
.path-mod-openbook .openbookoverlay table th,
.path-mod-openbook .openbookoverlay table tr {
    border: none;
}

.path-mod-openbook .openbookoverlay table td.noentries {
    text-align: center;
}

.path-mod-openbook .openbookoverlay table td.time {
    text-align: right;
}

.path-mod-openbook .modal .modal-body {
    max-width: 100%;
    overflow: auto;
}

.path-mod-openbook table#attempts select.needs-approval {
    border: 0.2rem solid var(--info);
}

.path-mod-openbook table#attempts .needs-approval-asterisk {
    font-size: 1.2rem;
    display: inline-block;
    margin-left: 0.2rem;
}

.path-mod-openbook #id_myfilescontainer #fgroup_id_uploadgrp .col-form-label {
    display: none !important; /* stylelint-disable-line declaration-no-important */
}

#page-mod-openbook-upload #fitem_id_guideline .form-inline {
    align-items: flex-end !important; /* stylelint-disable-line declaration-no-important */
}

#page-mod-openbook-view.allfilespage .activity-header {
    display: none;
}

/* disabled links */

.disabled-link {
    color: #999;                          /* texte grisé */
    cursor: not-allowed;                    /* montre que ce n’est pas cliquable */
    text-decoration: line-through;          /* barre le texte */
}

.disabled-link:hover {
    text-decoration: line-through;          /* barre le texte */
}
