/**
 * @file
 * Global field styles.
 */

%field {
  ~ .field,
  ~ .group,
  ~ .usa-accordion {
    margin-top: 2rem;
  }

  > .field__label {
    margin-bottom: 1rem;
  }

  &.field--label-inline + .field--label-inline {
    margin-top: 0.5rem;
  }
}

.field--type-text-with-summary,
.field--type-text-long {
  > .field__items > .field__item > * {
    @extend %trim;
  }
}

.field--name-field-subtitle {
  @extend %heading-small;
}

.field--name-field-job-title {
  font-style: italic;
}

.field-social-icons {
  margin-bottom: $field-spacing;

  .flex-group > & {
    margin-bottom: 0;
  }
}

.field--label-inline {
  > .field__label {
    display: inline;

    &:after {
      content: ':';
    }

    + .field__items {
      margin-left: 0.5rem;
      display: inline;

      > .field__item {
        display: inline;
      }
    }
  }

  &.field--name-field-link-multi {
    > .field__label + .field__items > .field__item {
      display: block;
    }
  }
}

.field__label {
  font-family: $sans;
  font-size: 1.5rem;
}

.field--name-date {
  font-size: 1.4rem;
}

// Comments field.
.field--comments {
  .indented {
    padding-left: 3rem;
  }

  .inline-group {
    margin-bottom: 2rem;

    ~ * {
      margin-top: 1.5rem;
    }
  }

  .comment-form {
    margin-top: 6rem;
  }
}

form#comment-form input#edit-preview {
  display: none;
}

.field--name-field-enforcement-type {
  &.field--label-inline > .field__items {
    > .field__item ~ .field__item:before {
      content: '|';
      margin-right: 0.25em;
    }
  }
}

// Disable mobile linking behavior on matter number.
.field--name-field-matter-number a[href^="tel"] {
  pointer-events: none;
  color: inherit;
  border: 0;
}

.field--name-field-page-blocks {
  .layout__region-column > .field ~ &,
  .field ~ & {
    margin-top: 4rem;
  }

  > .field__items > .field__item ~ .field__item {
    margin-top: $row-spacing;
  }
}

.field--name-body {
  a[href$=".pdf"],
  a[href$=".doc"],
  a[href$=".docx"] {

    &:after {
      content: '';
      display: inline-flex;
      @include file-document-pdf;
      width: 11px;
      height: 14px;
      background: #727272 no-repeat;
      margin-left: .5rem;
    }
  }
  a[href$=".doc"],
  a[href$=".docx"] {
    &:after {
      @include file-document-word;
    }
  }
}

.business-guidance-section.page-node-type--plain-language-guidance {
  .field--name-field-date {
    time {
      font-weight: bold;
    }
  }
}

.field--name-field-press-releases, 
.field--name-field-public-statements,
.views-field-field-link-files {
  li {
    margin-top: 2rem;
  }
}

div.file,
div.field--name-field-link-files > .field__items > .field__item {
  @include file-link;

  &::before {
    @include file-document;
  }
}

div.file-remote-audio, 
div.field--name-field-media-external-link {
  div.field__item {
    a {
      overflow-wrap: anywhere;
      margin-left: 5px;
    }
    &::before {
      -webkit-mask-image: url(/libraries/fontawesome/svgs/solid/file-audio.svg) !important;
      mask-image: url(/libraries/fontawesome/svgs/solid/file-audio.svg) !important;
      display: inline-block;
      content: ' ';
      mask-repeat: no-repeat;
      -webkit-mask-repeat: no-repeat;
      mask-size: 20px 20px;
      -webkit-mask-size: 20px 20px;
      background-color: #1d3557;
      height: 20px;
      width: 20px;
      vertical-align: middle;
    }
  }
}

.field--name-field-agenda-event-body {
  .field__items {
    .field__item {
      p {
        margin-top: 0rem!important;
        margin-bottom: 2.2rem!important;
      }
    }
  }
}

.view-event-locations__block_1 {
  .field--name-field-address {
    .field__items {
      .field__item {
        .address {
          .address-line1,
          .address-line2,
          .locality {
            &:after {
              content: "\002C";
            }
          }
        }
      }
    }
  }
}


.field.field--type-telephone svg {
    width: 15px;
    margin: 5px 5px 0 0;
}
