/*
 * Copyright (c) 2014 Adobe Systems Incorporated. All rights reserved.
 *  
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"), 
 * to deal in the Software without restriction, including without limitation 
 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 
 * and/or sell copies of the Software, and to permit persons to whom the 
 * Software is furnished to do so, subject to the following conditions:
 *  
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *  
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 
 * DEALINGS IN THE SOFTWARE.
 *
 */

@toolbar-button-size: 4.8rem;
@toolbar-button-size-retina-fix: 5.0rem;
@icon-dim: 2.5rem;
@icon-size: @icon-dim @icon-dim;

/* -- TOOLBAR -- */

.tool-spacer {
    border-top: @hairline solid @bg-alt;
    opacity: .55;
}

.toolbar {
    box-sizing: border-box;
    z-index: 1;
    width: @toolbar-button-size-retina-fix;
    height: @toolbar-button-size - 0.2rem;
    background-color: @bg-panel;
    color: @item-active;
    box-shadow: inset (-1 * @panel-border-width) 0 0 @bg-border-for-canvas, inset @hairline (@panel-border-width) 0 @bg-border;
    
    .toolbar-button.tool-selected {
        display: flex;
    }
    
    .toolbar-button, .zoom {
        display: none;
    }
    
    &.expanded {
        height: auto;
        color: @bg-alt;

        .toolbar-button, .zoom {
            display: flex;
        }        
    }
    .zoom {
        position: absolute;
        bottom: 1.3rem;
        align-items: center;
        justify-content: center;
        width: @toolbar-button-size-retina-fix;
        flex-wrap: wrap;
        
        .button-simple.toolbar__zoom {
            display: flex;
            align-self: flex-start;
            svg {
                width: 1.6rem;
                height: 1.6rem;
                fill: @item-inactive;
            }
        }
        .number-input {
            width: @toolbar-button-size-retina-fix;
            text-align: center;
            font-size: @text-medium;
            border-bottom-color: transparent;
            &:hover {
                border-bottom-color: transparent;
            }
            &:focus {
                border-bottom-color: @focus-highlight;
            }
        }
    }
}

.toolbar li:first-child {
    margin: 0;
    box-shadow: -1*@panel-border-width 0 0 @bg-border;
}

.tool-current {
    display: none;
}

.toolbar li .button-simple {
    width: @toolbar-button-size-retina-fix;
    height: @toolbar-button-size;
    margin:  0.1rem 0;
    box-shadow: none;
}
