// JOA - Locations

@import "../../base-shared";

.usajobs-joa-locations {
  &__sub-title {
    margin-top: $size-base;
  }

  &__list {
    @include unstyledList();
    @include clearfix();
    margin-top: $size-S;
  }

  &__list > &__item {
    margin-bottom: $size-default;

    @include media($SM) {
      float: left;
      width: 50%;
    }
  }

  &__link,
  &__link:visited {
    text-decoration: none;
    color: $color-base;

    .fa-map-marker-alt {
      color: $color-primary-alt;
    }
  }

  &__body {
    padding: 0 $size-S 0 $size-base;
  }

  &__location {
    @include h4();
    margin: 0;
    font-weight: normal;
  }

  &__street,
  &__city {
    display: block;
    hyphens: auto;
  }

  &__street,
  &__vacancies {
    font-size: $small-font-size;
  }

  &__city {
    font-weight: bold;
    line-height: 1.2;
  }

  &__reveal-link,
  &__reveal-link:visited {
    color: $color-primary;
  }

  &__reveal-link {
    margin: $size-S 0 $size-default;
    background-color: $color-white;
    text-align: left;
  }

  &__more-locations {
    padding: $size-default 0;

    &[aria-hidden="true"] {
      display: none;
    }
  }
}

.usajobs-joa-locations--pilot {
  &__list > &__item {
    @include media($SM) {
      @include span-columns(1, 2);
    }

    @include media($M) {
      @include span-columns(3, 6);
    }

    @include media($L) {
      float: none;
      width: 100%;
    }

    &:nth-child(2n) {
      @include media($SM) {
        @include omega();
      }
    }
  }
}

.main-content .usajobs-joa-locations__link {
  text-decoration: none;
}

.no-flexbox .usajobs-joa-locations {
  &__link {
    @include clearfix();
    display: table;
  }

  &__figure,
  &__body {
    display: table-cell;
  }

  &__body {
    $icon-width: rem(9.72px);
    $icon-padding: $size-base;
    $body-padding: $size-S;

    @include calc(
      width,
      "100% - " ($icon-width + $icon-padding + $body-padding)
    );

    .lt-ie9 & {
      width: 75%;
    }
  }
}

.flexbox .usajobs-joa-locations {
  &__link {
    display: flex;
    align-items: top;
  }

  &__figure {
    flex-shrink: 0;
  }

  &__body {
    flex: 1;
    min-width: 0;
  }
}

.usajobs-joa-locations--v1-5 {
  position: relative;
  margin-bottom: $size-default;
  background-color: $color-white;

  @include media($M) {
    padding: $size-default;
    @include boxShadow(1);
  }

  @include media($L) {
    padding: $size-M;
  }

  &__header {
    margin-top: 0;
    color: $color-primary-alt-darkest;
  }

  &__commuting-distance {
    margin-top: 0;

    .fa-info-circle {
      color: $color-primary;
    }
  }
}

.usajobs-joa-locations--pilot {
  @include media($L) {
    padding: 0 $size-default;
  }

  &__header {
    color: $color-primary-darkest;

    @include media($L) {
      padding-top: $size-base;
      border-top: 3px solid $color-primary-darkest;
    }
  }
}
