/* modules.less */

// The home for small tweaks to modules that don't require
// changes drastic enough to pull in the full module css
// and replace it completely
// Plus some misc. odds and ends

select {
    width: auto;
}

// Assign
.path-mod-assign #page-content [data-region="grade-panel"] .mform:not(.unresponsive) #id_attemptsettings .fitem {
    .fitemtitle,
    .felement {
        display: table-cell;
        float: none;
        border-top: 1px solid #ddd;
        padding: 8px 0;
    }
}

// Feedback module
.path-mod-feedback .mform.feedback_form .fitem .fitemtitle {
    display: block;
    margin-top: 4px;
    margin-bottom: 4px;
    text-align: left;
    width: 100%;
}

.path-mod-feedback .mform.feedback_form .fitem .felement {
    margin-left: 0;
    width: 100%;
    float: left;
    padding-left: 0;
    padding-right: 0;
}

.path-mod-feedback .mform.feedback_form .fitem .fstatic:empty {
    display: none;
}

.path-mod-feedback .mform.feedback_form .fitem .fcheckbox > span,
.path-mod-feedback .mform.feedback_form .fitem .fradio > span,
.path-mod-feedback .mform.feedback_form .fitem .fgroup > span {
    margin-top: 4px;
}

body.path-mod-feedback #region-main .mform.feedback_form .femptylabel .fitemtitle {
    display: inline-block;
    width: auto;
    margin-right: 0;
}

.path-mod-feedback .mform.feedback_form .femptylabel .felement {
    display: inline-block;
    margin-top: 4px;
    padding-top: 5px;
    width: auto;
}

body.path-mod-feedback #region-main .mform.feedback_form .feedback-item-pagebreak .felement {
    width: 100%;
}

.path-mod-feedback .mform.feedback_form .fitem_fcheckbox .fitemtitle,
.path-mod-feedback .mform.feedback_form .fitem_fcheckbox .felement {
    display: inline-block;
    width: auto;
}

.path-mod-feedback .mform.feedback_form .fitem_fcheckbox .felement {
    padding: 6px;
}

.path-mod-feedback .mform.feedback_form#feedback_viewresponse_form .fitem.feedback_hasvalue:not(.feedback-item-captcha) .felement {
    background: #fbfbf1;
    min-height: 1em;
    box-sizing: border-box;
    padding: 3px;
    border: 1px solid #ddd;
}

.path-mod-feedback .mform.feedback_form .fitem.feedback_hasvalue .fstatic:empty {
    display: inherit;
}

.path-mod-feedback .mform.feedback_form#feedback_edit_form .fitem:hover {
    background: #f5f5f5;
}

.path-mod-feedback .mform.feedback_form#feedback_edit_form .fitem .fitemtitle label {
    width: 100%;
}

.path-mod-feedback .mform.feedback_form#feedback_edit_form .fitem .fitemtitle .itemtitle {
    position: relative;
    width: 100%;
}

.path-mod-feedback .mform.feedback_form#feedback_edit_form .fitem .fitemtitle .itemtitle .itemdd,
.path-mod-feedback .mform.feedback_form#feedback_edit_form .fitem .fitemtitle .itemtitle .itemname {
    float: left;
}

.path-mod-feedback .mform.feedback_form#feedback_edit_form .fitem .fitemtitle .itemtitle .itemactions {
    float: right;
}



// Forum
.path-mod-forum .forumsearch {
    input,
    .helptooltip {
        margin: 0 3px;
    }
}

.path-mod-forum .forumheaderlist,
.path-mod-forum .forumheaderlist td {
    border: none;
}

.path-mod-forum {
    .forumheaderlist {
        thead .header,
        tbody .discussion td {
            white-space: normal;
            vertical-align: top;
            padding-left: 0.5em;
            padding-right: 0.5em;
        }

        thead .header {
            white-space: normal;
            vertical-align: top;
        }

        thead .header.replies {
            text-align: center;
        }
        thead .header.lastpost {
            text-align: right;
        }
        thead .header th,
        tbody .discussion td {
            &.discussionsubscription {
                width: 16px;
                padding-left: 0.5em;
                padding-right: 0.5em;
            }
        }
        .discussion {
            .author,
            .replies,
            .lastpost {
                white-space: normal;
            }
            .discussionsubscription,
            .replies {
                text-align: center;
            }
            .topic,
            .discussionsubscription,
            .topic.starter,
            .author,
            .replies,
            .lastpost {
                vertical-align: top;
            }
            .picture {
                margin: 0 20px;
                float: left;
            }
            .unread {
                img {
                    margin: 0;
                }
            }
        }
    }
}

.forumpost {
    .well;
    padding: 6px;
    .header {
        margin-bottom: 3px;
    }
    .picture img {
        margin: 3px;
        &.userpicture {
            margin-left: 3px;
            margin-right: 10px;
        }
    }
    .content {
        .posting.fullpost {
            margin-top: 8px;
        }
    }
    .row {
        .topic,
        .content-mask,
        .options {
            margin-left: 48px;
        }
        &.side {
            clear: both;
        }
    }
}

.forumpost .row .left {
    width: 48px;
}

.forumpost .options .commands {
    margin-left: 0;
}

.forumpost .subject {
    font-weight: bold;
}

// Override hardcoded forum modules styling
.forumsearch input[type=text] {
    margin-bottom: 0 !important; /* stylelint-disable-line declaration-no-important */
}

#page-mod-forum-discuss .discussioncontrols {
    width: auto;
    margin: 0;
}


#page-footer {
    margin-top: 1em;
    padding: 1em 0;
    border-top: 2px solid @table-border-color;
}

.maincalendar .calendarmonth td,
.maincalendar .calendarmonth th {
    border: 1px dotted @table-border-color;
}

.path-grade-report-grader h1 {
    text-align: inherit;
}

#page-mod-chat-gui_basic input#message {
    max-width: 100%;
}

#page-mod-data-view #singleimage {
    width: auto;
}

.path-mod-data form {
    margin-top: 10px;
}

.path-mod-data table.mod-data-default-template {
    th, td {
        padding: 5px;
    }
}

.template_heading {
    margin-top: 10px;
}

.breadcrumb-button {
    float: right;
    margin-top: 4px;
}

.navbar-inverse .logininfo a {
    color: @navbar-inverse-link-color;
}
.navbar-inverse .logininfo a:hover {
    background-color: @navbar-inverse-link-hover-bg; // "transparent" is default to differentiate :hover/:focus from .active
    color: @navbar-inverse-link-hover-color;
}

.navbar-fixed-top,
.navbar-fixed-bottom {
    z-index: 4030;
}
@media (max-width: @grid-float-breakpoint) {
    .navbar-collapse.collapse,
    .navbar-collapse.collapsing {
        margin-top: @navbar-height;
        .nav {
            float: none !important;
        }
    }
}
.langmenu form {
    margin: 0;
}
.container-fluid {
    max-width: 1680px;
    margin: 0 auto;
}
// contributed by Paul Hibbitts, see http://msdn.microsoft.com/en-us/library/ie/jj583807(v=vs.85).aspx
canvas {
    -ms-touch-action: auto;
}

div#dock {
    display: none;
}

// Choice.
.path-mod-choice {
    .horizontal  .choices {
        margin: 0;
        .option {
            display: inline-block;
            padding: 10px;
        }
    }
    .results .data {
        white-space: normal;
    }
}

// Lesson.
.path-mod-lesson .firstpageoptions {
    margin: auto;
    min-width: 280px;
    width: 60%;
}

.path-mod-lesson .centerpadded {
    padding: 5px;
    text-align: center;
}

// Wiki
.path-mod-wiki .wiki_headingtitle,
.path-mod-wiki .midpad,
.path-mod-wiki .wiki_headingtime {
    text-align: inherit;
}

.path-mod-wiki .wiki_contentbox {
    width: 100%;
}

// Quiz.
.path-mod-quiz {
    .questioncontainer {
        input[type="text"] {
            height: 1.5em;
        }
    }
}

// Survey module
.path-mod-survey {
    .surveytable {
        .r1 {background-color: @table-bg-accent}
        .rblock label {text-align: center;}
    }
    .resultgraph, .reportsummary, .studentreport, .reportbuttons, .centerpara {
        text-align:center;
    }
}

.path-mod-assign {
    .assignfeedback_editpdf_widget .pageheader button,
    .assignfeedback_editpdf_widget .pageheader select {
        padding: 3px 7px;
        height: 28px;
        line-height: 24px;
    }
    a.btn {
        .btn-default;
    }
}
