/*
 * Copyright (C) 2013 Adnane Belmadiaf <daker@ubuntu.com>
 * License granted by Canonical Limited
 *
 * This file is part of ubuntu-html5-ui-toolkit.
 *
 * This package is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; either version 3 of the
 * License, or
 * (at your option) any later version.

 * This package 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 Lesser General Public
 * License along with this program. If not, see
 * <http://www.gnu.org/licenses/>
 */

/* ----------------------------------
 * Buttons
 * ---------------------------------- */

[data-role="button"] {
    @include box_shadow (0 2px 2px rgba(100, 100, 100, 0.4) inset);
    @include box_sizing (border-box);
    display: inline-block;
    min-width: 92px;
    height: 35px;
	line-height: 27px;
    padding: 4px 10px;
    background: $ubuntu_orange;
	border: none;
    border-radius: 9px/7px;
    color: $white;
    font-family: $font-family;
    font-size: 1rem;
    overflow: hidden;
    position: relative;
    text-align: center;
    text-decoration: none;
    text-overflow: ellipsis;
    @include transition (box-shadow 0.175s);
    vertical-align: middle;
    white-space: nowrap;

    &.positive {
        background: $green;
        color: $white;
        border-color: $green;
    }

    &.information {
        background: $blue;
        color: $white;
        border-color: $blue;
    }

    &.secondary {
        background: $white;
        color: $warm_grey;
    }

    &.negative {
        background: $light_grey;
        color: $white;
        border-color: $light_grey;
    }

    &.disabled {
        color: rgba(255, 255, 255, 0.5);
    }
    
    &:not(.disabled):active {
		@include box_shadow (0 3px 3px rgba(0, 0, 0, 0.4) inset, 0 0 200px rgba(0, 0, 0, 0.15) inset);
	}

    & + [data-role="button"] {
        margin-left: 15px;
    }

    & [data-role="icon"] {
		display: inline-block;
        height: 100%;
		vertical-align: top;
		@include filter (brightness(2));
    }
    &.icon-left [data-role="icon"] {
		float: left;
		margin-right: 5px;
    }
    &.icon-right [data-role="icon"] {
		float: right;
		margin-left: 5px;
    }
    &.disabled [data-role="icon"] {
        opacity: 0.5;
    }
}