/* --- --- --- --- --- VARIABLES --- --- --- --- --- */
:root {
  --color-background-sidenav:#212a39;
  --color-background-main: #f5f6fa;
  --color-background-header: #fff;
  --color-background-footer: #fff;

  --color-accent-rbg: rgb(76,132,255);
  --color-accent-rbga-light: rgba(76,132,255,0.15);
  --color-accent: #4c84ff;


  --color-success:  #08c654;
  --color-warning:  #ecad38;
  --color-error:  #d40300;

  --color-wifiIcon:  #dc4d39;
  --color-bluetoothIcon:  #4495cf;
 
  --color-font: #000;

  --height-header: 65px;
  --height-footer: 65px;

  --transition-default: all 0.2s linear
}

/* --- --- --- --- --- MAIN HTML --- --- --- --- --- */
* {
    margin: 0; 
    padding: 0;
}

html, body {
    font-family: 'Open Sans', sans-serif;
    font-size: 16px;
}

a:link, a:visited {font-style:normal;text-decoration:none;color: var(--color-font);}
a:active {font-style:normal;text-decoration:none;color: var(--color-font);}
a:hover {font-style:normal;text-decoration:underline;color: var(--color-font);}
a img {border-width:0;}

/* --- --- --- --- --- GENERAL ELEMENTS --- --- --- --- --- */
.clear {float:none; clear: both;}
.grid {display: grid;}

/* --- --- --- --- --- MAIN GRID LAYOUT --- --- --- --- --- */
.grid-container {
  display: grid;
  grid-template-columns: 1fr; /* Side nav is hidden on mobile */
  grid-template-rows: var(--height-header) 1fr var(--height-footer);
  grid-template-areas:
    'header'
    'main'
    'footer';
  height: 100vh;
}

/* --- --- --- --- --- BASIC LAYOUT --- --- --- --- --- */
.header {
  grid-area: header;
  background-color:var(--color-background-header);
  height: var(--height-header);
}

.footer {
  grid-area: footer;
  background-color:var(--color-background-footer);
}

.header, .footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.main {
  grid-area: main;
  background-color:var(--color-background-main);
}

/* --- --- --- --- --- SIDENAVIGATION --- --- --- --- --- */
.sidenav {
  grid-area: sidenav;
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 240px;
  position: fixed;
  overflow-y: auto;
  box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.16), 0 0 0 1px rgba(0, 0, 0, 0.08);
  z-index: 2; /* Needs to sit above the hamburger menu icon */
  background-color: var(--color-background-sidenav);
  transform: translateX(-245px);
  transition: all .6s ease-in-out;
}

#logoWrapper {
  height: var(--height-header);
  background-color: #4c84ff;
}

#logoWrapper a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  line-height: var(--height-header);
  font-size: 25px;
}

#logoWrapper i {
  line-height: var(--height-header);
  width: var(--height-header);
  text-align: center;
  font-size: 28px;
  color: #fff;
}

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

.sidenav__list-item, .sidenav__list-item a {
  line-height: var(--height-header);
  width: 100%;
}


.sidenav__list-item a {
  color: #ddd;
  width: 100%;
  display: block;
  font-size: 18px;
  line-height: var(--height-header);
}

.sidenav__list-item a i {
  width: var(--height-header);
  text-align: center;
  font-size: 28px;
  line-height: var(--height-header);
}


.sidenav__list-item:hover {
  background-color: rgba(255, 255, 255, 0.2);
  cursor: pointer;
}

.sidenav__list-item:hover a{
  text-decoration: none;
}


/* Hamburger menu icon, stays fixed on mobile for any possible scrolling */
.menu-icon {
  position: fixed;
  display: flex;
  top: 5px;
  left: 10px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  z-index: 1;
  cursor: pointer;
  padding: 12px;
  background-color: #DADAE3;
}

/* Only visible on mobile screens */
.sidenav__close-icon {
  position: absolute;
  visibility: visible;
  top: 8px;
  right: 12px;
  cursor: pointer;
  font-size: 20px;
  color: #ddd;
}

/* The active class is toggled on hamburger and close icon clicks */
.sidenav.active {
  transform: translateX(0);
}  

/* Make room for the menu icon on mobile */
.header__search {
  margin-left: 42px;
}

/* --- --- --- --- --- MAIN AREA --- --- --- --- --- */
.main-header {
  display: flex;
  justify-content: space-between;
  margin: 20px;
  padding: 20px;
  height: 150px; /* Force our height since we don't have actual content yet */
  background-color: #e3e4e6;
  color: slategray;
}

.main-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(265px, 1fr)); /* Where the magic happens */
  grid-auto-rows: 94px;
  grid-gap: 20px;
  margin: 20px;
}

.main-cards {
  column-count: 2;
  column-gap: 20px;
  margin: 20px;
}

.main-cards.one_column {
  column-count: 1;
}

.main-cards.two_columns {
  column-count: 2;
  margin: 20px 0;
}

/* --- --- --- --- --- CARDS --- --- --- --- --- */
  
.overviewcard {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  background-color: #4c84ff;
  color: #fff;
}

.overviewcard .overviewcard__icon i {
  line-height: 100%;
  font-size: 25px;
}

.card {
  display: flex;
  flex-direction: column;
  /*align-items: center;*/
  width: 100%;
  background-color: #fff;
  margin-bottom: 20px;
  -webkit-column-break-inside: avoid;
  box-sizing: border-box;
  border: 1px solid #e5e9f2;
}

.cardTitle{
  height: var(--height-header);
  line-height: var(--height-header);
  border-bottom: 1px solid #e5e9f2;
  padding: 0 24px;
}

.cardTitle span{
  font-weight: 400;
  font-size: 20px;
}

.cardContent{
  padding: 24px;
}

/* Force varying heights to simulate dynamic content 
.card:first-child {
  height: 485px;
}
.card:nth-child(2) {
  height: 200px;
}
.card:nth-child(3) {
  height: 265px;
}*

/* --- --- --- --- --- MOBILE OPTIMIZATION --- --- --- --- --- */
/* 750px Breakpoint */
@media only screen and (min-width: 46.875em) {
    /* Show the sidenav */
    .grid-container {
      grid-template-columns: 240px 1fr; /* Show the side nav for non-mobile screens */
      grid-template-areas:
        "sidenav header"
        "sidenav main"
        "sidenav footer";
    }
    .sidenav {
      position: relative; /* Fixed position on mobile */
      transform: translateX(0);
    }

    .sidenav__close-icon {
        visibility: hidden;
        }
}

/* Medium-sized screen breakpoint (tablet, 1050px) */
@media only screen and (min-width: 65.625em) {
    /* Break out main cards into two columns */
    .main-cards {
        column-count: 2;
    }
}

/* --- --- --- --- --- FORM CONTROLS --- --- --- --- --- */
.inputWrapper {
  margin: 5px 0 25px 0; 
}

.inputWrapper .inputLabel {
  font-weight: 400;
  font-size: 18px;
}

.inputWrapper .inputElement {
  margin: 8px 0;
}

.inputWrapper .inputHint {
  color: #a1a1a1;
  font-size: 14px;
}

.inputElement input[type=text], .inputElement input[type=password] {
  width: calc(100% - 20px);
  padding: 0 10px;
  height: 45px;
  line-height: 45px;
  border: 1px solid #e5e9f2;
  border-radius: 5px;
  font-size: 16px;
}


.button {
  height: 45px;
  font-size: 16px;
  padding: 0 15px;
  border-radius: 5px;
  background-color: #4c84ff;
  border-color: #4c84ff;
  color: #fff;
  border: 1px solid;
  transition: var(--transition-default);
  cursor: pointer;
  text-align: center;
  margin: 5px;
}

.button i {
  margin: 0 5px;
}

a.button {
  line-height: 45px;
  text-decoration: none;
  display: inline-block;
  color: #fff;
  margin: 0;
}

.button.disabled {
  opacity: 0.6;
}

.button:hover {
  background-color: #266aff;
  border-color: #266aff;
}

.button.dark {
  background-color: #8a909d;
  border-color: #8a909d;
}

.button.green:hover {
  background-color: #08c654;
  border-color: #08c654;
}

.button.orange:hover {
  background-color: #ecad38;
  border-color: #ecad38;
}

.button.red:hover {
  background-color: #d40300;
  border-color: #d40300;
}

/* --- --- --- --- --- TABLES --- --- --- --- --- */
table {

}

table thead {
  
}

table thead tr {
  
}

table thead tr th {
  border-top: 1px solid #e5e9f2;
  border-bottom: 1px solid #e5e9f2;
  height: 65px;
  line-height: 65px;
  text-align: center;
}

table thead tr th:first-child {
  text-align: left;
}

table thead tr th:last-child {
  text-align: right;
}

table tbody {
  
}

table tbody tr {
  
}

table tbody tr td {
  height: 35px;
  line-height: 35px;
  border-bottom: 1px solid #e5e9f2;
  text-align: center;
}

table tbody tr td:first-child {
  text-align: left;
}

table tbody tr td:last-child {
  text-align: right;
}

table tbody tr.even td {
  
}

table tbody tr.odd td {
  
}

.tableGrid {
  display: grid;
}

.sortBox {
  float: right;
}

.sortBox i{
  margin-right: 5px;
  font-size: 24px;
  line-height: 65px;
}


.tableGridHead {
  height: 65px; 
  line-height: 65px;
  border-bottom: 5px solid rgba(76,132,255,0.4);
  font-weight: 600;
  /*border-right: 5px solid rgba(76,132,255,0.15);*/
  padding: 0 15px;
}

.tableGrid .tableGridHead:first-child {
  text-align: left;
}

.tableGrid .tableGridHead:last-child {
  text-align: right;
  border-right: none;
}

.tableGrid .tableGridCell {
  height: 55px; 
  line-height: 55px;
  padding: 0 10px;
  border-right: 1px solid #ccc;
  overflow:hidden;
}

.tableGrid .tableGridCell.last {
  border-right: none;
}

.tableGrid .tableGridCell.even {
  /*background-color:  #e3e4e6;*/
  background-color: var(--color-accent-rbga-light);
  border-top: 1px solid  rgba(76,132,255,0.2);
  border-bottom: 1px solid rgba(76,132,255,0.2);
  box-sizing: border-box;
}

.tableGrid .tableGridCell.odd {
  
}

/* --- --- --- --- --- LOADING ANIMATION --- --- --- --- --- */
#loadingIndicatorWrapper {
  width: 100%;
  text-align: center;
}

#loadingIndicatorWrapper i {
  font-size: 100px;
  color: rgba(76,132,255,0.4);
  margin: 50px 0;
}

/* --- --- --- --- --- FILTERBAR --- --- --- --- --- */
.filterBar {
  float: left;
  margin: 10px 0;
  width: 100%;
}

.filterItem {
  float:right;
  margin-left: 15px;
  line-height: 45px;
}

.filterItem .label{
  margin-right: 5px;
}

.filterItem.left {
  float:left;
  margin-right: 15px;
}

.filterItem input[type="checkbox"]{
  float:right;
  margin: 16px 5px;
}

.filterItem input[type="text"]{
  padding: 0 10px;
  height: 45px;
  line-height: 45px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 16px;
}

.filterItem select{
  padding: 0 10px;
  height: 45px;
  line-height: 45px;
  font-size: 16px;
}

/* --- --- --- --- --- PAGINATION --- --- --- --- --- */

.paginationWrapper {
  border-top: 5px solid rgba(76,132,255,0.4);
  border-bottom: 5px solid rgba(76,132,255,0.4);
  text-align: center;
  line-height: 65px;
}

.paginationWrapper .paginationControl {
  text-align: center;
  width: 65px;
  height: 65px;
  font-size: 24px;
  cursor: pointer;
  transition: var(--transition-default);
}

.paginationWrapper .paginationControl:hover {
  background-color: var(--color-accent-rbga-light);
}

.paginationWrapper .paginationControl.left {
  float: left;
  border-right: 1px solid #ccc;
}

.paginationWrapper .paginationControl.right {
  float: right;
  border-left: 1px solid #ccc;
}

/* --- --- --- --- --- GATT PROFILES --- --- --- --- --- */

.gattServiceWrapper {
  margin: 0 0 25px 0;
  border-bottom: 5px solid var(--color-accent);
}

.gattServiceWrapper .gattServiceTitle {
  height: 65px;
  line-height: 65px;
  border-bottom: 1px solid #ccc;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
}

.gattServiceWrapper .gattServiceTitle .serviceType {
  float:right;
}

.compareValueLink i {
  line-height: 45px;
}

.gattServiceWrapper .gattServiceTitle i {
  margin: 0 5px;
  font-size: 28px;
  font-weight: normal;
  color: var(--color-accent)
}

.gattServiceWrapper .gattServiceContent {
  transition: var(--transition-default);
}

.gattServiceWrapper .gattServiceContent.closed {
  height: 0px; 
  overflow: hidden;
}

/* CHARACTERISTIC */
.gattCharacteristicWrapper {
  margin: 0 0 25px 25px;
}

.gattCharacteristicWrapper .gattCharacteristicTitle {
  height: 45px;
  line-height: 45px;
  border-bottom: 1px solid #ccc;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.gattCharacteristicWrapper .gattCharacteristicTitle .CharacteristicType {
  float:right;
}

.gattCharacteristicWrapper .gattCharacteristicTitle i {
  margin: 0 5px;
  font-size: 20px;
  font-weight: normal;
  color: var(--color-background-sidenav);
}

.gattCharacteristicWrapper .gattCharacteristicTitle .characteristicType {
  float:right;
}

.gattCharacteristicWrapper .gattCharacteristicContent.closed {
  height: 0px; 
  overflow: hidden;
}

.gattCharacteristicPropertiesWrapper {
  margin-left: 25px;
  margin-bottom: 25px;
}

.gattCharacteristicPropertiesWrapper p {
  line-height: 35px;
}

.gattCharacteristicPropertiesWrapper p i{
  margin: 0 5px;
}

.header {
  font-size: 24px;
}
/* VALUES */
.gattCharacteriticValuesWrapper {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-left: 25px;
}

.valueItem {
  line-height: 35px;
  border-bottom: 1px solid #ccc;
}

.valueItem i {
margin: 0 5px;
}

.valueItem:nth-child(2){
  text-align: center;
}

.valueItem:last-child{
  text-align: right;
}


/* DESCRIPTORS */
.gattDescriptorWrapper {
  margin: 0 0 25px 25px;
}

.gattDescriptorWrapper .gattDescriptorTitle {
  height: 45px;
  line-height: 45px;
  border-bottom: 1px solid #ccc;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.gattDescriptorWrapper .gattDescriptorTitle .DescriptorType {
  float:right;
}

.gattDescriptorWrapper .gattDescriptorTitle i {
  margin: 0 5px;
  font-size: 20px;
  font-weight: normal;
  color: var(--color-background-sidenav);
}

.gattDescriptorWrapper .gattDescriptorTitle .DescriptorType {
  float:right;
}

.gattDescriptorWrapper .gattDescriptorContent.closed {
  height: 0px; 
  overflow: hidden;
}

.gattDescriptorPropertiesWrapper {
  margin-left: 25px;
  margin-bottom: 25px;
}

.gattDescriptorPropertiesWrapper p {
  line-height: 35px;
}

.gattDescriptorPropertiesWrapper p i{
  margin: 0 5px;
}

/* --- --- --- --- --- END GATT PROFILES --- --- --- --- --- */



#deviceDetailPropertiesGrid {

}

#deviceDetailPropertiesGrid #deviceTypeIcon {
  text-align: center;

}

#deviceDetailPropertiesGrid #deviceTypeIcon i {
  color: var(--color-accent);
  font-size: 200px;
  padding: 0 0;
  
  /* CENTER THE ICON */
  position: relative;
  top: 50%;
  transform: translate(0, -50%);
}

#deviceDetailPropertiesGrid .devicePropertiesHeader{
  grid-column: 1 / span 2;
  border-bottom: 1px solid #ccc;
  font-weight: 600;
  line-height: 30px;
  margin: 25px 0;
}

#deviceDetailPropertiesGrid .devicePropertiesHeader.first{
  margin: 0 0 25px 0;
}

#deviceDetailPropertiesGrid .devicePropertyLabel{
  font-weight: 600;
  line-height: 30px;
  padding: 0 0 0 15px;
}

#deviceDetailPropertiesGrid .devicePropertyValue i{
  margin: 0 5px;
}

#deviceDetailPropertiesGrid .devicePropertyValue{
  line-height: 30px;
}

/* MAPS */
.map-wrapper {
  position: relative;
}

.map-container {
  position: relative;
  height: inherit;
  width: inherit;
}

/* HEATMAP */
.mapLayerBar {float:right;}
.mapLayerSwitch {float:left; margin-left: 15px;}

#heatmap-wrapper {
    height: 450px;
    width: 100%;
}

/* DEVICE MAP */
#devicemap-wrapper {
  height: 700px;
  width: 100%;
}

#deviceMapResultList{
  height: 700px;
  overflow: auto;
}

.deviceMapListEntry {
  width: 100%;
  overflow: hidden;
  line-height: 45px;
  border-bottom: 1px solid #ccc;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deviceMapListEntry.loading {
  border-bottom: none;
  text-align: center;
}

.deviceMapListEntry.loading i {
  margin: 0 10px;
  font-size: 20px;
}

.deviceMapListEntry:nth-child(even){
  background: var(--color-accent-rbga-light);
}

.deviceMapListEntry span.iconSpan {
  margin: 0 10px 0 5px;
  font-size: 20px;
  cursor: pointer;
}

.deviceMapListEntry .wifiIcon {
  color: var(--color-wifiIcon);
}

.deviceMapListEntry .bluetoothIcon {
  color: var(--color-bluetoothIcon);
}