@use 'sass:math';
@use '@cfpb/cfpb-design-system/src/abstracts' as *;
@use './vars.scss' as *;

// Icon locations
// TODO: Replace magic numbers with calculations based off of the
//       button padding size.

.a-btn__icon--on-left {
  padding-right: math.div(11px, $btn-font-size) + em;
  border-right: 1px solid $btn-divider;
  margin-right: math.div(7px, $btn-font-size) + em;
}

.a-btn__icon--on-right {
  padding-left: math.div(11px, $btn-font-size) + em;
  border-left: 1px solid $btn-divider;
  margin-left: math.div(7px, $btn-font-size) + em;
}

.a-btn__icon {
  .a-btn--secondary & {
    border-color: $btn-secondary-divider;
  }

  .a-btn--warning & {
    border-color: $btn-warning-divider;
  }

  .a-btn--disabled &,
  .a-btn[disabled] & {
    border-color: $btn-disabled-divider;
  }
}
