/**********************
    Header
***********************/
.ontario-main-header {
  background: #1a1a1a;
  color: #fff;
  position: relative;
}

.ontario-header-logo {
    width: 110px;
    min-width: 110px;
    margin: 1rem 1rem 1rem 0;
}

.ontario-main-header__logo-link {
  float: left;
  line-height: 0;
}

@media screen and (max-width: 40em) {
  .ontario-header-logo {
      margin: 0.85rem 0;
  }
}

@media screen and (max-width: 40em) {
  .ontario-main-header__link {
      margin-top: 1rem;
  }
}

@media screen and (min-width: 40em) {
  .ontario-main-header__link {
      margin-top: 1.25rem;
  }
}

.ontario-main-header__link a,
.ontario-main-header__link a:visited {
  color: white;
  text-decoration: none;
}

.ontario-main-header__link a:hover,
.ontario-main-header__link a:focus {
  text-decoration: underline;
}

@media screen and (max-width: 40em) {
  .ontario-main-header__title {
      font-size: 0.85rem;
      margin-left: 0.5rem;
      top: 1.3rem;
  }
}


/* Language toggle */
.language-switcher-language-url .is-active {
  display: none;
}

.language-switcher-language-url {
  float: right;
}

.language-switcher-language-url a,
.language-switcher-language-url a:visited {
  color: white;
  text-decoration: none;
}

.language-switcher-language-url a:hover {
  color: #fff;
  text-decoration: #fff underline;
}

.language-switcher-language-url abbr {
  text-transform: uppercase;
}

/*****************
    Search Bar
*****************/
.covid-search-bar__form {
  position: relative;
}

.covid-search-bar {
  margin-left: -7px;
}

@media screen and (max-width: 73em) {
  .covid-search-bar {
    margin-left: 0;
  }
}

@media screen and (max-width: 50em) {
  .covid-search-bar {
    margin-left: -12px;
  }
}

@media screen and (max-width: 40em) {
  .covid-search-bar--mobile {
    display: block;
  }
}

.covid-search-bar__input {
  margin: .5rem 0;
  position: relative;
  /* important tag is necessary for IE */
  height: 48px !important;
}

input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.covid-search-bar__input--clear {
  position: absolute;
  background: white;
  display: none;
  padding: 0.25rem .75rem;
  font-size: 1.25rem;
  top: 4px;
  right: 80px;
  z-index: 10;
  transition: all .3s ease;
}

.covid-search-bar__input--clear:hover,
.covid-search-bar__input--clear:focus {
  text-decoration: none;
}

.covid-search-bar__button {
  border: none;
  box-sizing: border-box;
  box-shadow: none;
  display: inline-block;
  font-size: 1.125rem;
  font-weight: 600;
  font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  line-height: calc(14/9);
  padding: calc((1rem + 0.25rem) / 2) 1.5rem;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.covid-search-bar__button:focus {
  box-shadow: 0 0 0 4px #009ADB;
  outline: 4px solid transparent;
  transition: box-shadow 0.1s ease-in-out;
}

.covid-search-bar__submit-button {
  border-radius: 0 4px 4px 0;
  position: absolute;
  height: 44px;
  top: 2px;
  right: 0;
  min-width: 1rem;
  margin: 0;
  z-index: 11;
  background: white;
  width: 5rem;
  -webkit-transition: all 0.2s ease;
    -o-transition: all 0.2s ease;
    transition: all 0.2s ease;
}

.covid-search-bar__submit-button:hover,
.covid-search-bar__submit-button:focus,
.covid-search-bar__mobile-popup-button:focus,
.covid-search-bar__mobile-popup-button:hover {
  background: #555;
}

.covid-search-bar__submit-button:hover img {
  fill: white;
  color: white;
}

.covid-search-bar__submit-button:active,
.covid-search-bar__mobile-popup-button:active {
  background: #333;
}

/* Mobile Search Bar */
.covid-search-bar--mobile {
  position: absolute !important;
  right: 75px;
}

.covid-search-bar__mobile-popup-button {
  border-radius: 4px;
  min-width: 2rem;
  margin: 0;
  height: 44px;
  position: relative;
  top: 7px;
  background: white;
  transition: all .2s ease;
  -webkit-transition: all 0.2s ease;
    -o-transition: all 0.2s ease;
    transition: all 0.2s ease;
}

.covid-search-bar__submit-button-icon {
  fill: #000;
  position: absolute;
  width: 1.75rem;
  height: 1.75rem;
  top: 10px;
  right: 22px;
}

.dropdown-pane {
  width: inherit;
}

.dropdown-pane.is-open.ontario-show-for-small-only {
  display: none;
}

.covid-search-bar__submit-button:focus .covid-search-bar__submit-button-icon,
.covid-search-bar__submit-button:hover .covid-search-bar__submit-button-icon,
.covid-search-bar__submit-button:active .covid-search-bar__submit-button-icon,
.covid-search-bar__mobile-popup-button:focus .covid-search-bar__submit-button-icon,
.covid-search-bar__mobile-popup-button:hover .covid-search-bar__submit-button-icon,
.covid-search-bar__mobile-popup-button:active .covid-search-bar__submit-button-icon {
  fill: #fff;
}

.covid-search-bar__popup-search {
  display: none;
  position: absolute;
  padding: 1rem;
  background: white;
  z-index: 10;
  box-shadow: 0 1px 3px #666
}

.covid-search-bar__popup-search::before {
  content: "";
  width: 0;
  height: 0;
  position: absolute;
  top: -7px;
  right: 5.75rem;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-bottom: 7px solid white;
}

@media screen and (max-width: 73em) {
  .covid-search-bar__input--clear {
    right: 80px;
  }
}

@media screen and (max-width: 40em) {
  .dropdown-pane.is-open.ontario-show-for-small-only {
    display: block;
  }

  /* foundation dropdown alignment moving around - this is a fix to keep the dropdown in the same place */
  .dropdown-pane.is-open {
    top: 65px !important;
    left: 0 !important;
    right: 0 !important;
  }

  .covid-search-bar__input--clear {
    right: 38.5%;
    top: 29px;
  }

  .covid-search-bar__submit-button-icon {
    right: 8px;
  }

  .covid-search-bar__popup-search.is-open {
    display: block;
  }

  .covid-search-bar__input {
    width: 65%;
  }

  .covid-search-bar__button-mobile {
    width: 35%;
    height: 48px;
    margin-top: .5rem;
    min-width: 1rem;
    margin-left: .5rem;
    padding: auto 1rem;
    font-size: 1rem;
    background-color: #fff;
    border: 2px solid #06c;
    border-radius: 4px;
    color: #06c;
    padding-top: .5rem;
    padding-bottom: .5rem;
  }

  .covid-search-bar__button-mobile:hover,
  .covid-search-bar__button-mobile:focus {
    background-color: #E0F0FF;
    border-color: #00478F;
    color: #00478F;
  }

  .covid-search-bar__button-mobile:active {
    background-color: #C2E0FF;
    border-color: #002142;
    color: #002142;
  }
}

@media screen and (max-width: 30em) {
  .covid-search-bar__input--clear {
    right: 47%;
    top: 29px;
  }

  .covid-search-bar__popup-search::before {
    right: 5.5rem;
  }

  .covid-search-bar__button-mobile {
    width: 50%;
  }
}
