/*!
The MIT License (MIT)

Copyright (c) 2014 Barbara Lepage <db0company@gmail.com>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
 */
// ************************************************************************* //
// COLORS

// Main black color and its shades.
@Cmain:                 hsl(0, 0%,    19%);
@Cmaindark:          darken(@Cmain,    5%);
@Cmaindarkdark:      darken(@Cmain,   10%);
@Cborder:            darken(@Cmain,   13%);
@Cmainlight:        lighten(@Cmain,    5%);
@Cmainlightlight:   lighten(@Cmain,   10%);
@Cmainlightlightl:  lighten(@Cmain,   55%);

// Complete invert of the main black theme.
@Cinvert:               hsl(0, 0%,    90%);

// The green theme colors and its shades.
@Csecond:                   #4cae4c;
@Cseconddark:        darken(@Csecond, 10%);
@Cseconddarkdark:    darken(@Csecond, 20%);
@Csecondlight:      lighten(@Csecond, 15%);
@Csecondlightlight: lighten(@Csecond, 35%);

// The red theme color.
@Cwarning: #ae4c4c;

// ************************************************************************* //
// SIZES

@Smain: 100%;

// ************************************************************************* //
// Global

body {
    background-color: @Cmain;
    color: @Cinvert;
    text-align: justify;
}

body, h1, h2, h3, h4, h5, h6 {
    font-family: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", "Helvetica Neue", Helvetica, Verdana, Tahoma, sans-serif;
}

a {
    color: @Csecond;
    strong {
        color: @Cinvert;
    }
    &:hover {
        color: @Csecondlight;
        strong {
            color: @Csecond;
        }
    }
}

 
main {
    width: @Smain !important;
    min-height: 600px;
    margin: auto;
}

h1, h2, h3, h4, h5, h6 {
    a.anchor {
        font-size: 18px;
    }
}

h1, h2, h3, h4 {
    font-weight: bold;
    text-align: left;
}

h1, h2, h3 {
    color: @Cmainlightlightl;
    strong {
        color: @Cinvert;
    }
    a.anchor {
        color: @Cmainlightlightl;
    }
}

h4, h5, h6 {
    color: @Cseconddark;
}

h1 {
  border-bottom: 4px @Cmainlightlightl solid;
  padding: 20px 2%;
}

h3 {
  border-bottom: 2px @Cmainlightlightl solid;
  padding: 15px 1%;
}

h4 {
    border-bottom: 1px solid @Cinvert;
    padding: 10px 0;
    margin: 20px 0;
    color: @Cinvert;
    a.anchor {
        color: @Cinvert;
    }
}

.list-group {
    .list-group-item {
        background-color: @Cmainlight;
        border-color: black;
    }
    &.list-group-big .list-group-item {
        padding: 25px;
    }
    a.list-group-item {
        color: @Csecondlight;
        &:hover {
            background-color: @Cmain;
            color: @Csecond;
        }
    }
}


.well {
    background-color: @Cmaindark;
    border-color: black;
    color: @Cmainlightlightl;
    strong {
        color: @Cinvert;
    }
    code {
        background-color: @Cmain;
    }
    hr {
        border-color: @Cseconddark;
    }
    h3 {
        margin: 5px 0 15px 0;
        border: 0;
        padding: 0;
    }
    a {
        color: @Csecond;
    }
    a.btn {
        color: white;
    }
    small {
        display: block;
        padding: 0 10px;
        font-style: italic;
    }
    &.example {
        padding-top: 40px;
        margin-bottom: 130px;
        pre {
            margin: 50px;
            margin-bottom: 30px;
            font-size: 1.5em;
        }
        .btn {
            margin-right: 50px;
            margin-bottom: 20px;
        }
    }
    &.well-with-icon {
        min-height: 136px;
        .pull-right, .pull-left {
            background-color: @Csecond;
            color: @Cinvert;
            padding: 10px;
            border-radius: 5px;
            margin: 5px;
        }
        .pull-right {
            margin-left: 20px;
        }
        .pull-left {
            margin-right: 20px;
        }
    }
}

a.well {
    display: block;
    &:hover {
        text-decoration: none;
        opacity: 0.8;
    }
}

.info, .warning {
    margin: 10px;
    padding: 10px;
    background-color: @Cmainlight;
    color: @Cinvert;
    code {
        background-color: @Cmain;
    }
}

.info {
    border-left: 10px @Csecond solid;
}

.warning {
    border-left: 10px @Cwarning solid;
}

.with-icon {
    padding: 30px;
    .pull-left {
        padding-right: 30px;
    }
    .pull-right {
        padding-left: 30px;
    }
}

dd {
    margin-left: 20px;
}

code {
    background-color: @Cmaindark;
    color: @Csecondlight;
    display: inline-block;
    margin: 5px;
}

.table {
    margin: 20px 0;
    border-radius: 4px;
    // Stripes
    > tbody > tr:nth-child(odd) {
        > td {
            background-color: @Cmaindark;
        }
        > th {
            background-color: @Cmain;
        }
    }
    > tbody > tr:nth-child(even) {
        > td {
            background-color: @Cmainlight;
        }
    }
    // Cells
    > thead,
    > tbody,
    > tfoot {
        > tr {
            > th,
            > td {
                border-top: none;
            }
            > th {
                background-color: @Cmainlightlight;
            }
        }
    }
    // Table headings
    > thead {
        > tr {
            > th {
                // Bottom align for column headings
                border-bottom: 2px solid @Cmainlightlightl;
            }
        }
    }
    > tbody {
        > tr.table-heading {
            // These special rules are useful for long headings in <tbody>
            // Headings in <thead> or row headings are handled already.
            > th {
                border-bottom: 2px solid @Cmainlightlightl;
                background-color: @Cmainlightlight;
            }
        }
    }
    // Account for multiple tbody instances
    > tbody + tbody {
        border-top: 2px solid @Cmaindarkdark;
    }
}

// This adds borders to the table elements. Nothing is using it right now so
// it is commented out.
/*
.table-bordered {
    border: 1px solid @Cmaindarkdark;
    > thead,
    > tbody,
    > tfoot {
        > tr {
            > th,
            > td {
                border: 1px solid @Cmaindarkdark;
            }
            > th {
                background-color: @Cmainlightlight;
                // Bottom align for column headings
                border-bottom: 2px solid @Cmainlightlightl;
            }
        }
    }
    > thead > tr {
        > th,
        > td {
            border-bottom-width: 2px;
        }
    }
}
*/

.table-responsive {
    border: none;
}

// ************************************************************************* //
// Menu side bar nav

#sidebar-wrapper, .navbar {
    background-color: @Cmaindarkdark;
    overflow-x: hidden;
    .sidebar-brand, .navbar-brand {
        img {
            opacity: 0.6;
            margin-right: 8px;
        }
        &:hover {
            color: #fff;
            img {
                opacity: 1;
            }
        }
    }
    .sidebar-nav {
        li ul {
            list-style-type: none;
            padding: 0;
            li {
                line-height: 20px;
                a {
                    padding-left: 20px;
                }
            }
        }
    }
}

.content-header {
    height: auto;
    background-color: @Cmaindark;
    h1 {
        color: @Cinvert;
        display: block;
        margin: 0;
        margin-bottom: 20px;
        line-height: normal;
        border-bottom: none;
    }
}

// ************************************************************************* //
// Download & Index page

#download, #index {
    .btn-download-wrapper {
        text-align: center;
        margin: 160px auto;
        .btn {
            font-size: 3em;
            padding: 3%;
            display: inline-block;
            margin-bottom: 5px;
        }
        small {
            display: block;
            font-size: 0.4em;
        }
    }
    h2.description {
        color: @Cinvert;
        font-size: 2em;
        font-weight: bold;
        margin: 120px 50px;
        line-height: 2em;
        .label {
            font-size: 0.5em;
        }
    }
}

#download {

    h4 {
        margin-top: 180px;
    }
    h4.first {
        margin-top: 20px;
        small {
            color: inherit;
            font-size: 1em;
        }
    }

    .btn-download-wrapper {
        margin: 40px auto;
    }
    .os-selector {
        text-align: center;
        color: @Cinvert;
        margin: 30px 0;
        a.btn-build {
            color: @Cinvert;
            display: block;
            padding: 20px;
            border-radius: 2px;
        }
        @linuxcolor: #e43;
        @windowscolor: #06a;
        @maccolor: darkgrey;
        .btn-build[href="#build-linux"] {
            background-color: @linuxcolor;
            &:hover {
                color: @linuxcolor;
                background-color: @Cinvert;
            }
        }
        .btn-build[href="#build-windows"] {
            background-color: @windowscolor;
            &:hover {
                color: @windowscolor;
                background-color: @Cinvert;
            }
        }
        .btn-build[href="#build-mac"] {
            background-color: @maccolor;
            &:hover {
                color: @maccolor;
                background-color: @Cinvert;
            }
        }
        .tab-content {
            margin-top: 20px;
        }
        #build-linux {
            h3 {
                color: @linuxcolor;
            }
        }
        #build-windows {
            h3 {
                color: @windowscolor;
            }
        }
        #build-mac {
            h3 {
                color: @maccolor;
            }
        }
    }
}

// ************************************************************************* //
// Footer

footer {
    background-color: @Cmaindark;
    border-top: 1px @Cborder solid;
    padding: 20px ((100%-@Smain)/2);
    a {
        display: block;
    }
    img[alt="FFmpeg"] {
        width: 50%;
        display: block;
        margin: auto;
    }
}
