/*
Core Widgets CSS @Jeedom
Desktop
*/

/* ____________________Global */
[data-page=plan3d] .verticalAlign {
  z-index: auto !important;
}

div.eqlogicbackgraph {
  width: 100%;
  height: 100%;
  position: absolute;
  bottom: 0;
  left: 0;
  z-index: -100;
  opacity: 0.65;
}

div.eqlogicbackgraph path.highcharts-graph {
  stroke-width: 2;
}

div.eqlogicbackgraph .eqLogicGraphPeriod {
  font-size: 11px;
  position: absolute;
  bottom: 1px;
  right: 2px;
  z-index: 1;
}

div.eqLogic-widget div.cmds {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-evenly;
  align-items: flex-start;
  width: 100%;
  overflow: auto;
  height: calc(100%-24px);
}

div.eqLogic-widget div.cmd-widget {
  min-width: 80px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
}

.eqLogic-widget.hideEqLogicName .widget-name {
  display: none !important;
}

/* commented for test from 2024-02-25
div.cmd-widget .title>.cmdName {
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
} */

div.cmd-widget .cmdName {
  color: var(--txt-color);
  line-height: 16px;
  font-size: 12px;
  font-weight: 400;
}

div.cmd-widget .cmdName>i,
div.cmd-widget .iconCmdLine>i {
  font-size: 15px;
  vertical-align: bottom;
}

div.cmd-widget .iconCmdLine>img {
  max-width: 15px;
  max-height: 15px;
  vertical-align: bottom;
}

div.cmd-widget .value>.label {
  padding: 1px 3px;
}

div.cmd-widget .content-xs {
  color: var(--txt-color);
  line-height: 16px;
  min-width: 100px;
}

div.cmd-widget .content,
div.cmd-widget .content-sm,
div.cmd-widget .content-lg {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  min-width: 100%;
  min-height: 40px;
}

div.cmd-widget .content.content-inline {
  flex-direction: row;
  justify-content: space-evenly;
  align-items: flex-start;
  min-width: 100px;
}

div.cmd-widget .value {
  font-weight: bold;
}

.timeCmd.label {
  color: var(--txt-color);
  background: rgb(var(--bg-color));
  position: relative;
  padding: 2px 5px !important;
  font-size: 11px !important;
}

.timeCmd.label:first-letter {
  text-transform: uppercase;
}

div.eqLogic-widget div.cmds div.break {
  width: 100%;
  height: 0;
}

div.eqLogic_layout_table table.tableCmd td {
  vertical-align: top;
}

div.eqLogic_layout_table table.tableCmd td.tableCenter {
  vertical-align: middle !important;
}

.cmdStats {
  color: var(--txt-color) !important;
  font-size: 10px !important;
  line-height: 14px;
}

.verticalAlign {
  height: calc(100% - 22px);
  align-content: center;
}

[data-page="widgets"] .verticalAlign {
  z-index: 1;
}

/* ____________________Sliders */
.ui-slider-handle {
  font-size: 13px;
  border-radius: 8px !important;
  background-color: var(--link-color) !important;
  cursor: pointer !important;
  touch-action: none;
}

.ui-slider-handle:active,
.ui-slider-handle:focus,
.ui-slider-handle:hover,
.ui-slider-handle.ui-state-focus,
.ui-slider-handle.ui-state-default {
  outline: none;
}

.ui-slider-horizontal .ui-slider-handle {
  top: -6px !important;
}

.ui-slider-vertical .ui-slider-handle {
  left: -6px !important;
}

.ui-slider-horizontal {
  height: 3.2px !important;
}

.ui-slider-vertical {
  width: 3.2px !important;
}

.slider.ui-slider {
  background: var(--el-defaultColor) !important;
  border: none !important;
}

.slider.ui-slider-horizontal {
  position: relative;
  margin: 5px;
  width: 65px;
  left: 0;
}

.slider.ui-slider-vertical {
  margin: 5px;
  height: 48px;
}

.ui-slider .ui-slider-range,
.ui-slider .ui-corner-all.ui-slider-range {
  background-color: var(--link-color) !important;
  background-image: none !important;
  border-radius: 2px !important;
  border-color: transparent !important;
  box-shadow: none;
}

.ui-slider.ui-slider-vertical .ui-slider-range {
  left: -0.5px;
  width: 4.7px;
}

.ui-slider.ui-slider-horizontal .ui-slider-range {
  top: -0.5px;
  height: 4.7px;
}

.sliderValue {
  font-size: 12px;
  color: var(--link-color);
  font-weight: normal;
  position: absolute;
  z-index: 1;
}

.ui-slider-horizontal>.sliderValue {
  top: -7px;
  right: -22px;
}

.ui-slider-vertical>.sliderValue {
  bottom: -14px;
  right: -15px;
  width: 25px;
}

/* v4.2 nouislider */
div.cmd-widget .slider.noUi-horizontal {
  width: 70px;
  margin-top: 14px;
}

div.cmd-widget .slider.noUi-vertical {
  height: 40px;
  width: 7px;
  margin: 6px 0;
}

div.cmd-widget .slider.noUi-horizontal .noUi-base {
  z-index: 20;
}

div.cmd-widget .slider.noUi-vertical .noUi-base {
  width: 7px;
  z-index: 20;
}

div.cmd-widget .slider .noUi-connects {
  background: var(--el-defaultColor) !important;
  border-radius: 0;
  cursor: pointer;
}

div.cmd-widget .slider.noUi-horizontal .noUi-connects {
  height: 5px;
}

div.cmd-widget .slider.noUi-vertical .noUi-connects {
  width: 5px;
}

div.cmd-widget .slider .noUi-connects>.noUi-connect {
  background: var(--link-color);
}

div.cmd-widget .slider.noUi-horizontal .noUi-connects>.noUi-connect {
  height: 7px !important;
}

div.cmd-widget .slider.noUi-vertical .noUi-connects>.noUi-connect {
  width: 8px !important;
}

div.cmd-widget .slider,
div.cmd-widget .slider .noUi-handle {
  border: none;
  box-shadow: none;
  background: transparent;
}

div.cmd-widget .slider .noUi-handle {
  height: 1.3em;
  width: 1.3em;
  border-radius: 50%;
  background: var(--link-color);
}

div.cmd-widget .slider .noUi-handle:before,
div.cmd-widget .slider .noUi-handle::after {
  display: none;
}

div.cmd-widget .slider .noUi-tooltip {
  display: none;
  font-family: 'Roboto';
  font-size: 12px;
  border: none;
  background: var(--btnEq-default-color);
  color: var(--link-color);
}

div.cmd-widget .slider .noUi-handle:hover .noUi-tooltip {
  display: block;
}

div.cmd-widget .slider.noUi-horizontal .noUi-tooltip {
  bottom: 100%;
}

div.cmd-widget .slider.noUi-vertical .noUi-tooltip {
  right: 120%;
}

div.cmd-widget .slider .noUi-active .noUi-tooltip {
  display: block;
}

div.cmd-widget .slider .noUi-handle {
  cursor: pointer;
  outline: none;
}

div.cmd-widget .slider.noUi-horizontal .noUi-handle {
  right: -8.5px;
  top: -5.5px;
}

div.cmd-widget .slider.noUi-vertical .noUi-handle {
  bottom: -8px;
  left: -12.5px;
}

div.cmd-widget .slider .noUi-handle:focus {
  outline: none;
}

/* ____________________Specifics */
div.cmd-widget[data-type="action"][data-subtype="other"][data-template="default"] {
  min-width: auto;
  display: inline-flex;
  padding: 0 2px;
}

div.cmd-widget[data-type="action"][data-subtype="slider"][data-template="value"] input {
  font-size: 12px;
  padding: 2px;
}

div.cmd-widget[data-type="action"][data-subtype="slider"][data-template="value"] .ui-button-icon.ui-icon {
  margin-top: -8px;
}

div.cmd-widget[data-type="action"][data-subtype="slider"][data-template="button"] .buttons {
  width: 130px;
}

div.cmd-widget[data-type="action"][data-subtype="slider"][data-template="button"] .in_value {
  width: 70px;
  text-align: center;
}

div.cmd-widget[data-type="action"][data-subtype="message"][data-template="default"] {
  overflow: hidden;
}

div.cmd-widget[data-type="action"][data-subtype="message"][data-template="default"] .message {
  margin: 5px 0 !important;
  resize: none !important;
}

div.cmd-widget[data-type="action"][data-subtype="select"] div[class^="content"] {
  width: 85%;
}

div.cmd-widget div[class^="content"]>select {
  font-size: 16px !important;
  height: 22px;
}

div.cmd-widget[data-type="info"][data-template="tile"] .state {
  font-size: 2em;
  line-height: 24px;
}

div.cmd-widget[data-type="info"][data-subtype="numeric"][data-template="badge"] .state {
  padding: 6px;
}

div.cmd-widget[data-type="info"][data-subtype="string"][data-template="color"] .color {
  border-radius: var(--border-radius);
}

div.cmd-widget[data-type="info"][data-subtype="string"][data-template="multiline"] {
  width: 100%;
  overflow: auto;
  max-height: 24px;
}

div.cmd-widget[data-type="info"][data-subtype="string"][data-template="multiline"]::-webkit-scrollbar {
  width: 5px;
}


/* ____________________binarySwitch */
div.cmd-widget[data-type="action"][data-subtype="other"][data-template="binarySwitch"] .content-xs {
  width: 140px;
  max-width: 95%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 24px;
}

label.binarySwitch {
  position: relative;
  width: 40px;
  height: 20px;
  margin-bottom: 0;
}

label.binarySwitch input {
  display: none;
}

span.binarySwitch {
  border-radius: 1em;
}

span.binarySwitchHandle {
  position: absolute;
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 2px;
  background-color: var(--link-color);
  transition: .4s;
  border-radius: 50%;
}

label.binarySwitch>input:checked+span.binarySwitch>span.binarySwitchHandle {
  left: unset;
  right: 4px !important;
}

label.binarySwitch>input+span.binarySwitch {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  transition: .4s;
  background-color: var(--btnEq-default-color);
}

label.binarySwitch>input:checked+span.binarySwitch {
  background-color: var(--el-defaultColor);
}

[data-coloredicons="1"] label.binarySwitch>input:checked+span.binarySwitch {
  background-color: var(--bt-success-color);
}

[data-theme="core2019_Dark"][data-coloredicons="1"] label.binarySwitch>input:checked+span.binarySwitch>span.binarySwitchHandle {
  background-color: var(--btnEq-default-color) !important;
}

/* ____________________others */
div.arcgauge .content {
  position: relative;
  clip-path: polygon(0 -5px, 100% -5px, 100% 100%, 0 100%);
  min-width: 80px;
}

div.arcgauge .gauge,
div.arcgauge .gaugeValue {
  position: absolute;
  top: 0;
  width: 80px;
  height: 40px;
  border-top-left-radius: 80px;
  border-top-right-radius: 80px;
  border: 4px solid var(--el-defaultColor);
  border-bottom: 0 !important;
}

div.arcgauge .gaugeValue {
  border: 6px solid var(--link-color);
  transform-origin: 40px 40px;
  transform: scale(0.94) rotate(-180deg);
}

.hgauge-value,
.vgauge-value,
.shuttergauge-value {
  background: var(--link-color);
}

.hgauge-bckg,
.vgauge-bckg {
  background: var(--el-defaultColor);
}

.hgauge-bckg {
  position: relative;
  width: 70px;
  height: 5px;
}

.vgauge-chart {
  height: 40px;
}

.vgauge-bckg {
  position: relative;
  left: -6px;
  width: 5px;
  height: 40px;
  margin-bottom: -7px;
}

.shuttergauge-bckg {
  width: 39px;
  height: 40px;
  border-top: 5px solid var(--el-defaultColor);
  border-left: 3px solid var(--el-defaultColor);
  border-right: 3px solid var(--el-defaultColor);
}

.shuttergauge-chart {
  height: 40px;
}

.shuttergauge .noUi-pips {
  top: 5px;
  left: -12px;
}

.shuttergauge .noUi-marker.noUi-marker-vertical.noUi-marker-large {
  height: 1.15px;
  width: 10px;
}

.shuttergauge .noUi-marker.noUi-marker-vertical.noUi-marker-normal {
  height: 1.15px;
  width: 5px;
}

.shuttergauge .noUi-value.noUi-value-vertical.noUi-value-large {
  left: 5px;
}

.hgauge-value {
  position: relative;
  max-width: 70px;
  top: -1px;
  left: 5px;
  height: 10px;
  align-self: flex-start;
}

.vgauge-value {
  position: absolute;
  bottom: 0;
  width: 10px;
  margin-left: 4px;
}

/* ____________________Compass */
div.cmd-widget.widget-compass .widget-compass-container {
  width: 80px;
  height: 80px;
  margin: 2px;
}

div.cmd-widget.widget-compass .state {
  position: absolute;
  font-size: 16px !important;
}

div.cmd-widget.widget-compass .winDir {
  font-size: 11px !important;
}

div.cmd-widget.widget-compass .widget-compass-outline {
  position: absolute;
  width: 80px;
  height: 80px;
  border: 6px solid var(--txt-color);
  border-top: 6px solid var(--al-info-color);
  border-bottom: 6px solid var(--al-info-color);
  border-radius: 50%;
}

div.cmd-widget.widget-compass .widget-compass-needle-placer {
  margin-top: -3px;
  margin-left: -3px;
  width: 86px;
  height: 86px;
}

div.cmd-widget.widget-compass .widget-compass-needle {
  position: fixed;
  width: 0px;
  height: 0px;
  border: 8px solid transparent;
  border-top: 22px solid var(--al-warning-color);
  left: 35px;
}

/* ____________________Rain */
@keyframes jeedomWidgetRainWaterAnimation {
  from {
    background-position: 0 0
  }

  to {
    background-position: 100000% 0
  }
}

div.cmd-widget.widget-rain .widget-rain-water {
  position: absolute;
  bottom: 0px;
  width: 100%;
  transition: water 3s ease-out;
  z-index: 0;
  animation: jeedomWidgetRainWaterAnimation 3000s linear infinite;
}

div.cmd-widget.widget-rain .widget-rain-container {
  background: url(../../core/template/mobile/cmd.info.numeric.rain/marker.svg) no-repeat;
  background-size: cover;
  position: relative;
  height: 60px;
  width: 80px;
  z-index: 20;
}

div.cmd-widget.widget-rain .widget-rain-container .plage {
  position: absolute;
  right: 20px;
  bottom: 0;
  z-index: 2;
}
