/*
*
* @copyright Copyright (c) Open-Xchange GmbH, Germany <info@open-xchange.com>
* @license AGPL-3.0
*
* This code is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero 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 Affero General Public License for more details.

* You should have received a copy of the GNU Affero General Public License
* along with OX App Suite. If not, see <https://www.gnu.org/licenses/agpl-3.0.txt>.
*
* Any use of the work other than as authorized under this license or copyright law is prohibited.
*
*/

.generic-sidebar-container {

    @default-width: 320px;

    &.visible.has-left > .generic-sidebar-content {
        left: @default-width;
    }

    &.visible.has-right > .generic-sidebar-content {
        right: @default-width;
    }

    &.visible.has-left > .generic-sidebar {
        left: 0;
        right: auto;
    }

    &.visible.has-right > .generic-sidebar {
        right: 0;
        left: auto;
    }

    .generic-sidebar-content {
        z-index: 1;
    }

    .generic-sidebar {
        display: none;
        background-color: #f5f5f5;
        z-index: 0;
    }

    &.visible > .generic-sidebar {
        display: block;
        width: @default-width;
    }

    &.visible.maximize > .generic-sidebar {
        left: 0;
        right: 0;
        width: auto;
        z-index: 2;
        border: 0;
    }
}

.primary-action {

    padding: 16px 16px 15px 16px;
    border-bottom: 1px solid #ddd;

    .btn.btn-primary {

        width: 100%;
        border: 0;
        border-radius: 0;
        line-height: 40px;
        padding: 0 8px;
        background-color: @brand-primary;
        transition: background-color 5s linear;

        html.design-night & { background-color: @brand-primary; }
        html.design-twilight & { background-color: #4d7155; }
        html.design-dawn & { background-color: #2c6e7f; }
        html.design-day & { background-color: @brand-primary; }
        html.design-dusk & { background-color: #753e93; }
        html.design-late & { background-color: @brand-primary; }
    }
}

//
// Don't show on smartphones
//
@media all and (max-width: 540px) {
    .generic-sidebar-container .generic-sidebar {
        display: none;
    }
}

//
// More width on large screens (> 1280px)
//

@media all and (min-width: 1281px) {

    .generic-sidebar-container {

        @default-width: 320px;

        &.visible.has-left > .generic-sidebar-content {
            left: @default-width;
        }

        &.visible.has-right > .generic-sidebar-content {
            right: @default-width;
        }

        &.visible > .generic-sidebar {
            width: @default-width;
        }
    }
}
