@import "~Breakpoints";
@import "~Colors";
@import "~FontSize";
@import "~Layout";
@import "~Type";

$formTopPadding: 2rem;
$formLeftPadding: 2rem;
$gutter: 1.5rem;
.wrapper {
  background: white;
}

.container {
  @include container();
}

.info {
  display: flex;
  flex-direction: column-reverse;
  min-height: 35rem;
  max-height: 40rem;
  @include media-breakpoint-up(md) {
    flex-direction: row;
  }

}

.address, .link {

  @include fontSizer(1.8, 1.6);
  font-weight: 500;
}

.address {
  display: block;
  color: $gray;

}

.link {
  color: $brand-primary;
  & + & {
    position: relative;
    margin-left: 2rem;
    &:before {
      content: '|';
      color: $gray;
      position: absolute;
      left: -1rem;
      transform: translateX(-50%);
      font-weight: 100;
    }
  }
}

.button {
  display: block;
  margin-top: 2rem;
  margin-bottom: 3rem;
}

.map {
  margin-left: 5%;
  flex-grow: 1;
  img {
    object-fit: cover;
    height: 100%;
    width: 100%;
  }
}

.contactForm {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-between;
}

.headline {
  text-transform: capitalize;
  @include fontSizer(4.8);
  font-weight: 500;
}

.tagline {
  font-weight: 300;
  font-size: 1.8rem;
}

.callLink {
  color: $brand-secondary;
  font-weight: 600;
  margin-left: 1rem;
}

.formField {
  border: .1rem solid $gray;
  @supports (display: block) {
    border: none; // support for ie11
  }
  width: 100%;
  position: relative;
  display: inline-block;
  margin-top: 2.5*$formTopPadding;

}

.label {
  position: absolute;
  top: -2rem;
  left: 0;
  transition: all .5s ease;
  color: $gray;
  margin-bottom: 0;
  line-height: 1;
  letter-spacing: .1rem;
  font-size: 1.8rem;
  font-weight: 600;
}

.name, .email, .phone, .message {
  border: none; // fallback for ie11
  @supports (display: block) {
    border: .1rem solid $gray;
  }
  &:focus {
    border-color: $brand-primary;
  }
  &:focus + label {
    color: $brand-primary;
  }
  font-size: 1.4rem;

  background-color: transparent;
  color: $brand-primary;
  font-weight: 100;
  width: 100%;
  flex-basis: auto;
  padding: $formTopPadding $formLeftPadding;
  letter-spacing: .1rem;
  &:active, &:focus {
    outline: none;
  }
  &::placeholder {
    color: $brand-primary;
    text-transform: uppercase;
    opacity: 0;
  }
  &:not(:placeholder-shown) {
    background-color: white;
  }
  transition: border-color .35s ease;
}

.third {
  width: 100%;
  @include media-breakpoint-up(md) {
    width: calc((100% - #{$gutter} * 2) / 3);

  }
}
