/*
 * Copyright (c) 2012 Adobe Systems Incorporated. All rights reserved.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *     http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

    @mixin disc {
        width: 13px;
        height: 13px;
        border-radius: 50px;
        border: 1px solid rgba(0,0,0,0.24);
    }
    
    @mixin disc-active {
        @include disc;
        box-shadow: inset 0 1px 0 1px white;                                                  
        background: -webkit-linear-gradient(bottom, rgba(255,255,255,0), rgba(255,255,255,1));        
    }

#filter-list {
    padding: 0px;
    margin: 0px;
	padding-bottom: 100px;
}

#filter-list h2{
	color: #777;
	margin: 10px 0 5px;
	padding:0 0 0 10px;
	text-shadow: black 0px 1px 0px;
	font-size: 14px;
	font-weight: normal;
}

#filter-list li{
    @include list-reset;
    position: relative;
	color: white;
	padding: 4px;
	min-width: 20ex;
	text-align: left;
	font-size: 12px;
	font-weight: bold;
	padding-left: 5px;
	padding-top: 5px;
	padding-bottom: 5px;
    -webkit-transition-property: height, top, bottom, left, width;
    border-top: 1px solid transparent;
    border-bottom: 1px solid transparent;
}

#filter-list .loading {
    display: none;
}

#filter-list li:hover{
	color: white;   
}

#filter-list li.current{
    border-top: 1px solid rgba(0,0,0,.2);
    border-bottom: 1px solid rgba(255,255,255,.13);    
	background: $selectedBg;
}

#filter-list li .filter-name {
    color: #bbb;
    font-size: 1.2em;
    font-weight: normal;
    text-shadow: 0px 1px 1px #000;
}

#filter-list li .delete-filter{
    border: none;
    float: right;
    position: relative;
    cursor: pointer;
    width: 16px;
    height: 16px;
    text-indent: -9999px;
    margin: -1px 5px 0 0;
    background: transparent url(../img/remove.png) center center no-repeat;
}

#filter-list li .dragpoint {
    float: left;
    width: 10px;
    height: 16px;
    margin-right: 5px;
    background: url(../img/grabber.png) center 1px no-repeat;
    cursor: -webkit-grab;
} 

#filter-list .slide-toggle{
    padding:0;
    margin: 0 10px 0 0; 
    float: left; 
    height: 16px;
    width: 8px;
}

#filter-list li.dragging, #menu li.dragging .dragpoint {
    cursor: -webkit-grabbing;
}

#filter-list li.dragging.current{
    background: $baseColorDark;
}

#filter-list li > .config {
	display: none;
}

#filter-list li.current > .filter-name {
    color: #fff;
/*    opacity: 1;
*/}

#filter-list li.current > .config {
	display: block;
}

#animations li:hover,
.filter-stock .filter-item{
	cursor:pointer;
}
              
.filter-stock .filter-item{
    padding: 5px 10px;
}

.filter-stock .filter-item.loading {
    display: none;
}

.filter-stock .filter-item:hover{
    background: rgba(255,255,255,.05);
    
    .filter-label{
        color: white;
    }
}

.filter-stock .filter-item.forked-filter.current{
    border-top: 1px solid rgba(0,0,0,.2);
    border-bottom: 1px solid rgba(255,255,255,.13);    
    background: $selectedBg;
    .filter-label {
        color: #fff;
    }
}

#filter-list #filter-list-empty {
	color: #aaa;
	font-weight: normal;
    padding: 15px;
}

.filter-stock .filter-item {
    @include flexbox;
    @include prefixProperty(box-orientation, horizontal);
    @include prefixProperty(align-items, center);
    -webkit-transform: translate3d(0, 0, 0);
}

.filter-stock .filter-item .filter-preview {
	width: 75px;
	height: 50px;
	margin: 0 15px 0 5px;
	background: url(../../images/shaderprincess.svg) center 6px no-repeat;
    background-size: 100%;
}

.filter-stock .custom-filter .filter-preview {
    background-color: $baseColorDark;
}

.filter-stock .filter-item .filter-label {
    @include flexbox;
    @include prefixProperty(box-align, center);
    max-width: 100px;
    color: #bfbfbf;
    text-shadow: 0px 1px 1px rgba(0, 0, 0, 1);
}

.filter-stock .filter-item .button-box {
    @include flexbox;
    @include flex;
    @include prefixProperty(box-align, center);
    @include prefixProperty(box-pack, end);
    @include prefixProperty(flex, 0);
    padding: 0 0 0 10px;
}

.filter-stock .filter-item .button-box > a {
    opacity: 0.75;
    margin-left: 5px;
    padding: 0 5px 10px 5px;
    border-radius: 3px;
    
    &:hover{
        opacity: 1;
        box-shadow:  0 0px 2px rgba(0, 0, 0, 0.6);
    } 
}

#animations-container {
	/* JS will make this visible if File API is available. */
	display: none;
}

#animations {
    display: none;
    position: absolute;
    padding: 0px;
    margin: 0px;
    &.menu {
        min-width: auto;
    }
    
    a {
        margin: 0;
        padding: 3px 5px 3px 10px;
        
        &:hover {
            text-decoration: none;
        }
    }
    
    .icon-remove {
        background-size: 70%;
        float: right;
        margin: -1px 0 0 5px;
    }
    li:first-child .icon-remove {
        display: none;
    }  
}

#timeline {
    padding: 10px 15px 10px 15px;
	@include hbox;
    @include valign;
    overflow: hidden;
    box-sizing: border-box;
    border-top: 1px solid rgba(0,0,0,.13);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
	@include user-select(none);

    .title {
        color: $baseColorDark;
        text-shadow: 0 1px 0 white;
        font-size: 12px;
        margin-right: 10px;
    }
	
    .next, .prev, .toggle {
        width: 18px;
        height: 18px;
        cursor: pointer;
        text-indent: -9999em;
        margin-right: 0;
    }      
    
	.play {
		width: 38px;
		height: 27px;
		background: url(../img/play.png) center 5px no-repeat, -webkit-linear-gradient(bottom, rgba(255,255,255,0), rgba(255,255,255,1));
        border: 1px solid rgba(0, 0, 0, 0.3);
		border-radius: 3px;
        margin-top: -1px;
        margin-right: 8px; 
        text-indent: -9999em;
        box-shadow: inset 0 1px 0 #ffffff;
    }         
	
	.play:hover{
        background-image: url(../img/play.png) center 5px no-repeat, linear-gradient(top, #f8fafb, #edefef);
        background-image: url(../img/play.png) center 5px no-repeat, -webkit-gradient(linear, left top, left bottom, from(#f8fafb), to(#edefef));
	    cursor: pointer;
    }
	
	.play.active {
		background: #e5e7e7 url(../img/pause.png) center 6px no-repeat;
        box-shadow: inset 0 1px 0px rgba(0, 0, 0, 0.06);        
	}

	.next,
	.prev {
        background: url(../img/arrow.png) center center no-repeat;
        cursor: default;
        opacity: 0.6;
        pointer-events: none;
        margin-top: -2px;
	}

	.next.active,
	.prev.active {
		background: url(../img/arrow.png) center center no-repeat;
		opacity: 1;
        pointer-events: auto;
        cursor: pointer !important;
	}

	.prev {
      @include prefixProperty(transform, rotateY(180deg));
	}

    .next {
        margin-right: 10px !important;
    }

	.toggle {
        margin: -1px 0 0;
        position: relative;
	    width: 17px;
        border: 1px solid rgba(0,0,0,.3) !important;
	    @include disc-active;
	}
	
	.toggle:after {
	    position: absolute;
	    top: -2px;
	    left: 3px;       
	    width: 13px;
	    height: 13px;
	    text-indent: 0;
	    content: "+";
	    color: #666;
	    font-size: 14px;
	    text-shadow: 0 1px 0 #fff;
        -webkit-font-smoothing: antialiased;
	}

	.toggle.active:after {
	    content: "-"; 
	    font-size: 22px; 
	    line-height: 14px;
	}

	input[type="number"] {
        background: #fff;
        border-radius: 3px;
        width: 63px;
        height: 16px;
        padding: 2px;
        text-align: right;
        margin-left: 10px;
        margin-top: -4px;
        color: black;
        outline: none;
        border: 1px solid #a5a8a8;
        box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.1);
    }
    input[type="number"]:focus {
        border: 1px solid #0940fd;
        -webkit-box-shadow: 0 0 4px #0088ff;
        box-shadow: 0 0 4px #0088ff;
        outline: none;
    }    

    .start {
        color: black;
        margin-right: 8px;
    }

    .keyframe_wrapper {
    	background: #D3D7D7;
    	padding: 0 6px 0 4px;
    	box-shadow: inset 0 -1px 0 0 rgba(255, 255, 255, 0.7), 0 -1px 0 0 rgba(0,0,0,0.15);
    	border-radius: 3px;
        @include flex(1);
    
        .keyframe_bar {
            box-sizing: border-box;
            position: relative;
        }

        .keyframes_list {
        	position: relative;
        	height: 16px;
        }

        .keyframe {
        	@include prefixValue(cursor, pointer);
        	@include disc;
        	margin-left: -5px;
            position: absolute;
            
            &.active {
                @include disc-active;
                @include prefixValue(cursor, grab);
            }
        }

        .play_head{
            position: absolute;
        	cursor:hand;
            margin-left: -5px;
        	margin-top: -32px;
            width: 15px;
            height: 16px;
            background: url(../img/thumb.png) bottom center no-repeat;
        	cursor: -webkit-grab;

        	.laser {
            	position: relative;
            	display: block;
            	height: 17px;
            	width: 1px;
            	margin: 14px auto 0;
            	background: black;
    	    }
        }
    }
}

/* Syntax highligt ------------------------------------------------------------------------------- */

@font-face {
  font-family: "sourcecode";
  src: url("../font/SourceCodePro-Regular.otf");
  font-weight: normal;
  font-style: normal;
}

pre,
.code,
.CodeMirror-lines *{
    font-family: "sourcecode", monospace;
    -webkit-font-smoothing: antialiased;
}
  
.light .code{
    color: $baseColorDark;
    font-size: 12px;  
}
.code {
    color: #000; 
    padding: 15px;
    @include user-select(auto);
    @include prefixProperty(box-sizing, border-box);

    &#filter-code {
        overflow-x: hidden;
        overflow-y: auto;
    }

    > * {
        font-size: 1.05em;
    }

    .css-property-name {
        width: 130px;
    }

    .css-property-value {
        position: absolute;
        left: 150px;
        top: 15px;
        right: 15px;
        padding-bottom: 15px;
    }

    .data-uri {
        display: inline-block;
        width: 200px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    a {
    	color: #8757ad;
        text-decoration: underline;
    }

    .function-name {
        color: #446fbd;
    }

    .function-name.custom {
        color: #446fbd;
    }

    .parameter-name {
        color: #535353;
    }

    .keyword {
        color: #446fbd;
    }

    .parameter-value {
        color: #738d00;
    }

    .parameter-unit {
        color: #000;
    }

    .function-arguments.custom {
    }

    .keyframe-percent {
        color: #000;
    }

    .property-name {
        color: #000;
    }

    .keyframe-content {
        margin-left: 20px;
    }
}


.config-panel {
    @include vbox;
    box-sizing: border-box;
    height: 100%;
    padding-top: 10px;

    .config-row {
        @include hbox; 
        position: relative;
        padding: 7px 10px;
        line-height: 23px;
        overflow-x: hidden;

        label {
            display: block;
            width: 180px;
            @include noflex; 
            font-size: 13px;
            color: #bbb;
            text-align: right;
            text-shadow: 0px -1px 0 rgba(0, 0, 0, 0.8);
            margin: 0 7px 0 0;
        }
        
        div.config-default-value{
            display: block;
            min-width: 200px;
        }

        input, .value, select {
            display: block;
            @include noflex;
        }
        
        input[type='text'],
        input[type='number']{
            @extend .text-field.dark;
            width: 60px !important;
        }
        select > option {
            color: black;
        }
        input.config-shader-name {
            width: 200px !important;
        }        

        input[type='checkbox'] {
            display: none;
        }
    }
    
    h4 {
        margin: 0 0 10px;
        padding: 5px 10px 5px 10px;
        color: white;  
        font-size: 14px;
        font-weight: normal;    
        text-shadow: 0px -1px 0 #000;
        background: rgba(0, 0, 0, 0.24);
    }
    
    .config-parameters-row {
        position: relative;
        margin: 15px;
        border-radius: 4px;
        box-shadow: inset 0 0 4px rgba(0,0,0,.8);
        padding: 0; 
    }

    .config-parameter {
        @include flex(1); 
        background: rgba(255, 255, 255, 0.05);
        text-align: left;
        padding-bottom: 10px;
    }

    .config-parameters-wrapper {
        @include vbox;
        text-align: left;
        h4 {
            font-weight: normal;
            text-shadow: 0 -1px 0 #000;
        }
    }

    .config-parameters {
        @include flex(1);
        margin: 0px;
        padding: 0px;
        overflow: auto;
        
        li {
            @include list-reset;
            margin: 0px;
            padding: 2px 10px;
            cursor: pointer;
            color: #bbb;   
            text-shadow: 0px 1px 0 rgba(0, 0, 0, 0.8);
            font-size: 13px;
            
            &:hover {                                 
                background: rgba(255, 255, 255, 0.05);
            }
            &.active {
                background: rgba(255, 255, 255, 0.05);
                color: white;
            }
        }
    }
}

.code-panel {
	position: relative;
	background: white;
	color: black;
	height: 100%;

	.code-view {
    	position: absolute;
    	left: 0px;
    	right: 0px;
    	top: 0px;
    	bottom: 0px;
    }
}

.code-editor {
    background: white;
    visibility: hidden;
    position: absolute;
    top: 0px;
    
    .error-line {
        background: rgba(255, 0, 0, 0.7);
        color: white;
        /* Avoid borders because that will make the gutter jump. */
        outline: 1px solid rgba(190, 0, 0, 1);
    }

    .error-bookmark {
        font-weight: bold;
        background: rgba(255, 0, 0, 0.5);
    }

    &.active-shader-view {
        visibility: visible;
    }

    body.wait-dock-layout & {
        display: none ! important;
    }
}

#shader-errors {

	&>div {
	    padding: 10px;
	}

	.header {
        color: #bbb;
        text-shadow: 0-1px 0 #000;
    	margin-top: 5px;
    }

    .inline-shader-errors {
        @include user-select(auto);
    }

    pre {
    	margin: 0;
    	font-size: 12px;
    }
}

.loader{
    .progress-bar {
   	    border: 1px solid #333;
   	    height: 30px;

   	    .progress-bar-interior {
        	background: #ccc;
        	width: 0%;
        	height: 30px;
        }
   	}
}


/* Selection ------------------------------------------------------------------------------- */

::selection {
    background: #e0f0fa;
    color: #000;
}

/* Scrollbars ------------------------------------------------------------------------------- */

::-webkit-scrollbar {
	height: 8px;
    width: 8px;
}

::-webkit-scrollbar-track {
	background: rgba(0,0,0,0.1);
	box-shadow: inset 0 0 6px rgba(0,0,0,0);
    -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0);
    border-radius: 4px;
    -webkit-border-radius: 4px;
}

::-webkit-scrollbar-thumb {
	border-radius: 4px;
	-webkit-border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(0,0,0,0.3);
    box-shadow: inset 0 0 6px rgba(0,0,0,0);
    -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0);
}

::-webkit-scrollbar-thumb:window-inactive {
    background: rgba(0,0,0,0.1);
} 

.button.selected {
    @extend .button:active;
}

.button.dark.selected {
    @extend .button.dark:active;
}

.icon{
    width: 16px;
    height: 16px;
    display: inline-block;
    vertical-align: middle;
    text-indent: -9999px;
} 

.icon-remove{
    background: transparent url(../img/remove.png) center 4px no-repeat;
}

.icon-edit{
    background: transparent url(../img/edit.png) center 4px no-repeat;
}

.icon-fork{
    background: transparent url(../img/fork.png) center 3px no-repeat;
}   

.icon-close{
    background: transparent url(../img/close.png) center center no-repeat;
}
  
.slide-toggle {
    overflow: hidden;
    background: #1f1f1f;
    border: 1px solid black;
    position: relative; 
    cursor: pointer; 
    border-radius: 3px;
    
    input {
        display: none;
        
        &:checked + div{
            top: 8px;
        }
    } 
    
    div{   
        top: 0;
        width: 100%;
        height: 100%; 
        position: relative; 
        @include prefixProperty(transition, top 0.1s ease-out);
    }
    
    span{   
        top: 0;
        width: 100%;
        height: 50%;
        display: block;
        background-image: none, linear-gradient(top, #7a7c7c, #5f6060);
        background-image: none, -webkit-gradient(linear, left top, left bottom, from(#7a7c7c), to(#5f6060));
        border-radius: 2px;
    }
}

.slide-switch input:checked + .wrapper {
  left: -38px;
}

#import-filter{ 
    
    section {
        padding: 10px 20px;
    }

    p {
        color: #aaa;
        font-size: 12px;
        line-height: 1.3em;
    }
    
    label{   
        display: block;
        margin: 0 0 5px 0 ;
        color: #a4b4b7;
        font-size: 12px; 
        text-shadow: 0 -1px 0 #000000;
    }
    
    form {     
        width: 100%;
        
        @include hbox;
        
        input[type='url']{  
            @include flexbox;
            @include flex(1);
        }
        
        a{
            width: 40px;
        }
    }
    
    .notice{
        display: none;
    }
}

.notice {
    padding: 10px 15px;
    margin: 10px 0;
    font-size: 14px;
    line-height: 1.4em;
    border-radius: 3px;
    box-shadow: 0 -1px 0 0 rgba(0, 0, 0, 0.5);
    
    &.error{
        background: rgb(214, 190, 194);
        color: rgb(160, 25, 25);
    }
}

#code-view-error{
    display: none;
    margin: 20px 20px;
    box-shadow: none;
}

