/**
 * Collapsed Topics Information
 *
 * A topic based format that solves the issue of the 'Scroll of Death' when a course has many topics. All topics
 * except zero have a toggle that displays that topic. One or more topics can be displayed at any given time.
 * Toggles are persistent on a per browser session per course basis but can be made to persist longer by a small
 * code change. Full installation instructions, code adaptions and credits are included in the 'Readme.txt' file.
 *
 * @package    format_topcoll
 * @version    See the value of '$plugin->version' in version.php.
 * @copyright  &copy; 2009-onwards G J Barnard in respect to modifications of standard topics format.
 * @author     G J Barnard - gjbarnard at gmail dot com and {@link http://moodle.org/user/profile.php?id=442195}
 * @link       http://docs.moodle.org/en/Collapsed_Topics_course_format
 * @license    http://www.gnu.org/copyleft/gpl.html GNU Public License
 *
 * This program 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.

 * This program 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 this program.  If not, see <http://www.gnu.org/licenses/>.
*/

.course-content ul.ctopics {
    margin: 0;
    padding-left: 0;
    padding-right: 0;
}

.course-content ul.ctlayout {
    display: inline-block;
    vertical-align: top;
}

.course-content ul.ctopics li.section.main .left,
.course-content ul.ctopics li.section.main .right {
    /* Fix for Bootstrap V3 based themes in less/moodle/course.less . */
    display: block;
}

.course-content ul.ctopics li.section.main,
.course-content ul.ctopics li.tcsection {
    border-bottom: 0;
    list-style: none;
    margin: 4px 1px 1px 1px;
    padding: 0;
}
.course-content ul.ctopics li.section.main,
.course-content ul.ctopics li.tcsection,
.format-topcoll .course-content .single-section .section-navigation {
    position: relative;
}

.format-topcoll.path-course-view .completionprogress {
    z-index: 1;
}

.course-content ul.ctopics.bsnewgrid li.section.main,
.course-content ul.ctopics.bsnewgrid li.tcsection {
    margin: 0;
}

/* Fix for ordered and unordered list in course topic summary & course weekly summary - from theme/base/style/core.css
 * See: https://moodle.org/mod/forum/discuss.php?d=251944.
 */
.course-content ul.ctopics .content .summary ul,
.course-content ul.ctopics .content .summarytext ul {
    list-style: disc outside none;
}
.course-content ul.ctopics .content .summary ol,
.course-content ul.ctopics .content .summarytext ol {
    list-style: decimal outside none;
}

.course-content ul.ctopics li.section.main .content,
.course-content ul.ctopics li.tcsection .content {
    /* Default for non tablets / mobiles.  If the language file has 'topcollsidewidth' for the current language, then will be set in format.php. */
    margin: 0 40px;
    padding: 0;
}

.course-content ul.ctopics.ctportable li.section.main .content,
.course-content ul.ctopics.ctportable li.tcsection .content {
    margin: 0 0; /* Override default for tablets / mobiles.  When have sides, set in format.php. */
}

.course-content ul.ctopics li .content .sectionhead h3 {
    margin: 0;
}

.course-content ul.ctopics li.current .content .toggledsection {
    padding: 0 0 5px 0;
}

.course-content ul.ctopics li.section.hidden .content > div {
    margin-left: 0;
    margin-right: 0;
}

/* Toggle icon size */
#toggle-all .content .sectionbody h4 span.tc-small,
.course-content ul.ctopics li.section .content .toggle span.tc-small {
    background-size: 16px 16px;
}

#toggle-all .content .sectionbody h4 span.tc-medium,
.course-content ul.ctopics li.section .content .toggle span.tc-medium {
    background-size: 24px 24px;
}
#toggle-all .content .sectionbody h4 span.tc-large,
.course-content ul.ctopics li.section .content .toggle span.tc-large {
    background-size: 32px 32px;
}

/* -- Set the clickable element of the Toggle -- */
.course-content ul.ctopics li.section .content .toggle span.the_toggle {
    display: block;
    padding-bottom: 6px;
    padding-top: 6px;
    width: auto;
}

.course-content ul.ctopics li.section .content .toggle span.the_toggle.tc-small {
    padding-left: 16px; /* The 16px allows the arrow to be with the text next to it. */
    padding-right: 16px;
}

.course-content ul.ctopics li.section .content .toggle span.the_toggle.tc-medium {
    padding-left: 24px; /* The 24px allows the arrow to be with the text next to it. */
    padding-right: 24px;
}

.course-content ul.ctopics li.section .content .toggle span.the_toggle.tc-large {
    padding-left: 32px; /* The 32px allows the arrow to be with the text next to it. */
    padding-right: 32px;
}

/* CONTRIB-4106 */
.course-content ul.ctopics li.section .content .toggle span.the_toggle h3,
.course-content ul.ctopics li.section .content.sectionhidden h3 {
    margin: 0;
    word-wrap: break-word;
}

.course-content ul.ctopics li.section .content .toggle span.the_toggle h3.sectionname,
.course-content ul.ctopics li.section .content .toggle span.the_toggle h3.sectionname a,
.course-content ul.ctopics li.section .content .toggle span.the_toggle h3.sectionname a:hover,
.course-content ul.ctopics li.section .content .toggle span.the_toggle h3.sectionname a:focus,
.course-content ul.ctopics li.section .content.sectionhidden h3.sectionname,
.course-content ul.ctopics li.section .content.sectionhidden h3.sectionname a,
.course-content ul.ctopics li.section .content.sectionhidden h3.sectionname a:hover,
.course-content ul.ctopics li.section .content.sectionhidden h3.sectionname a:focus {
    color: inherit;
}

.course-content ul.ctopics li.section .content .toggle span.the_toggle h3.sectionname,
.course-content ul.ctopics li.section .content.sectionhidden h3.sectionname {
    margin: 4px;
}

/* Icon set common. */
.course-content ul.ctopics li.section .content .toggle span.the_toggle, #toggle-all .content h4 span {
    background-color: transparent;
    background-repeat: no-repeat;
    margin: 0 4px;
}

/* Icon sets.  Note: Background images for the settings - does not work in Chrome or Safari - known issue. */
/* Arrow icon set. */
.course-content ul.ctopics li.section .content .toggle-arrow span.toggle_closed,
.course-content ul.ctopics li.section .content .toggle-arrow span.toggle_open, /* JavaScript disabled */
body.jsenabled .course-content ul.ctopics li.section .content .toggle-arrow span.toggle_open, /* JavaScript enabled */
#toggle-all .content .toggle-arrow h4 span.off {
    background-image: url([[pix:format_topcoll|arrow_down]]);
}

body.jsenabled .course-content ul.ctopics li.section .content .toggle-arrow span.toggle_closed, /* JavaScript enabled */
#toggle-all .content .toggle-arrow h4 span.on,
body#page-admin-setting-formatsettingtopcoll select#id_s_format_topcoll_defaulttoggleiconset option[value="arrow"],
body#page-course-edit select#id_toggleiconset option[value="arrow"] {
    background-image: url([[pix:format_topcoll|arrow_right]]);
}

#toggle-all .content .toggle-arrow-hover h4 span.off:hover {
    background-image: url([[pix:format_topcoll|arrow_right_glow]]);
}

#toggle-all .content .toggle-arrow-hover h4 span.on:hover {
    background-image: url([[pix:format_topcoll|arrow_down_glow]]);
}

/* Bulb icon set. */
.course-content ul.ctopics li.section .content .toggle-bulb span.toggle_closed,
.course-content ul.ctopics li.section .content .toggle-bulb span.toggle_open, /* JavaScript disabled */
body.jsenabled .course-content ul.ctopics li.section .content .toggle-bulb span.toggle_open, /* JavaScript enabled */
#toggle-all .content .toggle-bulb h4 span.off {
    background-image: url([[pix:format_topcoll|bulb_on]]);
}

body.jsenabled .course-content ul.ctopics li.section .content .toggle-bulb span.toggle_closed, /* JavaScript enabled */
#toggle-all .content .toggle-bulb h4 span.on,
body#page-admin-setting-formatsettingtopcoll select#id_s_format_topcoll_defaulttoggleiconset option[value="bulb"],
body#page-course-edit select#id_toggleiconset option[value="bulb"] {
    background-image: url([[pix:format_topcoll|bulb_off]]);
}

#toggle-all .content .toggle-bulb-hover h4 span.off:hover {
    background-image: url([[pix:format_topcoll|bulb_off_glow]]);
}

#toggle-all .content .toggle-bulb-hover h4 span.on:hover {
    background-image: url([[pix:format_topcoll|bulb_on_glow]]);
}

/* Cloud icon set. */
.course-content ul.ctopics li.section .content .toggle-cloud span.toggle_closed,
.course-content ul.ctopics li.section .content .toggle-cloud span.toggle_open, /* JavaScript disabled */
body.jsenabled .course-content ul.ctopics li.section .content .toggle-cloud span.toggle_open, /* JavaScript enabled */
#toggle-all .content .toggle-cloud h4 span.off {
    background-image: url([[pix:format_topcoll|cloud_on]]);
}

body.jsenabled .course-content ul.ctopics li.section .content .toggle-cloud span.toggle_closed, /* JavaScript enabled */
#toggle-all .content .toggle-cloud h4 span.on,
body#page-admin-setting-formatsettingtopcoll select#id_s_format_topcoll_defaulttoggleiconset option[value="cloud"],
body#page-course-edit select#id_toggleiconset option[value="cloud"] {
    background-image: url([[pix:format_topcoll|cloud_off]]);
}

#toggle-all .content .toggle-cloud-hover h4 span.off:hover {
    background-image: url([[pix:format_topcoll|cloud_off_glow]]);
}

#toggle-all .content .toggle-cloud-hover h4 span.on:hover {
    background-image: url([[pix:format_topcoll|cloud_on_glow]]);
}

/* Eye icon set. */
.course-content ul.ctopics li.section .content .toggle-eye span.toggle_closed,
.course-content ul.ctopics li.section .content .toggle-eye span.toggle_open, /* JavaScript disabled */
body.jsenabled .course-content ul.ctopics li.section .content .toggle-eye span.toggle_open, /* JavaScript enabled */
#toggle-all .content .toggle-eye h4 span.off {
    background-image: url([[pix:format_topcoll|eye_show]]);
}

body.jsenabled .course-content ul.ctopics li.section .content .toggle-eye span.toggle_closed, /* JavaScript enabled */
#toggle-all .content .toggle-eye h4 span.on,
body#page-admin-setting-formatsettingtopcoll select#id_s_format_topcoll_defaulttoggleiconset option[value="eye"],
body#page-course-edit select#id_toggleiconset option[value="eye"] {
    background-image: url([[pix:format_topcoll|eye_hide]]);
}

#toggle-all .content .toggle-eye-hover h4 span.off:hover {
    background-image: url([[pix:format_topcoll|eye_hide_glow]]);
}

#toggle-all .content .toggle-eye-hover h4 span.on:hover {
    background-image: url([[pix:format_topcoll|eye_show_glow]]);
}

/* Folder icon set. */
.course-content ul.ctopics li.section .content .toggle-folder span.toggle_closed,
.course-content ul.ctopics li.section .content .toggle-folder span.toggle_open, /* JavaScript disabled */
body.jsenabled .course-content ul.ctopics li.section .content .toggle-folder span.toggle_open, /* JavaScript enabled */
#toggle-all .content .toggle-folder h4 span.off {
    background-image: url([[pix:format_topcoll|folder_open]]);
}

body.jsenabled .course-content ul.ctopics li.section .content .toggle-folder span.toggle_closed, /* JavaScript enabled */
#toggle-all .content .toggle-folder h4 span.on,
body#page-admin-setting-formatsettingtopcoll select#id_s_format_topcoll_defaulttoggleiconset option[value="folder"],
body#page-course-edit select#id_toggleiconset option[value="folder"] {
    background-image: url([[pix:format_topcoll|folder_closed]]);
}

#toggle-all .content .toggle-folder-hover h4 span.off:hover {
    background-image: url([[pix:format_topcoll|folder_closed_glow]]);
}

#toggle-all .content .toggle-folder-hover h4 span.on:hover {
    background-image: url([[pix:format_topcoll|folder_open_glow]]);
}

/* Ground signal set. */
.course-content ul.ctopics li.section .content .toggle-groundsignal span.toggle_closed,
.course-content ul.ctopics li.section .content .toggle-ground-signal span.toggle_open, /* JavaScript disabled */
body.jsenabled .course-content ul.ctopics li.section .content .toggle-groundsignal span.toggle_open, /* JavaScript enabled */
#toggle-all .content .toggle-groundsignal h4 span.off,
#toggle-all .content .toggle-groundsignal-hover h4 span.on:hover {
    background-image: url([[pix:format_topcoll|ground_signal_on]]);
}

body.jsenabled .course-content ul.ctopics li.section .content .toggle-groundsignal span.toggle_closed, /* JavaScript enabled */
#toggle-all .content .toggle-groundsignal-hover h4 span.off:hover,
#toggle-all .content .toggle-groundsignal h4 span.on,
body#page-admin-setting-formatsettingtopcoll select#id_s_format_topcoll_defaulttoggleiconset option[value="groundsignal"],
body#page-course-edit select#id_toggleiconset option[value="groundsignal"] {
    background-image: url([[pix:format_topcoll|ground_signal_off]]);
}

/* LED icon set. */
.course-content ul.ctopics li.section .content .toggle-led span.toggle_closed,
.course-content ul.ctopics li.section .content .toggle-led span.toggle_open, /* JavaScript disabled */
body.jsenabled .course-content ul.ctopics li.section .content .toggle-led span.toggle_open, /* JavaScript enabled */
#toggle-all .content .toggle-led h4 span.off {
    background-image: url([[pix:format_topcoll|led_on]]);
}

body.jsenabled .course-content ul.ctopics li.section .content .toggle-led span.toggle_closed, /* JavaScript enabled */
#toggle-all .content .toggle-led h4 span.on,
body#page-admin-setting-formatsettingtopcoll select#id_s_format_topcoll_defaulttoggleiconset option[value="led"],
body#page-course-edit select#id_toggleiconset option[value="led"] {
    background-image: url([[pix:format_topcoll|led_off]]);
}

#toggle-all .content .toggle-led-hover h4 span.off:hover {
    background-image: url([[pix:format_topcoll|led_off_glow]]);
}

#toggle-all .content .toggle-led-hover h4 span.on:hover {
    background-image: url([[pix:format_topcoll|led_on_glow]]);
}

/* Point icon set. */
.course-content ul.ctopics li.section .content .toggle-point span.toggle_closed,
.course-content ul.ctopics li.section .content .toggle-point span.toggle_open, /* JavaScript disabled */
body.jsenabled .course-content ul.ctopics li.section .content .toggle-point span.toggle_open, /* JavaScript enabled */
#toggle-all .content .toggle-point h4 span.off {
    background-image: url([[pix:format_topcoll|point_down]]);
}

body.jsenabled .course-content ul.ctopics li.section .content .toggle-point span.toggle_closed, /* JavaScript enabled */
#toggle-all .content .toggle-point h4 span.on,
body#page-admin-setting-formatsettingtopcoll select#id_s_format_topcoll_defaulttoggleiconset option[value="point"],
body#page-course-edit select#id_toggleiconset option[value="point"] {
    background-image: url([[pix:format_topcoll|point_right]]);
}

#toggle-all .content .toggle-point-hover h4 span.off:hover {
    background-image: url([[pix:format_topcoll|point_right_glow]]);
}

#toggle-all .content .toggle-point-hover h4 span.on:hover {
    background-image: url([[pix:format_topcoll|point_down_glow]]);
}

/* Power icon set. */
.course-content ul.ctopics li.section .content .toggle-power span.toggle_closed,
.course-content ul.ctopics li.section .content .toggle-power span.toggle_open, /* JavaScript disabled */
body.jsenabled .course-content ul.ctopics li.section .content .toggle-power span.toggle_open, /* JavaScript enabled */
#toggle-all .content .toggle-power h4 span.off {
    background-image: url([[pix:format_topcoll|toggle_plus]]);
}

body.jsenabled .course-content ul.ctopics li.section .content .toggle-power span.toggle_closed, /* JavaScript enabled */
#toggle-all .content .toggle-power h4 span.on,
body#page-admin-setting-formatsettingtopcoll select#id_s_format_topcoll_defaulttoggleiconset option[value="power"],
body#page-course-edit select#id_toggleiconset option[value="power"] {
    background-image: url([[pix:format_topcoll|toggle_minus]]);
}

#toggle-all .content .toggle-power-hover h4 span.off:hover {
    background-image: url([[pix:format_topcoll|toggle_minus_glow]]);
}

#toggle-all .content .toggle-power-hover h4 span.on:hover {
    background-image: url([[pix:format_topcoll|toggle_plus_glow]]);
}

/* Radio icon set. */
.course-content ul.ctopics li.section .content .toggle-radio span.toggle_closed,
.course-content ul.ctopics li.section .content .toggle-radio span.toggle_open, /* JavaScript disabled */
body.jsenabled .course-content ul.ctopics li.section .content .toggle-radio span.toggle_open, /* JavaScript enabled */
#toggle-all .content .toggle-radio h4 span.off {
    background-image: url([[pix:format_topcoll|radio_on]]);
}

body.jsenabled .course-content ul.ctopics li.section .content .toggle-radio span.toggle_closed, /* JavaScript enabled */
#toggle-all .content .toggle-radio h4 span.on,
body#page-admin-setting-formatsettingtopcoll select#id_s_format_topcoll_defaulttoggleiconset option[value="radio"],
body#page-course-edit select#id_toggleiconset option[value="radio"] {
    background-image: url([[pix:format_topcoll|radio_off]]);
}

#toggle-all .content .toggle-radio-hover h4 span.off:hover {
    background-image: url([[pix:format_topcoll|radio_off_glow]]);
}

#toggle-all .content .toggle-radio-hover h4 span.on:hover {
    background-image: url([[pix:format_topcoll|radio_on_glow]]);
}

/* Smiley icon set. */
.course-content ul.ctopics li.section .content .toggle-smiley span.toggle_closed,
.course-content ul.ctopics li.section .content .toggle-smiley span.toggle_open, /* JavaScript disabled */
body.jsenabled .course-content ul.ctopics li.section .content .toggle-smiley span.toggle_open, /* JavaScript enabled */
#toggle-all .content .toggle-smiley h4 span.off {
    background-image: url([[pix:format_topcoll|smiley_on]]);
}

body.jsenabled .course-content ul.ctopics li.section .content .toggle-smiley span.toggle_closed , /* JavaScript enabled */
#toggle-all .content .toggle-smiley h4 span.on,
body#page-admin-setting-formatsettingtopcoll select#id_s_format_topcoll_defaulttoggleiconset option[value="smiley"],
body#page-course-edit select#id_toggleiconset option[value="smiley"] {
    background-image: url([[pix:format_topcoll|smiley_off]]);
}

#toggle-all .content .toggle-smiley-hover h4 span.off:hover {
    background-image: url([[pix:format_topcoll|smiley_off_glow]]);
}

#toggle-all .content .toggle-smiley-hover h4 span.on:hover {
    background-image: url([[pix:format_topcoll|smiley_on_glow]]);
}

/* Square icon set. */
.course-content ul.ctopics li.section .content .toggle-square span.toggle_closed,
.course-content ul.ctopics li.section .content .toggle-square span.toggle_open, /* JavaScript disabled */
body.jsenabled .course-content ul.ctopics li.section .content .toggle-square span.toggle_open, /* JavaScript enabled */
#toggle-all .content .toggle-square h4 span.off {
    background-image: url([[pix:format_topcoll|square_on]]);
}

body.jsenabled .course-content ul.ctopics li.section .content .toggle-square span.toggle_closed, /* JavaScript enabled */
#toggle-all .content .toggle-square h4 span.on,
body#page-admin-setting-formatsettingtopcoll select#id_s_format_topcoll_defaulttoggleiconset option[value="square"],
body#page-course-edit select#id_toggleiconset option[value="square"] {
    background-image: url([[pix:format_topcoll|square_off]]);
}

#toggle-all .content .toggle-square-hover h4 span.off:hover {
    background-image: url([[pix:format_topcoll|square_off_glow]]);
}

#toggle-all .content .toggle-square-hover h4 span.on:hover {
    background-image: url([[pix:format_topcoll|square_on_glow]]);
}

/* Sun / Moon icon set. */
.course-content ul.ctopics li.section .content .toggle-sunmoon span.toggle_closed,
.course-content ul.ctopics li.section .content .toggle-sunmoon span.toggle_open, /* JavaScript disabled */
body.jsenabled .course-content ul.ctopics li.section .content .toggle-sunmoon span.toggle_open, /* JavaScript enabled */
#toggle-all .content .toggle-sunmoon h4 span.off {
    background-image: url([[pix:format_topcoll|sunmoon_on]]);
}

body.jsenabled .course-content ul.ctopics li.section .content .toggle-sunmoon span.toggle_closed, /* JavaScript enabled */
#toggle-all .content .toggle-sunmoon h4 span.on,
body#page-admin-setting-formatsettingtopcoll select#id_s_format_topcoll_defaulttoggleiconset option[value="sunmoon"],
body#page-course-edit select#id_toggleiconset option[value="sunmoon"] {
    background-image: url([[pix:format_topcoll|sunmoon_off]]);
}

#toggle-all .content .toggle-sunmoon-hover h4 span.off:hover {
    background-image: url([[pix:format_topcoll|sunmoon_off_glow]]);
}

#toggle-all .content .toggle-sunmoon-hover h4 span.on:hover {
    background-image: url([[pix:format_topcoll|sunmoon_on_glow]]);
}

/* Switch icon set. */
.course-content ul.ctopics li.section .content .toggle-switch span.toggle_closed,
.course-content ul.ctopics li.section .content .toggle-switch span.toggle_open, /* JavaScript disabled */
body.jsenabled .course-content ul.ctopics li.section .content .toggle-switch span.toggle_open, /* JavaScript enabled */
#toggle-all .content .toggle-switch h4 span.off {
    background-image: url([[pix:format_topcoll|switch_on]]);
}

body.jsenabled .course-content ul.ctopics li.section .content .toggle-switch span.toggle_closed, /* JavaScript enabled */
#toggle-all .content .toggle-switch h4 span.on,
body#page-admin-setting-formatsettingtopcoll select#id_s_format_topcoll_defaulttoggleiconset option[value="switch"],
body#page-course-edit select#id_toggleiconset option[value="switch"] {
    background-image: url([[pix:format_topcoll|switch_off]]);
}

#toggle-all .content .toggle-switch-hover h4 span.off:hover {
    background-image: url([[pix:format_topcoll|switch_off_glow]]);
}

#toggle-all .content .toggle-switch-hover h4 span.on:hover {
    background-image: url([[pix:format_topcoll|switch_on_glow]]);
}

body#page-admin-setting-formatsettingtopcoll select#id_s_format_topcoll_defaulttoggleiconset option,
body#page-course-edit select#id_toggleiconset option {
    background-color: transparent;
    background-position: right center; /* Position the icon to the right of the selection text. */
    background-repeat: no-repeat;
    padding: 3px 20px 3px 3px; /* The 20px allows the image to be on the right and the text next to it. */
}

body#page-admin-setting-formatsettingtopcoll.lang-en_ar select#id_s_format_topcoll_defaulttoggleiconset option,
body#page-course-edit.lang-en_ar select#id_toggleiconset option {
    background-position: 220px 45%; /* Pirate strings are longer. */
}

/* Display instructions */
.topcoll-display-instructions {
    margin: 0;
}

/* Layout */
.course-content ul.ctopics #section-0 .content{
    padding: 10px;
}

.course-content ul.ctopics li.section.main .side, .course-content ul.ctopics li.tcsection .side,
.editing .course-content ul.ctopics li.section.main .side, .editing .course-content ul.ctopics li.tcsection .side {
    padding: 0;
    text-align: center;
    width: 40px; /* Default used in editing mode or when not defined in the language file. */
}

.course-content ul.ctopics li.section .left, .course-content ul.ctopics li.tcsection .left {
    float:left;
}

.course-content ul.ctopics li.section.main .left {
    padding: 10px 0 0 0;
}

.course-content ul.ctopics li.current.main .right {
    padding: 0 0 0 0; /* Cancel out effect of above when having to use 'left' side selector for getting the correct text colour on the right for the current section.  This is because the selector '.course-content .current .left' defines the colour in the theme and therefore any CT specific 'right' implementation would not work for all themes. */
}

.course-content ul.ctopics li.section .right,
.course-content ul.ctopics li.tcsection .right {
    clear: none;
    float: none;
    position: absolute;
    right: 0;
    top: 0;
}

.format-topcoll .course-content .single-section .section-navigation .mdl-left,
.format-topcoll .course-content .single-section .section-navigation .mdl-right {
    float: none;
    position: absolute;
    top: 50%;
    transform: translate(0, -50%);
}

.format-topcoll .course-content .single-section .section-navigation .mdl-left {
    left: 0;
}

.format-topcoll .course-content .single-section .section-navigation .mdl-right {
    right: 0;
}

.course-content ul.ctopics li.section .right {
    line-height: 1.3;
    margin-top: 1rem;
}

.course-content ul.ctopics li.section .right a {
    display: block;  /* So that section_right_content() does not implode with 'br's and get too many when the up arrow is removed by JS. */
}

.course-content ul.ctopics li.section .right a img.hide{
    display: inline;  /* CONTRIB-5817 - Align the eye icon. */
}

.course-content ul.ctopics li.section .left .section-handle img.icon {
    padding: 0;
    vertical-align: baseline;
}

/* Assist the layout. */
body.format-topcoll.dir-rtl .course-content ul.ctopics li.section .left {
    float: right;
}

body.format-topcoll.dir-rtl .course-content ul.ctopics li.section .right {
    float: left;
}

body.format-topcoll .ctopics .mod-indent-outer {
    width: 100% !important; /* Same as w-100 on MDL-68330. */
}

body.format-topcoll .ctopics .section .activity .mod-indent-outer,
body.format-topcoll.editing.dir-rtl .ctopics .section .activity .mod-indent-outer {
    padding-left: 0;
}

body.format-topcoll.editing .ctopics .section .activity .mod-indent-outer {
    padding-left: 32px;
}

body.format-topcoll.dir-rtl .ctopics .section .activity .mod-indent-outer {
    padding-right: 0;
}

body.format-topcoll.editing.dir-rtl .ctopics .section .activity .mod-indent-outer {
    padding-right: 32px;
}

body.format-topcoll .ctopics .section  {
    margin: 1em 0;
}

body.format-topcoll .course-content ul.ctopics li.section .summary {
    margin-left: 0;
}

body.format-topcoll.dir-rtl .course-content ul.ctopics li.section .summary {
    margin-right: 0;
}

body.format-topcoll .course-content ul.ctopics li.section .summary.summaryalwaysshown {
    padding-top: 10px;
}

body.format-topcoll.editing #region-main ul.ctopics .moodle-actionmenu ul.menubar {
    display: none;
}

body.format-topcoll.editing.jsenabled #region-main ul.ctopics .moodle-actionmenu[data-enhance] ul.menubar {
    display: inline-block;
}

/* -- The section name in a Toggle and hidden section -- */
.course-content ul.ctopics li.section .content .toggle,
.course-content ul.ctopics li.section .content.sectionhidden {
    display: block;
    padding: 0;
    text-align: left;
}

/* -- The Toggle -- */
.course-content ul.ctopics li.section .content .toggle {
    cursor: pointer;
    width: 100%;
}

/* -- The padding of a hidden section -- */
.course-content ul.ctopics li.section .content.sectionhidden {
    padding: 6px 0 6px 0;
}

/* -- The topic summary text -- */
.course-content ul.ctopics li.section .content .toggle span.the_toggle p {
    font-size: 1.2em;
    font-style: italic;
    text-align: left;
}


/* -- Toggle text -- */
.course-content ul.ctopics li.section .content .toggle span.the_toggle,
.course-content ul.ctopics li.section .content.sectionhidden {
    font-weight: bold;
    text-decoration: none;
}

.course-content ul.ctopics li.section .content .toggledsection {
    min-height: 30px;
}

/* -- For centring the 'Topic / Week / Day x' text -- */
.course-content ul.ctopics li.section .right .cps_centre,
.dir-rtl .course-content ul.ctopics li.section .left .cps_centre {
    font-size: 0.7em;
    min-height: 28px;
    text-align: center;
}

.dir-rtl .course-content ul.ctopics li.section .right .cps_centre {
    font-size: 14px;
}

.course-content ul.ctopics li.section .right .cps_centre img {
    margin: 6px auto;
}

/* -- Hiding / Showing the sections -- */
body.jsenabled .toggledsection {
    display: none; /* If JavaScript is enabled then this css will apply and the section will be hidden. */
}

body.jsenabled .toggledsection.sectionopen {
    display: block;
}

/* -- Size of the spacer row -- */
.section .spacer {
    height:0.5em;
}

/* Toggle all */
#toggle-all, #topcoll-display-instructions {
    display: none; /* Hide when JavaScript not enabled. */
}

body.jsenabled #toggle-all, body.jsenabled #topcoll-display-instructions {
    display: block;
}

body.jsenabled #toggle-all {
    background: none repeat scroll 0 0 transparent;
}

#toggle-all .content .sectionbody h4 {
    display: block;
    margin-bottom: 0;
    padding: 6px 0;
}

#toggle-all .content .sectionbody h4 span {
    cursor: pointer;
    padding-bottom: 7px;
    padding-top: 7px;
    text-decoration: none;
    width: 35px;
}

#toggle-all .content .sectionbody h4 span.tc-small {
    padding-left: 18px; /* The 18px allows the arrow to be with the text next to it. */
    padding-right: 18px;
}

#toggle-all .content .sectionbody h4 span.tc-medium {
    padding-left: 26px; /* The 26px allows the arrow to be with the text next to it. */
    padding-right: 26px;
}

#toggle-all .content .sectionbody h4 span.tc-large {
    padding-left: 34px; /* The 34px allows the arrow to be with the text next to it. */
    padding-right: 34px;
}

#toggle-all .content .sectionbody h4, #toggle-all .content .sectionbody h4 span {
    text-align: left;
}

.dir-rtl #toggle-all .content .sectionbody h4, .dir-rtl #toggle-all .content .sectionbody h4 span {
    text-align: right;
}

.cttoggle {
    display: inline;
    font-family: inherit;
    font-size: inherit;
    font-style: inherit;
}

/* MDL-42634 */
.course-content ul.ctopics li.section.hidden .sectionname,
.course-content ul.ctopics li.section.hidden .content>div,
.course-content ul.ctopics li.section.hidden .activity .activityinstance {
    opacity: inherit;
}

.course-content ul.ctopics li.section.hidden h3.section-title,
.course-content ul.ctopics li.section.hidden .content .summary {
    opacity: 0.5;
}

/* Section name editing. */
.editing .course-content ul.ctopics li.section .content .toggle span.quickediticon img,
.editing .course-content ul.ctopics li.section .content.hidden span.quickediticon img {
    background-color: #fff;
    border: 2px solid #fff;
    border-radius: 4px;
}
.editing .course-content ul.ctopics li.section .content .toggle span.quickediticon img {
    opacity: .8;
}

.editing .course-content ul.ctopics li.section.hidden .content .toggle span.quickediticon img {
    opacity: 1;
}

/* M3.1 */
.course-content ul.ctopics li.section.hidden .sectionname > span {
    opacity: .7;
}

.course-content ul.ctopics li.section.hidden .sectionname {
    font-style: italic;
}

.format-topcoll .inplaceeditable.inplaceeditingon input {
    width: auto;
}

/* Activity further information styling */
.format-topcoll .ct-activity-meta-container {
    margin: 0 10px 0 30px;
    padding: 5px 0 0 0;
}

.format-topcoll .ct-activity-due-date {
    background-color: #555;
    border-radius: 0.5em;
    color: #fff;
    font-size: 0.9em;
    font-weight: 500;
    line-height: 3em;
    margin: 0 10px 0 0;
    padding: 7px;
    white-space: nowrap;
}

.format-topcoll .ct-activity-due-date a {
    color: #fff;
 }

.format-topcoll .ct-activity-mod-feedback {
    padding: 5px 0;
}

.format-topcoll .ct-activity-mod-feedback .icon {
    font-size: 1.1em;
}

.format-topcoll .ct-activity-action {
    margin: 0 7px;
}

.format-topcoll .ct-activity-action i {
    margin-right: 0.35rem;
}

.format-topcoll .ct-activity-date-submitted {
    background-color: #d4edda;
}

.format-topcoll .ct-activity-date-submitted a {
    color: #155724;
}

.format-topcoll .ct-activity-date-nearly-due {
    background-color: #FFF3CD;
}

.format-topcoll .ct-activity-date-nearly-due a {
    color: #856404;
}

.format-topcoll .ct-activity-date-overdue {
    background-color: #f8d7da;
}

.format-topcoll .ct-activity-date-overdue a {
    color: #721c24;
}

.format-topcoll .ct-activity-date-overdue .text-warning {
    color: #721C24 !important;
}

.format-topcoll .ct-activity-due-date .icon,
.format-topcoll .ct-activity-mod-engagement .icon,
.format-topcoll .ct-activity-mod-feedback .icon {
    font-size: 1.1em;
}

/* Colour picker */
.tccolourpopupbox {
    border: 1px solid black;
    cursor: pointer;
    margin: 0 0 0 2px;
    padding: 0 8px;
}

.tccolourpopupsel {
    position: absolute;
    z-index: 500;
}

/* Print styles. */
@media print {
    body.jsenabled .toggledsection {
        display: block; /* If JavaScript is enabled and we are printing then this css will apply and the section will be shown. */
    }
    body.jsenabled #toggle-all, body.jsenabled #topcoll-display-instructions, .cttoggle {
        display: none;
    }
    .course-content ul.ctopics li.section.main {
        float: left;
    }
    body.format-topcoll .course-content ul.ctopics li.section.main {
        padding-bottom: 0;
    }
    ul.ctopics {
        page-break-after: avoid;
        page-break-before: avoid;
    }
}
