/*
  Settings
*/
:root {
  --header-height: 3rem;
  --nav-width: 68px;
  --first-color: #4723d9;
  --first-color-light: #E0E0E0;
  --white-color: #f7f6fb;
  --light-color: #E0E0E0;
  --gray-color: #616161;  
  --dark-color: #333333;
  --body-font: "Helvetica", sans-serif;
  --normal-font-size: 1rem;
  --z-fixed: 100;
}

*,
::before,
::after {
  box-sizing: border-box;
}

body {
  margin: var(--header-height) 0 0 0;
  padding: 0 1rem;
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  transition: 0.5s;
}

.main_content {
  margin-top: 0;
  position: absolute;
  height: 100vh;
  left: 10px;
  right: 10px;
  top: 0;
  background: none;
  /* padding: 1em; */
  z-index: 10;
}

.page-container {
  margin-left: 15px;
  margin-right: 15px;
  padding: 20px;
}

.full-height {
  flex-grow: 1;
  display: flex;
  flex-direction: column; 
}

/*
  Bootstrap overrides
*/

.alert-dismissible .btn-close {
  padding: 1.5rem 1.5rem 0 0;
}

.bg-primary {
  background-color: var(--first-color) !important; 
}

.t-navbar .nav-link {
  color: var(--first-color);
}

/* 
  Datatables overrides
*/

.page-link {
  color: var(--first-color);
}

.page-item.active .page-link {
  background-color: var(--first-color);
  border-color: var(--first-color);
}

.no-top-rounding {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;    
}

.container-fluid {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar-collapse {
  flex-shrink: 0;
}

a {
  text-decoration: none;
}

/*
  bottom navbar
*/

.b-navbar {
  display: block;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  background: var(--dark-color);
  height: 4em;
  z-index: 80;
}

/*
  left navbar
*/

.l-navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--nav-width);
  height: 100vh;
  background-color: var(--first-color);
  padding: 0.5rem 1rem 0 0;
  transition: 0.5s;
  z-index: 30;
  display: none;
}

.l-navbuttons {
  height: 80%;
}

.l-navsub {
  position: fixed;
  top: 3em;
  left: -368px;
  height: 100%;
  z-index: 20;
}

.l-nav_logo,
.l-nav_link {
  display: grid;
  grid-template-columns: max-content max-content;
  align-items: center;
  column-gap: 1rem;
}

.l-nav_logo {
  margin-bottom: 2rem;
  padding: 0 0 0 1em;
}

.l-nav_link {
  position: relative;
  color: var(--first-color-light);
  margin-bottom: 1.5rem;
  transition: 0.3s;
  padding: 0.5rem 0 0.5rem 1.5rem;  
}

.l-nav_link:hover {
  color: var(--white-color);
}

.l-nav_link:hover::before {
  content: "";
  position: absolute;
  left: 0;
  width: 2px;
  height: 32px;
  background-color: var(--white-color);
}

.l-nav_icon {
  font-size: 1.25rem;
}

.l-navbar .active {
  color: var(--white-color);
}

.l-navbar .active::before {
  content: "";
  position: absolute;
  left: 0;
  width: 2px;
  height: 32px;
  background-color: var(--white-color);
}

.l-navsub .nav-link:hover {
  background: var(--gray-color);
  color: white;
}

/*
  top navbar
*/

.t-navbar {
  top: 0;
  left: 0;
  width: 100vw;
  position: fixed;
  height: 2rem;
  z-index: 50;
  display: none;
}

.t-navbar > nav > div > .t-messages {
  width: 100%;
  height: 3em;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 10px 0px 0px 10px;
  margin: 0 1em 0 0;
  display: none;
  margin-right: 1rem;
  flex-grow: 1;
}

.t-navbar_img {
  width: 35px !important;
  border: none;
  background: none;
  margin-right: 1em;
}

.t-navbar_img > .active {
  border: 2px solid var(--first-color);
}

.t-navbar_img img {
  width: 35px;
  justify-content: center;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
}

.t-navbar .active {
  font-weight: 600;
}

.t-navbar .nav-link:hover {
  color: var(--dark-color);
}

/*
  RESPONSIVE
*/

@media screen and (min-width: 768px) {
  body {
    margin: calc(var(--header-height) + 1rem) 0 0 0;
    padding-left: calc(var(--nav-width) + 2rem);
  }

  .body-pd {
    padding-left: calc(var(--nav-width) + 188px);
  }

  .b-navbar {
    display: none;
  }

  .t-navbar {
    height: calc(var(--header-height));
    padding: 0 0 0 calc(var(--nav-width));
    display: block;
  }

  .l-navbar {
    display: block;
    left: 0;
    padding: 1rem 1rem 0 0;
  }

  .main_content {
    margin-top: 4em;
    left: 78px;
  }

  .t-messages {
    width: 100%;
  }
}

/*
  LOADERS
*/

#main_loading {
  display: none;
  min-height: 2em;
}

#main_loading img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
}

.data_loading {
  display: none;
  position: relative;
  min-height: 2em;
}

.data_loading img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
}

/*
  PRE-LOADER
*/
.loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

#preloader {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: white;
  z-index: 9999;
}

#preloader .text {
  color: var(--first-color);
  display: inline-block;
  margin-left: 5px;
}

#preloader .bounceball {
  position: relative;
  display: inline-block;
  height: 37px;
  width: 15px;
}

#preloader .bounceball:before, #preloader .bounceball:after {
  content: "";
  position: absolute;
  display: block;
  border-radius: 50%;
}

#preloader .bounceball:before {
  top: 0;
  width: 15px;
  height: 15px;  
  position: absolute;
  content: "";
  display: block;
  border-radius: 50%;
  transform-origin: 50%;
  background-color: var(--first-color);  
  -webkit-animation: bounce 500ms alternate infinite ease;
          animation: bounce 500ms alternate infinite ease;
}

#preloader .bounceball:after {
  bottom: 0;
  width: 15px;
  height: 5px;
  background-color: rgba(0, 0, 0, 0.2);
}

@-webkit-keyframes bounce {
  0% {
    top: 30px;
    height: 5px;
    border-radius: 60px 60px 20px 20px;
    transform: scaleX(2);
  }
  35% {
    height: 15px;
    border-radius: 50%;
    transform: scaleX(1);
  }
  100% {
    top: 0;
  }
}

@keyframes bounce {
  0% {
    top: 30px;
    height: 5px;
    border-radius: 60px 60px 20px 20px;
    transform: scaleX(2);
  }
  35% {
    height: 15px;
    border-radius: 50%;
    transform: scaleX(1);
  }
  100% {
    top: 0;
  }
}


/*
  admin only
*/

.admin_only {
  display: none;
}

/*
  TOGGLE SWITCH
*/

.switcher {
  display: inline-block;
  height: 30px;
  margin-top:3px;
  padding: 4px;
  background: var(--white-color);
  border-radius: 2px;
  width: 200px;
  border-radius: 30px;
  border: solid 1px var(--first-color-light);
  position: relative;
}


.switcher__input {
  display: none;
}


.switcher__label {
  float: left;
  width: 50%;
  font-size: 0.9em;
  /* line-height: 30px; */
  color: var(--first-color);
  text-align: center;
  cursor: pointer;
  position: inherit;
  z-index: 10;
  transition: color 0.2s cubic-bezier(0.4, 0.0, 0.2, 1);
  will-change: transform;
}

.switcher__toggle {
  position: absolute;
  float: left;
  height: 26px;
  width: 50%;
  font-size: 12px;
  line-height: 30px;
  cursor: pointer;
  background-color: var(--first-color);
  border-radius: 30px;
  left: 2px;
  top: 1px;
  transition: left 0.25s cubic-bezier(0.4, 0.0, 0.2, 1);
  will-change: transform;
}

.switcher__input:checked + .switcher__label {
  color: #fff;
}

.switcher__input--right:checked ~ .switcher__toggle {
  left: 98px;
}
