/* Colors ---------------

Bleu ciel 10% : #--- / rgba(0, 187, 238, .1);
Bleu ciel -1 :  #1CF / rgba(17, 204, 255, 1);
Orange 25% :    #--- / rgba(255, 153, 0, .25);
Vert 25% :      #--- / rgba(170, 187, 51, .25) 

Gris : #999;
Gris : #CCC;
Blanc : #FFF;

-----------------------*/

:root {
  --main-color: rgba(0, 187, 238, 1); /*  #0BE */
  --color-success: rgba(170, 187, 51, 1); /* #AB3 */
  --color-warning: rgba(255, 153, 0, 1); /* #F90 */

  --color-consum: rgba(255, 0, 0, 1); /* #F00 */
  --color-grid: rgba(0, 102, 153, 1); /* #069 */
  --color-storage-out: rgba(170, 187, 51, 1); /* #AB3 */
  --color-storage-in: rgba(255, 153, 0, 1); /* #F90 */
  --color-pv: rgba(238, 187, 85, 1); /* #EB5 */

  /* Light mode */
  --light-bg: rgba(0, 187, 238, 0.1); /* #EEE */
  --light-card-content: rgb(255, 255, 255); /* #FFF */

  /* Dark mode */
  --dark-bg: rgb(22, 38, 43); /* #16262B */
  --dark-card-content: rgb(24, 26, 27); /* #181A1B */
}

/*
Noir : #222;
Gris : #999;
Gris : #CCC;
Blanc cassé : #EEE;
Blanc : #FFF;
 -----------------------*/

body {
  background-color: var(--light-bg);
  color: #222;
  font-family: Roboto;
}


/* MODIFS PAR PAULINE */
.device-card {
  box-sizing: border-box;
  display: block;
}

.device-name {
  font-size: 1.5rem;
  color: #666;
  font-weight: 300;
}

.card-margin {
  margin: 5%;
}

.card-title p {
  margin: 5px 0;
  font-size: 0.8em;
}

.card-button {
  width: 100%; 
  height: 40px; 
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1em;
  font-weight: bold;
}

.card-button:hover {
  background-color: #1679e2; 
}

.spinner-layer {
  width: 100%;
  height: 100%;
}
.preloader-wrapper {
  width: 15px !important; 
  height: 15px !important;
}

.dashboard .data-cards .col {
    padding: 0 .25rem;
}

.dashboard .data-card {
  background-color: var(--light-card-content);
  border: 1px solid #ccc;
  border-radius: 3px;
  box-shadow: none;
  padding: 5px 10px;
  margin-bottom: 3px;
}

.dashboard .device-name {
  font-size: 1.2rem;
  color: black;
  font-weight: bold;
}

.disabled {
  opacity: 0.5;
}

.card-content {
  background-color: var(--light-card-content);
}

.hidden {
  display: none;
}

.dashboard .alarm-container {
  position: relative;
}

.dashboard  .alarm-icon-wrapper {
  background: rgba(255, 0, 0, 0.274);
  border-radius: 5px;
  cursor: pointer;
  justify-content: center;
  padding: 3px 3px 0 3px;
  display: inline-flex;
  position: relative;
  right: 10px;
  font-size: 15px;
}

.dashboard .alarm-icon-wrapper i {
  color: red; 
}

.alarm-icon-wrapper .alarms-count {
  font-style: normal;
  color: red;
  text-align: center;
  padding: 1px;
}

.dashboard .alarm-timestamp {
  font-size: 0.5em;
  color: #999;
}

.dashboard .alarm-message {
  font-size: 0.8em;
}

#modal-support {
  width: 90%;
  height: 100%;
}
#modal-support .modal-content {
  height: calc(100% - 64px);
  padding: 0%;
}

#modal-commissioning {
  width: 90%;
  height: 100%;
}
#modal-commissioning .modal-content {
  height: calc(100% - 64px);
  padding: 0%;
}

.padding {
  padding: 15px;
}

/* Modal export */
#modal-export {
  height: 100%;
  width: 80%;
  background-color: white;
}

#modal-export .modal-content {
  position: relative;
  max-height: calc(100% - 30px);
  overflow-y: auto;
  width: auto;
  height: 150%;
}

.device-export {
  border: 1px solid black;
  border-radius: 5px;
  padding: 10px;
  margin: 10px;
}

#modal-export .select-wrapper {
  width: 100% !important;
}

#modal-export .select-dropdown {
  width: 100% !important;
  min-width: unset !important;
}

#modal-export .select-dropdown li {
  width: 100% !important;
  text-align: left;
}


#modal-export .modal-footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  z-index: 1000;
  text-align: center;
}

#modal-export .active .collapsible-footer {
  display: block;
}

#modal-export .collapsible-footer {
  position: sticky;
  bottom: 0;
  width: 100%;
  background-color: white;
  padding: 20px;
  z-index: 1000;
  text-align: center;
}

#modal-export .disabled-collapsible-header {
  pointer-events: none;
  opacity: 0.5;
}

#modal-export .enabled-collapsible-header {
  pointer-events: all;
  opacity: 1;
}

#modal-export .disabled-element {
  pointer-events: none;
  opacity: 0.5;
}

#modal-export .collapsible-header {
  display: flex;
  align-items: center;
}


/* TITLES --------------------------------- */

h1 {
  font-size: 2.5rem;
  color: #666;
  font-weight: 300;
}

/* BUTTONS --------------------------------- */

.btn,
.btn-floating {
  background-color: var(--main-color);
}

.btn:hover,
.btn-floating:hover {
  background-color: #1cf;
}

/* FORMS ---------------------------------- */

[type="radio"]:checked + span:after,
[type="radio"].with-gap:checked + span:before,
[type="radio"].with-gap:checked + span:after {
  border: 2px solid var(--main-color);
}

[type="radio"]:checked + span:after,
[type="radio"].with-gap:checked + span:after {
  background-color: var(--main-color);
}

.input-field input[type="text"],
.input-field input[type="number"],
.input-field input[type="password"],
.input-field input[type="email"] {
  border: 2px solid #ccc;
  border-radius: 3px;
  padding: 0 15px;
  box-sizing: border-box;
}

.input-field input[type="text"]:focus,
.input-field input[type="number"]:focus,
.input-field input[type="password"]:focus,
.input-field input[type="email"]:focus {
  border-bottom: 2px solid #ccc !important;
  box-shadow: none !important;
}

.input-field.col label {
  left: 1.5rem;
  top: 0.5rem;
  background-color: #fff;
  padding: 0 0.5rem;
}

#alarms-select {
  margin-top: 2%;
}

input[type="text"]:not(.browser-default):disabled {
  color: rgba(0, 0, 0, 0.25);
  border: 2px solid rgba(0, 0, 0, 0.1);
}
input[type="text"]:not(.browser-default):disabled:hover {
  cursor: no-drop;
}

input:disabled + span {
  color: #ccc !important;
}
input:disabled:hover + span {
  cursor: not-allowed;
}

/* HEADER --------------------------------- */

nav#main-nav {
  position: relative;
  background-color: var(--main-color);
}

nav .brand-logo {
  position: relative;
  display: inherit;
  padding: 0 1rem;
}

.dropdown-content li a,
.dropdown-content li > span {
  color: var(--main-color);
}

a.dropdown-trigger[data-target="site-dropdown"] {
  border: 2px solid rgba(255, 255, 255, 0.5);
}
a.dropdown-trigger[data-target="alarms-dropdown"] {
  position: relative;
}

.collection .collection-item {
  cursor: default;
}
nav#main-nav .collection .collection-item.avatar {
  min-height: auto;
}
nav#main-nav .collection .collection-item.avatar p {
  margin-top: -3px;
}
nav#main-nav .collection .collection-item.avatar small {
  color: #999;
}

nav#contextual-nav a.modal-trigger {
  border: 2px solid rgba(0, 0, 0, 0.1);
}

nav#main-nav a.dropdown-trigger[data-target="site-dropdown"],
nav#contextual-nav a.modal-trigger {
  border-radius: 0.25rem;
  margin: 0.5rem 1rem;
  min-width: 3rem;
}

nav#main-nav a.dropdown-trigger[data-target="site-dropdown"],
nav#main-nav #site-dropdown a {
  position: relative;
  padding: 0 3rem 0 1rem;
  height: 3.25rem;
  color: var(--main-color);
}

nav#main-nav a.dropdown-trigger[data-target="site-dropdown"] .mdi-menu-down {
  position: absolute;
  top: -0.5rem;
  right: 0.5rem;
}

nav#main-nav a .site-name,
nav#contextual-nav a .period-name {
  display: block;
  line-height: 2.5rem;
  font-weight: 500;
}

nav#main-nav a.dropdown-trigger[data-target="site-dropdown"] {
  color: #fff;
}

nav#main-nav #site-dropdown .input-container {
  padding: 0.5rem 1rem;
}

ul a span.badge {
  font-size: 0.9rem;
  min-width: 1rem;
  padding: 0 0.25rem;
  background-color: var(--color-consum);
  color: #fff;
  border-radius: 2px;
}
nav#main-nav ul a span.badge {
  position: absolute;
  top: 1rem;
  right: 0.5rem;
}

nav#main-nav a .site-address,
nav#contextual-nav a .period-detail {
  display: block;
  margin-top: -0.75rem;
  line-height: 1rem;
  font-size: 0.75rem;
}

nav#contextual-nav {
  background-color: #fff;
}

nav#contextual-nav a {
  color: #333;
}

nav#contextual-nav a.modal-trigger {
  position: relative;
  padding: 0 1rem 0 2.5rem;
  height: 3.25rem;
  color: var(--main-color);
}

nav#contextual-nav a.modal-trigger .mdi {
  position: absolute;
  top: -0.5rem;
  left: 0.5rem;
}

.alert {
  background-color: #999;
  color: #fff;
  border-radius: 3px;
  padding: 0.5rem 2rem;
  margin: 1rem 0;
}

/*.alert p {
    display: inline-block;
}*/
.alert p a {
  color: inherit;
  text-decoration: underline;
}

.alert.alert-error {
  background-color: var(--color-consum);
  color: #fff;
}

.alert.alert-success {
  background-color: var(--color-success);
  color: #fff;
}

.alert.alert-warning {
  background-color: var(--color-warning);
  color: #fff;
}

.alert .mdi {
  font-size: 1.5rem;
  line-height: 3.5rem;
}

.alert a.remove-alert {
  color: #fff;
  opacity: 0.5;
  float: right;
}

.alert a.remove-alert:hover {
  opacity: 0.75;
}

.card-entry {
  background-color: #eee;
  text-align: center;
  padding: 50px 0 !important;
  border: 10px solid #fff;
}

/* TABS --------------------------------- */

.tabs .tab a:focus,
.tabs .tab a:focus.active {
  background-color: rgba(0, 187, 238, 0.1);
}

.tabs .tab a {
  color: #999;
  padding: 0.5rem 1rem;
}

.tabs .tab a:hover,
.tabs .tab a.active {
  color: var(--main-color);
}

.tabs .tab a:hover,
.tabs .tab a.active {
  color: var(--main-color);
}

.tabs .indicator {
  height: 3px;
  background-color: var(--main-color);
}

.card-tabs .tabs {
  height: 5rem;
}

.card-tabs .tabs .tab {
  text-align: left;
  line-height: 1.5rem;
  height: 5rem;
  text-transform: none;
}

.card-tabs .tabs .tab .daily-value {
  text-align: left;
  font-size: 1.5rem;
  line-height: 2rem;
  font-weight: 500;
  height: 5rem;
  text-transform: none;
}

canvas {
  margin-top: 1rem;
}

.total {
  margin: 1rem 0;
}

.total-name {
  font-weight: 700;
}

.total-value {
  font-size: 2.5rem;
  font-weight: 500;
  color: var(--color-success);
}

.total-value-unity {
  font-size: 1rem;
  font-weight: 700;
  color: #999;
  top: -1rem;
  position: relative;
}

.total-consum {
  color: var(--color-consum);
}
.total-consum-grid {
  color: var(--color-grid);
}
.total-prod-pv {
  color: var(--color-pv);
}
.total-consum-storage {
  color: var(--color-storage-out);
}
.total-load-storage {
  color: var(--color-storage-in);
}

.gauge-legend {
  margin-top: -1.5rem;
}

.gauge-legend .gauge-value {
  font-size: 1.5rem;
  line-height: 1.5rem;
  font-weight: 700;
}

.storage-way {
  font-size: 0.75rem;
  text-transform: uppercase;
  background-color: #eee;
  color: #999;
  font-weight: 500;
  letter-spacing: 1px;
  padding: 0.25rem 0.75rem;
  border-radius: 10px;
}

.storage-way.on-use {
  color: var(--color-warning);
  background-color: rgba(255, 153, 0, 0.25);
  animation: moving 1s infinite;
}

.storage-way.on-load {
  color: var(--color-success);
  background-color: rgba(170, 187, 51, 0.25);
  animation: moving 1s infinite;
}

@keyframes moving {
  from {
    opacity: 0.5;
  }

  to {
    opacity: 1;
  }
}

/* MODALS */

.modal {
  background: #fff;
}

.modal .modal-content form label .main-label {
  display: block;
  color: #222;
}

.modal .modal-content form label .sublabel {
  display: block;
  color: #ccc;
  font-size: 0.8rem;
  padding-left: 35px;
}

/* DATEPICKER */

#period-modal input.datepicker,
#period-modal input.monthpicker,
#period-modal input.yearpicker {
  width: 150px;
  margin-left: 2.5rem;
  background-color: #eee;
  border-radius: 3px;
  border: 0;
  padding: 0rem 1rem;
}

#period-modal form label select {
  width: 180px;
  margin-left: 34px;
  padding-left: 10px;
  border-width: 2px;
  font-size: 1rem;
}

.datepicker-date-display,
.datepicker-table td.is-selected {
  background-color: var(--main-color);
}

.datepicker-controls button:focus {
  background-color: var(--main-color);
}

.datepicker-cancel,
.datepicker-clear,
.datepicker-today,
.datepicker-done,
.datepicker-table td.is-today {
  color: var(--main-color);
}

.datepicker-table td.is-today.is-selected {
  color: #fff;
}

/* SIDENAV */

#responsive-menu .background {
  background-color: var(--main-color);
}

.sidenav .user-view i {
  font-size: 2.5rem;
}
.sidenav .user-view .name {
  margin-top: 12px;
  padding-bottom: 2rem;
  font-weight: 500;
}

#responsive-menu li a i {
  font-size: 1.5rem;
}

/* LIVE PAGE 
------------------------------------------------------------------ */
table#synoptic tr {
  border-bottom: 0;
}
table#synoptic .armoire {
  position: relative;
  z-index: 1;
  margin: -3rem;
}

table#synoptic .card .card-content p.value {
  font-size: 1rem;
}
table#synoptic .card {
  max-width: 200px;
  text-align: center;
  margin: auto;
}

table#synoptic .card .card-icon {
  font-size: 2.25rem;
  width: 4rem;
  height: 4rem;
  line-height: 4rem;
  margin: auto;
  margin-bottom: 1rem;
  border-radius: 0.5rem;
}

.power-grid .card-icon {
  color: var(--main-color);
  background-color: rgba(0, 187, 238, 0.25);
}

.power-group .card-icon {
  color: #666;
  background-color: rgba(155, 155, 155, 0.25);
}

.power-pv .card-icon {
  color: var(--color-pv);
  background-color: rgba(238, 187, 85, 0.25);
}

.power-storage .card-icon {
  color: var(--color-storage-in);
  background-color: rgba(170, 187, 51, 0.25);
}

.power-consumption .card-icon {
  color: var(--color-storage-out);
  background-color: rgba(255, 153, 0, 0.25);
}
.power-grid,
.power-group {
  position: relative;
  left: 4rem;
}
.power-consumption {
  position: relative;
  left: -4rem;
}

.progress.horizontal {
  height: 4px;
  width: 100%;
  margin: 0.5rem 0 1rem 0;
}
.progress.vertical {
  height: 100px;
  width: 4px;
  margin: auto;
}
.progress .indeterminate.going-to {
  background-color: transparent;
}
.progress .indeterminate.going-to.in {
  background-color: green;
}
.progress .indeterminate.going-to.out {
  background-color: red;
}
.progress .indeterminate.going-to.stop {
  background-color: transparent;
}

.progress.horizontal .indeterminate.going-to.in:before {
  content: "-";
  color: transparent;
  position: absolute;
  background-color: inherit;
  top: 0;
  left: 0;
  bottom: 0;
  will-change: left, right;
  -webkit-animation: indeterminate 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395)
    infinite;
  animation: indeterminate 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
}

.progress.vertical .indeterminate.going-to.in:before {
  content: "-";
  color: transparent;
  position: absolute;
  background-color: inherit;
  top: 0;
  left: 0;
  bottom: 0;
  will-change: top, bottom;
  -webkit-animation: indeterminate-vertical 2.1s
    cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
  animation: indeterminate-vertical 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395)
    infinite;
}

.progress.horizontal .indeterminate.going-to.out:before {
  -webkit-animation-direction: reverse;
  animation-direction: reverse;
}
.progress.vertical .indeterminate.going-to.out:before {
  content: "-";
  color: transparent;
  position: absolute;
  background-color: inherit;
  top: 0;
  left: 0;
  bottom: 0;
  will-change: top, bottom;
  -webkit-animation: indeterminate-vertical 2.1s
    cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
  animation: indeterminate-vertical 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395)
    infinite;
  -webkit-animation-direction: reverse;
  animation-direction: reverse;
}

.progress.horizontal .indeterminate.going-to.in:after {
  content: "-";
  position: absolute;
  background-color: inherit;
  top: 0;
  left: 0;
  bottom: 0;
  will-change: left, right;
  -webkit-animation: indeterminate-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1)
    infinite;
  animation: indeterminate-short 2.1s cubic-bezier(0.165, 0.84, 0.44, 1)
    infinite;
}

.progress.vertical .indeterminate.going-to.in:after {
  content: "-";
  position: absolute;
  background-color: inherit;
  top: 0;
  left: 0;
  bottom: 0;
  will-change: top, bottom;
  -webkit-animation: indeterminate-short-vertical 2.1s
    cubic-bezier(0.165, 0.84, 0.44, 1) infinite;
  animation: indeterminate-short-vertical 2.1s
    cubic-bezier(0.165, 0.84, 0.44, 1) infinite;
}
.progress.horizontal .indeterminate.going-to.out:after {
  -webkit-animation-direction: reverse;
  animation-direction: reverse;
}
.progress.vertical .indeterminate.going-to.out:after {
  content: "-";
  position: absolute;
  background-color: inherit;
  top: 0;
  left: 0;
  bottom: 0;
  will-change: top, bottom;
  -webkit-animation: indeterminate-short-vertical 2.1s
    cubic-bezier(0.165, 0.84, 0.44, 1) infinite;
  animation: indeterminate-short-vertical 2.1s
    cubic-bezier(0.165, 0.84, 0.44, 1) infinite;
  -webkit-animation-direction: reverse;
  animation-direction: reverse;
}

@-webkit-keyframes indeterminate-vertical {
  0% {
    top: -35%;
    bottom: 100%;
  }
  60% {
    top: 100%;
    bottom: -90%;
  }
  100% {
    top: 100%;
    bottom: -90%;
  }
}

@keyframes indeterminate-vertical {
  0% {
    top: -35%;
    bottom: 100%;
  }
  60% {
    top: 100%;
    bottom: -90%;
  }
  100% {
    top: 100%;
    bottom: -90%;
  }
}

@keyframes indeterminate-short-vertical {
  0% {
    top: -200%;
    bottom: 100%;
  }
  60% {
    top: 107%;
    bottom: -8%;
  }
  100% {
    top: 107%;
    bottom: -8%;
  }
}

/* HISTORY PAGE 
------------------------------------------------------------------ */
@keyframes rotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.card-tabs .tabs .tab .tab-value {
  text-align: left;
  font-size: 2rem;
  line-height: 2rem;
  font-weight: 500;
  height: 5rem;
  text-transform: none;
  border-bottom: 1px solid #eee;
}

.btn-floating.left {
  left: -4rem;
  top: -20rem;
}

.btn-floating.right {
  right: -4rem;
  top: -20rem;
}

.mdi-loading {
  animation: rotate linear 1s infinite;
}

@media screen and (max-width: 600px) {
  nav .brand-logo img {
    width: 70px;
  }
  .btn-floating.left {
    top: -10rem;
  }
  .btn-floating.right {
    top: -10rem;
  }
  table#synoptic .progress.horizontal {
    min-width: 50px;
  }
  table#synoptic .power-grid {
    left: -1rem;
  }
  table#synoptic .power-consumption {
    left: 2rem;
  }
  table#synoptic .power-consumption .card-content {
    padding: 24px 10px;
  }
}

/* ACCOUNT
------------------------------------------------------------------ */

.card .hightlight {
  background-color: #f6f6f6;
  padding: 2rem 3rem 0 3rem;
}

.card .hightlight label {
  background-color: #f6f6f6;
}

table .input-field {
  margin: 0;
}

table .input-field input {
  width: 100px !important;
}

table .earnings-waiting {
  color: var(--color-warning);
}
table .earnings-used {
  color: #ccc;
}
table .earnings-validated {
  color: var(--color-success);
}

/* LOGIN PAGE 
------------------------------------------------------------------ */
#login-form {
  position: absolute;
  margin-top: -15px;
  padding-top: 12rem;
  margin-bottom: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-image: url("../img/background.jpg");
}

#login-form .overlay {
  position: absolute;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0.75;
  top: 0;
  background: rgb(0, 187, 238);
  background: -moz-linear-gradient(
    90deg,
    rgba(0, 187, 238, 1) 0%,
    rgba(102, 187, 136, 1) 100%
  );
  background: -webkit-linear-gradient(
    90deg,
    rgba(0, 187, 238, 1) 0%,
    rgba(102, 187, 136, 1) 100%
  );
  background: linear-gradient(
    90deg,
    rgba(0, 187, 238, 1) 0%,
    rgba(102, 187, 136, 1) 100%
  );
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#00bbee",endColorstr="#66bb88",GradientType=1);
}

#login-form .card {
  padding: 2rem;
}

#login-form .logo {
  width: 100%;
  margin: 2rem 0;
}

#login-form .input-field {
  margin-top: 0rem;
}
