// ┌─────────────┐
// │ Radio Group │
// └─────────────┘
//  ↳ http://esri.github.io/calcite-web/documentation/components/#radio-group
//  ↳ components → _radio-group.md
@mixin radio-group {
  border: none;
  padding: 0;
  margin-bottom: $baseline;
  @include font-size(-1);
  @include clearfix();
}

@mixin radio-group-title {
  @include font-size(0);
  margin-bottom: 0;
}

@mixin radio-group-input {
  opacity: 0;
  position: absolute;
  &:checked + .radio-group-label {
    background-color: $lightest-blue;
    border: 1px solid $blue;
    margin-right: 0;
    margin-left: 0;
  }

  &:checked + .radio-group-label + .radio-group-input + .radio-group-label {
    border-left: none;
    @include border-right(1px solid $lighter-gray);
  }
}

@mixin radio-group-label {
  display: inline-block;
  float: left;
  background-color: $white;
  color: $black;
  cursor: pointer;
  text-align: center;
  text-shadow: none;
  padding: 0.5rem 1rem;
  line-height: 1.25;
  margin-top: .25rem;
  margin-right: -1px;
  margin-bottom: 0;
  border: 1px solid $lighter-gray;
  box-sizing: border-box;
  height: 2.25rem;
  @include transition(background 0.1s ease-in-out, border-color 0.1s ease-in-out);
  @if ($include-right-to-left) {
    html[dir="rtl"] & {
      float: right;
      margin-left: -1px;
      margin-right: 0;
    }
  }
}


@if $include-radio-group == true {
  .radio-group       { @include radio-group(); }
  .radio-group-title { @include radio-group-title(); }
  .radio-group-input { @include radio-group-input(); }
  .radio-group-label { @include radio-group-label(); }
}
