@import url(http://fonts.googleapis.com/css?family=Lato:300,400,700);
body{
    background-color: $background-main;
    color: $text-main;

    line-height: 1.5;
    font:16px/1.5 Lato, "Helvetica Neue", Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a{
    color: $text-secondary;
    &:visited{}
    &:hover{}
}

i{ white-space: pre-line; }

p{
    font-weight: normal;
    line-height: 1.64;
}

hr{
    border: 0;
    height: 0;
    border-bottom: 1px solid $gray-lighter;
}

img {
    max-width: 100%;
    height: auto;
    width: auto\9; /* ie8 */
}

// medium
blockquote {
    font-family: Georgia,Cambria,"Times New Roman",Times,serif;
    font-style: italic;
    border-left: 3px solid $flat-blue;
    padding-left: 20px;
    margin-left: -10px;
    margin-top: -1px;
    padding-bottom: 1px;
    font-size: 18px;
}

.center {
    display: block;
    margin-left: auto !important;
    margin-right: auto !important;
}

.centered {
    margin: auto;
    position: absolute;
    top: 0; left: 0; bottom: 0; right: 0;
    display: table;
    height: auto;
}

.pull-left{ float: left }
.pull-right{ float: right }

.clear {
    @include clear;
}

.hide { display: none }

.text-left           { text-align: left; }
.text-right          { text-align: right; }
.text-center         { text-align: center; }


.small   { font-size: 85%; }
.x-small { font-size: 80%; }

// Color Classes
.flat-green  { color: $flat-green; }
.flat-blue   { color: $flat-blue; }
.flat-red    { color: $flat-red; }
.flat-orange { color: $flat-orange; }


.container{
    overflow: hidden;
    padding-left: $sidebarWidth;

    .column{
        position: relative;
        float: left;
        // margin-bottom: -99999px;
        // padding-bottom: 99999px;
    }
}

// Button
.btn{
    display: block;
    width: 320px;
    border: none;
    margin: 1em 0;
    padding: 1em;
    position: relative;
    background-color: $flat-blue;
    color: #fff;

    $lighten-amount: 4%;

    &.center{
        left: 0;
        right: 0;
    }

    &:focus{ outline: none }
}

/*
  ==========================================================================
    Notifications bar
  ==========================================================================
*/
.notification-bar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: $flat-green;
    z-index: 99999;
    color: white;
    padding: 5px 20px;

    &:hover {
        background-color: lighten($flat-green, 2%);
        cursor: pointer;
    }

    .message {
        a {
            color: white;
            text-decoration: none;
        }

        .close-btn {
            position: fixed;
            right: 20px;
            top: 5px;
            text-decoration: none;
        }
    }


}

/*
  ==========================================================================
    Header
  ==========================================================================
*/
$gutter: 10px;
$header-height: 80px;
header{
    height: $header-height;
    position: fixed;
    z-index: 100;
    width: calc(100% - 275px);
    background-color: $blue-dark;

    .status-pane{
        width: 150px;
        box-shadow: inset 0px 0px 1px #8F8F8F;
        padding: 16px 0;
        p{
            text-align: center;
            margin: 0;
            &.connection{
                color: $flat-green;
                &:hover{
                    cursor: pointer;
                }

                &.offline{ color: $flat-red }
            }

            &.status{
                font-size: 14px;
                font-weight: 200;
                color: #474C52;
            }
        }
    }
}

.logo{
    width: 275px;
    background-color: $blue-dark;
    height: $header-height;
    box-shadow: inset 0px 0px 1px #8F8F8F;
    h2{
        padding: 0 20px;
        color: $gray-lightish;
        font-weight: normal;
        span{
            font-size: 13px;
            color: #303238;
        }
    }
}

/*
  ==========================================================================
    Navigation
  ==========================================================================
*/

.nav{
    list-style: none;
    padding: 0;
    margin: 0 $gutter;

    li{
        float: left;
        margin: 0 10px 0 0;

        a{
            display: inline-block;
            text-decoration: none;
            color: $gray-lightish;
            font-size: 19px;
            padding: 26px;
            &:hover{
                background-color: lighten($blue-dark, 2%);
                color: white;
            }
        }
    }
}

/*
  ==========================================================================
    Sidebar
  ==========================================================================
*/
#sidebar{
    position: fixed;
    left: 0;
    width: $sidebarWidth;
    right: $sidebarWidth;
    margin-right: -$sidebarWidth;
    background-color: #fafafa;
    height: 1000px;

    .add-new-doc{
        position: absolute;
        width: 100%;
        font-weight: 200;

        i{
            background-color: $flat-green;
            padding: 3px 6px 4px 6px;
            position: relative;
            top: -10px;
            color: whitesmoke;
            border-radius: 3px;
            &:hover{
                background-color: lighten($flat-green, 5%);
                cursor: pointer;
            }
        }
    }

    .documents{
        list-style-type: none;
        padding: 0;
        margin-top: $header-height;
        overflow-y: auto;
        li{
            a{
                color: $blue-dark-light;
                text-decoration: none;
                padding: 15px 20px;
                display: block;
                border-bottom: 1px solid #f2f2f2;
                overflow: hidden;
                position: relative;

                &:hover{
                    background-color: white;
                }

                &.active{
                    background-color: white;
                    box-shadow: inset 3px 0 0px $flat-blue;
                }

                p{
                    font-size: 15px;
                    margin: 0 0 10px 0;
                }

                span{
                    font-size: 11px;
                    color: $flat-blue;
                    i{
                        margin-right: 5px;
                    }

                    &.views{ color: $gray-lightish; }

                    &.published{
                        &.draft{
                            color: $flat-red;
                        }
                    }

                    &.remove{
                        position: absolute;
                        right: 5px;
                        top: 22px;
                        font-size: 14px;
                        color: $flat-red;
                        opacity: 0;
                        transition: opacity 0.2s ease-out;
                        &:hover{
                            color: darken($flat-red, 15%);
                            text-shadow: 0 0 1px #CCC;
                        }
                    }

                }

                &:hover{
                    .remove{
                        opacity: 1;
                    }
                }


            }

            &:last-child a{border-bottom: 0;}
        }

    }


    // Side Bar headers / titles
    h3{
        padding: 5px 10px;
        background-color: $blue-dark;
        text-transform: uppercase;
        font-size: 13px;
        color: $gray-lighter;
    }

    footer{
        color: #41464c;
        text-transform: uppercase;
        margin-top: 40px;
        display: block;
        width: 100%;
        font-size: x-small;
    }
    >p{
        font-size: 80%;
        padding: 0 10px;
    }
    // Twitter follow button
    .twitter-follow-button{
        padding: 0 0 0 11px;
    }
}

/*
  ==========================================================================
    Content
  ==========================================================================
*/
#main{
    width: 100%;
    // margin: 5px $gutter;
}


.content-wrapper{
    padding: 20px 15px;
    margin-top: $header-height;
}

.content{
    background-color: white;
    border-radius: 3px;
    padding: 0 10px;
    box-shadow: 0 2px 0 rgba(210, 211, 212, 0.75);
    margin: 20px 0 65px 0;
    position: relative;

    h1{
        margin: 0;
    }

    h2 {
        border-bottom: 1px solid #eeeeee;
    }
    .breadcrumbs{
        position: absolute;
        top: -30px;
        left: 0px;

        .separator{
            margin: 0 10px;
        }

        a{ text-decoration: none; color: $flat-blue; }
        a:hover{ text-decoration: underline }
    }

    #edit-controls {
        display: inline-block;
        float: right;
        margin: 0;
        padding: 0;
        list-style: none;

        li {
            float: left;
            margin-right: 8px;

            &:last-child{ margin-right: 0 }

            a {
                background-color: #46647C;
                padding: 3px 0;
                width: 37px;
                text-align: center;
                color: white;
                border-radius: 2px;

                &:hover { background-color: #527591 }
            }
        }
    }

    .row{
        position: relative;
        padding: 22px 25px 10px 25px;
        border-bottom: 1px solid $background-main;
        margin: 0 -10px;
        &:last-child{border-bottom: 0;}
        &:hover{ background-color: #f7fcff }

        .remove{
            position: absolute;
            right: -5px;
            top: 22px;
            color: $flat-red;
            opacity: 0;
            transition: opacity 0.2s ease-out;
            &:hover{ cursor: pointer }
        }
        &:hover{
            .remove{
                opacity: 1;
            }
        }
        .label{
            color: $flat-blue;
            font-size: 11px;
            position: absolute;
            top: 10px;
            left: 25px;
            font-weight: bold;
            &.nested{
                top: inherit;
            }
        }

        .value{
            padding: 5px 0;
            margin: 5px 0;
        }


        input.inEdit{
            border: none;
            border: 1px solid transparent;
            background-color: transparent;

            &:hover{
                // background-color: $background-main;
                border: 1px dotted #D9DDE7;
                // transition: background-color 0.5s;
            }

            &:focus{
                outline: 0;
            }
        }

        input.editing{
            background-color: white;
        }

        &.id{
            background-color: $blue-dark;
            border-top-left-radius: 3px;
            border-top-right-radius: 3px;
            padding: 14px 25px;
            color: #757E8A;
            font-weight: 200;
            .key{
                font-weight: bold;
            }
        }

        &.new{
            input{
                display: inline;
                width: auto;
                padding: 5px 15px;
                margin: 5px 0;
                width: 47%;
            }
        }
    }

    .btn-add{
        position: absolute;
        background-color: transparent;
        color: whitesmoke;
        font-size: 30px;
        padding: 0px;
        font-weight: 200;
        bottom: -90px;
        width: 40px;
        height: 40px;
        background: #252C3A;
        border-radius: 3px;
        &:hover{
            background-color:#323C50;
        }

        &.save{
            background-color: $flat-green;

            i{
                font-size: 20px;
                position: relative;
                top: -3px;
            }
        }
    }
}

.animate {
    @include translateZ(0);
    -webkit-perspective: 1000;
    -webkit-backface-visibility: hidden;
    @include transition( all, .2s, ease-out );
}

@include keyframes( in ){
    to { @include translateY(0); }
}
/*
  ==========================================================================
    Modal Viewer
  ==========================================================================
*/
// Overlay
.md-overlay{
    visibility: hidden;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    background-color: rgba(32, 40, 49, 0.9);
    opacity: 0;

}

// X button
.md-overlay-x{
    visibility: hidden;
    position: fixed;
    top: 0;
    right: 0;
    padding: 3px 10px 5px 10px;
    color: hsla(0, 100%, 100%, 0.65);
    text-shadow: 0px 0px 8px rgba(58, 56, 56, 0.45);;
    font-weight: 200;
    font-size: 31px;
    z-index: 10000;
    &:hover{
        cursor: pointer;
        color: #FFF;
    }
}

// Content
.md-content{
    width: 340px;
    border: 10px solid rgba(255, 255, 255, 0.1);
    z-index: 147;
    display: none;
    background-color: white;

}

// Modal Mode
body.md-mode .md-content{ display: table }
body.md-mode .md-overlay-x{
    visibility: visible;
}
body.md-mode{
    .md-overlay{
        visibility: visible;
        opacity: 1;
    }

    .container{
        @include blur(6px);
    }
}

// Connect form
form.connect {
    .connect-pane {
        position: relative;

        .title {
            margin: -10px;
            background-color: $background-main;
            padding: 10px;
        }

        .version {
            position: absolute;
            bottom: -70px;
            width: 100%;
            text-align: center;
            color: aliceblue;
            opacity: 0.2;
            font-size: 14px;
        }

    }
}
textarea {
    resize: vertical;
}

input,
textarea {
    display: block;
    width: 100%;
    border: 1px solid #eee;
    margin: 1em 0;
    padding: 1em;
    color: #666;
    &::-webkit-input-placeholder {
       color: $gray-lighter;
    }

    box-sizing: border-box;
    appearance: none;
    border-radius: 0;
}

label {
    font-size: 0.75em;
    color: #666;
}

input:focus,
textarea:focus {
    border: 1px solid #ccc;
    color: #333;

    -webkit-outline: none;
    -moz-outline: none;
    outline: none;
}

/* Demo FloatLabel.js Styling */

.js-float-label-wrapper label {
    font-weight: 500;
}

.js-float-label-wrapper.focused label,
.js-float-label-wrapper.populated label {
    color: $flat-blue;
}

.js-float-label-wrapper.focused.populated label {
    color: $flat-blue;
}

/*
  ==========================================================================
   Embeds
  ==========================================================================
*/
.embed {
    position: relative; padding-bottom: 56.25%;
    padding-top: 30px;
    height: 0;
    overflow: hidden;
    max-width: 100%;
    height: auto;

    iframe, object, embed {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }
}

/*
  ==========================================================================
   Embeds
  ==========================================================================
*/
.ace_editor {
    border: 1px solid lightgray;
    margin: auto;
    min-height: 100px;
    position: relative !important
}

.ace_scrollbar {
    display: none;
}

.fullScreen .fullScreen-editor{
    height: auto!important;
    width: auto!important;
    border: 0;
    margin: 0;
    position: fixed !important;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10000
}

.fullScreen {
    overflow: hidden
}


/*
  ==========================================================================
   nprogress override
  ==========================================================================
*/
body {@include loadingColor($flat-green)}

/*
  ==========================================================================
   Debug Trick
  ==========================================================================
*/
// * {
//     background:rgba(0,0,0,0.2);
// }
