@import "../variables";

ui-content.import-data {
  display: flex;
  flex-direction: column;
  step-timeline {
    flex: 0;
    > div {
      margin: 0 40px;
    }
  }
  import-step-1,
  import-step-2,
  import-step-3,
  import-step-4,
  import-step-5 {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    > div.step_content {
      margin: 15px 40px;
      flex: 1;
      display: flex;
      flex-direction: column;
      overflow: auto;
      .import-content {
        flex-grow: 1;
        margin-bottom: 40px;
        overflow: auto;
        display: flex;
        flex-direction: column;

        .import-error {
          font-weight: 400;
          font-size: 12px;
          line-height: 15px;
          color: $red-warning;
        }
        .import-content_step3_default_value{
          >div:first-child{
            >div:last-child{
              text-align: center;
            }
          }
        .import-content_step3_default_line {
          border-top: none !important;
          font-size: 0.8rem;
          > div:first-child {
            padding-right: 10px;
          }
          >div:last-child{
            border-top: 1px solid $gray-very-light;
          }
        }
      }
        .import-content_step3,
        .import-content_step3_default_line {
          display: grid;
          align-items: center;
          grid-template-columns: auto 230px;
          grid-template-areas: "label firstValue";
          border: 1px solid $gray-very-light;
          border-bottom: none;
          > div {
            &:first-child {
              grid-area: label;
              margin-left: 10px;
              > div {
                display: flex;
                align-items: center;
                justify-content: space-between;
              }
            }
            &:last-child {
              grid-area: firstValue;
              flex: 200px;
              height: 38px;
              width: 100%;
              // display: flex;
              align-items: center;
              border-left: 1px solid $gray-very-light;
              > div.import-step3__default {
                width: 100%;
                padding: 0;
                > ui-input {
                  border: none;
                }
                > ui-date-picker {
                  width: 100%;
                  ui-field-wrapper {
                    border: none;
                  }
                }
                > ui-select {
                  border: none;
                }
              }
            }

            > ui-date-picker {
              width: 100%;
              ui-field-wrapper {
                border: none;
              }
            }
            > ui-select {
              border-color: transparent;
              &.ui-select--focus {
                border-color: transparent !important;
              }
              > .select2-container span.select2-selection .select2-selection__clear {
                margin-top: 4.5px;
                height: 25px;
              }
            }
            > ui-input {
              height: 42px;
              border: none !important;
              border-radius: 0;
            }
          }
          &:last-child {
            border-bottom: 1px solid $gray-very-light;
          }
        }
      }
      .import-header {
        flex-grow: 0;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        padding: 0px;
        gap: 15px;
        margin-bottom: 38px;
        > .import-header__label {
          font-weight: 300;
          font-size: 28px;
          line-height: 36px;
          color: $black-100;
        }
        > .import-header__text {
          font-weight: 400;
          font-size: 14px;
          line-height: 22px;
          color: $black-100;
        }
      }
      div.import-content_step3,
      div.import-content_step3_default_line {
        > div {
          overflow: hidden;
          .ui-input {
            padding: 0 10px;
          }
        }
      }
    }
    > div.import-footer {
      flex: 0;
      background: var(--primary-white-10, $import-data-footer);
      width: 100%;
      padding: 10px 20px;
      display: flex;
      justify-content: end;
      gap: 30px;
      > span {
        display: flex;
        align-items: center;
        gap: 10px;
        > div.import-data__error {
          font-weight: 400;
          font-size: 12px;
          line-height: 15px;
          color: $red-warning;
        }
      }
    }
    .ui-select.ui-input--invalid {
      margin-bottom: 0;

      & > div.ui-input__error {
        display: none;
      }
    }
  }
  import-step-1 {
    > div {
      > ui-files {
        > compose {
          > .ui-files-actions {
            display: none;
          }
        }
      }
    }
  }
  .step_content {
    height: inherit;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    .import-metering__header {
      flex-grow: 0;
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      padding: 0px;
      gap: 15px;
      margin-bottom: 38px;
      > .import-metering__header__label {
        font-weight: 300;
        font-size: 28px;
        line-height: 36px;
        color: $black-100;
      }
      > .import-metering__header__text {
        font-weight: 400;
        font-size: 14px;
        line-height: 22px;
        color: $black-100;
      }
      > div {
        display: flex;
        width: 100%;
        justify-content: space-between;
        > div {
          > .import-metering__step4__header__text {
            font-weight: 400;
            font-size: 14px;
            line-height: 22px;
            color: $red-warning;
            &.success {
              color: $green-valid;
            }
          }
          > .import-metering__step4__header__warning {
            display: flex;
            flex-direction: row;
            justify-content: center;
            padding: 10px 15px;
            align-items: center;
            gap: 10px;
            background: $red-light;
            border-radius: 8px;
            > ui-icon {
              color: $red-warning;
            }
          }
          > .import-metering__step4__header__toggle {
            display: flex;
            align-items: center;
            justify-content: flex-end;
          }
          > .import-metering__step4__header__excel-button {
            display: flex;
            padding-top: 5px;
            > div.button-space {
              height: 40px;
              margin-right: 10px;
              border: none;
              ui-button {
                border-color: $import-data-footer;
              }
            }
            > ui-button {
              height: 40px;
              margin: 0px;
            }
          }
        }
      }
    }
  }
  import-step-5 {
    > div.step_content {
      > .import-header {
        margin-bottom: 38px;

        > div {
          display: flex;
          flex-direction: row;
          align-items: center;
          padding: 0px;
          gap: 10px;
          font-size: 28px;
          margin-bottom: 30px;
          ui-icon {
            background: $ui-green;
            border-radius: 60px;
            color: $white;
          }
        }
        > span {
          font-size: 14px;
        }
      }
      > .import-content__step5 {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        padding: 20px 40px;
        gap: 20px;
        border: 1px solid $gray-very-light;
        border-radius: 24px;
        > .col {
          &:last-child {
            border-right: none;
          }
          display: flex;
          flex-direction: column;
          align-items: flex-start;
          padding: 20px 30px;
          border-right: 1px solid $gray-very-light;
          > p {
            margin: 0;
            &:first-child {
              color: $primary;
              font-size: 12px;
            }
            &:last-child {
              font-size: 36px;
            }
          }
        }
        &__result {
          display: flex;
          flex-direction: row;
          justify-content: flex-end;
          align-items: center;
          padding: 10px 0px;
          gap: 5px;
          color: $gray-light;
        }
      }
    }
  }

  .row {
    margin-left: 0;
    margin-right: 0;
  }
}

.import-step3__select {
  min-width: 200px;
  display: flex;
  border-top: 1px solid #efefef;
  padding: 15px;
  gap: 8px;
  align-items: center;
  > ui-field {
    &:first-child {
      ui-select > select {
        max-width: 80px;
      }
    }
    &:last-child {
      select {
        height: 2.6rem;
        border: solid 1px $gray-lighter;
        border-radius: 0.3rem;
        max-width: 100px;
      }
    }
  }
  select {
    border: none;
    &:focus-visible {
      border: solid 1px $gray-lighter !important;
    }
  }
}

.import-metering-correct-errors-box__old-value {
  display: flex;
  align-items: center;
  gap: 5px;
}
