@import '../../styles/common';

$control-size: rem(16px);

// Need to push the control down just a little to have it appear
// vertically centered with the label.
$control-vertical-adjustment: 2px;

.Choice {
  display: inline-flex;
  justify-content: flex-start;
  padding: spacing(extra-tight) 0;
}

.labelHidden {
  padding: 0;

  > .Label {
    @include visually-hidden;
  }

  .Control {
    margin-top: 0;
    margin-right: 0;
  }
}

.disabled {
  > .Label {
    color: color('ink', 'lightest');

    @media (-ms-high-contrast: active) {
      color: ms-high-contrast-color('disabled-text');
    }
  }
}

.Control {
  display: flex;
  flex: 0 0 auto;
  align-items: stretch;
  width: $control-size;
  height: $control-size;
  margin-top: $control-vertical-adjustment;
  margin-right: spacing(tight);

  > * {
    width: 100%;
  }
}

.Label {
  @include text-style-body;
  -webkit-tap-highlight-color: transparent;
}

.Descriptions {
  padding-left: spacing(tight) + $control-size;
}

.HelpText {
  @include text-style-body;
  @include text-emphasis-subdued;
  margin-bottom: spacing(extra-tight);
}
