@import '../../../core/src/style/variables';

.wpt-dialog-title {
  line-height: 1.125;
  font-weight: 800;
  font-size: 18px;
  margin-bottom: 10px;
}

.BomModal-download {
  max-height: 70vh;
  width: 795px;

  h4 {
    margin: 5px 0 0;
  }

  & > p {
    margin: 0 0 $gutter-l;
  }

  &-selection {
    width: 100%;
    border-top: 2px solid $black;
    overflow: hidden;
    margin-bottom: $gutter-l;

    &-toggle,
    &-toggle-custom {
      display: flex;
      margin-left: 3px; // Ensure checkbox visible focus when left checkboxes are tabbed

      width: 100%;
      padding: $gutter 0 0;

      wpt-checkbox {
        position: relative;
        float: left;        

        input {
          position: absolute;
          visibility: hidden;
          display: inline-block;
          top: 2px;
          left: 0;
        }

        label {
          margin-right: $gutter;
          vertical-align: middle;
          cursor: pointer;
          font-size: $font-size-s;
          font-weight: bold;
        }
      }

    }

    &-toggle-custom {
      padding: $gutter-s 0 0;
      font-size: 12px;
    }

    form {
      display: flex;
      flex-flow: column;
      .checkbox-list {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-content: baseline;
        padding-top: $gutter-s;
        margin-top: $gutter-s;
        margin-left: 3px; // Ensure checkbox visible focus when left checkboxes are tabbed
        padding-bottom: 8px;
        box-sizing: content-box;
        min-height: 7rem;
        font-size: 12px;
        &:nth-child(3) {
          border-top: 1px solid $middarkergrey;
          border-bottom: 2px solid $black;
        }
      }

      .custom-type-checkboxes {
        .checkbox-list {
          border-top: none;
          border-bottom: 2px solid $black;
        }
      }
    }

    &-checkbox {
      display: block;      
      padding: 0;      
      margin: 0 8px 0 0;
      position: relative;
      flex: 0 0 auto;
      width: 170px;      

      input {
        position: absolute;
        display: inline-block;
        top: 5px;
        left: 15px;
      }

      label {
        cursor: pointer;
        display: block;
        position: relative;
        padding-left: 25px;
        font-weight: bold;
      }
    }
  }

  &-expander {
    border-top: 1px solid $grey;
    overflow: hidden;
    margin: $gutter-l 0 0;
    padding: $gutter-m 0 0;

    form {
      margin-bottom: $gutter;
      margin-left: 3px; // Ensure leftmost input controls can have visible focus

      div {
        border: 0;
        width: 48%;
        float: left;
        margin: 0 4% $gutter 0;
        padding: 0;

        &.last {
          margin-right: 0;
        }
      }

      label {
        display: block;
        margin-bottom: 5px;
      }

      input {
        width: 100%;
        padding: 8px 9px;
        cursor: initial !important;
      }

      textarea {
        display: block;
        width: 100%;
        height: 70px;
        resize: none;
        padding: 8px 9px;
      }
    }
    .BomModalComponent-buttons {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      float: right;
      width: 215px;
      button {
        width: 100px;
      }
      //TODO: watch this. Commented out to ensure Done|Email buttons are not placed on separate lines.
      // must be an effect of other changes because it was not the case before BM-7311
      //flex-wrap: wrap;  
    }
  }

  &-actions {
    display: flex;
    justify-content: space-between;
    text-align: right;

    [wpt-button] {
      width: 167.5px;
      max-width: 167.5px;
    }

    .download {
      display: flex;
      align-items: center;
      margin-top: 10px;
    }

    .includeCrossesBox,
    .saveSelection {
      margin: 5px 0px 5px 5px;
      label {
        margin: 0 0 0 5px;
        vertical-align: bottom;
      }
    }

    .saveSelection {
      margin-left: 3px; // Ensure leftmost input controls can have visible focus
    }
  }

  &-error {
    color: $red;
    text-align: right;
  }

  &--status {
    display: block;
    padding: 5px 0;
    text-align: right;
    flex-grow: 1;
    align-self: flex-end;
    font-size: 14px;

    &.success {
      color: $blue;
    }

    &.error {
      color: $red;
    }
  }

  .dwe-message {
    text-align: right;
  }
}
