/*!
 * Copyright (c) 2014-present Cliqz GmbH. All rights reserved.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at https://mozilla.org/MPL/2.0/.
 */

@import 'shared';

/* Add 2 more px padding on top of PersonalToolbar */
#navigator-toolbox > toolbar:not(#toolbar-menubar):not(#TabsToolbar):not(#nav-bar) {
    padding-top: 2px;
}

/* Move caption buttons more to the right and top
   NOTE: Keep this code here
 */
.titlebar-placeholder[type="caption-buttons"], #titlebar-buttonbox {
    margin-left: 13px; // NOTE overriding the margin can cause caption buttons placeholder's width changes (Fix below)
    // margin-left: 10px; // Same as above (FF58)
    // margin-top: -3px; // FF58
    max-width: 61px; // Fix dynamic width for caption buttons place holder
}

#titlebar, #tabbrowser-tabs {
    --tab-min-height: 30.5px; /* Make title bar shorter than 33 px */
}

#navigator-toolbox {
    --tabs-border-color: rgba(0, 0, 0, 0.08); // Active tab border color and line below
    /* TABS TOOLBAR */
    #TabsToolbar {
        /* Add 2 more pxs to the top in order to compensate 2 pxs lost from 'margin' (1) */
        padding-top: 2px;

        /* Make the first tab align with the back button */
        /* Move the new tab button a bit to the left to be aligned with the last toolbar button */
        .titlebar-placeholder {

            &[type="pre-tabs"] {
                width: 43px;
            }

            &[type="post-tabs"] {
                width: 44px;
            }
        }

        /* Reverse the extra space on top (1) */
        &[inFullscreen] {
            padding-top: 0;
        }
    }
}


/* When user enable extra drag space */
[extradragspace][tabsintitlebar]:root:not([inFullscreen]) {
    #navigator-toolbox {
        /* TABS TOOLBAR */
        #TabsToolbar {
            /* Add 10 more pxs to the drag space */
            padding-top: 10px;

            #tabbrowser-tabs {

                .tabbrowser-tab {

                    /* Force tab left and right border to cover whole tab's height */
                    &:before, &:after {
                        border-image: none;
                    }
                }
            }
        }
    }
}

/* When user enable tabs in title bar */
#main-window:not([tabsintitlebar]) {
    #navigator-toolbox {
        /* TABS TOOLBAR */
        #TabsToolbar {
            /* Remove padding top */
            padding-top: 0;

            #tabbrowser-tabs {

                .tabbrowser-tab {

                    &:first-of-type {
                        border-left: none;
                    }
                }
            }
        }
    }
}

@import 'blue-theme';
@import 'purple-theme';
