@charset "utf-8";

/* Two .contact-block rules existed previously — merged; effective flex-wrap is nowrap */
.contact-block {
  flex-wrap: nowrap;
  font-weight: 300;
  gap: 2rem;
  position: relative;
  width: 100%;

  & * {
    flex-direction: column;
    line-height: 1.2;
  }

  & :is(.department-name, .email, .fax, .phone, .locations) {
    flex-direction: row;
  }

  & .initial {
    flex: 1;
    height: auto;
    justify-content: space-between;
    left: 0;
    min-width: max-content;
    padding-bottom: 2.125rem;
    top: 6rem;

    & .email {
      text-transform: lowercase;
    }

    & .hours {
      margin: 0;
      padding: 0;
    }

    & .numbers {
      margin-top: 0.75rem;

      & > * {
        padding: 0;
        padding-bottom: .25rem;
      }
    }
  }

  &.single .initial {
    min-width: 0;

    & .email {
      min-width: 0;
      
    }
  }

  &.multi .initial {
    height: min-content;
    padding-bottom: 2.125rem;
    position: sticky;
  }

  &.multi .email {
    margin: 2rem 0;
  }

  & .single-location {
    flex: 2;
    justify-content: flex-end;
    padding: 1rem 2rem;
  }

  & .multi-location {
    flex: 2;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0 1rem;
    row-gap: 1rem;

    & section {
      padding: 2px; /* drop-shadow bleed compensation */
    }

    & .location-container {
      border-radius: .25rem;
      box-shadow: var(--float-close);
      padding: 1rem;
    }
  }

  & .department-name {
    align-items: center;
    justify-content: space-between;
  }

  & .title {
    font-size: 1.5rem;
    font-weight: 200;
    letter-spacing: unset;
    margin: 1rem;
    text-transform: capitalize;
    white-space: nowrap;
  }

  & :is(.physical-location, .mailing-location, .hours) {
    padding: 1rem;
    width: max-content;
  }

  & :is(.open-period, .address) {
    line-height: 1.5rem;
  }

  & .numbers > * {
    padding: 0.25rem 1rem;
  }

  & img.icon {
    margin-right: 3rem;
    max-width: 3rem;
  }

  & label {
    font-weight: 500;
    letter-spacing: .03rem;
    line-height: 1.5;
    text-transform: uppercase;
  }

  & svg {
    flex-shrink: 0;
    height: 1.125rem;
    margin-right: .5rem;
    stroke-width: 1.5px;
    width: 1.125rem;
  }
}

.directory {
  flex-direction: column;
  font-weight: 300;
  width: 100%;

  & h4 {
    font-size: 1.5rem;
    font-weight: 200;
    margin: 2rem 0 1rem;

    &::before {
      background: var(--color-6);
      content: "";
      height: auto;
      margin-right: 1rem;
      width: 2px;
    }
  }

  & .entry {
    flex-direction: column;
    padding: .25rem;
    width: 100%;

    &:focus-within {
      border-radius: .25rem;
      outline: 1.5px solid var(--color-6);
    }

    & a:focus {
      background: var(--color-1);
    }

    & :is(.upper, .lower) {
      justify-content: space-between;
      width: 100%;
    }

    & * {
      line-height: 1.5;
    }
  }

  & .email {
    text-transform: lowercase;
  }

  & :is(.name, .right) {
    flex-direction: column;
    white-space: nowrap;
    width: max-content;
  }

  & .dotted-line {
    border-bottom: 1px dotted var(--contrast);
    height: 1rem;
    margin: 0 .5rem;
    width: -webkit-fill-available;
    width: -moz-available;
    width: stretch;
  }
}

@media screen and (max-width: 940px) {
  .contact-block {
    flex-direction: column;

    &.multi .initial {
      padding: 0;
      position: unset;
    }

    & .single-location {
      justify-content: flex-start;
      padding: 0;

      & .location-container {
        column-gap: 2rem;
        flex-direction: row;
      }

      & :is(.hours, .locations) {
        column-gap: 2rem;
        margin-top: 0;
      }

      & :is(.hours, .physical-location, .mailing-location) {
        padding: 1rem 0;
      }
    }

    & .multi-location {
      flex-direction: row;
      gap: 2rem;
      overflow-x: auto;
      overflow-y: hidden;
      padding: 0;
      width: 100%;
    }
  }

  .directory .name {
    flex-shrink: 0;
    max-width: 40%;
    white-space: unset;
    width: fit-content;
  }
}

@media screen and (max-width: 720px) {
  .contact-block {
    & .single-location .location-container {
      flex-direction: column;
    }

    & .locations {
      column-gap: 2rem;
      flex-direction: column;
    }
  }

  .directory {
    & :is(.upper, .lower) {
      flex-direction: column;
    }

    & .dotted-line {
      border-bottom: unset;
      border-top: 1px dotted;
      margin: 0;
      order: -1;
    }

    & .name {
      max-width: 100%;
    }
  }
}

@media screen and (max-width: 580px) {


  #locations .swiper-wrapper {
    flex-direction: row;
    flex-wrap: nowrap;
  }

  
  .contact-block {
    & .locations {
      flex-direction: column;
    }

    & .multi-location {
      overflow: hidden;

      & section {
        flex-shrink: 0;
        width: 100%;
      }

      & .swiper-button-next {
        right: 2px;
      }

      & .swiper-button-prev {
        left: 2px;
      }
    }
  }
}

@media screen and (max-width: 480px) {

  .contact-block .email {
    overflow-wrap: anywhere;
  }
  .contact-block .multi-location {
    & .title {
      white-space: unset;
    }

    & .location-container {
      height: -webkit-fill-available;
      height: -moz-available;
      height: stretch;
    }
  }
}
