body {

    font-family: 'system-ui', sans-serif;
    font-size: 14px;
    color: @text-color;
    background-color: @backgound-color;

    & * {
        box-sizing: border-box;
        -webkit-box-sizing: border-box;
    }

    h1 {
        font-size: 24px;
        line-height: 32px;
        font-weight: 600;
        margin: 0 0 20px 0;
    }

    h2 {
        font-size: 20px;
        line-height: 28px;
        font-weight: 600;
        margin: 4px 0 15px 0;
    }

    a {
        text-decoration: none;
        color: @link-text-color;

        &:hover{
            border-bottom: 2px solid @link-text-color;
            cursor: pointer;
        }
    }

    .btn {
        display: inline-block;
        vertical-align: middle;
        height: 32px;
        min-width: 95px;
        font-weight: 600;
        font-size: 14px;
        line-height: 20px;
        padding: 0 10px;
        border-radius: 2px;
        border: 2px solid transparent;
        outline: none;

        &.btn-primary {
            background-color: @link-text-color;
            color: #fff;

            &:hover {
                background-color: lighten(@link-text-color, 5%);
            }
        }

        &.btn-grey {
            background-color: @grey-btn-background;

            &:hover {
                background-color: darken(@grey-btn-background, 5%);
            }
        }
    }

    .entry {
        display: flex;
        align-items: center;
        margin-bottom: 5px;
        background-color: @panel-background-color;
        border-radius: 4px;
        box-shadow: 0 1.6px 3.6px rgba(0,0,0,0.13), 0 0.3px 0.9px rgba(0,0,0,0.11);

        &:last-child {
            margin-bottom: 0;
        }

        &.selected {
            box-shadow: 0 0 0 1.5px @link-text-color;
            background-color: @grey-btn-background;
        }

        .entry-icon,
        .entry-time,
        .entry-link,
        .entry-remove {
            display: inline-block;
            vertical-align: middle;
        }

        .entry-icon {
            width: 16px;
            height: 16px;
            margin: 12px;
        }

        .entry-link {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            line-height: 24px;
            flex-grow: 1;
            padding-right: 10px;

            a {
                color: @text-color;
                border: none;
                font-weight: 600;
            }
        }

        .entry-time {
            text-align: right;
            padding: 0 10px;
            color: @text-grey-color;
            line-height: 40px;
            font-size: 12px;
            cursor: default;
        }

        :first-child.entry-time {
            text-align: left;
        }

        .entry-remove {
            margin: 6px;
            padding: 8px;
            border: none;

            svg {
                fill: #767676;
                width: 12px;
                height: 12px;
                float: left;
            }

            &:hover {
                background-color: @backgound-color;
                border-radius: 2px;
            }
        }
    }

    &.main {
        .wrapper {
            .sidebar {
                position: fixed;
                width: 340px;
                border-right: 1px solid @border-color;
                background-color: @backgound-color;

                .container {
                    display: flex;
                    flex-direction: column;
                    height: 100vh;
                    padding: 30px 25px 30px 50px;

                    &>.search,
                    &>.nav,
                    &>.footer {
                        display: flex;

                        &>.content {
                            width: 100%;
                        }
                    }

                    &>.search {
                        &>.content {
                            .search-structure {
                                background-color: @input-background;
                                border: 1px solid @border-color;
                                border-radius: 2px;
                                display: flex;
                                transition: all 0.2s ease-in-out;
                                margin-bottom: 20px;

                                &.focus {
                                    box-shadow: 0 0 0 1px darken(@border-color, 10%) inset;
                                    border-color: darken(@border-color, 10%);
                                }

                                svg {
                                    fill: @text-color;
                                }

                                .search-icon {
                                    width: 16px;
                                    height: 16px;
                                    margin: 8px 12px;
                                }

                                .search-input {
                                    border: none;
                                    background: transparent;
                                    outline: none;
                                    padding-right: 5px;
                                    flex: 1 0 0;
                                }

                                .search-clear {
                                    display: none;
                                    margin: 4px;
                                    padding: 6px;
                                    border: none;

                                    svg {
                                        width: 12px;
                                        height: 12px;
                                        float: left;
                                    }

                                    &:hover {
                                        background-color: @backgound-color;
                                        border-radius: 2px;
                                    }
                                }
                            }
                        }
                    }

                    &>.nav {
                        flex-grow: 1;

                        &>.content {
                            text-align: center;
                            padding-bottom: 20px;
                            display: flex;
                            flex-direction: column;

                            .calendar {
                                flex-grow: 0;

                                &:after {
                                    display: table;
                                    content: " ";
                                    clear: both;
                                }
                            }

                            p {
                                flex-grow: 0;
                                min-height: 22px;

                                &:last-child {
                                    margin-bottom: 0;
                                }

                                &.space {
                                    flex-grow: 1;
                                }

                                #go_today, #go_options {
                                    display: inline-block;
                                }
                            }
                        }
                    }

                    &>.footer {
                        border-top: 1px solid @border-color;
                        padding-top: 20px;

                        &>.content {
                            img {
                                float: left;
                                width: 40px;
                                height: 40px;
                                margin-right: 15px;
                            }

                            div {
                                display: inline-block;
                                width: 200px;
                            }

                            a {
                                font-size: 12px;
                            }
                        }
                    }
                }
            }

            .history-container {
                margin-left: 340px;
                padding: 30px 50px;

                .gutter {
                    position: relative;
                    width: 820px;

                    .remove-confirmation {
                        display: none;
                        position: absolute;
                        right: 0;
                        margin-top: -15px;
                        background-color: @panel-background-color;
                        box-shadow: 0 1.6px 3.6px rgba(0,0,0,0.13), 0 0.3px 0.9px rgba(0,0,0,0.11);
                        padding: 10px 10px 10px 20px;
                        border-radius: 5px;

                        span {
                            display: inline-block;
                            vertical-align: middle;
                        }

                        .btn-primary {
                            margin-left: 10px;
                            margin-right: 5px;
                        }
                    }
                }

                .search-result {
                    margin-bottom: 20px;
                }

                .history-day {
                    margin-bottom: 20px;

                    .entry {
                        width: 820px;

                        .entry-link {
                            width: 660px;
                        }
                    }
                }
            }
        }
    }

    .entry,
    .search-clear,
    .calendar,
    #go_today {
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }

    .form-group {
        margin-bottom: 20px;
        display: flex;

        label {
            flex-grow: 1;
        }

        input[type=number] {
            background-color: @panel-background-color;
            border: 1px solid @border-color;
            outline: none;
        }

        .toggle-switch {
            position: relative;

            input {
                appearance: none;
                cursor: pointer;
                display: block;
                outline: none;
                width: 40px;
                height: 20px;
                background-color: @panel-background-color;
                border: 1px solid @border-color;
                border-radius: 20px;
            }

            .dot {
                position: absolute;
                transition: all .1s ease;
                pointer-events: none;
                top: 5px;
                left: 5px;
                right: unset;
                border-radius: 10px;
                width: 10px;
                height: 10px;
                background: #2B2B2B;
            }

            input:checked {
                background-color: @link-text-color;
                border-color: @link-text-color;
                &+.dot {
                    left: 25px;
                    right: unset;
                    background: @panel-background-color;
                }
            }
        }


    }

    .modal {
        position: fixed;
        display: none;
        justify-content: center;
        z-index: 1;
        left: 0;
        top: 0;
        bottom: 0;
        right: 0;
        overflow: hidden;
        background-color: rgb(0,0,0);
        background-color: rgba(0,0,0,0.4);

        .modal-content {
            background-color: @panel-background-color;
            width: 400px;
            border-radius: 4px;
            height: auto;
            margin-top: auto;
            margin-bottom: auto;

            .modal-heading {
                display: flex;
                justify-content: flex-end;
                padding: 5px 5px 0 5px;

                .close {
                    display: flex;
                    padding: 3px;

                    &:hover {
                        background-color: @backgound-color;
                        border-radius: 2px;
                        cursor: pointer;
                    }
                }
            }

            .modal-body {
                padding: 0 20px 10px 20px;
            }

            .modal-footer {
                padding: 0 20px 20px 20px;
                display: flex;

                button {
                    flex-grow: 1;

                    &:first-child {
                        margin-right: 5px;
                    }

                    &:last-child {
                        margin-left: 5px;
                    }
                }
            }
        }
    }
}

