* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    font-family: Roboto, sans-serif;
    background-color: #ffffff;
}

input,
select {
    color: #666666;
    font-family: Roboto, sans-serif;
    font-size: 16px;
}

.box-shadow {
    -webkit-box-shadow: 0px 0px 14px 0px rgba(0, 0, 0, 0.15);
    box-shadow: 0px 0px 14px 0px rgba(0, 0, 0, 0.15);
}

.pointer {
    cursor: pointer;
}

.icon-hover:hover {
    color: #5b5efd;
}

#preloader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    overflow: hidden;
    background-color: #18191a;
}

#preloader::before {
    content: "";
    width: 150px;
    height: 181px;
    position: fixed;
    top: calc(50vh - 90px);
    left: calc(50vw - 75px);
    background-image: url(../img/preload-icon.png);
    -webkit-animation: animate-preloader 1.5s linear;
    animation: animate-preloader 1.5s linear;
}

@-webkit-keyframes animate-preloader {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

@keyframes animate-preloader {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* Top navigation */
#top-nav {
    width: 100%;
    position: fixed;
    top: 0;
    display: flex;
    flex-direction: column;
    padding: 10px;
    background-color: transparent;
}

#record-search {
    width: 100%;
    height: 50px;
    padding: 10px;
    background-color: #ffffff;
    border: 1px solid #aaaaaa;
    border-radius: 10px;
    outline: none;
}

#record-search:focus {
    border-color: #5b5efd;
}

#top-nav-container {
    width: 100%;
    display: flex;
    margin-top: 10px;
    border: 1px solid #aaaaaa;
    border-radius: 10px;
}

#filter-menu-icon {
    width: 40px;
    height: 40px;
    color: #666666;
    background-color: #ffffff;
    border: none;
    border-right: 1px solid #aaaaaa;
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
    outline: none;
    font-size: 18px;
}

.sort-by-select {
    height: 40px;
    flex-grow: 1;
    padding: 0 10px;
    color: #666666;
    background-color: #ffffff;
    border: none;
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
    outline: none;
    cursor: pointer;
}

#sort-personnel-by-select,
#sort-department-by-select,
#sort-location-by-select {
    display: none;
}

/* Filter records */
.filter-menu-container {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
    background-color: #ffffff;
}

.filter-menu {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 50px 20px 20px 20px;
    overflow-y: auto;
    overflow-x: hidden;
}

.close-filter-menu {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #aaaaaa;
    font-size: 24px;
    cursor: pointer;
}

.filter-menu-section {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 20px;
    color: #aaaaaa;
}

.filter-menu-section-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
}

.filter-menu-section-heading i {
    font-size: 14px;
}

.filter-menu-checkbox-container {
    padding-left: 10px;
    font-size: 16px;
}

.filter-menu-checkbox {
    padding: 5px;
}

.filter-menu-checkbox input,
.filter-menu-checkbox label {
    cursor: pointer;
}

.filter-menu-checkbox input:checked ~ label {
    color: #5b5efd;
}

.filter-menu-checkbox label {
    margin-left: 5px;
    color: #aaaaaa;
    font-weight: 400;
}

.filter-menu-button-container {
    display: flex;
    align-self: flex-end;
    gap: 20px;
    margin-top: 10px;
    width: 100%;
}

.filter-menu-btn {
    height: 30px;
    border: none;
    border-radius: 5px;
    outline: none;
    font-size: 15px;
    cursor: pointer;
}

.apply-filters-btn {
    width: 100%;
    color: #ffffff;
    background-color: #5b5efd;
}

.clear-filters-btn {
    width: 100%;
    color: #ffffff;
    background-color: #ff7878;
}

.close-filters-btn {
    width: 100%;
    color: #666666;
    background-color: #eeeeee;
}

#personnel-filter-menu-container,
#department-filter-menu-container,
#location-filter-menu-container {
    display: none;
}

/* Records list */
#records-list-container {
    width: 100%;
    height: calc(100% - 172px);
    position: absolute;
    top: 122px;
    overflow-y: auto;
    overflow-x: hidden;
}

#personnel-list,
#department-list,
#location-list {
    display: none;
}

.list {
    padding: 0;
    list-style-type: none;
    list-style-position: inside;
}

.list-entry {
    display: flex;
    align-items: center;
    padding: 10px;
    cursor: pointer;
}

.list-entry:hover {
    background-color: #eeeeee;
}

.list-entry.active,
.list-entry.active:hover {
    background-color: #5b5efd;
}

.list-entry.active .list-badge,
.list-entry.active:hover .list-badge {
    color: #ffffff;
    background-color: #5b5efd;
}

.list-entry.active .list-name,
.list-entry.active:hover .list-name {
    color: #ffffff;
}

.personnel-list-entry .list-badge i {
    display: none;
}

.personnel-list-entry.active .list-badge .list-badge-initials {
    display: none;
}

.personnel-list-entry.active .list-badge i {
    display: block;
}

.list-badge {
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    margin-right: 10px;
    color: #ffffff;
    background-color: #cccccc;
    border-radius: 25px;
    align-items: center;
    font-size: 24px;
}

.list-name {
    color: #999999;
    font-size: 18px;
}

/* New record button */
#add-record {
    width: 60px;
    height: 60px;
    position: absolute;
    bottom: 60px;
    right: 10px;
    color: #ffffff;
    background-color: #5b5efd;
    border: none;
    border-radius: 35px;
    outline: none;
    -webkit-box-shadow: 0px 0px 7px 0px rgba(0, 0, 0, 0.15);
    box-shadow: 0px 0px 7px 0px rgba(0, 0, 0, 0.15);
    font-size: 24px;
}

#add-record span {
    display: none;
}

/* New record */
.new-record-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    background-color: #666666aa;
}

.new-record-form {
    max-height: 100%;
    width: 300px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    overflow-x: hidden;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding: 20px;
    border-radius: 10px;
    -webkit-box-shadow: 0px 0px 7px 0px rgba(0, 0, 0, 0.15);
    box-shadow: 0px 0px 7px 0px rgba(0, 0, 0, 0.15);
    background-color: #ffffff;
}

.new-record-heading {
    align-self: center;
    color: #666666;
    font-size: 24px;
    text-align: center;
}

.new-record-info-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-self: center;
    gap: 5px;
    margin-top: 15px;
}

.new-record-info-container label,
.new-record-info-container span {
    color: #666666;
}

.new-record-input {
    width: 100%;
    height: 27px;
    padding-left: 5px;
    color: #666666;
    border: 1px solid #666666;
    border-radius: 5px;
    outline: none;
}

.new-record-input:focus,
.new-record-select:focus {
    border-color: #5b5efd;
}

.new-record-select {
    width: 100%;
    height: 27px;
    color: #666666;
    background-color: #ffffff;
    border: 1px solid #666666;
    border-radius: 5px;
    outline: none;
    cursor: pointer;
}

.new-record-info {
    height: 27px;
    color: #aaaaaa;
}

.new-record-button-container {
    display: flex;
    align-self: flex-end;
    gap: 20px;
    margin-top: 20px;
}

.new-record-btn {
    width: 80px;
    height: 30px;
    border: none;
    border-radius: 5px;
    outline: none;
    font-size: 15px;
    cursor: pointer;
}

.new-record-cancel-btn {
    color: #666666;
    background-color: #eeeeee;
}

.new-record-ok-btn {
    color: #ffffff;
    background-color: #5b5efd;
}

#new-personnel-container,
#new-department-container,
#new-location-container {
    display: none;
}

/* New personnel */
#new-personnel-name-input-container {
    align-self: center;
    width: 100%;
}

#new-personnel-name-input-container div {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 15px;
}

#new-personnel-name-input-container label {
    color: #666666;
}

#new-email-invalid {
    display: none;
    font-size: 14px;
    color: #ff7878;
}

#new-personnel-jobTitle-input::placeholder {
    color: #cccccc;
    font-style: italic;
}

#new-personnel-location {
    color: #cccccc;
}

#new-personnel-alert-container,
#new-personnel-response-alert-container {
    display: none;
}

/* New department */
#new-department-alert-container,
#new-department-response-alert-container {
    display: none;
}

/* New location */
#new-location-alert-container,
#new-location-response-alert-container {
    display: none;
}

/* Records by ID */
.record-container {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    overflow-y: auto;
    overflow-x: hidden;
    display: none;
    padding: 20px;
    background-color: #ffffff;
}

.record-content {
    display: flex;
    flex-direction: column;
}

.record-header {
    display: flex;
    justify-content: space-between;
    color: #aaaaaa;
    font-size: 24px;
}

.record-badge {
    width: 90px;
    height: 90px;
    display: flex;
    align-self: center;
    justify-content: center;
    align-items: center;
    margin: 40px 0 10px 0;
    color: #ffffff;
    background-color: #5b5efd;
    border-radius: 45px;
    font-size: 36px;
}

.record-name {
    align-self: center;
    margin: 10px 0 20px 0;
    color: #333333;
    font-size: 28px;
    text-align: center;
}

.name-input {
    width: 100%;
    height: 38px;
    align-self: center;
    margin: 8px 0 18px 0;
    color: #333333;
    border: 1px solid #666666;
    border-radius: 5px;
    outline: none;
    font-size: 28px;
    text-align: center;
}

.name-input:focus {
    border-color: #5b5efd;
}

.record-info-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-self: center;
    padding: 10px 0;
    border-bottom: 1px solid #aaaaaa;
    font-size: 18px;
    line-height: 27px;
}

.record-info-heading {
    color: #333333;
}

.record-info {
    color: #aaaaaa;
}

.record-info-input {
    height: 27px;
    display: none;
    padding-left: 5px;
    color: #666666;
    border: 1px solid #666666;
    border-radius: 5px;
    outline: none;
}

.record-info-input:focus {
    border-color: #5b5efd;
}

.record-info-select {
    height: 27px;
    display: none;
    color: #666666;
    background-color: #ffffff;
    border: 1px solid #666666;
    border-radius: 5px;
    outline: none;
    cursor: pointer;
}

.record-info-list {
    padding-left: 20px;
    color: #aaaaaa;
}

.record-info-sublist {
    display: none;
    padding-left: 20px;
    font-size: 16px;
    list-style: none;
}

.record-info-sublist li {
    display: flex;
    align-items: center;
    gap: 10px;
}

.delete-record {
    display: none;
    align-self: center;
    margin-top: 40px;
    color: #ff7878;
    font-size: 18px;
    cursor: pointer;
}

.delete-record i {
    margin-right: 10px;
}

.alert-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #666666aa;
}

.alert {
    max-height: 100%;
    width: 300px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    overflow-x: hidden;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 10px;
    -webkit-box-shadow: 0px 0px 7px 0px rgba(0, 0, 0, 0.15);
    box-shadow: 0px 0px 7px 0px rgba(0, 0, 0, 0.15);
}

.alert-text {
    font-size: 18px;
}

.alert-list {
    padding: 10px 20px;
    font-size: 18px;
}

.alert-list li {
    padding: 10px 0;
}

#location-changes-description {
    padding-bottom: 20px;
}

.alert-button-container {
    display: flex;
    align-self: flex-end;
    margin-top: 20px;
}

.alert-btn {
    width: 80px;
    height: 30px;
    margin-right: 10px;
    border: none;
    border-radius: 5px;
    outline: none;
    font-size: 15px;
    cursor: pointer;
}

.alert-cancel-btn {
    color: #666666;
    background-color: #eeeeee;
}

.alert-ok-btn {
    color: #ffffff;
    background-color: #5b5efd;
}

.alert-delete-btn {
    color: #ffffff;
    background-color: #ff7878;
}

.alert-dependency-list {
    padding: 10px 20px;
    font-size: 18px;
}

/* Personnel by ID*/
#cancel-edit-personnel-icon,
#save-personnel-icon,
#personnel-name-input-container,
#personnel-email-input,
#email-invalid,
#personnel-department-select,
#personnel-changes-alert-container,
#update-personnel-response-alert-container,
#personnel-delete-alert-container,
#delete-personnel-response-alert-container {
    display: none;
}

#personnel-name-input-container {
    align-self: center;
    gap: 10px;
    width: 100%;
    height: 64px;
    font-size: 18px;
    line-height: 27px;
}

#personnel-name-input-container div {
    display: flex;
    flex-grow: 1;
    flex-direction: column;
    justify-content: flex-end;
}

#personnel-name-input-container div label {
    color: #333333;
}

.personnel-name-input {
    height: 27px;
    padding-left: 5px;
    color: #666666;
    border: 1px solid #666666;
    border-radius: 5px;
    outline: none;
}

.personnel-name-input:focus {
    border-color: #5b5efd;
}

/* Department by ID*/
#cancel-edit-department-icon,
#save-department-icon,
#department-name-input,
#department-location-select,
#no-department-personnel,
#department-changes-alert-container,
#update-department-response-alert-container,
#department-delete-alert-container,
#dependent-department-alert-container,
#delete-department-response-alert-container {
    display: none;
}

/* Location by ID*/
#cancel-edit-location-icon,
#save-location-icon,
#location-name-input,
#no-location-departments,
#location-changes-alert-container,
#update-location-response-alert-container,
#location-delete-alert-container,
#dependent-location-alert-container,
#delete-location-response-alert-container {
    display: none;
}

#location-departments {
    padding: 0;
    list-style: none;
}

.location-department-header {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 0 10px;
    cursor: pointer;
}

.location-department i {
    font-size: 14px;
}

.location-department-name {
    flex-grow: 1;
}

#right-side-container,
#left-side-container {
    display: none;
}

#right-side-content {
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #aaaaaa;
    font-size: 24px;
    font-style: italic;
}

#no-personnel-selected,
#no-department-selected,
#no-location-selected {
    display: none;
}

/* List tabs */
#tabs-container {
    width: 100%;
    height: 50px;
    position: fixed;
    bottom: 0;
    display: flex;
    background-color: #e4e6eb;
}

.list-tab {
    display: flex;
    flex-grow: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #aaaaaa;
    background-color: #eeeeee;
    -webkit-box-shadow: inset 0px 20px 30px -30px rgba(0, 0, 0, 0.15);
    box-shadow: inset 0px 20px 30px -30px rgba(0, 0, 0, 0.15);
    cursor: pointer;
}

.list-tab.active {
    color: #666666;
    background-color: #ffffff;
    -webkit-box-shadow: none;
    box-shadow: none;
}

.list-tab.active i {
    color: #5b5efd;
}

/* Media queries */
@media only screen and (min-width: 640px) {
    #top-nav,
    #records-list-container,
    #tabs-container,
    .filter-menu-container {
        width: 320px;
    }

    .filter-menu-container {
        z-index: 4;
    }

    #add-record {
        left: 250px;
        z-index: 3;
    }

    .new-record-container {
        z-index: 6;
    }

    .record-container {
        width: calc(100% - 320px);
        left: auto;
        right: 0;
        z-index: 5;
        border-left: 1px solid #e4e6eb;
    }

    #right-side-container {
        width: calc(100% - 320px);
        height: 100%;
        position: absolute;
        top: 0;
        right: 0;
        display: block;
        background-color: #ffffff;
        border-left: 1px solid #e4e6eb;
    }
}

@media only screen and (min-width: 960px) {
    #left-side-container {
        width: 320px;
        height: 100%;
        position: absolute;
        top: 0;
        left: 0;
        display: block;
        border-right: 1px solid #e4e6eb;
        background-color: #ffffff;
    }

    #top-nav,
    #records-list-container,
    #tabs-container {
        width: calc((100% - 320px) / 2);
        left: 320px;
    }

    #top-nav {
        z-index: 2;
    }

    #top-nav-container {
        width: 300px;
        position: fixed;
        left: 10px;
        margin: 0;
    }

    #filter-menu-icon {
        display: none;
    }

    .sort-by-select {
        width: 100%;
        height: 48px;
        border: none;
        border-radius: 10px;
    }

    .filter-menu-container {
        top: 70px;
        z-index: 4;
        background-color: transparent;
    }

    .filter-menu {
        padding: 0 20px 20px 20px;
    }

    .close-filter-menu,
    .close-filters-btn {
        display: none;
    }

    .apply-filters-btn {
        display: none;
    }

    #records-list-container {
        height: calc(100% - 190px);
        top: 140px;
    }

    #add-record {
        width: calc((100% - 320px) / 2);
        height: 70px;
        top: 70px;
        left: 320px;
        display: flex;
        align-items: center;
        padding: 10px;
        color: #5b5efd;
        background-color: #ffffff;
        border-radius: 0;
        -webkit-box-shadow: none;
        box-shadow: none;
        font-size: 18px;
    }

    #add-record i {
        width: 50px;
        height: 50px;
        display: flex;
        justify-content: center;
        margin-right: 10px;
        color: #ffffff;
        background-color: #5b5efd;
        border-radius: 25px;
        align-items: center;
        font-size: 24px;
    }

    #add-record span {
        display: inline;
    }

    .record-container {
        width: calc((100% - 320px) / 2);
    }

    #right-side-container {
        width: calc((100% - 320px) / 2);
    }
}

@media only screen and (min-width: 1200px) {
    #top-nav,
    #records-list-container,
    #add-record,
    #tabs-container {
        width: 450px;
    }

    .record-container,
    #right-side-container {
        width: calc(100% - 770px);
    }

    #personnel-name-input-container,
    .record-info-container,
    .name-input {
        width: 410px;
    }
}
