@use '../../styles/mat-selectors' as ms;

.aca-rule-composite-condition {
  display: block;
  border-radius: 8px;

  fieldset {
    border: none;
    margin: 0;
    padding: 0;
  }

  &.aca-childCompositeCondition {
    padding: 8px 16px;
    background-color: hsl(0deg, 0%, 100%);

    &.aca-secondaryBackground {
      background-color: hsl(0deg, 0%, 95%);
    }
  }

  &__form {
    display: flex;
    flex-direction: column;
    gap: 8px;

    .aca-rule-composite-condition__form__row {
      display: flex;
      gap: 8px;

      & > :nth-child(1) {
        width: 7em;
        height: fit-content;
        font-size: inherit;
      }

      & > :nth-child(2) {
        flex: 1;
      }

      .aca-rule-composite-condition__boolean-mode-control #{ms.$mat-form-field-wrapper} {
        background-color: unset;

        #{ms.$mat-select-disabled} {
          color: var(--adf-theme-foreground-text-color);
        }
      }
    }

    &__no-conditions {
      color: var(--theme-disabled-text-color);
      margin: 0.5em 0;
    }

    &__actions {
      padding-left: 8px;

      button:not(:disabled) {
        background-color: unset;
      }

      .aca-rule-composite-condition__form__actions-add {
        width: 24px;
        height: 24px;
        font-size: 24px;
        margin-right: 0;
      }
    }
  }
}
