/**
 * @file
 * Custom extends.
 *
 */

// Use crisp font aliasing
%crisp {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

// Auto scroll with smooth scrolling on touch devices.
%scroll {
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

// Reset a list style.
%list-reset {
  @include unstyled-list();
}

// Trims the margin for top/bottom.
%trim {
  &:first-child {
    margin-top: 0;
  }

  &:last-child {
    margin-bottom: 0;
  }
}

// Positions the element to 100% the width and height of the relative container.
%fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

%center {
  margin-left: auto;
  margin-right: auto;
}

%vertical-spacing,
.vertical-spacing {
  @include vertical-spacing();

  &.collapse-vertical-spacing {
    @include collapse-vertical-spacing();
  }
}

%vertical-spacing-padding,
.vertical-spacing-padding {
  @include collapse-vertical-spacing();
  @include vertical-spacing-padding();
}

.usa-prose,
%prose {
  font-size: 1.5rem;
  line-height: 1.95;

  p {
    max-width: 82rem;
  }

  @include breakpoint($tablet) {
    font-size: 1.7rem;
  }
}

%accordion-arrow-title-transparent {
  cursor: pointer;
  background-color: transparent;
  font-family: $sans;
  font-size: 1.7rem;
  border-bottom: 1px solid rgba(29, 53, 87, 0.25);
  padding-bottom: 1.15rem;
  padding-right: 4rem;

  @include hover {
    background-color: transparent;
  }

  &[aria-expanded="false"] {
    background-image: url("../../../ftc_uswds/uswds/dist/img/angle-arrow-down-primary.svg"), linear-gradient(transparent, transparent);
    background-repeat: no-repeat;
    background-position: right 0 center;
    background-position-x: calc(100% - 2rem);
    background-size: 1rem;
  }

  &[aria-expanded="true"] {
    background-image: url("../../../ftc_uswds/uswds/dist/img/angle-arrow-up-primary.svg"), linear-gradient(transparent, transparent);
    background-repeat: no-repeat;
    background-position: right 0 center;
    background-position-x: calc(100% - 2rem);
    background-size: 1rem;
    color: $brightblue;

    span {
      color: $brightblue;
    }
  }
}
