/*
Granef -- graph-based network forensics toolkit
Copyright (C) 2020-2021  Milan Cermak, Institute of Computer Science of Masaryk University

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.
*/


@color-white: #fff;
@color-grey: #f4f3ef;
@color-grey-light: #fafafa;
@color-grey-border: #dee2e6;
@color-black: #2c2c2c;
@color-black-light: #9c9c9c;
@color-orange: #ef8157;
@color-orange-dark: #d6744e;
@color-shadow: #00000036;


body {
    background-color: @color-grey;
    color: @color-black;
    font-family: Montserrat, Helvetica Neue, Arial, sans-serif;
    font-size: 15px;
    position: relative;

    code {
        font-size: 1em;
        color: @color-black;
        background-color: @color-white;
        border: 1px solid @color-grey-border;
        padding: 0 0.25em;
    }
    
    pre {
        background-color: @color-white;
        border: 1px solid @color-grey-border;
    
        code {
            border: none;
            padding: 1% !important;
        }
    }
}


#particles-js {
    position: fixed;  // Use "fixed" to enable a sliding effect, "absolute" otherwise
    top: 0;
    left: 0;
    pointer-events: none;
    width: 100%;
    height: 100%;
    z-index: -1;
}


.navbar {
    background: @color-white;
    padding: 0px;
    line-height: 40px;
    box-shadow: 1px 1px 4px @color-shadow;
    -webkit-box-shadow: $box-shadow;
    -moz-box-shadow: $box-shadow;
    -o-box-shadow: $box-shadow;

    .navbar-brand {
        color: @color-orange !important;
        font-size: 26px;
    }

    .navbar-nav a.active {
        background-color: @color-orange;
        color: @color-white !important;
    }

    .navbar-toggler {
        margin: 8px 0px;

        &:focus {
            box-shadow: 0 0 0 0.05rem;
        }
    }
}


#hero {
    box-shadow: inset 1px -3px 4px -3px @color-shadow;
    -webkit-box-shadow: $box-shadow;
    -moz-box-shadow: $box-shadow;
    -o-box-shadow: $box-shadow;

    .container {
        padding-top: 5rem!important;
        padding-bottom: 5rem!important;

        #screenshot {
            border: solid @color-grey-border 1px;
            image-rendering: pixelated;
        }
    }

    h1 {
        color: @color-orange;
    }

    .lead {
        font-size: 1.2rem;
    }

    .btn-primary {
        font-size: 1.2rem;
        background-color: @color-orange;
        border-color: @color-orange;

        &:hover {
            background-color: @color-orange-dark;
            border-color: @color-orange-dark;
        }

        &:focus {
            outline: none;
            box-shadow: none;
        }
    }

    .btn-secondary {
        font-size: 1.2rem;
        background-color: @color-white;
        border-color: @color-orange;
        color: @color-orange;

        &:hover {
            background-color: @color-grey-light;
            border-color: @color-orange-dark;
            color: @color-orange-dark;
        }

        &:focus {
            outline: none;
            box-shadow: none;
        }
    }
}


section:not(#hero) {
    scroll-margin-top: 56px;  // Scroll offset
    background-color: @color-white;

    &.gray-section {
        background-color: @color-grey;
        //background-color: transparent;
        box-shadow: inset 1px 0px 4px @color-shadow;
        -webkit-box-shadow: $box-shadow;
        -moz-box-shadow: $box-shadow;
        -o-box-shadow: $box-shadow;
    }

    h2 {
        font-weight: 300;
        font-size: 1.75rem;
        color: @color-orange;
    }

    h3 {
        font-weight: 300;
        font-size: 1.3rem;
        color: @color-orange;
    }

    a {
        color: @color-orange !important;
    }

    .text-bold {
        font-weight: 600;
    }
}


#design {
    #main {
        .line-horizontal {
            height: 2px;
            margin: 4rem 5px 0 5px;
            position: relative;
            background: @color-black-light;

            &.curve-down {
                &::before {  // Bottom line
                    content: "";
                    display: block;
                    border-top: 2px solid @color-black-light;
                    width: 400%;
                    margin-left: 12px;
                    margin-top: 3.8em;
                    transform: translateX(-75%);
                }
                &::after {  // Right line
                    content: "";
                    display: block;
                    border-top: 3.8em solid @color-black-light;
                    width: 2px;
                    margin-left: auto;
                    margin-right: -12px;
                    transform: translateY(-101%);
                }
            }

            &.curve-up {
                &::before {  // Top line
                    content: "";
                    display: block;
                    border-top: 2px solid @color-black-light;
                    width: 800%;
                    margin-left: -12px;
                    margin-top: -5.9em;
                }
                &::after {  // Left line
                    content: "";
                    display: block;
                    border-top: 6em solid @color-black-light;
                    width: 2px;
                    margin-left: -12px;
                    transform: translateY(-2%);
                }
            }
        }

        .arrow-right {
            &::before {
                content: "";
                position: absolute;
                width: 0px;
                height: 0px;
                border: 5px solid transparent;
                top: -4px;
                right: -7px;
                border-left: 15px solid @color-black-light;
            }

            &.arrow-margin {
                margin-right: -8px;
            }
        }

        .module {
            height: 6.5em;
            border: 1px dashed @color-black;
            white-space: nowrap;
            background-color: transparent;
            text-align: left;
            overflow: hidden;
            text-overflow: ellipsis;
            color: @color-orange-dark;

            &:hover {
                background-color: @color-orange;
                border: 1px dashed @color-orange-dark;
                color: @color-white;
                cursor: pointer;

                .line-horizontal {
                    background: @color-white;
                }

                .arrow-right::before {
                    border-left: 15px solid @color-white;
                }
            }
    
            .module-name {
                line-height: 2.5em;
                text-decoration: underline;
            }

            .task-name {
                height: 3em;
                background-color: @color-grey;
                border: 1px solid @color-black-light;
                color: @color-black;
                border-radius: 3px;
                display: flex;
                justify-content: center;
                align-items: center;
            }

            .line-horizontal {
                margin: 1.5rem 5px;
            }
        }

        .my-auto {
            padding-top: 1.9rem;
        }

        .over-task-name {
            .module.task-name();
            margin-top: -3.95em;
            margin-bottom: 3em;
        }
    }
}


#usage {
    code {
        background: @color-grey;
    }

    p code, ul code {
        font-size: 0.875em;
    }

    .video-container {
        border: 1px solid @color-grey-border;

        .video-js .vjs-big-play-button {
            background-color: @color-orange;
            border-color: @color-grey-border;

            &:hover {
                background-color: @color-orange-dark;
            }
        }
    }
}


#publications {
    .paper-name {
        font-weight: 600;
    }

    .publication .list-inline {
        margin-left: 1px;

        i {
            margin-right: 2px;
        }
    }
}


#team {
    .name {
        font-size: 1rem;
        font-weight: 600;
    }

    .list-inline {
        margin-left: 1px;

        i {
            margin-right: 2px;
        }
    }

    .modal-link {
        cursor: pointer;
    }
}

#contact {
    .font-bold {
        font-weight: 600;
    }

    input, textarea {
        font-size: 15px;
        margin-left: -1px;

        &:focus {
            border-color: @color-orange;
            box-shadow: none;
        }
    }

    #contact-message {
        height: 10.4rem;
    }

    .btn-primary {
        background-color: @color-orange;
        border-color: @color-orange;

        &:hover {
            background-color: @color-orange-dark;
            border-color: @color-orange-dark;
        }

        &:focus {
            outline: none;
            box-shadow: none;
        }
    }
}


.modal {
    .modal-dialog-centered {
        padding-bottom: 25%;
    }

    .modal-content {
        background-color: @color-grey;
        
        .modal-header {
            margin: 0 1rem;
            padding: 1rem 0 0.5rem 0;

            .modal-title {
                font-weight: 300;
                font-size: 1.75rem;
                color: @color-orange;
            }

            .navigation {
                padding-top: 4px;
                text-decoration: none;
                color: @color-black-light;
                font-size: 17px;
                border: none;
                background-color: transparent;

                &:hover {
                    color: @color-black;
                }

                &.btn-left {
                    margin-right: 0.1em;
                }

                &.btn-right {
                    margin-left: 0.1em; 
                }
            }
        }

        .modal-body {
            p, ul {
                a {
                    color: @color-orange;
                }
            }

            code {
                background: @color-white;
            }

            .btn {
                background-color: @color-orange;
                border-color: @color-orange;
        
                &:hover {
                    background-color: @color-orange-dark;
                    border-color: @color-orange-dark;
                }
        
                &:focus {
                    outline: none;
                    box-shadow: none;
                }
            }

            .text-bold {
                font-weight: 600;
            }
        }
    }
}
