/*
 *  (c) 2000-2025 deviantART, Inc. All rights reserved.
 */
/*
 * @@include cssms/lib/mixins/css3.css
 */

#da-developers {
    padding-top: 50px;

    .developers-page-container {
        overflow: visible;
    }

    .static-doc {
        .api-endpoint {
            max-width: 900px;
        }
    }

    .browse-left-bar {
        margin-top: -50px;   

        .browse-facet .browse-link-api span {
            background-position: 0 -191px;
            margin-top: 3px;
        }
        .browse-facet-browse-links {
            border-bottom: 1px solid #beccbf;
            box-shadow:0 1px 0 #edf1ec;
        }
    }

    .developers.fooview {
        margin-left: 185px;
        font-size: 13px;
        line-height: 20px;
        color: #353535;

        .fooview-inner {
            h3 {
                font-family: Helvetica,Trebuchet MS,sans-serif;
                letter-spacing: .1px;
                margin-bottom: 10px;
            }
            ul.parameters {
                display: table;

                li {
                    display: table-row;
                    margin: 5px 0;

                    .parameter,
                    .description {
                        display: table-cell;
                        padding-bottom: 5px;
                    }
                    .parameter {
                        font-weight: bold;
                        font-family: Courier, sans-serif;
                        text-align: right;
                    }
                    .description {
                        padding-left: 15px;
                    }
                }

                .param_list li {
                    display: list-item;
                    padding: 0px;
                    margin: 0px;
                    font-size: 11px;
                }
            }

            .note {
                font-size: 11px;
                font-style: italic;
            }
            br + .note {
                display: inline-block;
                padding: 6px 0 3px;
            }
            .collapsable-heading {
                display: block;
                background: url(/icons/expand-collapse-large.png) no-repeat;
                background-position: 0 0;
                cursor: pointer;
                padding-left: 25px;
                margin-top: 10px;
                font-weight: bold;
            }
            .collapsable-heading.open {
                background-position: 0 -20px;
            }
            .collapsable-content {
                padding-left: 8px;
                display: none;
            }

            .no-margin {
                margin: 0;
            }
            .browse-content {
                margin-bottom: 20px;
                overflow: hidden;
                padding-top: 50px;
                position: relative;
            }

            .smbutton span {
                color: #3B5A4A;
            }

            .changelog h5 {
                font-size: 14px;
                margin-bottom: 0;
                margin-top: 8px;
            }

            .code {
                padding: 6px 20px 6px;
                font-family: Courier, sans-serif;
                background: #ddd;
                padding: 0 1px 2px;
            }
        }
    }

    .settings_applications {
        margin-left: 185px;

        .applications {
            .developers.fooview {
                margin-left: 0;
            }
            .app-section {
                margin-bottom: 0.3em;
                font-size: 18pt;
                width: auto;
            }
            span.appdetailslabel {
                width: 100px;
            }
            .appapikey {
                margin: 5px 0 0;
            }
            .appapikey .smbutton {
                margin-left: -50px !important;
                padding: 0;
            }
            .appapikey .smbutton span {
                padding: 0 4px;
                font-weight: normal;
            }
            input.itext_uplifted {
                width: 85%;
            }
            div.fooview h3,
            div.fooview div.appdetails {
                margin-left:110px;
            }
            .unpublished-warning {
                color: #943019;
                font-weight: bold;
            }
            div.fooview .appfeatured,
            div.fooview .appfeatured span {
                font-weight: normal;
                font-size: inherit;
            }
        }
    }

    /**
     * New Docs
     */
    .api-doc-container {
        margin-left: 185px;
        position: relative;

        p {
            margin-bottom: 8px;
        }

        .code {
            padding: 10px;
            color: #727272;
            background: #eaf2ee;
            border: 1px solid #84b2c2;
            border-radius: 3px;
            font: 11px/20px Monaco,'Courier New',Courier,monospace;
            overflow: auto;
        }

        .endpoint-alert {
            padding: 10px;
            color: #4e4e4e;

            &.endpoint-warning {
                background: #f0dcdc;
                border: 1px solid #c28484;
            }
            &.endpoint-notice {
                background: #FFF9C5;
                border: 1px solid #EDCD5B;
            }
        }

        span.code {
            padding: 2px;
            border: none;
            background-color: #E9E9E9;
            border-radius: 0;
        }

        span.code.truncate {
            height: 50px;
            display: block;
        }

        h2 {
            color: #2B3635;
            font: bold 15pt Helvetica,Trebuchet MS,sans-serif;
            letter-spacing: .1px;
            margin-bottom: 10px;
        }

        .api-doc-search {
            position: absolute;
            top: -39px;

            .api-doc-search-input {
                padding: 3px 5px;
                font-size: 16px;
                border-radius: 4px;
                border: 1px solid #9CAFAE;
                box-shadow:0 1px rgba(255, 255, 255, 0.4), 0 1px 4px #bdbdbd inset;
            }
        }

        .api-doc-back  {
            padding: 5px 0;
            position: absolute;
            top: -45px;
        }

        .api-doc-version-selector  {
            position: absolute;
            top: -30px;
            right: 25px;
        }

        .api-message-outdated {
            font-weight: bold;
            margin: .5em 0;
        }

        .examples {
            h5 {
                margin: 8px 0px;
            }

            .code {
                margin-top: 0px;
            }
        }

        .api-module {
            border: 1px #a5b1a6 solid;
            background-color: #E9F0E6;
            border: 1px #A5B1A6 solid;
            padding: 14px 25px 15px 17px;
            border-radius: 6px;
            box-shadow:inset 0 1px 1px #ffffff;
            margin-right: 25px;
            margin-bottom: 25px;
            font-size: 13px;
            line-height: 20px;
            color: #353535;

            a {
                color: #337287;
            }

            .method {
                float: left;
                width: 40px;
            }

            &.api-related {
                margin-top: 20px;
            }

            .api-module-endpoints {
                border-collapse: collapse;

                .endpoint-uri,
                .endpoint-description {
                    text-align: left;
                    padding: 7px 0;
                    border-bottom: 1px solid #9EAFA0;
                }
                .endpoint-uri {
                    white-space: nowrap;
                }
                .endpoint-description {
                    width: 400px;
                    padding-left: 10px;
                }
                & tr:last-child .endpoint-uri, & tr:last-child .endpoint-description {
                    border: none;
                }
            }
        }

        .api-endpoint {
            border: 1px #a5b1a6 solid;
            background-color: #E9F0E6;
            border: 1px #A5B1A6 solid;
            padding: 14px 25px 15px 17px;
            border-radius: 6px;
            box-shadow:inset 0 1px 1px #ffffff;
            margin-right: 25px;
            margin-bottom: 25px;
            font-size: 13px;
            line-height: 20px;
            color: #353535;

            .api-console-link a {
                font-size: 12px;
                text-decoration: underline;
                color: #337287;
            }

            .api-parameters, .api-errors {
                border-collapse: collapse;

                th {
                    text-align: left;
                }
                td {
                    border-bottom: 1px solid #9eafa0;
                    padding: 1px 25px 4px 0;
                    vertical-align: top;
                }

                .field-declaration {
                    min-width: 205px;
                }
                .field-name {
                    font-weight: bold;
                }
                .field-necessity{
                    &.optional {
                        color: #7D857F;
                    }
                    &.required {
                        color: #48634F;
                    }
                }

                & tr:last-child > td {
                    border: none;
                }
            }

            .api-sub-parameters {
                display: none;
            }

            .api-view-sub-parameter {
                color: #337287;
                font-weight: bold;
            }

            .api-response {
                list-style: none;
                margin: 0;
                padding: 0;

                .field-declaration {
                    margin: 0px 0px 10px 30px;
                }

                .field-name {
                    font-weight: bold;
                }

                .field-extra {
                    font-size: 11px;
                }

                .deprecated {
                    font-weight: bold;
                    color: red;
                }
            }

            .innner-response {
                margin-left: 30px;
            }

            .subhead {
                color: #2B3635;
                font: bold 14px Verdana,Trebuchet MS,sans-serif;
                margin: 10px 0;
                letter-spacing: 0;
                display: block;
                background: url(//st.deviantart.net/icons/expand-collapse-large.png) no-repeat;
                background-position: 0 0;
                cursor: pointer;
                padding-left: 25px;
                color: #337287;
                height: 25px;
            }
            .subhead.open {
                background-position: 0 -20px;
            }
            .collapsable-content {
                display: none;
            }
            .note {
                font-size: 10px;
            }
        }
    }

    .private {
        color: #e11;
        font-size: .7em;
    }

    .nice-table {
        th {
            text-align: left;
        }
        td {
            border-bottom: 1px solid #9eafa0;
            padding: 1px 25px 4px 0;
            vertical-align: top;
        }

        & tr:last-child > td {
            border: none;
        }
    }
}

@media all and (min-width: 1157px) {
    #da-developers {
        .fooview {
            width: 900px;
        }
        
        .app-section {
            width: 900px;
        }
    }
}


/* Small devices */
@media (max-width: 767px) {
    #da-developers {
        padding-top: 10px;
        word-break: break-word;
    
        .browse-left-bar {
            margin: 0 3vw 3vw 3vw;
            width: auto;
            max-width: 94vw;
            display: block;
            float: none;
            background-color: #dde6da;
            
            .browse-facet {
                width: auto;

                ul a, .noncollapseHeader {
                    font-size: large;
                }
            }
        }

        .api-doc-container {
            margin: auto;

            .api-parameters,
            .api-errors {
                td {
                    padding: 1px 3px 1px 0 !important;
                }
                .field-declaration {
                    min-width: auto !important;
                    word-break: initial;
                }
            }
            .api-module .api-module-endpoints .endpoint-uri {
                white-space: normal;
                min-width: 40vw !important;
            }
        }

        .nice-table td {
            padding: 1px 3px 1px 0 !important;
            min-width: 40vw !important;
        }

        .developers.fooview,
        .api-doc-container .api-endpoint,
        .api-doc-container .api-module {
            margin: 0 3vw 3vw 3vw;
            padding: 10px;
            width: auto;
            max-width: 94vw;
            box-shadow: inset 0 1px 1px #fff;
        }
        
        img {
            width: 100%;
            max-width: 100%;
        }
        code, pre.code {
            padding: 7px 10px !important;
        }
        .fooview-inner {
            border: none;
            padding: 0;
        }

        /* apps */
        .settings_applications {
            margin: 0;

            .appimage {
                float: none;
                
                .shadow.mild {
                    margin-bottom: 10px;
                    padding: 0;
                }
            }
            .fooview-inner > h3,
            .appdetails {
                margin: 0 !important;
                .appapikey {
                    position: relative;
                    
                    > a {
                        position: absolute;
                        bottom: 4px;
                        right: 4px;
                    }
                }
            }
            .applications {
                margin-left: 3vw;
                input.itext_uplifted {
                    width: 100%;
                    box-sizing: border-box;
                }
            }
        }
    }
    .developer-console .browse-content {
        padding-top: 10px !important;
        
        > .empty-state {
            margin-left: 10px;
        }
    }
}
/* @@include cssms/lib/mixins/css3.css */

/* Header icon */
.developer-console .browse-left-bar .browse-facet .browse-link-api span {
    background-image: url(//st.deviantart.net/developers/api_console.png);
}
.developer-console .browse-content {
    padding-top: 50px;
    margin-bottom: 20px;
    position: relative;
}
.developer-console .endpoint-options {
    background-color: #E9F0E6;
    border: 1px #A5B1A6 solid;
    border-right: none;
    padding: 15px;
    border-radius: 6px 0 0 6px;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.75);
    min-height: 450px;
    width: 300px;
    float: left;
}
.developer-console .endpoint-results {
    background: rgba(255,255,255,.75);
    padding: 15px;
    border: 1px #A5B1A6 solid;
    border-radius: 0 6px 6px 6px;
    overflow: hidden;
    margin-right: 10px;
    min-height: 460px;
}
.developer-console .endpoint-options h1,
.developer-console .endpoint-results h1,
.developer-console #da-developers .fooview h4 {
    margin: 0 0 10px 0;
    font-family: "Trebuchet MS", sans-serif;
    display: block;
    color: #2B3635;
    font-size: 15pt;
    letter-spacing: -1px;
}
.developer-console .endpoint-options h1 {
    color: rgba(0,0,0,0.25);
    font-size: 16px;
}
.developer-console .endpoint-options h1:before {
    content: "Build ";
    color: #2B3635;
    font-size: 20px;
}

/* Inputs */
.developer-console .search-input {
    border-radius: 4px;
    border: 1px solid #9CAFAE;
    box-shadow: 0 1px rgba(255, 255, 255, 0.4), 0 1px 4px #bdbdbd inset;
    padding: 3px;
    width: 100%;
    margin-bottom: 5px;
}
.developer-console .endpoint-options input[type=text],
.developer-console .endpoint-options input[type=password]{
    box-sizing: border-box;
    font-family: Verdana,Geneva,sans-serif;
    color: #515c5a;
    font-size: 11px;
    letter-spacing: -0.25px;
    padding: 5px 6px;
    border: 1px solid #8c9b8c;
    background: #fff;
    border-radius: 3px;
    box-shadow:0 1px rgba(255, 255, 255, 0.4),0 1px 4px #bdbdbd inset;
    width: 98%;
    height: 27px;
}
.developer-console .endpoint-options input[type="text"].stash_item {
    width: 173px;
}

/* Nice select */
.developer-console .endpoint-options select {
    .appearance(none);
    background: url(//st.deviantart.net/developers/select-bg.png) no-repeat right 0;
    border: 1px solid #b8b8b8;
    box-shadow:0 2px 0 rgba(255,255,255,.4), inset 0 1px 0 rgba(255,255,255,.4);
    right: 0px;
    top: -8px;
    padding: 5px 29px 5px 10px;
    font-family: Verdana,Geneva,sans-serif;
    cursor: pointer;
    position: absolute;
    max-width: 210px;
}
.developer-console .endpoint-options select:hover {
    background-position:right -23px;
}
.developer-console .endpoint-options select.constrain {
    overflow: hidden;
    max-width: 70px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.developer-console .endpoint-options .multiple {
    padding: 5px 29px 5px 10px;
    font-family: Verdana,Geneva,sans-serif;
    display: block;
    float: right;
    position: relative;
    background: #fff;
    min-height: 160px;
}

.developer-console dd {
    clear: both;
}

/* Radios */
.developer-console .endpoint-options .radio-push {
    float: right; 
}
.developer-console .endpoint-options .radio-push input {
    display: none; 
}
.developer-console .endpoint-options .radio-push input[type="radio"]+label {
    cursor: pointer;
    display: inline-block;
    background: rgba(0,0,0,0.1);
    padding: 4px;
    border-radius: 4px;
    width: 30px;
    text-align:
    center;
    margin-top: -5px;
} 
.developer-console .endpoint-options .radio-push input[type="radio"]:checked+label {
    color: white;
    background-color: #E18D43;
}
.developer-console .endpoint-options .radio-push input[type="radio"]:checked+label.yes {    
    color: #121516;
    background-color: #bdd023;
}
.developer-console .endpoint-options .sharing {
    margin-top: 15px;
}

/* Def list field holders */
.developer-console .endpoint-options dt {
    position: relative;
    padding-left: 20px;
}
.developer-console .endpoint-options dt dt {
    padding-left: 0;
}
.developer-console .endpoint-options dd {
    font-size: 10px;
    margin: 5px 0 14px 0;
    padding: 0 6px 0 20px;
    color: rgba(0,0,0,0.5);
}
.developer-console .endpoint-options label.field-label {
    font-weight: bold;
}
.developer-console .endpoint-options .optional-checkbox {
    position: absolute;
    left: 0;
    top: 1px;
    margin: 0;
}

/* Results */
.developer-console .json { 
    padding: 10px; 
    background: #eaf2ee;
    border: 1px solid #84b2c2;
    border-radius: 3px;
    overflow: auto;
    min-height: 100px;
    margin-bottom: 10px;
}
.developer-console .json pre, .developer-console textarea { 
    color: #727272;
    font: 11px/20px Monaco,'Courier New',Courier,monospace;
}
.developer-console textarea { 
    padding: 0;
    margin: 0;
    background: none;
    border: none;
    width: 100%;
    min-height: 150px;
}
.developer-console .console-form textarea {
    border: 1px solid #8c9b8c;
    background: #fff;
    border-radius: 3px;
    box-shadow:0 1px rgba(255, 255, 255, 0.4),0 1px 4px #bdbdbd inset;
}
.developer-console textarea:focus { 
    outline: none;
}

.developer-console .json pre { 
    margin: 0 0; 
    white-space: pre-wrap; 
}

.developer-console .sidebar {
    width: 350px;
    padding: 0px;
    z-index: 999;
    display: none;
    position: absolute;
}
.types-main {
    background: white;
}

/* Docs overrides */
.developer-console #da-developers .fooview,
.developer-console #da-developers .fooview-inner {
    width: auto;
    background: none;
    border: none;
    padding: 0;
}
.folder_list {
    width: 300px;
    max-height: 500px;
    overflow: auto;
}
.folder_list ul {
    margin: 0px;
    padding: 0px;
    list-style-type: none;
}
.folder_list a {
    display: block;
    background-color: #d9d9d9;
    text-decoration: none;
    font-size: 12px;
    padding: 5px;
}
.folder_list a:hover {
    background-color: #efefef;
}

.developer-console .empty-state {
    background-color: #E9F0E6;
    border: 1px #A5B1A6 solid;
    padding: 15px;
    border-radius: 6px;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.75);
    margin-left: 200px;
    margin-right: 10px;
}
.developer-console .empty-state .warning {
    padding: 10px;
    color: #4e4e4e;
    background: #F0DCDC;
    border: 1px solid #C28484;
    border-radius: 3px;
}
.developer-console .empty-state .info {
    margin-bottom: 15px;
    background-color: #efe9bd;
    border-color: #ddc899;
}
.developer-console .browse-facet ul a {
    width: 158px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.developer-console .browse-facet ul a:hover {
    width: auto;
    overflow: visible;
    text-overflow: initial;
    white-space: nowrap;
}
.developer-console .browse-facet li {
    position: relative;
    cursor: pointer;
}
#browse-favourite a {
    overflow: hidden;
}
.developer-console .browse-facet li a {
    z-index: 0;
}
.developer-console .browse-facet li a.selected {
    width: auto;
}
.developer-console .browse-facet .btn {
    display: none;
    position: absolute;
    z-index: 1;
    right: 3px;
    top: 3px;
    color: #fff;
}
.developer-console .browse-facet .btn:hover {
    color: #e11;
}
.developer-console .browse-facet li:hover a {
    width: auto;
    overflow: visible;
    color: #fff;
    background: #348aa1;
}
.developer-console .browse-facet li:hover .btn {
    display: block;
}

.developer-console #da-developers .developers.fooview.altaltview {
    margin-left: 0;
}
.developer-console #da-developers {
    padding-top: 5px;
}
.developer-console .result-controls {
    float: right;
    font-size: 11px;
    margin-right: 4px;
    margin-top: 16px;
    color: #557C8A;
}
.developer-console .result-controls a {
    color: #557C8A;
}
.developer-console #da-developers .api-doc-container {
    margin-left: 0;
}
.developer-console #da-developers .api-doc-container .api-console-link {
    display: none;
}
.developer-console #da-developers .api-doc-container .api-endpoint {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    box-shadow:none;
}
.developer-console .endpoint-options input[type=text].array-field {
    width: 90%; 
}
.developer-console .endpoint-options .array-wrap {
    margin-top: 5px;
}
.developer-console .version_header {
    border-top: 1px solid #d9d9d9;
    padding: 10px 0px;
}

.developer-console .stash-sidebar {
    position: fixed;
    top: 0;
    overflow: auto;
    background: white;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.developer-console .stash-sidebar .nav {
    display: flex;
    gap: 8px;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 5px;
    background: #fafafa;
    border-bottom: 1px solid #ccc;
    border-radius: 5px 5px 0 0;
}

.developer-console .stash-sidebar .contents {
    padding: 40px 20px 20px;
}

.developer-console .stash-sidebar .close {
    border: none;
    background: none;
    cursor: pointer;
    color: #1878aa; 
    font-size: 11px;
}

.developer-console .stash-sidebar .back-to-stash {
    border: none;
    background: none;
    cursor: pointer;
    color: #444; 
    font-size: 11px;
}

.developer-console .stash-sidebar .header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
    align-items: baseline;
}

.developer-console .stash-sidebar .folder-name {
    font-size: 1.4em;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.developer-console .stash-sidebar .back {
    border: none;
    background: none;
    cursor: pointer;
}

.developer-console .stash-sidebar .folders {
    list-style-type: none;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
}

.developer-console .stash-sidebar .folder {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    overflow: hidden;
}

.developer-console .stash-sidebar .folder .title {
    overflow: hidden;
}

.developer-console .stash-sidebar .folder .thumb {
    overflow: hidden;
    width: 94px;
    height: 94px;
    background-image: url(/minish/stash/stackbg-112.png);
    position: relative;
    background-size: contain;
}

.developer-console .stash-sidebar .folder .thumb-img {
    width: 75px;
    position: relative;
    height: 75px;
    top: 9px;
}

.developer-console .stash-sidebar .deviations {
    list-style-type: none;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
}

.developer-console .stash-sidebar .folders + .deviations {
    margin-top: 32px;
}


.developer-console .stash-sidebar .deviation {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    overflow: hidden;
}

.developer-console .stash-sidebar .deviation .title {
    z-index: 1;
}

.developer-console .stash-sidebar .deviation .thumb {
    overflow: hidden;
    width: 80px;
    height: 90px;
    position: relative;
}

.developer-console .stash-sidebar .deviation .thumb-img {
    width: 80px;
    position: relative;
    height: 80px;
}

.developer-console .stash-sidebar .no-results {
    display: none;
}

.developer-console .stash-sidebar.no-folders.no-deviations .no-results {
    display: block;
}
#wizard,
#result {
    max-width: 960px;
    margin: 0 auto;
}

#wizard {
    padding: 20px;
    border-radius:5px;
    margin-top: 15px;
    background-color: #e0e8e1;
}

#wizard > div {
    display: inline-block;
    vertical-align: top;
    margin-right: 30px;
    width: 200px;
}

#wizard h3 {
    margin-bottom: 5px;
    border-bottom: 1px solid #ecf1ea;
    text-shadow: 0 1px 0 rgba(255,255,255,0.8);
}

#wizard label {
    display: block;
}

#result {
    padding: 20px;
    border-radius:5px;
    margin-top: 15px;
    background-color: #dde6da;
}

#result h3 {
    font-size: 150%;
}

#result .divgroup div {
    margin-bottom: 10px;
}

#result .code {
    padding: 10px 10px 8px 10px;
    margin-top: 7px;
    background: #f6f4ca;
    border: 1px solid #e9d37b;
    border-radius: 6px;
    font-family:"Lucida Console", Monaco, monospace;
    max-width: 740px;
}

/* Helper mixins */
.colormixin(@color:false) when not (@color=false) {color: @color;}
.bgcolormixin(@color:false) when not (@color=false) {background-color: @color;}
.bordercolormixin(@color:false) when not (@color=false) {border-color: @color;}

.widthmixin(@width:false) when not (@width=false) {width: @width;}
.minwidthmixin(@width:false) when not (@width=false) {min-width: @width;}
.maxwidthmixin(@width:false) when not (@width=false) {max-width: @width;}

.heightmixin(@height:false) when not (@height=false) {height: @height;}
.minheightmixin(@height:false) when not (@height=false) {min-height: @height;}
.maxheightmixin(@height:false) when not (@height=false) {max-height: @height;}

/* Helper variable for retina media queries */
@retina : ~"(-webkit-min-device-pixel-ratio: 2), (min--moz-device-pixel-ratio: 2), (min-device-pixel-ratio: 2), (min-resolution: 2dppx), (min-resolution: 192dpi)";

/*
 * helper function for .linear-gradient
 * @encode - string of svg xml
 */
.base64DataUriBackground (@encode, @type: ~"image/svg+xml") {
    @dataUriPrefix: ~"url(data:@{type};base64,";
    @dataUriSuffix: ~")";
 
    // because our lessc doesn't give access to btoa()
    // we have to make our own
    @b64DataUri: ~`(function(a,b,c){function e(a){a=a.replace(/\r\n/g,'\n');var b='';for(var c=0;c<a.length;c++){var d=a.charCodeAt(c);if(d<128){b+=String.fromCharCode(d)}else if(d>127&&d<2048){b+=String.fromCharCode(d>>6|192);b+=String.fromCharCode(d&63|128)}else{b+=String.fromCharCode(d>>12|224);b+=String.fromCharCode(d>>6&63|128);b+=String.fromCharCode(d&63|128)}}return b}function f(a){var b='';var c,f,g,h,i,j,l;var m=0;a=e(a);while(m<a.length){c=a.charCodeAt(m++);f=a.charCodeAt(m++);g=a.charCodeAt(m++);h=c>>2;i=(c&3)<<4|f>>4;j=(f&15)<<2|g>>6;l=g&63;if(isNaN(f)){j=l=64}else if(isNaN(g)){l=64}b=b+d.charAt(h)+d.charAt(i)+d.charAt(j)+d.charAt(l)}return b}var d='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';return a+f(b)+c})('@{dataUriPrefix}','@{encode}','@{dataUriSuffix}')`;
 
    background: @b64DataUri;
}

/*
 * @angle - 1st param (eg 45deg, top, to left bottom)
 * @legacy_color - Color if no gradient at all is available
 * @ie_gradient_type - 0 (vertical) or 1 (horizontal).  If anybody wants to write a filter to deduce this 
 *                     angle, have at it
 */
.linear-gradient(@start_color, @end_color) {
    .linear-gradient(top, @start_color, @end_color, @start_color);
}
.linear-gradient(@angle, @start_color, @end_color) {
    .linear-gradient(@angle, @start_color, @end_color, @start_color);
}
.linear-gradient(@angle, @start_color, @end_color, @legacy_color: @start_color, @ie_gradient_type: 0) {
    @svg: ~'<?xml version="1.0" ?><svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 1 1" preserveAspectRatio="none"><linearGradient id="grad-ucgg-generated" gradientUnits="userSpaceOnUse" x1="0%" y1="0%" x2="0%" y2="100%"><stop offset="0%" stop-color="@{start_color}" stop-opacity="1"/><stop offset="100%" stop-color="@{end_color}" stop-opacity="1"/></linearGradient><rect x="0" y="0" width="1" height="1" fill="url(#grad-ucgg-generated)" /></svg>';
 
    
    /* base background */
    background: @legacy_color;
    
    /* IE9 you so special */
    .ie.eq9 & {
        .base64DataUriBackground(@svg);
    }
    /* IE8 is the bad kind of special */
    .ie.lt9 & {
        filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='@{start_color}', endColorstr='@{end_color}',GradientType=@ie_gradient_type );
    }
    
    /* hooray modern browsers */
    background: -webkit-linear-gradient(@angle, @start_color, @end_color);
    background: -moz-linear-gradient(@angle, @start_color, @end_color);
    background: linear-gradient(@angle, @start_color, @end_color);
}

.linear-gradient-stops(@angle, @legacy_start_color, @legacy_end_color, @legacy_color, @rest...) 
{
    @svg: ~'<?xml version="1.0" ?><svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" viewBox="0 0 1 1" preserveAspectRatio="none"><linearGradient id="grad-ucgg-generated" gradientUnits="userSpaceOnUse" x1="0%" y1="0%" x2="0%" y2="100%"><stop offset="0%" stop-color="@{legacy_start_color}" stop-opacity="1"/><stop offset="100%" stop-color="@{legacy_end_color}" stop-opacity="1"/></linearGradient><rect x="0" y="0" width="1" height="1" fill="url(#grad-ucgg-generated)" /></svg>';
 
    
    /* base background */
    background: @legacy_color;
    
    /* IE9 you so special */
    .ie.eq9 & {
        .base64DataUriBackground(@svg);
    }
    /* IE8 is the bad kind of special */
    .ie.lt9 & {
        filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='@{legacy_start_color}', endColorstr='@{legacy_end_color}',GradientType=0 );
    }
    
    /* hooray modern browsers */
    background: -webkit-linear-gradient(@angle, @rest);
    background: -moz-linear-gradient(@angle, @rest);
    background: linear-gradient(@angle, @rest);
}

/*
 * This is not compatible with IE8, don't use it if you have to support old IE
 * 
 * @lhs - Left hand side (height, width, whatever)
 * @rhs - Right hand side, whatever your calculation is.  You probably need a ~
 *
 * Example: .calc(height, ~"100% - 50px")
 *
 * Note, using a guard because less doesn't seem to like using a variable for lhs
 * Annoying, but don't know what else to do
 *
 * http://caniuse.com/calc
 */
.calc(@lhs, @rhs) when (@lhs = width) {
    width: -webkit-calc(@rhs);
    width: calc(@rhs);
}
.calc(@lhs, @rhs) when (@lhs = height) {
    height: -webkit-calc(@rhs);
    height: calc(@rhs);
}
.calc(@lhs, @rhs) when (@lhs = left) {
    left: -webkit-calc(@rhs);
    left: calc(@rhs);
}
.calc(@lhs, @rhs) when (@lhs = right) {
    right: -webkit-calc(@rhs);
    right: calc(@rhs);
}
.calc(@lhs, @rhs) when (@lhs = top) {
    top: -webkit-calc(@rhs);
    top: calc(@rhs);
}
.calc(@lhs, @rhs) when (@lhs = bottom) {
    bottom: -webkit-calc(@rhs);
    bottom: calc(@rhs);
}
.calc(@lhs, @rhs) when (@lhs = min-width) {
    min-width: -webkit-calc(@rhs);
    min-width: calc(@rhs);
}
.calc(@lhs, @rhs) when (@lhs = max-width) {
    max-width: -webkit-calc(@rhs);
    max-width: calc(@rhs);
}
.calc(@lhs, @rhs) when (@lhs = min-height) {
    min-height: -webkit-calc(@rhs);
    min-height: calc(@rhs);
}
.calc(@lhs, @rhs) when (@lhs = max-height) {
    max-height: -webkit-calc(@rhs);
    max-height: calc(@rhs);
}


/*
 * Not compatible with IE8 or IE9 (nothing breaks, they just don't get transitions)
 */
.transition(@arg) {
    -moz-transition: @arg;
    -webkit-transition: @arg;
    transition: @arg;
}

.transition(@transition, @duration, @timingFunction: ease-in-out ) when (@transition = transform) {
    -webkit-transition: -webkit-transform @duration @timingFunction;
    -moz-transition: -moz-transform @duration @timingFunction;
    -ms-transition: -ms-transform @duration @timingFunction;
    transition: transform @duration @timingFunction;
}

.animation (@name, @duration: 300ms, @delay: 0, @ease: ease, @iterationCount: 1) {
    -webkit-animation: @name @duration @delay @ease;
    -moz-animation:    @name @duration @delay @ease;
    -ms-animation:     @name @duration @delay @ease;
    animation-iteration-count: @iterationCount;
    -webkit-animation-iteration-count: @iterationCount;
    -moz-animation-iteration-count: @iterationCount;
}

.transition-delay(@arg) {
    -webkit-transition-delay: @arg;
    -moz-transition-delay: @arg;
    -o-transition-delay: @arg;
    transition-delay: @arg;
}

/*
 * Not supported in <=IE8
 */
.transform(@arg) {
    -ms-transform: @arg;
    -webkit-transform: @arg;
    transform: @arg;
}

.transform-scale(@arg) {
    -ms-zoom: @arg;
    -ms-transform: scale(@arg);
    -webkit-transform: scale(@arg);
    transform: scale(@arg);
}

.transform-origin(@arg) {
    -ms-transform-origin: @arg;
    -moz-transform-origin: @arg;
    -webkit-transform-origin: @arg;
    transform-origin: @arg;
}

.box-sizing(@arg) {
    -moz-box-sizing: @arg;
    -webkit-box-sizing: @arg;
    box-sizing: @arg;
}

.filter(@arg) {
    -ms-filter: @arg;
    -moz-filter: @arg;
    -webkit-filter: @arg;
    filter: @arg;
}

.user-select(@arg) {
    -ms-user-select: @arg;
    -moz-user-select: @arg;
    -webkit-user-select: @arg;
    user-select: @arg;
}

.backface-visibility(@arg) {
    -webkit-backface-visibility: @arg;
    backface-visibility: @arg;
}

.perspective(@arg) {
    -webkit-perspective: @arg;
    perspective: @arg;
}

.cursor-zoom-in(@arg) {
    cursor: @arg;
    cursor: -webkit-zoom-in;
    cursor: -moz-zoom-in;
}

.cursor-zoom-out(@arg) {
    cursor: @arg;
    cursor: -webkit-zoom-out;
    cursor: -moz-zoom-out;
}

.appearance(@arg) {
    -webkit-appearance: @arg;
    -moz-appearance: @arg;
}

.text-size-adjust(@arg) {
    -webkit-text-size-adjust: @arg;
    -moz-text-size-adjust: @arg;
    -ms-text-size-adjust: @arg;
}

/* 
 *  Make something spin for infinite time, one rotation per @interval 
 *  example: .spin(3000ms)
*/
.spin(@interval) {
    -webkit-animation-name: spin;
    -webkit-animation-duration: @interval;
    -webkit-animation-iteration-count: infinite;
    -webkit-animation-timing-function: linear;
    -moz-animation-name: spin;
    -moz-animation-duration: @interval;
    -moz-animation-iteration-count: infinite;
    -moz-animation-timing-function: linear;
    -ms-animation-name: spin;
    -ms-animation-duration: @interval;
    -ms-animation-iteration-count: infinite;
    -ms-animation-timing-function: linear;
    animation-name: spin;
    animation-duration: @interval;
    animation-iteration-count: infinite;
    animation-timing-function: linear;

    @-ms-keyframes spin {
        from { -ms-transform: rotate(0deg); }
        to { -ms-transform: rotate(360deg); }
    }
    @-moz-keyframes spin {
        from { -moz-transform: rotate(0deg); }
        to { -moz-transform: rotate(360deg); }
    }
    @-webkit-keyframes spin {
        from { -webkit-transform: rotate(0deg); }
        to { -webkit-transform: rotate(360deg); }
    }
    @keyframes spin {
        from { transform:rotate(0deg); }
        to { transform:rotate(360deg); }
    }
}

/*
 * CSS3 multi-column layout.
 * Won't do anything for IE8 or 9.
 */
.column-count(@arg) {
    -moz-column-count: @arg;
    -webkit-column-count: @arg;
    column-count: @arg;
}
.column-width(@arg) {
    -moz-column-width: @arg;
    -webkit-column-width: @arg;
    column-width: @arg;
}
.column-gap(@arg) {
    -moz-column-gap: @arg;
    -webkit-column-gap: @arg;
    column-gap: @arg;
}
.column-rule(@arg) {
    -moz-column-rule: @arg;
    -webkit-column-rule: @arg;
    column-rule: @arg;
}

/*
 * Input placeholder text
 */
.placeholder-font-style(@style){
    &::-webkit-input-placeholder {
        font-style: @style;
    }
    &:-moz-placeholder {
        font-style: @style;
    }
    &::-moz-placeholder {
        font-style: @style;
    }
    &:-ms-input-placeholder {
        font-style: @style;
    }
}
.placeholder-color(@color: false, @bgcolor: false, @bordercolor: false){
    &::-webkit-input-placeholder {
        .colormixin(@color);
        .bgcolormixin(@bgcolor);
        .bordercolormixin(@bordercolor);
    }
    &:-moz-placeholder {
        .colormixin(@color);
        .bgcolormixin(@bgcolor);
        .bordercolormixin(@bordercolor);
    }
    &::-moz-placeholder {
        .colormixin(@color);
        .bgcolormixin(@bgcolor);
        .bordercolormixin(@bordercolor);
    }
    &:-ms-input-placeholder {
        .colormixin(@color);
        .bgcolormixin(@bgcolor);
        .bordercolormixin(@bordercolor);
    }
}

/* Full-screen mixin */
.full-screen-width(@width: false, @minwidth: false, @maxwidth: false) {
    &:-webkit-full-screen {
        .widthmixin(@width);
        .minwidthmixin(@minwidth);
        .maxwidthmixin(@maxwidth);
    }
    &:-moz-full-screen {
        .widthmixin(@width);
        .minwidthmixin(@minwidth);
        .maxwidthmixin(@maxwidth);
    }
    &:-ms-full-screen {
        .widthmixin(@width);
        .minwidthmixin(@minwidth);
        .maxwidthmixin(@maxwidth);
    }
    &:-o-full-screen {
        .widthmixin(@width);
        .minwidthmixin(@minwidth);
        .maxwidthmixin(@maxwidth);
    }
    &:full-screen {
        .widthmixin(@width);
        .minwidthmixin(@minwidth);
        .maxwidthmixin(@maxwidth);
    }
}
.full-screen-height(@height: false, @minheight: false, @maxheight: false) {
    &:-webkit-full-screen {
        .heightmixin(@height);
        .minheightmixin(@minheight);
        .maxheightmixin(@maxheight);
    }
    &:-moz-full-screen {
        .heightmixin(@height);
        .minheightmixin(@minheight);
        .maxheightmixin(@maxheight);
    }
    &:-ms-full-screen {
        .heightmixin(@height);
        .minheightmixin(@minheight);
        .maxheightmixin(@maxheight);
    }
    &:-o-full-screen {
        .heightmixin(@height);
        .minheightmixin(@minheight);
        .maxheightmixin(@maxheight);
    }
    &:full-screen {
        .heightmixin(@height);
        .minheightmixin(@minheight);
        .maxheightmixin(@maxheight);
    }
}

/* Text hyphenation */
.hyphenate(@style:auto) {
    -webkit-hyphens:@style;
       -moz-hyphens:@style;
        -ms-hyphens:@style;
            hyphens:@style;
}

.clearfix() {
    zoom:1;
    &:before, &:after{ 
        content:""; 
        display:table; 
    }
    &:after{ 
        clear: both; 
    }
}

.font-smoothing(@value: antialiased) when(@value = antialiased) {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
.font-smoothing(@value) when (@value = subpixel) {
    -webkit-font-smoothing: subpixel-antialiased;
    -moz-osx-font-smoothing: auto;
}

.font-default(@font-size: 14px, @line-height: 1.2, @font-weight: 300) {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: @font-size;
    line-height: @line-height;
    font-weight: @font-weight;
}

.font-face-calibre() {
    @font-face {
    font-family: 'Calibre-Bold';
        src: url('//st.deviantart.net/fonts/calibre-bold.otf') format('opentype');
        font-weight: normal;
        font-style: normal;
    }
    @font-face {
    font-family: 'Calibre-Semibold';
        src: url('//st.deviantart.net/fonts/calibre-semibold.otf') format('opentype');
        font-weight: normal;
        font-style: normal;
    }

    @font-face {
    font-family: 'Calibre-Light';
        src: url('//st.deviantart.net/fonts/calibre-light.otf') format('opentype');
        font-weight: normal;
        font-style: normal;
    }
}

.font-heading-bold(@font-size: 40px, @line-height: 1, @font-weight: 300) {
    font-family: 'Calibre-Bold';
    line-height: @line-height;
    font-weight: @font-weight;
    font-size: @font-size;
}

.flexbox() {
    /* order is important here */
    display: -webkit-box;      /* OLD - iOS <6, Safari 3.1-6 */
    display: -moz-box;         /* OLD - Firefox <19 */
    display: -ms-flexbox;      /* TWEENER - IE 10 */
    display: -webkit-flex;     /* NEW - Chrome */
    display: flex;             /* NEW, Opera 12.1, Firefox >20 */
}

.flex() {
    .flexbox();

    /* but not here */
    flex-wrap: wrap;
    -ms-flex-wrap: wrap;
    -moz-flex-wrap: wrap;
    -webkit-flex-wrap: wrap;
    flex-direction: row;
    -webkit-flex-direction:row;
    -moz-flex-direction:row;
    justify-content: flex-start;
    -webkit-justify-content:flex-start;
    -moz-justify-content:flex-start;
}
.flex-sizing(@size:1) {
    flex-grow: @size;
    -ms-flex-grow: @size;
    -moz-flex-grow: @size;
    -webkit-flex-grow:@size;
    flex-shrink: @size;
    -ms-flex-shrink: @size;
    -moz-flex-shrink: @size;
    -webkit-flex-shrink: @size;
}
.flex-center() {
    -webkit-box-pack: center; /* OLD - iOS <6, Safari 3.1-6 */
    -webkit-box-align: center;
    -moz-box-pack: center; /* OLD - Firefox <19 */
    -moz-box-align: center;
    -ms-flex-pack: center; /* TWEENER - IE 10 */
    -ms-flex-align: center;
    -webkit-justify-content: center; /* NEW - Chrome, Safari */
    -webkit-align-items: center;
    justify-content: center; /* NEW, Opera 12.1, Firefox >20 */
    align-items: center; 
}

.flexbox-inline() {
    display: -ms-inline-flex;
    display: -webkit-inline-flex;
    display: inline-flex;
}
.flex-direction(@value: row) {
    -webkit-flex-direction: @value;
    -ms-flex-direction: @value;
    flex-direction: @value;
}
.flex-grow(@value: 0) {
    -webkit-flex-grow: @value;
    -ms-flex-grow: @value;
    flex-grow: @value;
}
.flex-shrink(@value: 1) {
    -webkit-flex-shrink: @value;
    -ms-flex-shrink: @value;
    flex-shrink: @value;
}
.flex-justify(@value: flex-start) {
    -webkit-justify-content: @value;
    -ms-justify-content: @value;
    justify-content: @value;
}
.flex-align(@value: stretch) {
    -webkit-align-items: @value;
    -ms-align-items: @value;
    align-items: @value;
}
.flex-align-self(@value: auto) {
    -webkit-align-self: @value;
    -ms-align-self: @value;
    align-self: @value;
}
.flex-wrap(@value: wrap) {
    -webkit-flex-wrap: @value;
    -ms-flex-wrap: @value;
    flex-wrap: @value;
}
.fit(@margin:0) {
    position: absolute;
    top: @margin;
    right: @margin;
    bottom: @margin;
    left: @margin;
}

.fit-fixed(@margin:0) {
    position: fixed;
    top: @margin;
    right: @margin;
    bottom: @margin;
    left: @margin;
}

.transition-cubic-bezier(@property: all, @duration: 0.2s) {
    .transition(@property @duration cubic-bezier(0, 0, 0.58, 1));
}

/*
 * Push lately to have greyscale interfaces.
 * UI likes to think in terms of % grey, so they make mocks with
 * rgba(0,0,0, .74) for 74% grey.
 * This style uses more css room, requires more processing cycles from the browser's paint, and is dangerous
 * if underlying element is ever changed to something other than white.
 *
 * Now you can just do .foo { .grey(74%); color:@grey; }
 */

.grey(@percentage) {
    @grey: darken(#fff, 100% - @percentage);
}


/* Old brand colors */
.brandcolors() {
    @primary-green: #0FCC47;
    @primary-teal: #41CFC7;
    @primary-orange: #F75908;
    @primary-magenta: #ED145A;
    @primary-lightgreen: #BDD023;
    @primary-darkgreen: #026D20;

    @grey1: #111;
    @grey2: #242626;
    @grey3: #2F3131;
    @grey4: #323232;
    @grey5: #363636;
    @grey6: #474747;
    @grey7: #555;
    @grey8: #575757;
    @grey9: #666;
    @grey10: #6F6F6F;
    @grey11: #727272;
    @grey12: #828282;
    @grey13: #999;
    @grey14: #909090;
    @grey15: #CBCBCB;
    @pale-grey: #F2F2F2;

    @black-alpha1: rgba(0,0,0,0.5);
    @black-alpha2: rgba(0,0,0,0.2);

    @white-alpha1: rgba(0,0,0,0.8);
    @white-alpha2: rgba(0,0,0,0.5);
    @white-alpha3: rgba(0,0,0,0.3);
    @white-alpha4: rgba(0,0,0,0.2);
    @white-alpha5: rgba(0,0,0,0.1);
    @white-alpha6: rgba(0,0,0,0.07);

    @list-level-0: #19252C;
    @list-level-1: #273943;
    @list-level-2: #324855;
    @list-level-3: #455C69;
}

/* New brand colors */
.11-14-brandcolors() {
    /* Used by the header */
    @brand-green: #05CC47;
    @header-green: #475C4D;
    @dark-header-green: #46584A;
    @border-green: #38463B;
    @subheader-green: #3D4F42;
    @submit-green: #5FAC75;
    @menu-grey: #313836;
    @hover-blue: #508FA3;

    /* Colors from the brand guidelines */

    @black: #000;
    @grey1: #181A1B;
    @grey2: #4F5254;
    @grey3: #7D8080;
    @grey4: #F2F2F2;
    @white: #FFF;
    @darker-grey: #181A1B;
    @pale-grey: #F2F2F2;


    @blue1: #1F3833;
    @blue2: #36807A;
    @blue3: #40CFC7;
    @blue4: #D4F5F2;

    @green1: #1F3626;
    @green2: #42704F;
    @green3: #4DC47D;
    @green4: #D4F5DE;

    @orange: #F7590A;


    @core-access-icon: #FFB35C;
    @core-plus-icon: #FF815F;
    @core-pro-icon: #E776FF;
    @core-pro-plus-icon: #FF94B4;
    @core-max-icon: #7579FF;


    @accent-orange: darken(@orange, 10%);
}


