/*****************************************************************************************
 * X2Engine Open Source Edition is a customer relationship management program developed by
 * X2Engine, Inc. Copyright (C) 2011-2014 X2Engine Inc.
 * 
 * This program is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Affero General Public License version 3 as published by the
 * Free Software Foundation with the addition of the following permission added
 * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
 * IN WHICH THE COPYRIGHT IS OWNED BY X2ENGINE, X2ENGINE DISCLAIMS THE WARRANTY
 * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
 * 
 * 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
 * this program; if not, see http://www.gnu.org/licenses or write to the Free
 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 * 02110-1301 USA.
 * 
 * You can contact X2Engine, Inc. P.O. Box 66752, Scotts Valley,
 * California 95067, USA. or at email address contact@x2engine.com.
 * 
 * The interactive user interfaces in modified source and object code versions
 * of this program must display Appropriate Legal Notices, as required under
 * Section 5 of the GNU Affero General Public License version 3.
 * 
 * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
 * these Appropriate Legal Notices must retain the display of the "Powered by
 * X2Engine" logo. If the display of the logo is not reasonably feasible for
 * technical reasons, the Appropriate Legal Notices must display the words
 * "Powered by X2Engine".
 *****************************************************************************************/

/*
fixed header disabled for mobile layout (should eventually be made sticky)
*/
@media (min-width: 658px) {
    .no-widgets .x2-gridview-fixed-top-bar-outer {
        padding-right:5px;
    }

    .grid-view .mobile-dropdown-button {
        display: none !important;
    }
    .no-widgets .x2-gridview-fixed-top-bar-outer .x2-gridview-fixed-title {
        margin: 0 0px 0 5px;
    }
    .x2-gridview-fixed-top-bar-outer .x2-gridview-fixed-title {
        margin: 0 6px 0 5px;
        width: auto;
        -moz-border-radius: 0;
        -o-border-radius: 0;
        -webkit-border-radius: 0;
        border-radius: 0;
        border-left: 1px solid #b3b3b3;
        border-right: 1px solid #b3b3b3;
    }

    .no-widgets .x2-gridview-fixed-top-bar-outer .x2grid-header-container {
        margin: 0 0px 0 5px;
    }

    .x2-gridview-fixed-top-bar-outer .x2grid-header-container {
        margin: 0 6px 0 5px;
        border-left: 1px solid #b3b3b3;
        border-right: 1px solid #b3b3b3;
    }

    .x2-gridview-fixed-top-bar-outer + .x2grid-body-container .x2grid-grips div {
        top: 75px !important;
    }

    .x2-gridview-fixed-top-bar-outer .x2-gridview-fixed-top-bar-inner {
        width: 100%;
        padding-right: 22%;
        padding-left: 11px;
        height: 0;
        -webkit-box-sizing: border-box;
        -moz-box-sizing: border-box;
        box-sizing: border-box;
    }

    .x2-gridview-fixed-top-bar-outer {
        width: 100%;
        height: 0px;
        position: fixed;
        z-index: 800;
        left: 0;
        top: 32px;
        padding-left: 151px;
        padding-right: 9px;
        -webkit-box-sizing: border-box;
        -moz-box-sizing: border-box;
        box-sizing: border-box;
    }

    .x2-gridview-body-with-fixed-header {
        padding-top: 75px;
    }

}

@media (max-width: 801px) and (min-width: 658px) {
    .grid-view.fullscreen.show-mass-action-buttons .grid-view-summary-text {
        display: none;
    }
}


@media (max-width: 1040px) and (min-width: 658px) {
    .x2-gridview-fixed-top-bar-outer div.x2grid-header-container {
        margin-left: 5px;
    }
    .x2-gridview-fixed-title + div.x2grid-header-container {
        margin-left: 5px;
    }
    
    .x2-gridview-fixed-top-bar-outer .x2-gridview-fixed-title {
        margin: 0 -4px 0 5px;
    }
    .x2-gridview-fixed-top-bar-outer .x2grid-header-container {
        margin: 0 -4px 0 5px;
    }
}

@media (max-width: 1040px) {
    .x2-gridview-fixed-top-bar-outer .x2grid-header-container {
        margin: 0 0px 0 0px;
    }

    .x2-gridview-fixed-top-bar-outer .x2-gridview-fixed-top-bar-inner {
        padding-right: 0;
    }
}

@media (max-width: 370px) {
    .x2-gridview-top-pager {
        display: none !important;
    }
}
@media (max-width: 325px) {
    .grid-view-summary-text {
        display: none !important;
    }
}

@media (max-width: 657px) {
    div.x2-gridview-fixed-top-bar-outer {
        padding-left: 0px;
        left: -11px;
    }

    #actions-grid .page-title > h2, 
    #users-grid .page-title > h2, 
    #x2-gridview-page-title > h2 {
        display: block !important;
    }
    .grid-view .page-title {
        height: 36px;
    }

    /* enables hiding of summary */ 
    .grid-view .page-title .summary {
        float: none;
    }
    .show-top-buttons.grid-view .page-title .summary {
        float: right;
    }

    ul.column-selector {
        position:absolute !important;
        top: 75px;
    }

    .x2-gridview-mass-action-buttons .more-drop-down-list {
        position: absolute !important;
        top: 74px;
    }

}
