/*
  LWT main theme style additions
  February 2020 redesign (CW-749)

  Override/replace other components
*/


/* ---------- Widgets ---------- */

/* Dropdown links */
.dropdown-links {
  position: relative;
  display: inline-block;
}

.dropdown-links button { /* Toggle button */
  position: relative;
  z-index: 51;
  display: flex;
  flex-flow: row nowrap;
  justify-content: center;
  align-items: center;
  -webkit-appearance: none;
  -moz-appearance: none;
  margin: 0;
  padding: 0.9rem 1.8rem 0.9rem 2.8rem;
  border-radius: 2.3125rem;
  font: 600 1.125rem/1.2 "futura-pt",sans-serif;
  transition: background-color 0.25s ease-out, color 0.25s ease-out, box-shadow 0.25s ease-out;
  cursor: pointer;
}
  html.no-js .dropdown-links button { /* Fix padding if no JavaScript chevron */
    padding-left: 2.8rem;
    padding-right: 2.8rem;
  }

.dropdown-links button > span { /* Text */
  flex: 1 1 auto;
}
.dropdown-links button > svg { /* Chevron */
  flex: 1 0 15px;
  width: 15px;
  height: 17px;
  margin-left: 1.15rem;
  fill: #fff;
  transition: fill 0.25s ease-out, transform 0.25s ease-out;
}
.dropdown-links.flip button > svg { /* Rotate chevron immediately upon toggle */
  transform: rotate(180deg);
}

.dropdown-links.open button { /* Add drop shadow when open */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

#main .dropdown-links > ul { /* List; hidden by default */
  display: none;
  position: absolute;
  z-index: 50;
  top: 50%;
  left: 0;
  width: 100%;
  margin: 0;
  padding: 2.4rem 1rem 1rem;
  list-style: none;
  border: 2px solid #0053a0;
  border-radius: 0.3125rem;
  background-color: #fff;
}
.no-js #main .dropdown-links:hover > ul { /* Appear on hover without scripting */
  display: block;
}

#main .dropdown-links > ul > li {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  background: none;
  line-height: 1.3;
}
#main .dropdown-links > ul > li:last-child { /* Reduce bottom whitespace */
  margin-bottom: 0;
}

.dropdown-links > ul > li a {
  display: block;
  font-weight: 400;
  text-decoration: none;
  transition: color 0.25s ease-out;
}


/* ---------- Hero buttons ---------- */

.header--theme.header--hero-small-header .header--text .header--text-format .header--text-inside a.button {
  margin: 0 0.35em 0.5em 0;
}
.header--theme.header--hero-small-header .header--text .header--text-format .header--text-inside a.button:last-child {
  margin-right: 0;
}



/* ---------- Sticky Resources Footer ---------- */

#sticky-footer h2 {
  display: block;
}

#block-hwt-core-footer-resources {
  padding: 0 0.5rem;
}

#block-hwt-core-footer-resources,
#block-hwt-core-footer-resources div,
#block-hwt-core-footer-resources label,
#block-hwt-core-footer-resources select,
#block-hwt-core-footer-resources input {
  display: inline-block;
  vertical-align: top;
}
#block-hwt-core-footer-resources .form-item {
  white-space: nowrap;
  margin: 0;
}

#block-hwt-core-footer-resources label {
  font-size: 1.25rem;
  line-height: 1.6;
  color: #fff;
}

/* Toggle a/an + vowel label */
#block-hwt-core-footer-resources label .footer-vowel {
  display: none;
}
#block-hwt-core-footer-resources label span {
  vertical-align: top;
}
#block-hwt-core-footer-resources .form-item-footer-role label {
  min-width: 3.4em;
  text-align: right;
}
#block-hwt-core-footer-resources .form-item-footer-role label .form-required {
  display: none;
}

#block-hwt-core-footer-resources select {
  width: 240px;
  height: auto;
  margin: 0 0.75rem;
  padding: 0.25rem 0.7rem 0.25rem 1.25rem;
  border: 0.125rem solid #4d93d5;
  border-radius: 2.3125rem;
  background-color: #005bbb;
  background-image: url("../img/icons/icon--down-arrow-light-blue.svg");
  font: 400 1.2rem/1.2 "futura-pt",sans-serif;
  color: #fff;
  cursor: pointer;
  transition: box-shadow 0.25s ease-out,
              border-color 0.25s ease-in-out,
              color 0.25s ease-in-out,
              background-color 0.25s ease-in-out;
}
  #block-hwt-core-footer-resources select:hover {
    color: #fff;
  }
  #block-hwt-core-footer-resources select:focus {
    background-color: #0f4a7f;
    box-shadow: 0 1px 4px rgba(0, 67, 130, 0.9);
  }


#block-hwt-core-footer-resources input.form-submit {
  margin: 0 0 0 0.25rem;
  padding: 0.5rem 2.15rem;
  border-radius: 2.3125rem;
  background-color: #4d93d5;
  font-size: 1rem;
  color: #fff;
}
  #block-hwt-core-footer-resources input.form-submit:hover {
    background-color: #0f4a7f;
    color: #fff;
  }


#block-hwt-core-footer-resources .links {
  margin-left: 1.55rem;
  border-left: 1px solid #fff;
  padding-left: 1.55rem;
}

#block-hwt-core-footer-resources a.button {
  margin: 0;
  padding: 0.45rem 1.75rem;
  border: 0.125rem solid #4d93d5;
  border-radius: 2.3125rem;
  background-color: #005bbb;
  font-size: 1rem;
  color: #fff;
}
  #block-hwt-core-footer-resources a.button:hover {
    background-color: #0f4a7f;
    color: #fff;
  }
#block-hwt-core-footer-resources a.button + a.button {
  margin-left: 0.8rem;
}


@media only screen and (max-width: 960px) {
  /* Tablet: Reduce size */
  #block-hwt-core-footer-resources label {
    font-size: 1.1rem;
    line-height: 1.8;
    vertical-align: middle;
  }
  #block-hwt-core-footer-resources select {
    width: 175px;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
    font-size: 1.05rem;
  }
  #block-hwt-core-footer-resources input.form-submit {
    padding-left: 1.75rem;
    padding-right: 1.75rem;
    font-size: 0.9rem;
  }
  #block-hwt-core-footer-resources a.button {
    padding-left: 1.6rem;
    padding-right: 1.6rem;
    font-size: 0.9rem;
  }
}

@media only screen and (max-width: 766px) {
  /* Hide second button link */
  #block-hwt-core-footer-resources .links a.button:nth-child(2) {
    display: none;
  }
}

@media only screen and (max-width: 650px) {
  /* Hide both button links */
  #block-hwt-core-footer-resources .links {
    display: none;
  }
}

@media only screen and (max-width: 630px) {
  /* Non-sticky mobile */
  #sticky-footer {
    padding: 1.5rem 0;
  }

  #block-hwt-core-footer-resources label {
    font-size: 1rem;
  }
  #block-hwt-core-footer-resources select {
    margin-left: 0.3rem;
    margin-right: 0.3rem;
  }
}

@media only screen and (max-width: 468px) {
  /* Two rows */
  #block-hwt-core-footer-resources * {
    vertical-align: middle;
  }

  #block-hwt-core-footer-resources .form-item {
    margin-bottom: 0.8rem;
    display: block;
  }
  #block-hwt-core-footer-resources .form-item label {
    display: inline-block;
    min-width: 6rem;
    text-align: right;
  }
  #block-hwt-core-footer-resources select {
    margin-left: 0.5rem;
  }
  #block-hwt-core-footer-resources input.form-submit {
    vertical-align: bottom;
  }
}
