/* -----------------------------------------------------------------------------
  LEGACY MOE MAPS

  Permits to take Water
  Page on contrib: /page/map-permits-take-water

  District Locator
  Page on contrib: /page/ministry-environment-conservation-and-parks-district-locator

  Great lakes watershed locator
  Page on contrib: page/great-lakes-watershed-locator

  Map: Lake partner
  Page on contrib: page/map-lake-partner
----------------------------------------------------------------------------- */

/* these are hard overrides for the embedded map elements */
/* The search area of the map (id="SearchControl") must contain the class '.moe-map__search' in order for these styles to work */
.moe-map__search {
  margin-top: 0.5rem;
}

.moe-map__search .element-invisible {
  display: none;
}

.moe-map__search input[type="text"] {
  border: 2px solid #1a1a1a;
  border-radius: 4px;
  box-sizing: border-box;
  color: #1a1a1a;
  display: block;
  font-size: 1rem;
  font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  line-height: 1.5;
  margin: 0 0 2.5rem;
  max-width: 48rem;
  width: 100%;
  padding: 0.625rem 1rem;
  -webkit-transition: box-shadow 0.1s ease-in-out;
  transition: box-shadow 0.1s ease-in-out;
}

.moe-map__search input[type="text"]:focus, .moe-map__search input[type="text"]:active {
  box-shadow: 0 0 0 4px #009adb;
  outline: 4px solid transparent;
  -webkit-transition: box-shadow 0.1s ease-in-out;
  transition: box-shadow 0.1s ease-in-out;
}

.moe-map__search [type="checkbox"],
.moe-map__search [type="radio"] {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  padding: 0;
}

.moe-map__search fieldset {
  border: none;
  margin: 0 0 0 1.5rem;
  padding: 0 0.5rem;
  position: relative;
}

.moe-map__search input[type="radio"] {
  cursor: pointer;
  margin: -0.25rem 0 0 0;
  position: absolute;
  opacity: 0;
  width: 36px;
  height: 36px;
  z-index: 1;
  left: -1.50rem;
}

.moe-map__search input[type=radio] + label {
  position: relative;
  display: block;
  margin: 0 0 1rem;
  padding: 0 2rem 0;
  font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  float: none;
}

.moe-map__search input[type=radio] + label.option {
  overflow-wrap: break-word;
  word-wrap: break-word;
  -ms-word-break: break-all;
  word-break: break-all;
  -ms-hyphens: auto;
  -webkit-hyphens: auto;
  hyphens: auto;
  font-size: 1rem;
  margin: 0.2rem 0 1.5rem 0;
  padding: 0 0.75rem;
  touch-action: manipulation;
  display: block;
}

.moe-map__search input[type=radio] + label.option:before {
  content: "";
  border: 2px solid #1a1a1a;
  border-radius: 50%;
  box-sizing: border-box;
  position: absolute;
  top: -0.2rem;
  left: -40px;
  width: 32px;
  height: 32px;
  -webkit-transition: border .1s ease-in-out;
  transition: border .1s ease-in-out;
}

.moe-map__search input[type="radio"] + label.option:after {
  content: "";
  border-radius: 50%;
  border: 10px solid #1a1a1a;
  position: absolute;
  top: -0.2rem;
  left: -40px;
  -webkit-transform: translate(6px,6px);
  transform: translate(6px,6px);
  opacity: 0;
}

.moe-map__search input[type=radio] + label.option:before,
.moe-map__search input[type=radio] + label.option:after {
  left: -2rem;
  top: -0.2rem;
}

.moe-map__search input[type="radio"]:focus + label:before {
  -webkit-box-shadow: 0 0 0 4px #009adb;
  box-shadow: 0 0 0 4px #009adb;
  outline: 4px solid transparent;
  -webkit-transition: box-shadow .1s ease-in-out;
  -webkit-transition: -webkit-box-shadow .1s ease-in-out;
  transition: -webkit-box-shadow .1s ease-in-out;
  transition: box-shadow .1s ease-in-out;
}

.moe-map__search input[type="radio"]:checked + label:after {
  opacity: 1;
}

.moe-map__search select {
  border: 2px solid #1a1a1a;
  border-radius: 4px;
  box-sizing: border-box;
  color: #1a1a1a;
  display: block;
  font-size: 1rem;
  font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  line-height: 1.5;
  max-width: 48rem;
  width: 100%;
  padding: 0.625rem 1rem;
  -webkit-transition: box-shadow 0.1s ease-in-out;
  transition: box-shadow 0.1s ease-in-out;
  margin: 1.5rem 0;
  background-color: #fff;
  background-image: url(../assets/icons/ontario-material-dropdown-arrow-48px.svg);
  background-position: right .5rem center;
  background-repeat: no-repeat;
  background-size: 2rem;
  cursor: pointer;
}

.moe-map__search select:focus, .moe-map__search select:active {
  box-shadow: 0 0 0 4px #009adb;
  outline: 4px solid transparent;
  -webkit-transition: box-shadow 0.1s ease-in-out;
  transition: box-shadow 0.1s ease-in-out;
}

.moe-map__search select:disabled {
  border: 2px solid #cccccc;
  background-color: #f2f2f2;
  cursor: not-allowed;
}

/* checkboxes */
.moe-map__search input[type="checkbox"] {
  cursor: pointer;
  margin: 0;
  left: -2px;
  opacity: 0;
  width: 36px;
  height: 36px;
  z-index: 1;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  top: 0.75rem;
}

@media screen and (max-width: 40em) {
  .moe-map__search input[type="checkbox"] {
    width: 40px;
    height: 40px;
  }
}

.moe-map__search input[type="checkbox"] + label.option {
  overflow-wrap: break-word;
  word-wrap: break-word;
  -ms-word-break: break-all;
  word-break: break-all;
  -ms-hyphens: auto;
  hyphens: auto;
  display: inline-block;
  cursor: pointer;
  line-height: 1.5;
  margin: 0.25rem 0;
  width: 100%;
  position: relative;
  padding: 0;
}

@media screen and (max-width: 40em) {
  .moe-map__search input[type="checkbox"] + label.option {
    margin: 0.33rem 0;
  }
}

.moe-map__search input[type="checkbox"] + label.option:before {
  content: "";
  border: 2px solid #1a1a1a;
  border-radius: 4px;
  position: absolute;
  width: 32px;
  height: 32px;
  -webkit-transition: border 0.1s ease-in-out;
  transition: border 0.1s ease-in-out;
  display: block;
  -webkit-border-radius: 4px;
  left: -2.5rem;
  top: -0.2rem;
}

@media screen and (min-width: 40em) {
  .moe-map__search input[type="checkbox"] + label.option:before {
    width: 28px;
    height: 28px;
  }
}

.moe-map__search input[type="checkbox"] + label.option:after {
  height: 30px;
  width: 30px;
  position: absolute;
  right: 0;
  bottom: 0;
  opacity: 0;
  display: block;
  content: "";
  background-image: url(../assets/icons/ontario-checkbox-background-no-width.svg);
  background-repeat: no-repeat;
  left: -2.5rem;
  top: -0.2rem;
}

@media screen and (max-width: 40em) {
  .moe-map__search input[type="checkbox"] + label.option:after {
    height: 34px;
    width: 34px;
  }
}

.moe-map__search input[type="checkbox"]:checked + label.option:after {
  opacity: 1;
}

/* Specific to positioning of the checkbox and label for the Lake Partner map*/
.moe-map__search.map__lake-partner input[type="checkbox"] + label.option {
  left: 2.5rem;
  top: -3.5rem;
}

#searchHelp {
  cursor: pointer;
  color: #1a1a1a;
  font-family: "Raleway", "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  margin: 0 0 1rem 0;
  width: 100%;
  max-width: none;
}

.moe-map__search #search_submit {
  margin-right: 0.5rem;
}

.moe-map__search #search_clear {
  background-color: #fff;
  border: 2px solid #06c;
  color: #06c;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.moe-map__search #search_clear:hover {
  background-color: #e0f0ff;
  border-color: #00478f;
  color: #00478f;
}

.moe-map__search #search_clear:focus {
  background-color: #e0f0ff;
  border-color: #00478f;
  color: #00478f;
  -webkit-transition: background-color 0.2s ease-out, box-shadow 0.1s ease-in-out;
  transition: background-color 0.2s ease-out, box-shadow 0.1s ease-in-out;
}

.moe-map__search #search_clear:active {
  background-color: #c2e0ff;
  border-color: #002142;
  color: #002142;
  -webkit-transition: background-color 0s, box-shadow 0.1s ease-in-out;
  transition: background-color 0s, box-shadow 0.1s ease-in-out;
}
.moe-map__search #search_clear:visited {
  color: #06c;
}

.moe-map__search #information {
  max-width: none;
}

.moe-map__search.moe-map__permit-water input[type="text"]#map_query,
.moe-map__search.moe-map__district-locator input[type="text"]#map_query {
  float: left;
  margin-right: 1rem;
}

@media screen {
  .moe-map__search.moe-map__permit-water input[type="text"]#map_query,
  .moe-map__search.moe-map__district-locator input[type="text"]#map_query {
    width: 100%;
  }
}

@media screen and (min-width: 64em) {
  .moe-map__search.moe-map__permit-water input[type="text"]#map_query,
  .moe-map__search.moe-map__district-locator input[type="text"]#map_query {
    width: 50%;
  }
}

#map_canvas {
  width: 100%;
  height: 540px;
  line-height: 1.3;
  position: relative;
  overflow: hidden;
}

#map_canvas button {
  min-width: 0;
}

#map_canvas img {
  max-width: none;
}

.gm-style .gm-style-iw-c {
  font-size: 1rem;
  font-family: "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  padding: 1.5rem;
}

.gm-style .gm-style-iw-c button {
  top: 5px;
  right: 7px;
}

.gm-style .gm-style-iw-c button img {
  float: right;
  max-width: none;
}

#query_table {
  overflow-x: scroll;
  margin-bottom: 1.25rem;
}

/* -----------------------------------------------------------------------------
  LEGACY MOE MAP SUBMIT BUTTON
----------------------------------------------------------------------------- */
input[type=submit] {
  background-color: #06c;
  color: #fff;
  border: none;
  border-radius: 4px;
  box-sizing: border-box;
  box-shadow: none;
  display: inline-block;
  font-size: 1.125rem;
  font-family: "Open Sans","Helvetica Neue",Helvetica,Arial,sans-serif;
  font-weight: 600;
  line-height: 1.5555555556;
  margin: 0 calc(1rem + 0.75rem) 1.5rem 0;
  min-width: 10rem;
  padding: 0.625rem 1.5rem;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

input[type=submit]:hover {
  background-color: #00478f;
  color: #fff;
}

input[type=submit]:focus {
  background-color: #00478f;
  color: #fff;
  box-shadow: 0 0 0 4px #009adb;
  outline: 4px solid transparent;
}

@media screen and (max-width: 39.9375em) {
  input[type=submit] {
    display: block;
    width: 100%;
  }
}
