@import "variables";
@import "../../../components/snackbar/index";

/* MAIN */
html, body, main {
    height: 100%;
}

body {
    background: #efefef;
}

th {
    font-weight: 300;
}

/* REGISTRATION */
.registration {
    width:100%;
    height: 100%;
    display: flex;
    flex-direction:row;
    background-size: cover !important;

    .sidebar {
        align-items: center;
        align-self: flex-start;
        background: white;
        display: flex;
        flex-direction: column;
        height: 100%;
        justify-content: center;
        min-width: 400px;
        max-width: 400px;
        opacity: 0.85;
        text-align: center;

        h4 {
            font-weight: 300;
        }

        form {
            width: 90%;
        }
    }

    .logo {
        align-self: center;
        width: 100%;
        text-align: center;
        color: white;

        .logo__icon {
            font-size: 20rem;
        }
    }

    .action button {
        width: calc(100% - 3rem);
        margin-top: 1.5rem;
    }
}

@media only screen and (max-width : 600px) {
    .registration {
        .logo {
            display: none;
        }

        .sidebar {
            width: 100%;
        }
    }
}

/* LAYOUT */
@media only screen and (min-width : 993px) {
    body {
        overflow-y: scroll;
    }

    main, footer {
        margin-left: 300px;
    }
    nav {
        padding-left: 40px;
    }
}

.content {
    display: flex;
    max-width: 100%;
    padding-bottom: 50px;
}

.left-panel {
    flex-basis: 80%;
    margin-left: 0.375rem;

    &.wide {
        flex-basis: 100%;
        margin-right: 0.375rem;
    }

    > .card {
        margin-bottom: 0.375rem;
    }

}

.right-panel {
    flex-basis: 20%;
    min-width: 250px;
    margin-left: 0.375rem;
    margin-right: 0.375rem;

    > .card {
        margin-bottom: 0.5rem;
    }
}

@media only screen and (max-width : 993px) {
    .left-panel {
        flex-basis: 100%;
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    .left-panel > .card {
        margin-top: 1px;
    }

    .right-panel {
        display: none;
    }
}

/* SIDEBAR */
.sidenav-fixed {
    // managed by perfect-scrollbar
    overflow-y: hidden;

    li {
        min-height: 48px;
    }

    // fix for chrome scrolling bug
    > li.last {
        padding-bottom: 58px;
    }

    .collapsible-body {
        padding: 0;

        li a {
            padding-left: 70px;
        }

        // 3d level header
        li .collapsible li.active {
            background-color: rgba(0, 0, 0, 0.05);
            a {
                color: rgba(0, 0, 0, 0.87);
            }
        }

        li:not(.active)>a.collapsible-header {
                color: rgba(0, 0, 0, 0.87);
        }


        // 3d level body
        li .collapsible-body li.active {
            background-color: $primary-color;
            a {
                color: #fff;
            }
        }

        li .collapsible-body li a {
            color: rgba(0,0,0,0.87);
            padding-left: 90px;
        }

        .collapsible li.active > a.active {
            color: rgba(0, 0, 0, 0.87);
        }

        .submenu.active {
            background-color: rgba(0, 0, 0, 0.05) !important;

            .collapsible li.active > a.active,
            .collapsible li.active > .collapsible-header,
            .collapsible > li > .collapsible-header  {
                color: rgba(0, 0, 0, 0.87);
            }
        }
    }
}

@media only screen and (min-width: 993px) {
  nav.topbar a.sidenav-trigger {
    display: block;
    margin-left: -24px;
  }
}


/* TOPBAR */
nav.topbar {
    box-shadow: none;
    height: 54px;
    line-height: 54px;

    i,
    a.button-collapse,
    a.button-collapse i {
        height: 54px;
        line-height: 54px;
    }
    .brand-logo {
        white-space: nowrap;
        text-overflow: ellipsis;
        font-weight: 100;
        font-size: 2.5rem;
        top: 5px;
    }
}

/* BREADCRUMBS */
nav.breadcrumbs {
    height: 48px;
    line-height: 48px;
    box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14),0 1px 0px 0 rgba(0,0,0,0.12),0 3px 1px -2px rgba(0,0,0,0.2);

    a:first-child {
        padding-left: 0px;
    }

    a {
        font-size: 1rem;
        color: rgba(255,255,255,0.7)
    }

    a.active {
        color: white;
    }

    a:not(:first-child):before {
        content: '\E5CC';
        color: rgba(255,255,255,0.7);
        vertical-align: top;
        display: inline-block;
        font-family: 'Material Icons';
        font-weight: normal;
        font-style: normal;
        font-size: 20px;
        margin: 0 5px 0 4px;
        -webkit-font-smoothing: antialiased;
    }
}

@media only screen and (max-width : 992px) {
    nav.breadcrumbs {
        text-align: center;
    }
}

@media only screen and (max-width : 600px) {
    nav.breadcrumbs {
        white-space: nowrap;

        .nav-wrapper {
            width: 100%;
            overflow-x: hidden;
            padding: 0 20px 0 10px;
            text-overflow: ellipsis;
        }
    }
}

/* DATATABLE */
.list-card {
    .card-content {
        padding-left:0px;
        padding-right:0px
    }

    .card-action {
        margin-top: -75px;
        border-top: none;
        padding: 10px 10px 10px 20px;
        float: left;
    }
}

table[data-form-control="datatable"] {
    margin-bottom: 60px;

    ~.dataTables_paginate {
        margin-top: -60px;
        padding-right: 20px;
        min-height: 60px;
        text-align: right;

        .paginate_button {
            display: inline-block;
            font-size: 1.2rem;
            padding: 0 10px;
            margin: 15px 2px;
            line-height: 30px;
            border-radius: 2px;
            text-align: center;
            color: #444;
            cursor: pointer;

            &.current {
                background-color: $primary-color;
                color: white;
            }

            &.disabled  {
                cursor: default;
                color: #999;
            }
        }
    }

    thead {
        tr>th:first-child {
            padding-left: 20px;
        }

        tr>th:last-child {
            padding-right: 20px;
        }

        tr>th {
            padding-right: 30px;

            &.sorting,
            &.sorting_asc,
            &.sorting_desc {
                cursor: pointer;
                position: relative;
            }

            &.sorting_asc,
            &.sorting_desc {
                font-weight:500;
            }

            &.sorting:before,
            &.sorting:after,
            &.sorting_asc:before,
            &.sorting_asc:after,
            &.sorting_desc:before,
            &.sorting_desc:after,
            &.sorting_asc_disabled:before,
            &.sorting_asc_disabled:after,
            &.sorting_desc_disabled:before,
            &.sorting_desc_disabled:after {
                position: absolute;
                bottom: 11px;
                display: block;
                opacity: 0.3;
                font-size: 1.3em;
                margin: auto;
                height:30px;
                top:0px;
                bottom:0px;
            }

            &.sorting:last-child:before,
            &.sorting:last-child:after,
            &.sorting_asc:last-child:before,
            &.sorting_asc:last-child:after,
            &.sorting_desc:last-child:before,
            &.sorting_desc:last-child:after,
            &.sorting_asc_disabled:last-child:before,
            &.sorting_asc_disabled:last-child:after,
            &.sorting_desc_disabled:last-child:before,
            &.sorting_desc_disabled:last-child:after {
                // padding-right: 20px;
            }

            &.sorting:before,
            &.sorting_asc:before,
            &.sorting_desc:before,
            &.sorting_asc_disabled:before,
            &.sorting_desc_disabled:before {
                right: 1em;
                content: "\2191"
            }

            &.sorting:after,
            &.sorting_asc:after,
            &.sorting_desc:after,
            &.sorting_asc_disabled:after,
            &.sorting_desc_disabled:after {
                right: 0.5em;
                content: "\2193"
            }

            &.sorting_asc:before,
            &.sorting_desc:after {
                opacity: 1
            }

            &.sorting_asc_disabled:before,
            &.sorting_desc_disabled:after {
                opacity: 0
            }
        }
    }

    tbody {
        tr:hover,
        tr.selected:hover {
          background-color: #eeeeee;
        }

        tr.selected {
            background: #f5f5f5;
        }

        .dt-body-center {
            padding-top: 10px;
            padding-bottom: 0px;
        }

        tr>td:first-child {
            padding-left: 20px;
        }

        tr>td:last-child {
            padding-right: 20px;
        }

        tr>td>i.material-icons {
            height: 16px;
            margin-top: -8px;
            font-size: 22px;
            display: block;
        }
    }
}


/* ALERTS */
.toast {
    justify-content: flex-start; // fix: allow links inside toast messages
}

.toast a {
    color: white;

    &.alert-info {
        background-color: #0277bd;
    }

    &.alert-warning {
        background-color: #ff8f00;
    }

    &.alert-error {
        background-color: #bf360c;
    }
}

/* FORM CARD */
.card form {
	.section {
        padding-top: 0;
        padding-bottom: 0;

        h5 {
            font-size: 1.2rem;
            padding-bottom: 0.5rem;
            border-bottom: 2px solid black;
            margin-bottom: 10px;
        }
    }
}

/* HELPERS */
.primary {
    background-color: $primary-color;
}

.secondary {
    background-color: $secondary-color;
}
