.motor-model-charts-content .hide {
  /*position: absolute;
  left: 0;*/
  height: 0;
  margin: 0;
  opacity: 0;
  transition: opacity .33s ease 0s;
}
.motor-model-charts-content :not(.hide) {
  opacity: 1;
  transition: opacity .33s ease 0s;
}

.motor-model-charts-content .grayscale-image {
  filter: sepia(1) contrast(3) brightness(.75) grayscale(1);
}

.motor-model-charts-content h4{
  margin-bottom: 1em;
}

.motor-model-charts-content{
  position: relative;
  padding: 1em;
  padding-bottom: 2em;
  background-color: white;
}

.motor-model-charts-content .chart-container p{
    margin:0;
    font-size: 14px;
}

.motor-model-charts-content .chart-container{
  position: relative;
  height: 350px;
  width: 100%;
}

.motor-model-air-conso-curve .chart-container {
  position: relative;
  height: 250px;
  width: 100%;
}
.motor-model-charts-content .chart-h-container, .motor-model-air-conso-curve .chart-h-container {
  height: calc(100% - 50px);
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
}
.motor-model-charts-content .chart-h-container .torque-scale {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: calc(100% + 20px);
  margin-top: -10px;
  margin-right: 5px;
  justify-content: space-between;
}

.motor-model-charts-content .chart-h-container .power-scale {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: calc(100% + 20px);
  margin-top: -10px;
  margin-left: 5px;
  justify-content: space-between;
}

.motor-model-air-conso-curve .chart-h-container .air-conso-scale {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: calc(100% - 20px);
  margin-bottom: -10px;
  margin-right: 5px;
  justify-content: space-between;
  align-self: flex-end;
}

.motor-model-air-conso-curve .chart-h-container .chart-wrapper {
  width: calc(100% - 90px) !important;
}
.motor-model-charts-content .chart-h-container .chart-wrapper {
  width: 100%;
}

.motor-model-charts-content .chart-wrapper div.chart-inner, .motor-model-air-conso-curve div.chart-inner {
  height: 100%;
  position: relative;
  border-bottom-style: solid;
  border-bottom-width: 1px;
  border-bottom-color: #ccc;
  border-right-style: solid;
  border-right-width: 1px;
  border-right-color: #ccc;
  background-color: white;
}
.reference-builder-curves-container{
  margin-top: 25px;
  text-align: left;
}

.motor-model-charts-content .chart-wrapper div.chart-inner img{
  position: absolute;
  height: 100%;
  width: 100%;
  left: 0;
}

.motor-model-air-conso-curve{
  position: relative;
}

.motor-model-air-conso-curve div.chart-inner img {
  position: absolute;
  height: calc(100% - 20px) !important;
  width: 100%;
  left: 0;
  bottom: 0;
  image-rendering: auto !important; 
}

.motor-model-charts-content .chart-wrapper div.chart-inner .horizontal-guide, .motor-model-air-conso-curve .chart-wrapper div.chart-inner .horizontal-guide {
  --scale: 100;
  --line-every: 20;
  background-image: linear-gradient(to bottom, #ccc 1px, transparent 1px);
  background-size: 100% calc(100% / var(--scale) * var(--line-every));
  position: absolute;
  height: 100%;
  width: 100%;
}

.motor-model-charts-content .chart-wrapper div.chart-inner .vertical-guide, .motor-model-air-conso-curve .chart-wrapper div.chart-inner .vertical-guide {
  --scale: 100;
  --line-every: 25;
  background-image: linear-gradient(to right, #ccc 1px, transparent 1px);
  background-size: 25%;
  position: absolute;
  height: 100%;
  width: 100%;
}

.motor-model-air-conso-curve .speed-scale {
  margin-top: 5px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  width: calc(100% + 40px);
  margin-left: -20px;
}

.motor-model-air-conso-curve .speed-scale .values{
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.motor-model-charts-content .speed-scale {
  margin-top: 5px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  width: calc(100% + 40px);
  margin-left: -20px;
}

.motor-model-charts-content .speed-scale .values{
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.motor-model-charts-content .speed-scale .values p {
  width: 40px;
  color: #555;
  text-align: center;
}

.motor-model-charts-content .torque-scale p {
  width: 40px;
  color: #555;
  text-align: right;
}
.motor-model-charts-content .power-scale p {
  width: 40px;
  color: #555;
  text-align: left;
}

.motor-model-air-conso-curve .speed-scale .values p {
  width: 40px;
  color: #555;
  text-align: center;
}

.motor-model-air-conso-curve .air-conso-scale p {
  width: 40px;
  margin: 0;
  color: #555;
  text-align: right;
}

.graph_units_title {
  font-weight: bold;
  font-size: 14px;
}

.graph_units_title.air-conso{
  margin:0px;
  position: absolute;
  top: 30px;
  left:0;
}

.graph_units_title.torque{
  margin: 0;
  position: absolute;
  top:45px;
  left:25px;
}
.graph_units_title.power{
  margin: 0;
  position: absolute;
  top:45px;
  right:25px;
}

.graph_units_title.speed{
  width: fit-content;
}


div.motor-model-charts-legend {
    position: absolute;
    bottom: 10px;
    left: 10px;
    display: flex;
    flex-direction: row;
    gap: 10px;
}

div.motor-model-charts-legend div {
    display: flex;
    flex-direction: row;
    gap: 5px;
    align-items: center;
}

div.motor-model-charts-legend span.legend-item {
    width: 24px;
    height: 24px;
    border-radius: 8px;
}

/*div.motor-model-charts-legend div.legend-pressure-1 span.legend-item {
    background-color: #31506f;
}

div.motor-model-charts-legend div.legend-pressure-2 span.legend-item {
    background-color: #42709a;
}

div.motor-model-charts-legend div.legend-pressure-3 span.legend-item {
    background-color: #a1bdd9;
}*/

div.motor-model-charts-legend div.legend-pressure-1 span.legend-item {
  background-color: #303030;
}

div.motor-model-charts-legend div.legend-pressure-2 span.legend-item {
  background-color: #707070;
}

div.motor-model-charts-legend div.legend-pressure-3 span.legend-item {
  background-color: #cccddd;
}


select.motor-model-charts-toggle {
  outline: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: var(--current-color);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512' fill='white'><!--! Font Awesome Pro 6.4.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2023 Fonticons, Inc. --><path d='M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z' stroke='white'/></svg>");
  background-repeat: no-repeat;
  background-position-x: 95%;
  background-position-y: 5px;
  background-size: 15px;
  border: 0 solid #dfdfdf;
  border-radius: 2px;
  margin-bottom: 1rem;
    width: 150px;
    padding: 0.5rem;
    color: white;
    font-family: 'AvantGarde Regular';
    font-weight: bold;
    font-size: .9em;
}

select.motor-model-charts-toggle option{
  background: white;
  color: #1b1b1b;
  font-size: .9em;
}

/*custom select*/
.container {
  position: relative;
  margin-bottom: 10px;
}

.wrapper-dropdown-charts {
  position: relative;
  
  display: inline-block; 
  min-width: 180px;
  padding: 0 5px 0 15px;
  
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 2px 2px 0 rgba(0 ,0 , 0, .14), 0 3px 1px -2px rgba(0, 0, 0, .12), 0 1px 5px 0 rgba(0, 0, 0, .2);
  
  text-align: left;
  line-height: 45px;
  color: #444;
  
  cursor: pointer;
  
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.wrapper-dropdown-charts::before {
  content: '';
  position: absolute;
  top: 50%;
  right: 16px;
  
  margin-top: -2px;
  width: 0;
  height: 0;
  
  border-width: 6px 6px 0 6px;
  border-style: solid;
  border-color: white transparent;
}

.wrapper-dropdown-charts{
  background-color: var(--current-color);;
  color: white;
}

.wrapper-dropdown-charts.active::before {
  border-width: 0 6px 6px 6px;
}

.wrapper-dropdown-charts .dropdown {
  
  position: absolute;
  top: 110%;
  right: 0;
  left: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-radius: 2px;
  box-shadow: inherit;
  background: white;
  -webkit-transition: .5s ease;
  -moz-transition: .5s ease;
  -ms-transition: .5s ease;
  transition: .5s ease;
  -webkit-transform: scaleY(0);
  -moz-transform: scaleY(0);
  -ms-transform: scaleY(0);
  transform: scaleY(0);
  -webkit-transform-origin: top;
  -moz-transform-origin: top;
  -ms-transform-origin: top;
  transform-origin: top;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  opacity: 0;
  visibility: hidden;
}

.wrapper-dropdown-charts .dropdown li {
  padding: 0 15px;
  border-bottom: 1px solid rgba(255, 255, 255, .2);
  overflow: hidden;
  color: var(--current-color);
  -webkit-transition: .5s ease;
  -moz-transition: .5s ease;
  -ms-transition: .5s ease;
  transition: .5s ease;
  transition: opacity .33s ease 0s;
}

.wrapper-dropdown-charts .dropdown li:last-child {
  border-bottom: none;
}

.wrapper-dropdown-charts .dropdown li:hover {
  --color-hover-curve-dropdown : var(--current-color);
  opacity: .8;
  color: white;
  background: var(--color-hover-curve-dropdown);
  transition: opacity .33s ease 0s;
}

.wrapper-dropdown-charts.active .dropdown {
  opacity: 1;
  visibility: visible;
  z-index: 100;
  -webkit-transform: scaleY(1);
  -moz-transform: scaleY(1);
  -ms-transform: scaleY(1);
  transform: scaleY(1);
  background: white;
}

.motor-model-charts-content .overlay{ 
  position: absolute;
  top: 0;
  left: 0;
  z-index: 90;
  width: 100%;
  height:100%;
  background: rgba(0,0,0,0.25);
}
.motor-model-charts-content .overlay .cv-spinner {
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;  
}
.motor-model-charts-content .overlay .cv-spinner .spinner {
  width: 40px;
  height: 40px;
  border: 4px #ddd solid;
  border-top: 4px #2e93e6 solid;
  border-radius: 50%;
  animation: sp-anime 0.8s infinite linear;
}
@keyframes sp-anime {
  100% { 
    transform: rotate(360deg); 
  }
}

