@import '../functions.less';
@import '../../../../files/config/colors.less';


@graphicColor1: #2A71C0;
@graphicColor2: #8B79CB;
@graphicColor3: #ED6666;
@graphicColor4: #DD8822;
@graphicColor5: #FEC000; 
@graphicColor6: #80982B;
@graphicColor7: #DC5187;
@graphicColor8: #DC81E7;
@graphicColor9: #2D847F;
@graphicColor10: #49BDDC;
@graphicColor11: #4BD699;
@graphicColor12: #B7D64B;
@graphicColor13: #D6A04B;
@graphicColor14: #D6654B;
@graphicColor15: #5F86C3;
@graphicColor16: #112233;


.drs-graphics-01 {
    margin: 0 auto;
    @colorFieldGraphic: #5671;
    padding: 30px 25px 35px 25px;
    background: #FFF;
    border-radius: 4px;
    * {
        .fx();
    }
    a, a * {
        cursor: pointer;
    }
    a:hover{
        filter: grayscale(70%);
    }
    .title {
        font-size: 1.3em;
        text-align: center;
    }
    .legend {
        padding: 20px 0;
        font-size: .75em;
        text-align: center;
        label {
            position: relative;
            display: inline-block;
            padding: 5px 10px 5px 45px;
            cursor: pointer;
            user-select: none;
            &:before {
                content: "";
                display: block;
                position: absolute;
                width: 30px;
                height: 15px;
                left: 10px;
                border-radius: 3px;
            }
            &:nth-child(1):before {
                background: linear-gradient(~"@{graphicColor1}FF" , ~"@{graphicColor1}BB");
            }
            &:nth-child(2):before {
                background: linear-gradient(~"@{graphicColor2}FF", ~"@{graphicColor2}BB");
            }
            &:nth-child(3):before {
                background: linear-gradient(~"@{graphicColor3}FF", ~"@{graphicColor3}BB");
            }
            &:nth-child(4):before {
                background: linear-gradient(~"@{graphicColor4}FF", ~"@{graphicColor4}BB");
            }
            &:nth-child(5):before {
                background: linear-gradient(~"@{graphicColor5}FF" , ~"@{graphicColor5}BB");
            }
            &:nth-child(6):before {
                background: linear-gradient(~"@{graphicColor6}FF", ~"@{graphicColor6}BB");
            }
            &:nth-child(7):before {
                background: linear-gradient(~"@{graphicColor7}FF", ~"@{graphicColor7}BB");
            }
            &:nth-child(8):before {
                background: linear-gradient(~"@{graphicColor8}FF", ~"@{graphicColor8}BB");
            }
            &:nth-child(9):before {
                background: linear-gradient(~"@{graphicColor9}FF" , ~"@{graphicColor9}BB");
            }
            &:nth-child(10):before {
                background: linear-gradient(~"@{graphicColor10}FF", ~"@{graphicColor10}BB");
            }
            &:nth-child(11):before {
                background: linear-gradient(~"@{graphicColor11}FF", ~"@{graphicColor11}BB");
            }
            &:nth-child(12):before {
                background: linear-gradient(~"@{graphicColor12}FF", ~"@{graphicColor12}BB");
            }
            &:nth-child(13):before {
                background: linear-gradient(~"@{graphicColor13}FF" , ~"@{graphicColor13}BB");
            }
            &:nth-child(14):before {
                background: linear-gradient(~"@{graphicColor14}FF", ~"@{graphicColor14}BB");
            }
            &:nth-child(15):before {
                background: linear-gradient(~"@{graphicColor15}FF", ~"@{graphicColor15}BB");
            }
            &:nth-child(16):before {
                background: linear-gradient(~"@{graphicColor16}FF", ~"@{graphicColor16}BB");
            }
            &.stroke {
                text-decoration: line-through;
                opacity: 40%;
                filter: grayscale(70%);
            }
            &:not(.stroke):hover {
                opacity: 90%;
            }
            &.stroke:hover {
                filter: grayscale(20%);
                opacity: 70%;
            }
        }
        span {
            background: @colorFieldGraphic;
            padding: 6px 30px;
            margin-left: 10px;
            border-radius: 3px;
            b {
                font-size: 1.1em;
            }
        }
    }
    .itens > * *[ref].hide {
        display: none;
    }
    &.vertical {
        .itens {
            .colorGraphics(@ori:to bottom);
            .flex(2%);
            min-height: 330px;
            font-size: .85em;
            > * {
                flex: 1;
                text-align: center;
                text-decoration: none;
                color: #123;
                strong {
                    display: block;
                    font-weight: normal;
                    font-size: .9em;
                    > span {
                        display: block;
                        background: @colorFieldGraphic;
                        border-radius: 0 0 3px 3px;
                        padding: 6px 4px 6px 4px;
                    }
                }
                > div {
                    .grid(1fr);
                    height: 300px;
                    background: @colorFieldGraphic;
                    border-radius: 3px;
                    overflow: hidden;
                    box-shadow: 0 3px 3px -3px #000;
                    label {
                        display: block;
                        width: 100%;
                        margin: auto auto 0 auto;
                        > * {
                            display: block;
                            height: 0px;
                            font-size: .85em;
                            i {
                                .flex();
                                justify-content: center;
                                position: relative;
                                color: #FFF;
                                width: 100%;
                                height: 100%;
                                z-index: 10;
                            }
                            &.radius {
                                border-radius: 3px 3px 0 0;
                            }
                        }
                    }
                }
            }
        }
    }
    &.horizontal {
        .itens {
            .colorGraphics(@ori:to left);
            font-size: .85em;
            > * {
                .grid(120px 1fr; 0);
                grid-template-areas: "str div";
                div { grid-area: div; }
                strong { grid-area: str; }
                text-decoration: none;
                > strong {
                    font-weight: normal;
                    text-align: right;
                    color: #123;
                    border-right: 1px solid #123A;
                    font-size: .85em;
                    > span {
                        display: block;
                        padding: 6px 10px 6px 0;
                        background: @colorFieldGraphic;
                        margin: 1px 0;
                        border-radius: 3px 0 0 3px;
                    }
                }
                > div {
                    background: @colorFieldGraphic;
                    height: calc(100% - 2px);
                    border-radius: 0 3px 3px 0;
                    > * {
                        .flex();
                        height: 100%;
                        text-align: left;
                        > * {
                            .flex();
                            height: 0px;
                            font-size: 14px;
                            justify-content: right;
                            font-size: .8em;
                        }
                    }
                    label > * {
                        &.radius {
                            border-radius: 0 3px 3px 0;
                            box-shadow: 2px 0 2px -2px #666;
                        }
                        i {
                            display: block;
                            position: relative;
                            width: 100%;
                            color: #FFF;
                            text-align: center;
                            font-size: .95em;
                            z-index: 10;
                        }
                    }
                }
            }
        }
    }
}

.colorGraphics(@ori){
    > * > div label > * {
        &:nth-child(1) {
            background: linear-gradient(@ori, ~"@{graphicColor1}FF", ~"@{graphicColor1}BB");
        }
        &:nth-child(2) {
            background: linear-gradient(@ori, ~"@{graphicColor2}FF", ~"@{graphicColor2}BB");
        }
        &:nth-child(3) {
            background: linear-gradient(@ori, ~"@{graphicColor3}FF", ~"@{graphicColor3}BB");
        }
        &:nth-child(4) {
            background: linear-gradient(@ori, ~"@{graphicColor4}FF", ~"@{graphicColor4}BB");
        }
        &:nth-child(5) {
            background: linear-gradient(@ori, ~"@{graphicColor5}FF", ~"@{graphicColor5}BB");
        }
        &:nth-child(6) {
            background: linear-gradient(@ori, ~"@{graphicColor6}FF", ~"@{graphicColor6}BB");
        }
        &:nth-child(7) {
            background: linear-gradient(@ori, ~"@{graphicColor7}FF", ~"@{graphicColor7}BB");
        }
        &:nth-child(8) {
            background: linear-gradient(@ori, ~"@{graphicColor8}FF", ~"@{graphicColor8}BB");
        }
        &:nth-child(9) {
            background: linear-gradient(@ori, ~"@{graphicColor9}FF", ~"@{graphicColor9}BB");
        }
        &:nth-child(10) {
            background: linear-gradient(@ori, ~"@{graphicColor10}FF", ~"@{graphicColor10}BB");
        }
        &:nth-child(11) {
            background: linear-gradient(@ori, ~"@{graphicColor11}FF", ~"@{graphicColor11}BB");
        }
        &:nth-child(12) {
            background: linear-gradient(@ori, ~"@{graphicColor12}FF", ~"@{graphicColor12}BB");
        }
        &:nth-child(13) {
            background: linear-gradient(@ori, ~"@{graphicColor13}FF", ~"@{graphicColor13}BB");
        }
        &:nth-child(14) {
            background: linear-gradient(@ori, ~"@{graphicColor14}FF", ~"@{graphicColor14}BB");
        }
        &:nth-child(15) {
            background: linear-gradient(@ori, ~"@{graphicColor15}FF", ~"@{graphicColor15}BB");
        }
        &:nth-child(16) {
            background: linear-gradient(@ori, ~"@{graphicColor16}FF", ~"@{graphicColor16}BB");
        }
    }
}