@import "def";

#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: 0px;
    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;
    }
  }
}

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

  &.power {
    height: 81%;
  }

  &.pitch {
    height: 100%;
  }

  &.met {
    height: 110px;
  }

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

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

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

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

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

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

      @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;
        }
      }

      &.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;
      }

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

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

  &#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;
      }
    }
  }
}
