//
// 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 search style sheet
//
// @package    theme_adaptable
// @copyright  2021 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
//

/* M3.9- */
.simplesearchform .btn {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.simplesearchform .btn .icon {
    margin: 0;
}

.simplesearchform .btn-submit {
    border-color: #8f959e;
    color: #6c757d;
}

.simplesearchform .btn-close,
.simplesearchform .btn-clear {
    position: absolute;
    top: 0;
    right: 0;
    color: #6c757d;
    z-index: 4;
}

.simplesearchform .btn-close {
    right: 2.2rem;
}

.simplesearchform .btn-submit {
    background-color: #f8f9fa;
}

.simplesearchform .withclear {
    padding-right: 2rem;
}

.simplesearchform .searchinput {
    display: flex;
    flex: 1 1 auto;
}

.simplesearchform .collapsing {
    height: inherit;
    transition: none;
    width: inherit;
}

@media (max-width: 991.98px) {
    .simplesearchform .collapse.show,
    .simplesearchform .collapsing {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        display: flex;
        background-color: #fff;
        z-index: 1060;
        height: 50px;
    }
    .simplesearchform .collapse.show .form-inline,
    .simplesearchform .collapsing .form-inline {
        width: auto;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Now inline with M3.10+ version */
.headersearch {
    padding: [[setting:searchboxpadding]];
}

.headersearch .btn-close,
.navbarsearchsocial .btn-close {
    border-width: 0;
}

.headersearch .btn-open {
    border-radius: 0;
    color: [[setting:fonttitlecolorcourse]];
}

.headersearch .btn,
.navbarsearchsocial .btn {
    box-shadow: none;
}

#adaptable-page-header-wrapper #header2 a.btn-open i {
    color: [[setting:headertextcolor]];
}

.headersearch abbr[title]{
    border-bottom: none;
    cursor: pointer;
    text-decoration: none;
}

.headersearch .form-inline,
.navbarsearchsocial .form-inline,
#adaptable-page-header-wrapper #above-header .navbar .navbarsearchsocial button {
    margin: 0;
}

.headersearch .form-inline input.form-control[type=text],
.navbarsearchsocial .form-inline input.form-control[type=text] {
    height: 35px;
}

@media (max-width: 979px) {
    .headersearch {
        margin: 0;
        padding-bottom: 5px;
        width: 100%;
    }
}

#adaptable-page-header-wrapper .navbarsearchsocial form .icon {
    color: [[setting:fontcolor]];
}

.headersearch .simplesearchform .btn-submit,
#adaptable-page-header-wrapper #above-header .navbar .navbarsearchsocial button {
    border-radius: 0;
}
.navbarsearchsocial .btn-open {
    border-width: 0;
    font-size: 1.2em;
}

#adaptable-page-header-wrapper .navbarsearchsocial .icon {
    margin-right: 0;
    padding-right: 0;
}

@media (max-width: 991.98px) {
    .navbarsearchsocial .simplesearchform .collapse.show,
    .navbarsearchsocial .simplesearchform .collapsing {
        background-color: transparent;
        display: flex;
        height: auto;
        left: 0;
        position: relative;
        top: 0;
        width: 100%;
        z-index: 1060;
    }
}
