@import "def";

svg:not(:root) {
  overflow: visible;
}

#unitdetails {
  top: 10px;

  .maxgraph {
    height: calc(100% - 30px);
  }

  .alignbottom {
    align-self: flex-end;
  }

  i.icon-unit_solar {
    position: absolute;
    left: -45px;
    top: 35px;
    font-size: 150px;
    line-height: 10px;
    margin: 0;
    padding: 0;
    overflow-y: hidden;
    overflow-x: visible;
    max-height: 200px;
    width: 300px;
    display: block;
    z-index: 0;

    @include themify($themes) {
      color: themed("bodybg");
    }
    &:before {
    }
  }

  .nav-tabs {
    border-bottom: none;
    margin-top: 10px;
    // transform: translate(0px, 10px);

    .nav-link {
      border: none;
      padding-left: 25px;
      padding-right: 25px;

      @include themify($themes) {
        background: themed("bodybg");
        color: themed("txtcolor100");
      }
      margin-right: 5px;

      &.active {
        @include themify($themes) {
          background: themed("barbg");
          color: themed("txtcolor100");
        }
      }

      .count {
        font-size: 11px;
        border-radius: 4px;
        display: inline-block;
        text-align: center;
        margin-left: 5px;
        margin-right: 0px;
        transform: translateY(-1px);
        line-height: 16px;
        width: 20px;
        height: 16px;

        @include themify($themes) {
          background: themed("txtcolor100");
          color: themed("color0");
        }
      }
    }
  }

  .icon-cirk_bg {
    left: -10px !important;
    top: -1px !important;
  }

  .unitdescription {
    margin-bottom: -10px;
    padding-left: 15px;
    padding-right: 0px;

    p {
      @include themify($themes) {
        color: themed("txtcolor2");
      }
    }

    h3 {
      margin-bottom: 0px;
      white-space: nowrap;
    }
  }

  .status {
    h1 {
      font-size: 48px;
    }

    table {
      padding: 0;
      margin: 0;
      display: block;
      width: 100%;
      max-width: 100%;

      tr {
        border: none;
      }

      td {
        vertical-align: top;
        padding: 0;
        white-space: initial;
      }
    }

    .statusicon {
      width: 70px;
      text-align: center;
      span {
        display: block;
        transform: translateY(4px) translateX(5px);
      }
    }

    .statustext {
      padding-top: 10px;
    }
  }

  .frame {
    border-radius: 10px;
    margin: 10px;
    padding: 15px;
    //width:36%;
    position: relative;
    @include themify($themes) {
      background-color: themed("barbg");
    }

    &.environment {
      i {
        font-size: 42px;
        line-height: 0px;
        padding: 0;
        margin: 0;
        display: block;
        transform: translateY(3px);
      }


      h6 {
        margin-bottom: 29px;
      }

      .row:last-of-type h6 {
        margin-bottom: 0;
      }
    }

    h3 {
      font-size: 24px;
      font-weight: 400;
      white-space: nowrap;
    }

    h4 {
      font-size: 28px;
      margin-bottom: 0px;
      font-weight: 400;
      display: inline-block;

      span {
        //font-size:18px;
        font-size: 20px;
      }

      &.timeunit {
        display: inline-block;
        padding-right: 20px;
        span {
          @include themify($themes) {
            color: themed("txtcolor3");
          }
          font-size: 16px;
          display: block;
        }
      }

      &.periodheader {
        @include themify($themes) {
          color: themed("txtcolor100");
        }
        font-size: 16px;
        display: block;
      }
    }

    h6 {
      font-size: 14px;
      padding: 0 0 21px 0;
      @include themify($themes) {
        color: themed("txtcolor2");
      }

      &:last-of-type {
        padding-bottom: 0;
      }
    }

    .yawrose {
      background-position: center;
      background-repeat: no-repeat;
      max-width: 245px;

      img.nacelle {
        position: absolute;
      }
    }
  }
}

.theme-light {
  .yawrose {
    background-image: url(/app/core/images/yaw_black.svg);
  }

  .nacelle {
    content: url(/app/core/images/yaw_nacelle_black.svg);
  }
}

.theme-dark {
  .yawrose {
    background-image: url(/app/core/images/yaw.svg);
  }
}

/* Graphs */
.pitchgraphwrapper {
  position: relative;
  min-height: 242px;

  .pitchgraph {
    position: absolute;
    left: 0px;
    bottom: 0px;
    top: 0px;
    width: 100%;
  }

  &.singlewing {
    .svgwingwrapper {
      bottom: -40px;
    }
    svg {
      max-height: 290px;
    }
  }
}

.flexwrapper{
  display: flex;
  justify-content: space-between; 
  width:100%;
}

.unitgraphwrapper {
  position: relative;
  margin: 10px 0 10px 0;

  &.power {
    height: 81%;
  }

  &.pitch {
    height: 100%;
  }

  &.met {
    height: 110px;
  }

  &.hydrotemp {
    min-width:120px;
    height: 172px;
    h6.title {
      position:absolute;
      left:0px;
      top:182px;
    }
    h4.abovelimit {
      @include themify($themes) {
        color: themed('alert');
      }
 
  }

  &.drive {
    height: 150px;
    margin-bottom: 10px;
    margin-top: 6px;

    &.ge {
      height: 110px;
      margin-top: 10px;
    }
  }



  .statvalues {
    position: absolute;
    transform: translateY(17px);
    left:55px;
    white-space: nowrap;
    h4, span.type {
      line-height:18px;
      display:block!important;
    }
    span.type {
      font-size:14px!important;
      font-weight: 300;
      @include themify($themes) {
        color: themed("neutral");
      }
    }
    h4 {
      margin-bottom:13px!important;
     
      }
    }

    h4:nth-child(1) .type{
      @include themify($themes) {
        color: themed("online3");
      }
    }

    h4:nth-child(3) .type{
      @include themify($themes) {
        color: themed("online1");
      }
    }
  }

  .base {
    display: block;
    float: left;
    width: 32px;
    position: relative;
    margin-left: 9px;
    height: 100%;
    @include themify($themes) {
      background-color: themed("bodybg");
    }

    .warnlimit {
      position: absolute;
      width:100%;
      top:1px;
      background:rgba(255,0,0,0.15);   
      z-index:9;   
    }

    .overLimit {
      width:100%;
      @include themify($themes) {
        background-color: themed("alert");
      }
    }



    .valuebar,
    .value {
      height: 30%;
      width: 100%;
      position: absolute;
      bottom: 0px;
      overflow-x: visible;
      background: #369894;

      &.onethirdbar {
        width:30%; 

        &.second {
          left:33%;
        }

        &.third {
          left:66%;
        }
      }

      &.onehalfbar {
        width:48%; 

        &.second {
          left:50%;
        }
        

      }

      &.wind {
        @include themify($themes) {
          background-color: themed("windblue");
        }
      }

      &.power {
        @include themify($themes) {
          background-color: themed("barvalue");
        }
      }
    }
    .value {
      background: transparent;
      white-space: nowrap;
      width: 130%;
      z-index:100;

      @include themify($themes) {
        border-top: 1px solid themed("txtcolor100");
      }

      overflow: visible;
      h4 {
        transform: translateX(45px) translateY(-12px);
        line-height: 18px;
      }
    }
  }

  .min,
  .max {
    position: absolute;
    left: 55px;
    white-space: nowrap;
  }
  .min {
    bottom: -15px;
  }

  .max {
    top: -9px;
  }

  .valuelines {
    display: block;
    float: left;
    height: 100%;
    width: 4px;

    @include themify($themes) {
      background: repeating-linear-gradient(
        transparent,
        transparent 6px,
        themed("txtcolor2") 6px,
        themed("txtcolor2") 7px
      );
    }
  }
  .graphtop,
  .graphbottom {
    position: absolute;
    left: 0px;
    bottom: 0px;
    height: 1px;
    width: 50px;

    @include themify($themes) {
      background-color: themed("txtcolor100");
    }
  }

  .graphtop {
    top: 0px;
  }
}

.svgwingwrapper {
  width: 100%;
  padding-right: 10px;
  position: absolute;
  bottom: 0px;
  float: left;
  @include themify($themes) {
    .axis {
      fill: themed("txtcolor2");
    }
    .axisvalue,
    .wingborder {
      fill: themed("txtcolor100");
    }
    .wing {
      transform-origin: 66% 32%;
    }
    .wingfill {
      fill: themed("barbg");
    }
  }

  svg {
    max-height: 310px;
  }
}

.drillcontainer div .yawsystemwrapper {
  max-width: 240px;
  margin-left: auto !important;
  margin-right: auto !important;

  @include themify($themes) {
    .cls-2 {
      stroke: themed("txtcolor100");
    }
    #nacelleline,
    .st0 {
      fill: themed("txtcolor100");
    }
    .wind0 {
      fill: themed("service");
    }
    .st1 {
      stroke: themed("txtcolor2");
    }
  }

  .st1 {
    fill: none;
    stroke-width: 2;
  }

  .cls-2 {
    fill: none;
    stroke-miterlimit: 10;
    stroke-width: 2px;
  }

  .cls-2 {
    stroke-dasharray: 4.97 4.97;
  }
}

#nacelleline,
#windarrow {
  transform-origin: 50% 50%;
}

.statusbox {
  display: inline-block;
  width: 100%;
  border-radius: 10px;
  padding: 15px;
  transform: translateY(20px);
  @include themify($themes) {
    background-color: themed("barbg");
  }
  transition: all 0.4s;

  p {
    margin: 0px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .statusgroup {
    display: block;
    white-space: nowrap;

    div {
      display: inline-block;
      vertical-align: top;
    }
  }

  span {
    font-weight: 600;
  }

  .left {
    width: 120px;

    p {
      font-weight: 600;
      @include themify($themes) {
        color: themed("txtcolor100") !important;
      }
    }
  }

  .right {
    width: auto;
    max-width: calc(100% - 120px);
    p {
      /* white-space: normal!important;*/
    }

    &.statusboxtext {
      padding-top: 5px;

      .icon-stack {
        width: 35px;
        height: 10px;
        display: block;
        float: left;
        i {
          font-size: 20px;
          line-height: 20px;
        }
      }
    }
  }
}

.detailtools {
  transform: translateY(5px);
  transition: all 0.4s;

  & > div {
    padding-right: 0px !important;
  }
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  40% {
    transform: rotate(90deg);
  }
  50% {
    transform: rotate(180deg);
  }
  90% {
    transform: rotate(270deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
.spin {
  animation: spin 13.5s linear 0s infinite normal;
}

.drillcontainer {
  div {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}

.tab-pane {
  .gridwrapper {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(48, 1fr);
    grid-gap: 20px;
    grid-auto-flow: row dense;

    .frame {
      margin: 0 !important;
      grid-column-start: auto;
      grid-column-end: span 18;
      max-height: 500px;

      h3 {
        margin-bottom: 0;

        span {
          @include themify($themes) {
            color: themed("txtcolor3");
          }
          font-size: 16px;
          display: inline-block;
        }
      }

      p.state {
        margin-top: 0px!important;
        margin-bottom: 8px;
        font-weight: bold;
        @include themify($themes) {
          color: themed("txtcolor100");
        }

        .icon-stack {
          margin-right:20px;

        }

        i {
          line-height:normal;
        }

        .icon-cirk_bg {
          left: 0px !important;
          transform: translateX(3px) scale(0.8);
     
        }
      }

      h6.state {
        margin-top: 12px!important;
        margin-bottom: 5px;
        padding:0!important;
      }

      &.narrow {
        grid-column-end: span 12 !important;
        opacity: 1 !important;
      }

      &.wide {
        grid-column-end: span 24 !important;
        opacity: 1 !important;
      }

      &.third {
        grid-column-end: span 16 !important;
        opacity: 1 !important;
      }

      &.twothirds {
        grid-column-end: span 32 !important;
        opacity: 1 !important;
      }

      &.half {
        grid-column-end: span 24 !important;
        opacity: 1 !important;
      }

      &.full {
        grid-column-end: span 48 !important;
        opacity: 1 !important;
      }

      &.doublerow {
        grid-row-end: span 2 !important;
        opacity: 1 !important;
      }


      &.nomax{
        max-height: none;
      }

     
    }
  }

  &#counters {
    .gridwrapper {
      width: calc(100% + 20px);
      display: flex;
      flex-wrap: wrap;
      flex-direction: row;
      align-items: stretch;
      height: auto;
    }

    div.frame {
      flex: 1;
      margin-right: 20px !important;
      margin-bottom: 20px !important;
      padding-right: 0px;
      white-space: nowrap;
      .counters div {
        white-space: nowrap;
      }

      h3 {
        margin-right: 20px;
      }
    }
  }

  &#service {
    .row {
      padding: 20px 0;
    }

    h3 {
      margin-bottom: 8px;
    }

    i {
      cursor: pointer;
      &.active {
        background: red;
        border-radius: 4px;
        @include themify($themes) {
          color: themed("txtcolor100") !important;
          background-color: themed("bodybg");
        }
      }
    }

    #manyaw {
      display: flex;
      flex-direction: row;
      align-items: stretch;
      width: calc(100% + 10px);
      row-gap: 10px;
      margin-left: -5px !important;
      margin-right: -5px !important;
    }

    button {
      display: block;
      padding-left:15px;
      width: 100%;
      text-align: center;
      &.active {
        @include themify($themes) {
          background-color: themed("bodybg");
        }

        input[type="submit"] {
          @include themify($themes) {
            background-color: themed("navbg");
          }
        }
      }

      &.manyaw {
        margin: 0 5px;
        padding: 0px;
      }

      input {
        @include themify($themes) {
          border: 1px solid themed("trBorderColor");
          background-color: themed("txtcolor4");
          color: themed("txtcolor100");
        }
        /*width: 70px;*/
        text-align: center;
        margin: 0px 5px;
      }
      input[type="text"] {
        width:40px;
      }

      input[type="submit"] {
        border: none;
        padding-left: 12px;
        padding-right: 12px;
        border-radius: 0.25rem;
        cursor: pointer;
        @include themify($themes) {
          background-color: themed("bodybg");
        }
      }
    }
    p.status {
      @include themify($themes) {
        color: themed("txtcolor2");
      }
      margin: 0;

      span {
        @include themify($themes) {
          color: themed("txtcolor100");
        }
        &.servicealert {
          font-weight: bold;
          @include themify($themes) {
            color: themed("alert");
          }
        }
      }
    }
  }

  .counters {
    width: 100%;
    // grid-template-columns: repeat(3, 1fr);
    // grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    // grid-gap: 20px;
    // grid-auto-flow: column;

    div {
      padding: 15px 25px 0 0;
      display: inline-block;
      //display:block;
      width: auto !important;
      //float:left;
      //white-space: nowrap;

      &:last-child {
        padding-right: 10px;
      }

      &.columns {
        display: block !important;
      }
    }
  }
}

#foundations {
  top: 20px;
}

.foundation-container {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  grid-template-areas: "foundation_main foundation_main foundation_main foundation_main foundation_main foundation_main foundation_main foundation_displacement foundation_displacement foundation_displacement" "foundation_main foundation_main foundation_main foundation_main foundation_main foundation_main foundation_main foundation_warning foundation_warning foundation_warning";

  margin-top: 20px;

  > div {
    border-radius: 10px;
    padding: 15px;
    @include themify($themes) {
      background-color: themed("barbg");
    }

    h3,
    .h3 {
      font-size: 24px;
      font-weight: 400;
    }

    h4,
    .h4 {
      font-size: 28px;
      margin-bottom: 0px;
      margin-top: 10px;
      font-weight: 400;
      display: inline-block;
    }

    h5,
    .h5 {
      font-size: 18px;
      font-weight: 400;
      @include themify($themes) {
        color: themed("txtcolor2");
      }
    }

    h6,
    .h6 {
      font-size: 14px;
      padding: 0;
      @include themify($themes) {
        color: themed("txtcolor2");
      }
    }
  }

  .foundation_image {
    grid-area: 1 / 3 / 3 / 6;
    overflow: hidden;
    background-color: transparent !important;
    z-index: 1;
    min-height: 600px;
    text-align: center;

    svg {
      transform: translateY(-130px);
    }
  }

  .foundation_main {
    grid-area: foundation_main;
    margin: 0px 10px 0px 0px !important;
    @include themify($themes) {
      background-image: radial-gradient(circle, themed("txtcolor4"), themed("barbg"));
    }

    .sensors {
      width: 100%;
      height: 100%;
      position: relative;

      .sensor {
        z-index: 2;
        position: absolute;
        border-radius: 10px;
        padding: 15px;
        @include themify($themes) {
          background-color: themed("navbg");
        }
      }
      .sensor_1 {
        left: 0px;
        top: 50px;
        width: 30%;
      }
      .sensor_3 {
        right: 0px;
        top: 50px;
        width: 30%;
      }
      .sensor_2 {
        bottom: 100px;
        margin-top: 500px;
        left: 50%;
        width: 42%;
        transform: translateX(-50%);

        .now {
          display: inline-block;
        }
        .last {
          display: inline-block;
          float: right;
        }
      }

      .resetsensors {
        z-index: 2;
        position: absolute;
        bottom: 35px;
        left: 50%;
        width: 42%;
        transform: translateX(-50%);
        @include themify($themes) {
          background-color: themed("txtcolor3");
        }
        color: #fff;
      }
    }
  }
  .foundation_displacement {
    grid-area: foundation_displacement;
    margin: 0px 0px 10px 10px !important;
  }
  .foundation_warning {
    grid-area: foundation_warning;
    margin: 10px 0px 0px 10px !important;

    table {
      width: 100%;

      tr {
        height: auto;
      }

      th,
      td {
        padding: 7px;
      }
    }

    button {
      margin: 0;
      @include themify($themes) {
        background-color: themed("txtcolor3");
      }
      color: #fff;
    }

    .material-input input {
      width: 65px;
      text-align: right;
    }

    .state {
      display: inline-block;
      width: 20px;
      height: 20px;
      transform: translateY(3px);
      border-radius: 10px;
      border: 1px solid #666;
      margin: 0;

      &.active {
        border: none;
        @include themify($themes) {
          background-color: themed("warning");
        }
      }
    }
  }
}

.weathericon {
  font-size: 135px;
  line-height: 115%;

  &:before {
    margin-left: 0px !important;
    margin-right: 0px !important;
  }
}

.databuttons {
  padding-top: 20px;
  padding-bottom:20px;
}

.chartdatatabs {
  flex-direction: row-reverse;
  margin-top: 0px !important;

  li {
    line-height: 16px;
    a {
      &.nav-link {
        border-radius: 0.25rem;
      }
    }
  }
}

.no-padding {
  padding:0!important;
}


.waterflowsvg {
  display:block; 
  width:90%;
  margin:auto; 
  height:auto;

  path, line, rect {
    @include themify($themes) {
      stroke: themed("txtcolor100");
    }

    fill:none;
  }

  .bgbox {
    @include themify($themes) {
      fill: themed("txtcolor5");
    }
    stroke: none!important;

  }

  .barbg {
    @include themify($themes) {
      fill: themed("bodybg");
    }
    stroke: none!important;
  }

  .barvalue {
    @include themify($themes) {
      fill: themed("online3");
    }
    stroke: none!important;
  }

  .description {
    font-size:14px;
    font-weight:500;
    @include themify($themes) {
      fill: themed("txtcolor100");
    }
  }

  .bigtext {
    font-size:24px;
    font-weight:500;
    @include themify($themes) {
      fill: themed("txtcolor100");
    }
  }

  .bigcircle {
    @include themify($themes) {
      stroke: themed("txtcolor100");
    }
    fill:none;
  }

  .ok {
    fill: #20bf6b;
  }

  .alert {
    fill: #d52e2b;
  }

  

}

.hydroturbinesvg {
  text {
    @include themify($themes) {
      fill: themed("txtcolor100");
    }

    &.value {
      font-size: 32px;
      font-weight: 500;
    }

     &.description {
      font-size: 14px;
      @include themify($themes) {
        fill: themed("txtcolor2");
      }
     }

     &.state {
      font-weight: 500;
       @include themify($themes) {
        fill: themed("txtcolor100");
      }
     }

    .unit {
      font-family: Montserrat-Medium, Montserrat;
      font-size: 24px;
      font-weight: 100;
    }
  }
.filled  {
  @include themify($themes) {
    fill: themed("bodybg");
  }
}

.gen {
  @include themify($themes) {
    fill: themed("bodybg");
  }
}

.connector {
  @include themify($themes) {
    fill: themed("menucolor");
  }
}

  line, path, rect, polyline {
    @include themify($themes) {
      stroke: themed("menucolor");
    }
    stroke-width: 2;
    fill:none;

  }

  polygon {
    @include themify($themes) {
      fill: themed("txtcolor2");
    }
  }

  .dashed {
    stroke-dasharray: 2 2;
  }

  .infoline {
    stroke-width: 1;
    fill: none;
    @include themify($themes) {
      stroke: themed("txtcolor100");
    }
  }

 

  
}