/*  ==========================================================================
    WIDGETS
    ========================================================================== */


/* Panel */
.Panel {
    @include position(absolute, 0px 0px 0px 0);
    background: $color-white;
    width: 50px;

    &.affix {
        position: fixed;
        top: 56px;
    }

    .Image { // prebaciti u .Image { .Panel & {} }
        /*height: 130px;
        width: 130px;*/
    }

    .cf-list-type-image {
        margin: -5px;

        > .cf-list-item {
            width: percentage(1/3);
            padding: 5px;
        }

        img {
            width: 100%;
            height: auto;
        }

    }

    .cf-list-type-recipe,
    .cf-list-type-coolarticle,
    .cf-list-type-ingredient,
    .cf-list-type-coolbook,
    .cf-list-type-product {
        border: 1px solid #ececec;
        font-size: em(15);

        > .cf-list-item {
            border-top: 1px solid #ececec;

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

        a {
            display: block;

            @include hover {
                background-color: #0d7ed5;
                color: #fff;
                margin-left: -16px;
                padding-left: 16px;

                .tmp-itemID {
                    color: #d8d8d8;
                }
            }
        }
    }

    .cf-list-type-product {
        .Image { display: none; } // @todo: rewrite
    }
}


.Panel-tabs {
    @include position (absolute, 0px 0px 0px 0);
    box-shadow: -1px 0px 0px 0px rgba($color-black,0.1);
    background-color: $color-white;
    margin: 0;
    z-index: 100;
}

.Panel-tabs-link {
    @include rem('font-size', 21px);
    @include transition(all 0.25s ease-out);
    box-shadow: 0px 1px 0px 0px $color-light;
    color: $color-info;
    display: block;
    height: 50px;
    line-height: 50px;
    position: relative;
    text-align: center;
    width: 50px;

    @include hover {
        color: $color-black;
    }

    .Panel-tabs-item.active & { // @todo: active > is-active
        background-color: $color-brand-alpha;
        color: $color-white;
    }

}

.Panel-content {
    @include position (absolute, 0px 0px 0px 0px);
    @include transition(transform 0.3s ease);
    @include transform (translateX(100%));
    background: $color-white;
    //box-shadow: -1px 0px 0px 0px $color-light;
    padding: 0 50px 66px 0;

    .is-active & {
        @include transform (translateX(0%));
    }

    @media screen and (min-width:mq-em($bp-gamma)) {
        left: auto;
        width: 600px;
    }

}

.Panel-content-inner {
    border: $spacing-size-m + px solid $color-brand-alpha;
    height: 100%;
    overflow-y: auto;
    padding: $spacing-size-m + px;
}

.Panel-content-title {
    color: $color-brand-alpha;
    font-size: em(24);
    font-weight: $font-weight-300;
    line-height: 1;
    margin-bottom: 0;
    text-transform: uppercase;
}




/* Widget */

.Widget { 
    background-color: #eee;
    border: 1px solid #dcdcdc;
    margin-bottom: 15px;
    min-height: 64px;
    padding: 20px;
    position: relative;
    width: 100%; 

    @include hover {
        background: $color-white;
        border: 1px solid $color-brand-alpha;
        
        .Widget-content {
           color: $color-dark; 
        }
    }

    p {
        margin-bottom: 0;
    }
}

.cf-widget-collection-item.Widget {
    /*padding-left: 50px; 
    padding-right: 50px;*/
    padding: 0;
}

.Widget-type    { 
    color: $color-info; @include rem('font-size', 10px); text-transform: uppercase; position: absolute; top: -10px; left: -10px; display: none; 
}
// .Widget-tools   { position: absolute; right: 20px; top: 20px; }
.Widget-content > div > p { 
    @include rem('font-size', 18px);     
    color: $color-default;
    text-transform: uppercase; 
}

.Widget-tools   
{  
    .fa { @include rem('font-size', 24px); @include rem('line-height', 24px); height: 24px; }

    .Tool-status    
    { 
        //display: none;
        @include position(absolute, 15px 50px 0 0);
        
    }
    .Tool-sort
    {
        display: none;
        @include position(absolute, 0px auto 0px -30px);
        width: 30px; 
        a 
        {
            display: inline-block; width: 100%; height: 100%;
             
            .fa 
            { position: absolute; top: 50%; right: 5px; margin-top: -12px; }
        }
    }
    .Tool-delete    
    {
        @include position(absolute, 20px 15px 0 0);
       /* display: none;
        @include position(absolute, 0px 0px 0px auto);
        width: 30px;        
        a 
        {
            display: inline-block; width: 100%; height: 100%;
            
            .fa 
            { position: absolute; top: 50%; right: 5px; margin-top: -12px; }
        }*/
    }
    
    

    .Tool-toggle    { @include position(absolute, 20px 0 0 15px); }
}

.Widget:hover .Tool-status,
.Widget:hover .Tool-sort,
.Widget:hover .Tool-delete
{
    display: inline-block; 
}



.Widget-title {
    min-height: 64px;
    padding: 20px 160px 20px 50px;
}

// @todo: rename
.Widget-inner {
    border-top: 1px solid #e5e5e5;
    padding: 30px 20px 20px; // padding top rješavati preko elemenata
}

.Widget-visibilityAction {

    @include inline-block;
    @include transition(background 0.4s ease);
    background-color: #067ad4; 
    border-radius: 3px;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.1);
    color: #fff !important;
    font-size: 15px;
    height: 36px;
    line-height: 36px;
    overflow: hidden;
    padding: 0 25px 0 10px;
    position: relative;
    text-shadow: 0 1px 0 rgba(0,0,0,.2);
    text-transform: uppercase;
    vertical-align: middle;

    &:before {
        background: url(/images/framework/gradient-1.png) no-repeat center center;
        border-radius: 1px;
        box-shadow: 0 0 20px #000, inset 0 0 0 1px rgba(255,255,255,.6);
        content: "";
        position: absolute;
        right: 2px;
        top: 2px;
        bottom: 2px;
        width: 15px;
    }

    @include hover {
        color: #fff;
    }

    &.is-hidden {
        background-color: #b9b9b9;
        padding: 0 10px 0 25px;

        &:before {
            left: 2px;
            right: auto;
        }

    }

}

// .Widget-type { position: absolute; left: 10px; top: 10px; text-transform: uppercase; color: #666; font-size: 10px; }
    //.Widget-tools { position: absolute; right: 10px; top: 5px; }
    // .Widget-tools a { cursor: pointer; margin-left: 10px; }
    // .Widget-remove { position: absolute; right: 5px; top: 5px; color: #000; }
    // .Widget-edit { color: #000; }