// ----------------------------------------------------------------------
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
// --
// Copyright 2016-2019 Andi Dittrich <https://andidittrich.de>
// ----------------------------------------------------------------------

@import "core/selectors.less";

.THEME(enlighter, {
    
    color: #939393;
    border-radius: 8px;
    border: solid 1px #e0e0e0;

    .STYLE_BUTTON({
        border-radius: 3px;
        background-color: #fff;
        color: #717171;
        font-size: 1em;
        padding: 0;
        border: 1px solid #e0e0e0;
        margin: 0 0 0 8px;
        text-decoration: none;
        width: 23px;
        height: 23px;
        background-position: 0 0;
        background-size: contain;

        &:hover{
            border-color: #c9c9c9;
        }

        // hide text
        &:after{
            content: '';
        }
    });

    // hover styles
    .STYLE_LINEHOVER({
        color: #444444;
        background-color: #fffcd3;
    }, {
        color: #444444;
        background-color: #fffcd3;
    });

    // Inline specific styles
    .STYLE_CODE_CONTAINER_INLINE({

    });
    
    // RAW code pane
    .STYLE_CODE_CONTAINER_RAW({
        font-size: 1em;
        color: #000000;
        background-color: #f9f9f9;
        border-radius: 8px;
        line-height: 1.4em;
        padding: 0px 5px 0px 60px;
    });

    // LIST specific styles
    .STYLE_CODE_CONTAINER_BLOCK({

    });

    // line styles
    .STYLE_LINE({
        border: solid 0px #ffffff;
        line-height: 1.35em;
        color: #aaaaaa;

        // top+bottom offsets + borders
        &:FIRST-CHILD {
            //padding-top: 5px;
            border-radius: 8px 8px 0px 0px;
        }

        &:LAST-CHILD {
            //  padding-bottom: 5px;
            border-radius: 0px 0px 8px 8px;
        }

        // special line highlight color
        &.enlighter-special{
            background-color: #fdf5f0;
        }

    }, {}, {});

    // Line Number Styles
    .STYLE_LINENUMBERS({
        border-right: solid 1px #e0e0e0;
        background-color: #f9f9f9;

    // borders
    }, {
        border-radius: 8px 0px 0px 0px;
    }, {
        border-radius: 0px 0px 0px 8px;
    });

    // default text fragment color
    .TOKEN(text, {
        color: #000000;
    });

    // comments
    .TOKEN(c0, {
        color: #9999aa;
    });
    .TOKEN(c1, {
        color: #9999aa;
    });
    .TOKEN(c2, {
        color: #9999aa;
    });
    .TOKEN(c9, {
        color: #9baa8f;
    });

    // keywords
    .TOKEN(k0, {
        color: #286491;
        font-weight: bold;
    });
    .TOKEN(k1, {
        color: #286491;
        font-weight: bold;
    });
    .TOKEN(k2, {
        color: #445588;
        font-weight: bold;
    });
    .TOKEN(k3, {
        color: #4da0d2;
        background-color: #f0f0f0;
    });
    .TOKEN(k4, {
        color: #4a9141;
        font-weight: bold;
    });
    .TOKEN(k5, {
        color: #286491;
        font-weight: bold;
    });
    .TOKEN(k6, {
        color: #286491;
        font-style: italic;
    });
    .TOKEN(k7, {
        color: #286491;
        font-weight: bold;
    });
    .TOKEN(k8, {
        color: #4da0d2;
    });
    .TOKEN(k9, {
        color: #990073;
        font-weight: bold;
    });
    .TOKEN(k10, {
        color: #4a9141;
        font-style: italic;
    });
    .TOKEN(k11, {
        color: #9999aa;
    });


    // expressions
    .TOKEN(e0, {
        color: #34068a;
        font-weight: bold;
    });
    .TOKEN(e1, {
        color: #34068a;
        font-weight: bold;
    });
    .TOKEN(e2, {
        color: #009926;
    });
    .TOKEN(e3, {
        color: #286491;
    });
    .TOKEN(e4, {
        color: #ff8c00;
        font-style: italic;
    });

    // strings
    .TOKEN(s0, {
        color: #dd1144;
    });
    .TOKEN(s1, {
        color: #dd1144;
    });
    .TOKEN(s2, {
        color: #dd1144;
    });
    .TOKEN(s3, {
        color: #737383;
    });
    .TOKEN(s4, {
        color: #ff8c00;
        font-weight: bold;
    });
    .TOKEN(s5, {
        color: #dd1144;
        font-style: italic;
    });

    // numbers
    .TOKEN(n0, {
        color: #009999;
    });
    .TOKEN(n1, {
        color: #009999;
    });
    .TOKEN(n2, {
        color: #009999;
        font-style: italic;
    });
    .TOKEN(n3, {
        color: #009999;
        font-style: italic;
    });
    .TOKEN(n4, {
        color: #009999;
        font-style: italic;
    });
    .TOKEN(n5, {
        color: #009999;
        text-decoration: underline;
    });

    // methods/functions
    .TOKEN(m0, {
        color: #0086b3;
    });
    .TOKEN(m1, {
        color: #0086b3;
    });
    .TOKEN(m2, {
        color: #0086b3;
    });
    .TOKEN(m3, {
        color: #0086b3;
    });

    // generic
    .TOKEN(g0, {
        color: #777;
    });
    .TOKEN(g1, {
        color: #777;
    });

    // Text Documents
    .TOKEN(t0, {
        color: #777;
    });
    .TOKEN(t1, {
        color: #dd1144;
        font-weight: bold;
    });
    .TOKEN(t2, {
        color: #990073;
        font-weight: bold;
    });
    .TOKEN(t3, {
        color: #0086b3;
    });
    .TOKEN(t4, {
        color: #009926;
    });
    .TOKEN(t5, {
        color: #009926;
    });
    .TOKEN(t6, {
        color: #dd1144;
    });
    .TOKEN(t7, {
        color: #535353;
        font-weight: bold;
    });
    .TOKEN(t8, {
        color: #777;
        background-color: #f0f0f0;
        font-style: italic;
    });

    // XML
    .TOKEN(x1, {
        color: #286491;
        font-weight: bold;
    });
    .TOKEN(x2, {
        color: #4da0d2;
    });

    // CSS
    .TOKEN(x10, {
        color: #000000;
        font-weight: bold;
    });
    .TOKEN(x11, {
        color: #286491;
        font-weight: bold;
    });
    .TOKEN(x12, {
        color: #286491;
        text-decoration: underline;
    });
    .TOKEN(x13, {
        color: #0086b3;
    });
    .TOKEN(x14, {
        color: #009999;
        font-style: italic;
    });
    .TOKEN(x15, {
        color: #990073;
        font-style: italic;
    });

    /* Object Wrapper - layout::INLINE
    ----------------------------------------------------------------------------------- */
    .VIEW_INLINE({
        border-radius: 3px;
        background-color: #fafafa;
    });

    /* Object Wrapper - layout::CODEGROUPS
    ----------------------------------------------------------------------------------- */
    .VIEW_CODEGROUP({

        // border radius top
        .enlighter, .enlighter-raw{
            border-top-left-radius: 0px;
            border-top-right-radius: 0px;
        }
    
        // border radius upper right corner
        .enlighter div:first-child{
            border-radius: 0px;
        }
    
        // contains the tabs
        .enlighter-codegroup-wrapper{
            position: relative;
        }
    
        // contains the buttons
        .enlighter-codegroup-switch{
            border-radius: 8px 8px 0 0;
            background-color: #f9f9f9;
            border-bottom: 1px solid #e0e0e0;
            padding: 5px 5px 5px 45px;
    
            .enlighter-btn{
                padding: 3px 10px 3px 10px;
                border-radius: 4px;
                border: 1px solid #e0e0e0;
                font-size: 1em;
                color: #000;
                background-color: transparent;
                width: auto;
    
                &.enlighter-active{
                    background-color: #e5e5e5;
                    color: #000;
                    border-color: #c9c9c9;
                }
            }
        }
    });
});