.tool {
    height: 4rem;
    position: relative;;
    margin: 0.6rem 0;
    z-index: 11;

    > [class^="icon-"] {
        width: 100%;
        height: 100%;
        cursor: pointer;
        color: $color-featured;
        font-size: 2.1rem;
        z-index: 12;
        position: relative;
        display: flex;
        justify-content: center;
        align-items: center;

        &:hover {
            color: $color-snow;
            background: $color-featured;

            + .tool-label {
                transform: translateX(0);
            }
        }
    }

    &.active {
        > [class^="icon-"]{
            color: $color-snow;
            background-color: $color-featured;
        }
        .tool-content {
            animation: display-none-in-transition 0.4s forwards;
            opacity: 1;
            visibility: visible;
            z-index: 9;
        }
        > [class^="icon-"]:hover + .tool-label {
            transform: translateX(-100%);
        }

    }

    &.open {
        .tool-content {
            animation: display-none-in-transition 0.4s forwards;
            display: block;
        }
    }

    &.disabled {
        opacity: 0.5;
        cursor: default;

        &:hover .tool-label {
            display: none;
        }
    }
}

.tool-label {
    text-transform: uppercase;
    color: #fff;
    font-size: 1rem;
    padding: 0 1.5rem 0 4rem;
    position: absolute;
    top: 0;
    height: 100%;
    background: $color-featured;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    border-top-right-radius: 0.3rem;
    border-bottom-right-radius: 0.3rem;
    transform: translateX(-100%);
    z-index: 10;

    .shortcut {
        text-transform: capitalize;
        margin: 0;
        line-height: 1;
        margin-left: 0.5rem;
        font-size: 0.9rem;
    }
}

.tool-content {
    background: #fff;
    min-width: 30rem;
    position: absolute;
    left: 6rem;
    top: 0;
    opacity: 0;
    z-index: -9;
    display: none;
    border-radius: 0.3rem;
    animation: display-none-out-transition 0.4s;

    .open {
        opacity: 1;
        z-index: 9;
    }

    header {
        width: 100%;
        height: 4rem;
        line-height: 4rem;
        background: $color-featured;
        color: $color-snow;
        position: relative;
        border-top-left-radius:0.3rem;
        border-top-right-radius:0.3rem;

        &:before{
            position: absolute;
            content: '';
            top: 0;
            bottom: 0;
            margin: auto;
            left: -7px;
            @include triangle(1.4rem, $color-featured, left);
        }

        .title {
            color: $color-snow;
            font-family: $font-title;
            font-size: 1.2rem;
            line-height: 4rem;
            text-transform: uppercase;
            text-align: center;
            margin: 0;
            color: $color-featured-light;
        }

        .close {
            position: absolute;
            display: block;
            transform: rotate(45deg);
            top: 0;
            bottom: 0;
            margin: auto;
            font-size: 1.4rem;
            width: 1.4rem;
            height: 1.4rem;
            right: 1rem;
            cursor: pointer;
        }
    }

    .main {
        padding: 2rem 2.5rem 1rem;
        border: 0.1rem solid $color-snow-extra-dark;
        border-top: 0;
        min-width: 25rem;
        overflow: visible;
        border-bottom-left-radius: 0.3rem;
        border-bottom-right-radius: 0.3rem;

        &.float-footer {
            padding-bottom: 6rem;
            border-bottom: 0;
            overflow: auto;
            border-bottom-left-radius: 0;
            border-bottom-right-radius: 0;
        }
    }

    footer {
        width: 100%;
        height: 5rem;
        padding: 0 3rem;
        position: absolute;
        bottom: 0;
        background: $color-snow-dark;
        border: 0.1rem solid $color-snow-extra-dark;
        border-bottom-left-radius: 0.3rem;
        border-bottom-right-radius: 0.3rem;
        border-top: 0;
        display: flex;
        align-items: center;
        justify-content: space-between;

        .btn-blue-small {
            font-family: "Century Gothic Bold", sans-serif;
            color: #fff;
            background-color: #397999;
            text-transform: uppercase;
            border: none;
            text-shadow: none;
            border-top-left-radius: 3px;
            border-top-right-radius: 3px;
            border-bottom-left-radius: 3px;
            border-bottom-right-radius: 3px;
            transition: all, 0.2s, ease-in-out;
            cursor: pointer;
        }

        .action-filter {
            float: right;
            display: inline-block;
            width: 100px;
            padding: 0 30px;
            line-height: 32px;
            font-size: 11px
        }
    }

    i {
        font-size: 1.6rem;
        padding-right: 1rem;
        color: $color-info-dark;

        &.icon-bezier {
            font-size: 1.7rem;
            position: relative;
            left: -0.7rem;
            padding-right: 0.4rem;
        }

        &.icon-erase-all {
            font-size: 1.9rem;
            position: relative;
            left: 0rem;
            padding-right: 0.8rem;
        }

        &.icon-hand-point {
            font-size: 2rem;
            position: relative;
            left: -0.4rem;
            padding-right: 0.7rem;
        }

        &.color-error {
            color: $color-negative;
        }

        &.color-success {
            color: $color-positive;
        }
    }

    .icon-info{
        color: $color-info;
        padding-right: 0;
        padding-left: 1rem;
        cursor: pointer;

    }

    .tool-tip-parent{
        position: relative;
    }

    .tool-tip{
        width: 20rem;
        height: auto;
        padding: 1rem 2rem 2rem 2rem;
        color: #fff;
        font-size: 1.2rem;
        position: absolute;
        border-radius: 0.3rem;
        background: $color-info-dark;
        top: 0;
        right: 0;
        display: none;
        font-weight: normal;
        transform: translate3d(100%, -100%, 0);
        box-shadow: 2px 2px 2px 1px rgba(0, 0, 0, 0.2);
        border: 0.1rem solid darken($color-info-dark, 10);

        span{
            display: inline-block;
            margin: 1rem 0 0;

        }

        .icon-plus-cross{
            position: absolute;
            top: 0;
            right: 0;
            color: #FFF;
            padding-top: 0.5rem;
            padding-right: 0.2rem;
            cursor: pointer;
            transform: rotate(45deg);
        }
    }

    .default-list {
        padding: 0.5rem 1rem;
        list-style-type: none;
        width: 100%;
        margin: 0;
        font-size: 1.2rem;

        li {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 1.5rem 0;
            position: relative;
            border-bottom: 0.1rem solid $color-smoke;

            &:first-child {
                padding-top: 0;
            }

            &:last-child {
                border-bottom: none;
                padding-bottom: 0;
            }

            a, label {
                text-decoration: none;
                color: $color-slate;
                white-space: nowrap;
                display: block;
                flex-grow: 1;
                transition: color 0.2s ease-in-out;

                &:hover {
                    color: $color-info-dark;
                }
            }

            &.active {
                font-weight: 700;

                &:hover a, &:hover label, .shortcut {
                    color: $color-slate;
                }

                label{
                    font-weight: 700;
                }

                &:before {
                    content: '';
                    width: 0.6rem;
                    height: 0.6rem;
                    display: block;
                    position: relative;
                    left: -0.8rem;
                    margin-left: -0.6rem;
                    background: $color-info-dark;
                    border-radius: 100%;

                }
            }

            .shortcut {
                white-space: nowrap;
                padding-left: 1rem;
            }

            .strong {
                font-weight: 700
            }

            .critical {
                color: $color-negative;
            }

            label{
                cursor: pointer;
            }

            .image-file{
                display: none;
                width: 0;
                height: 0;;
                position: absolute;
            }
        }
    }

    .tool-info-caption {
        text-align: center;
        border-bottom: 0.1rem solid $color-snow-extra-dark;
        padding: 0.5rem 1rem;
        padding-top: 0;
        margin-bottom: 1.5rem;

        span {
            font-family: $font-title;
            font-size: 1.4rem;
        }

        p {
            font-family: $font-title;
            font-size: 1.2rem;
        }
    }

    .center-default-list {
        @extend .default-list;

        li {
            display: block;
        }
    }
}

.tool {

    > .icon-filter {
        font-size: 2rem;
    }

    > .icon-layers {
        font-size: 2rem;
    }

    > .icon-pointer {
        font-size: 2rem;
    }

    > .icon-upload {
        font-size: 2rem;
    }

    > .icon-pen {
        font-size: 2rem;
    }

    > .icon-bezier {
        font-size: 2.4rem;
    }

    > .icon-hand {
        font-size: 2.3rem;
    }

    > .icon-erase {
        font-size: 2rem;
    }

    > .icon-ruler {
        font-size: 2.4rem;
    }

    > .icon-track {
        font-size: 2.5rem;
    }

    > .icon-clock {
        font-size: 2rem;
    }

    > .icon-pacmans {
        font-size: 2rem;
    }

    > .icon-info {
        font-size: 2rem;
    }
}

.pacmans {
    background: $color-snow-dark;
    padding: 2rem 1rem;
    margin-bottom: 2rem;
    text-align: center;
    font-family: $font-title;
    font-size: 1.2rem;

    span {
        display: block;
        line-height: 2rem;
    }

    strong {
        font-family: $font-title;
        font-weight: normal;
    }

    .tool-tip-parent{
        margin-top: 2rem;
    }
}
