@import "../../styles/variables.scss";

novo-control-group {
  display: block;
  margin-bottom: 0.5em;
  background: var(--background-bright, $color-white);

  &.novo-control-group-appearance-card {
    border-radius: 0.4rem;
    box-shadow: rgba(0, 0, 0, 0.09) 0px 1px 7px 0px, rgba(0, 0, 0, 0.2) 0px 1px 3px 0px;
  }

  novo-control-input input + i.bhi-times {
    top: 2px;
  }

  .novo-section-header {
    box-sizing: border-box;
    margin: 0;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    border-radius: 0.4rem 0.4rem 0 0;

    button {
      padding: 3px 15px;
    }
    > span {
      display: flex;
      align-items: center;
    }
    label.novo-control-group-description {
      font-size: 1rem;
      font-weight: 500;
      padding-right: 10px;
    }
    i.bhi-section {
      margin-top: -10px;
    }
    i.bhi-next {
      cursor: pointer;
      transform: rotate(0deg);
      transition: all 300ms ease-out;
      &.toggled {
        transform: rotate(90deg);
      }
    }
    .clickable {
      cursor: pointer;
    }
  }

  .novo-control-group-controls {
    display: flex;
    flex-wrap: nowrap;
    padding: 0;
    flex-direction: column;

    &.hidden {
      display: none !important;
    }
    novo-control {
      novo-select {
        min-width: 100%;
        max-width: 100%;
      }
    }
    &.horizontal {
      novo-control {
        margin: 0.5em 0;
        padding: 0 0.4em !important;
        .novo-control-outer-container {
          max-width: 100% !important;
        }
        &:first-of-type {
          padding-left: 0;
        }
        &:last-of-type {
          padding-right: 0;
        }
      }
      .novo-control-group-labels {
        background: var(--background-main, $color-light);
        border-top: 1px solid var(--border, $color-grey);
        border-bottom: 1px solid var(--border, $color-grey);
        align-items: center;
        padding: 0.4em 0;
        & > .novo-control-group-control-label {
          padding: 0 0.4em;
          &.novo-control-group-control-hidden {
            padding: 0;
          }
        }
      }
    }
    &.vertical {
      .novo-control-group-control {
        flex-direction: column;
      }
      .novo-control-group-row {
        display: flex;
        align-items: center;
        border-bottom: 1px solid lighten($dark, 45%);
        padding: 0.4em;
        &:last-of-type {
          border-bottom: none;
        }
      }
    }
    > .novo-control-group-labels {
      display: flex;
      padding: 0 0 1em;
      > .novo-control-group-control-label {
        &:nth-child(1).column-required {
          margin-left: 23px;
        }
        box-sizing: border-box;
        flex: 1;
        > span {
          color: var(--text-muted);
          font-size: 1rem;
          font-weight: 500;
          text-transform: uppercase;
          overflow: hidden;
          text-overflow: ellipsis;
        }
        &.last {
          min-width: 4rem;
          max-width: 4rem;
        }
      }
    }
    .novo-control-group-row {
      .novo-control-group-control {
        display: flex;
      }
      div.novo-control-container {
        flex: 1;
        .novo-control-inner-container {
          margin-right: 0px;
        }
        &.is-label {
          display: flex;
          align-items: center;
        }
        &.first {
          > span i {
            margin: 0;
          }
          min-width: 4rem;
          max-width: 4rem;
          margin-left: 0;
          display: flex;
          align-items: center;
        }
        &.last {
          min-width: 4rem;
          max-width: 4rem;
          margin-right: 0;
          display: flex;
          align-items: center;
        }
      }
      button[theme="icon"],
      novo-button[theme="icon"] {
        padding: 3px;
        height: 3rem;
        width: 3rem;
        min-height: 3rem;
        min-width: 3rem;
        margin-left: 1rem;
        i.bhi-delete-o {
          color: $negative;
          font-size: 1.2em;
        }
      }
    }
    .novo-control-group-footer {
      display: flex;
      flex-flow: row nowrap;
      padding: 0.2rem;
    }
  }
}
