$fieldset-vertical-margin: 20px;
$fieldset-horizontal-margin: 30px;

axa-fieldset {
  position: relative;
  display: block;

  &:not([horizontal]) > *:not(:last-child) {
    margin-bottom: $fieldset-vertical-margin;
  }

  &[horizontal]  {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    flex-direction: row;
    margin-top: -$fieldset-vertical-margin;

    > *:not([nogap]) {
      margin-right: $fieldset-horizontal-margin;
    }

    > *[nogap]:not(:first-child) {
      margin-left: -2px;
    }

    > * {
      margin-top: $fieldset-vertical-margin;
    }
  }

  &[horizontal="stretch"]{
    @media (max-width: $breakpoint-xs) {
      > *,
      > * > * {
        margin-right: 0;
        width: 100%;
      }

    }
  }

  &[error]:not([error=""]) {
    axa-radio:not(:hover):not([disabled]):not([checked]) {

      &[button] .a-radio__wrapper {
        border-color: $color-shy-tomato;
      }

      .a-radio__icon {
        border-color: $color-shy-tomato;
      }
    }

    &:after {
      @include text(t4);
      content: attr(error);
      display: inline-block;
      width: 100%;
      margin: 10px 0 0 !important;
      color: $color-shy-tomato;
    }
  }
}
