* {
  box-sizing: border-box;
}

body, html {
  width: 100%;
  height: 100%;
  color: #333;
  margin: 0;
  padding: 0;
  font-family: 'Roboto', sans-serif;
}

#start-container {
    margin-left: 1em;
    margin-right: 1em;
}

.connection-container {
  width: 100%;
  height: 500px;
  display: flex;
  border: 1px solid #969696;
  background: #f0f0f0;
  box-shadow: 0px 0px 3px 1px #dedede;
}

.connection_new {
  width: 50%;
  height: 100%;
  padding: 8px;
  border-right: 1px solid #969696;
}

.connection_load {
  width: 50%;
  height: 100%;
  padding: 8px;
}

.connection-error {
  margin-top: 16px;
  font-size: 1.5em;
  color: #ffffff;
  background: #de4141;
  padding: 5px;
}

#github-link {
  position: absolute;
  bottom: 0px;
  left: 8px;
}

/************************
* Saved connections
*************************/
#saved_connections .saved-connection {
  display: flex;
  margin-bottom: 8px;
}

#saved_connections .saved-connection span {
  flex-grow: 1;
}


/************************
* Dashboard
*************************/
#dashboard {
  display: flex;
  height: 100%;
  flex-direction: column;
}

#dashboard .dashboard-top {
  border-bottom: 1px solid #969696;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: #474747;
  color: #e8e8e8;
}

#connection-current {
  margin-left: 8px;
  font-weight: 100;
}

#dashboard .dashboard-container {
  display: flex;
  height: 100%;
}

#dashboard .dashboard-sidebar {
  background: #e8e8e8;
  border-right: 1px solid #969696;
  position: relative;
  max-width: 400px;
  width: 400px;
}

#dashboard .dashboard-main {
  flex-grow: 1;
  padding: 16px;
  width: calc(100% - 400px);
}

#dashboard .dashboard-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

#dashboard .sidebar-inner {
  padding: 16px;
}

#dashboard .sidebar-inner.isClosed {
  display: none;
}

#sidebar-toggle {
  cursor: pointer;
  padding: 5px;
  font-size: 2em;
  position: absolute;
  right: 0;
  z-index: 5;
}

#sidebar-toggle:hover {
  color: #5a5a5a;
}

#dashboard .dashboard-sidebar.isClosed {
  width: 0;
  padding-right: 42px;
}

#dashboard .dashboard-sidebar span.fa {
  transition: all .2s;
}

#dashboard .dashboard-sidebar.isClosed span.fa {
  transform: rotate(180deg);
}

/************************
* Widgets
*************************/
#widgets-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  align-items: center;
  margin-top: 16px; 
}

.widget {
  width: 90%;
  background: #f0f0f0;
  border: 1px solid #969696;
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
  box-shadow: 0px 0px 3px 1px #dedede;
}

.widget-title {
  border-bottom: 1px solid #969696;
  padding: 8px;
  display: flex;
  font-size: 0.75em;
  align-items: center;
}

.widget-name {
  flex-grow: 1;
}

.widget-body {
  padding: 8px;
}

.widget__scrollable .widget-body {
  height: 200px;
  display: flex;
  flex-direction: column;
}

.widget h3 {
  margin: 0;
  margin-bottom: 16px;
}

.widget__scrollable div.msg-container {
  background: #000000;
  padding: 8px;
  overflow-y: auto;
  color: #98B209;
  font-size: 0.875em;
  height: 100%;
}

.widget__scrollable .msg-container .msg {
  display: grid;
  grid-template-columns: 90% 10%;
  padding-bottom: 10px;
}

.widget__scrollable .msg-container .msg .payload {
  color: #AFCC14;
  font-size: 1.2em;
}
/************************
* Dialogs
*************************/

.dialog {
  width: 500px;
  min-height: 200px;
  background: white;
  position: absolute;
  top: 25%;
  left: calc(50% - 250px);
  box-shadow: 2px 2px 6px 0px #868686;
  display: flex;
  flex-direction: column;
  border: 1px solid #999999;
  z-index: 10;
}

.dialog-top {
  display: flex;
  background: #474747;
  padding: 8px;
  font-size: 1.5em;
  align-items: center;
  color: white;
}

.dialog-title {
  flex-grow: 1;
}

.dialog-close {
  display: flex;
}

.dialog-body {
  padding: 8px;
}

#dialog-overlay {
  width: 100%;
  height: 100%;
  background: white;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0.75;
  z-index: 5;
}

/************************
* Dashboards
*************************/
#dashboards-list {
  margin-bottom: 16px;
}

#dashboards-list .dashboard {
  display: flex;
  margin-bottom: 8px;
  align-items: center;
}

#dashboards-list .dashboard-name {
  flex-grow: 1;
  display: flex;
  align-items: center;
}

#dashboards-list .dashboard-name .active {
  font-size: 0.625em;
  padding: 3px 5px;
  background: #98b20a;
  color: white;
  margin-left: 16px;
  border-radius: 3px;
}


/************************
* FORMS
*************************/
.input-wrapper {
  margin-bottom: 16px;
  display: flex;
  justify-content: center;
  flex-direction: column;
}

.input-wrapper label {
  font-size: 0.75em;
  color: darkgrey;
  margin-bottom: 2px;
}

.input-wrapper input {
  width: 100%;
  font-size: 1.25em;
}

button {
  padding: 9px 16px;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  margin-right: 5px;
  outline: none;
}

button:hover {
  background: #a8a8a8;
}

/**
* Primary blue button
*/
button.btn-primary {
  background: #0c5bb8;
  color: white;
  font-weight: bold;
}

button.btn-primary:hover {
  background: #3b7cc9;
}

button.btn-secondary {
  background: #98B209;
  color: white;
  font-weight: bold;
}

button.btn-secondary:hover {
  background: #AFCC14;
}

/**
* Button with icon and text
*/
button.btn-icon-before i {
  margin-right: 5px;
}

button.btn-icon-after i {
  margin-right: 5px;
}

button.btn-icon {
  background: transparent;
  font-size: 1.5em;
  color: #474747;
  padding: 0;
}

button.btn-icon:hover {
  color: gray;
}

.btn-icon.btn-icon__inverted {
  color: white;
}




/************************
* GLOBALS
*************************/
.hidden {
  display: none;
}

.uppercase {
  text-transform: uppercase;
}

.bold {
  font-weight: bold;
}