/***** Map components *****/

.leaflet-container {
  font-family: "Roboto", sans-serif;
}

.map-wrapper {
  position: fixed;
  z-index: 0;
  top: 62px;
  bottom: 0;
  left: 222px;
  right: 0;
}

#map,
.map-wrapper #map {
  position: absolute;
  z-index: 0;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
/* .map-wrapper.is-fullscreen {
  left: 222px;
  top: 62px;
  border-top-left-radius: 8px;
  background: var(--black);
  transition: all 0.4s;
}*/
@media (max-width: 768px) {
  .map-wrapper {
    left: 0;
    border-radius: 0;
    top: 48px;
  }
}

.map-wrapper.is-routeplanner .active-card-wrapper {
  left: calc(300px + 16px);
}
@media (max-width: 768px) {
  .map-wrapper.is-routeplanner .active-card-wrapper {
    left: 0;
  }
}

.map-wrapper.is-routeplanner .leaflet-left {
  left: 300px;
}
@media (max-width: 768px) {
  .map-wrapper.is-routeplanner .leaflet-left {
    left: 0;
  }
}

#map image {
  cursor: pointer;
}

.highlighted-waypoint {
  stroke: #00ff00 !important;
  stroke-width: 5 !important;
  stroke-opacity: 1 !important;
  filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.5));
}

.main.is-sidebar-collapsed .map-wrapper,
.main.is-sidebar-collapsed .sidebar {
  left: 64px;
}
@media (max-width: 768px) {
  .main.is-sidebar-collapsed .map-wrapper,
  .main.is-sidebar-collapsed .sidebar {
    left: 0;
  }
}

.leaflet-left .leaflet-control {
  margin-left: 16px;
}
@media (max-width: 768px) {
  .leaflet-left .leaflet-control {
    margin-left: 16px;
  }
}

.leaflet-right .leaflet-control {
  margin-right: 24px;
}
@media (max-width: 768px) {
  .leaflet-right .leaflet-control {
    margin-right: 16px;
  }
}
.leaflet-top {
  margin-top: 16px;
}

.leaflet-top .leaflet-control {
  margin-top: 0;
}

.leaflet-bottom {
  margin-bottom: 16px;
}
@media (max-width: 768px) {
  .leaflet-bottom {
    margin-bottom: 16px;
  }
}
.leaflet-bottom .leaflet-control {
  /*margin-bottom: 0;*/
}

/*** Layers ***/

.leaflet-control-layers {
  background: none;
  margin-right: 24px;
  z-index: 801;
}
@media (max-width: 768px) {
  .leaflet-control-layers {
    margin-right: 16px;
  }
}

.leaflet-touch .leaflet-control-layers,
.leaflet-touch .leaflet-bar {
  border: none !important;
  background-clip: padding-box;
  border-radius: 20px;
}

.leaflet-touch .leaflet-control-layers:hover,
.leaflet-touch .leaflet-bar:hover {
  transform: none;
}

.leaflet-touch .leaflet-control-layers-toggle {
  width: 32px;
  height: 32px;
  border: 1px solid var(--grey-light);
  border-radius: 50%;
  display: flex;
  background: #fff;
  position: relative;
  z-index: 1;
}
@media (max-width: 768px) {
  .leaflet-touch .leaflet-control-layers-toggle {
    width: 48px;
    height: 48px;
  }
}

.leaflet-control-layers-expanded {
  height: auto !important;
  padding: 0;
}
.leaflet-control-layers-expanded .leaflet-control-layers-toggle {
  display: block;
  transition: none;
}

.leaflet-control-layers.is-expanded .leaflet-control-layers-toggle {
  background: #fff;
}
.leaflet-control-layers .leaflet-control-layers-toggle:before {
  content: "";
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background: url("/static/images/icons/filter.svg") 50% 8px no-repeat;
  opacity: 1;
  transition: all 0.2s;
}
@media (max-width: 768px) {
  .leaflet-control-layers .leaflet-control-layers-toggle:before {
    background-size: 26px 26px;
    background-position: 50% 12px;
  }
}

.leaflet-control-layers.is-expanded .leaflet-control-layers-toggle:before {
  opacity: 0;
}
.leaflet-control-layers .leaflet-control-layers-toggle:after {
  content: "";
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background: url("/static/images/icons/cross.svg") 50% 50% no-repeat;
  opacity: 0;
  transition: all 0.2s;
}
@media (max-width: 768px) {
  .leaflet-control-layers .leaflet-control-layers-toggle:after {
    background-size: 32px 32px;
  }
}

.leaflet-control-layers.is-expanded .leaflet-control-layers-toggle:after {
  opacity: 0.5;
}

.leaflet-control-layers-list {
  color: #333;
  overflow-y: auto;
  background: rgba(234, 223, 204, 0.4);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  box-shadow: -4px 0 10px rgba(0, 0, 0, 0.15);
  padding: 24px 24px 16px;
  border-radius: 20px 0 0 20px;
  position: absolute;
  top: 56px;
  transform: translateX(110%);
  margin-right: -24px;
  right: 0;
  z-index: 0;
  transition: all 0.4s;
}
@media (max-width: 768px) {
  .leaflet-control-layers-list {
    top: 56px;
    margin-right: -16px;
  }
}

.leaflet-control-layers .leaflet-control-layers-list,
.leaflet-control-layers-expanded .leaflet-control-layers-toggle {
  display: block;
}
.leaflet-control-layers-expanded .leaflet-control-layers-list {
  position: absolute;
}
.leaflet-control-layers.is-expanded .leaflet-control-layers-list {
  transform: translateX(0);
}

.leaflet-control-layers label {
  display: block;
  margin: 0;
}
.leaflet-control-layers label:not(:last-child) {
  margin-bottom: 8px;
}

.leaflet-control-layers label:hover {
}

/* .leaflet-control-layers-selector {
  margin-top: 0px !important;
  position: relative;
  top: 1px;
  float: right;
} */

.leaflet-control-layers label input[type="checkbox"],
.leaflet-control-layers label input[type="radio"] {
  position: absolute;
  opacity: 0;
  z-index: -1;
}

.leaflet-control-layers label input[type="checkbox"] + span {
  display: block;
  height: 40px;
  border-radius: 20px;
  padding: 10px 36px 10px 9px;
  border: 1px solid #fff;
  background: #fff;
  position: relative;
  line-height: 18px;
  font-size: 14px;
  font-weight: normal;
  color: var(--dark);
  transition: all 0.2s;
  cursor: pointer;
  white-space: nowrap;
}
.leaflet-control-layers label:hover input[type="checkbox"] + span {
  background: #fafafa;
  border-color: #fafafa;
}

.leaflet-control-layers input[type="checkbox"] + span:before {
  content: "";
  display: block;
  position: absolute;
  right: 8px;
  top: 7px;
  width: 24px;
  height: 24px;
  z-index: 1;
  background: url("/static/images/icons/check.svg") 50% 50% no-repeat;
  opacity: 0.7;
  transition: all 0.2s;
}
.leaflet-control-layers input[type="checkbox"]:checked + span {
  color: var(--green);
  font-weight: bold;
}
.leaflet-control-layers input[type="checkbox"]:checked + span:before {
  filter: invert(36%) sepia(53%) saturate(329%) hue-rotate(83deg) brightness(94%) contrast(87%);
  opacity: 1;
}

/* First 2 buttons */

.leaflet-control-layers-overlays label:nth-child(1),
.leaflet-control-layers-overlays label:nth-child(2) {
}

.leaflet-control-layers-overlays label:nth-child(1) {
  margin-bottom: 16px;
}
.leaflet-control-layers-overlays label:nth-child(2) {
  margin-bottom: 21px;
}

.leaflet-control-layers-overlays label:last-child {
  margin-bottom: 0;
}

.leaflet-control-layers label:nth-child(1) input[type="checkbox"] + span,
.leaflet-control-layers label:nth-child(2) input[type="checkbox"] + span {
  height: 24px;
  border-radius: 12px;
  padding: 2px 11px;
  font-weight: normal;
  border-color: var(--red-light);
  color: var(--red-light);
  display: inline-block;
}
.leaflet-control-layers label:nth-child(1):hover input[type="checkbox"] + span,
.leaflet-control-layers label:nth-child(2):hover input[type="checkbox"] + span {
  background: #fafafa;
}
.leaflet-control-layers-overlays label:nth-child(1) input[type="checkbox"] + span:before,
.leaflet-control-layers-overlays label:nth-child(2) input[type="checkbox"] + span:before {
  display: none;
}

.leaflet-control-layers-overlays label:nth-child(1) input[type="checkbox"]:checked + span,
.leaflet-control-layers-overlays label:nth-child(2) input[type="checkbox"]:checked + span {
  background: var(--red-light);
  color: #fff;
}
.leaflet-control-layers-overlays label:nth-child(1):hover input[type="checkbox"]:checked + span,
.leaflet-control-layers-overlays label:nth-child(2):hover input[type="checkbox"]:checked + span {
  background: var(--red-light-hover);
  border-color: var(--red-light-hover);
}

/* Datatype toggler */

.leaflet-control-datatype {
}
.leaflet-control-datatype .datatype-toggler {
  width: 48px;
  height: 48px;
  border: 1px solid var(--grey-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  position: relative;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 1;
}
.leaflet-control-datatype .datatype-toggler:hover {
  background: #f5f5f5;
}

.leaflet-control-datatype .datatype-toggler i {
}

/* My location */
.leaflet-right .leaflet-control.leaflet-control-location {
  margin-bottom: 16px;
}

@media (max-width: 768px) {
  .leaflet-bar--location {
    display: none;
  }
}

.locate-button {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.locate-button i {
  width: 16px;
  height: 16px;
  transition: all 0.2s;
}
.locate-button:hover i {
  filter: invert(76%) sepia(10%) saturate(2359%) hue-rotate(171deg) brightness(103%) contrast(101%);
}

/* Zoom */

.leaflet-bar.leaflet-control {
  /* margin-right: 24px; */
}

.leaflet-touch .leaflet-bar a {
  width: 26px;
  height: 26px;
  line-height: 26px;
}

.leaflet-touch .leaflet-bar a:first-child {
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
}
.leaflet-touch .leaflet-bar a:last-child {
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

.leaflet-bottom .leaflet-control.leaflet-control-zoom {
  margin-bottom: 16px;
}
@media (max-width: 768px) {
}

.leaflet-touch .leaflet-bar a.leaflet-control-zoom-in,
.leaflet-touch .leaflet-bar a.leaflet-control-zoom-out {
  width: 24px;
  height: 24px;
  border: none;
  font-weight: normal;
  font-family: "Roboto", sans-serif;
}
@media (max-width: 768px) {
  .leaflet-touch .leaflet-bar a.leaflet-control-zoom-in,
  .leaflet-touch .leaflet-bar a.leaflet-control-zoom-out {
    width: 48px;
    height: 48px;
    line-height: 48px;
    font-size: 30px;
  }
}

.leaflet-touch .leaflet-bar a.leaflet-control-zoom-in {
  border-radius: 12px 12px 0 0;
}
@media (max-width: 768px) {
  .leaflet-touch .leaflet-bar a.leaflet-control-zoom-in {
    border-radius: 50%;
    margin-bottom: 2px;
  }
}

.leaflet-touch .leaflet-bar a.leaflet-control-zoom-out {
  border-radius: 0 0 12px 12px;
}
@media (max-width: 768px) {
  .leaflet-touch .leaflet-bar a.leaflet-control-zoom-out {
    border-radius: 50%;
  }
}

.main--map {
  background: #333;
}

.main--map .leaflet-touch .leaflet-control-layers-toggle {
  width: 48px;
  height: 48px;
}
.main--map .leaflet-control-layers .leaflet-control-layers-toggle:before {
  background-size: 26px 26px;
  background-position: 50% 12px;
}
.main--map .leaflet-control-layers .leaflet-control-layers-toggle:after {
  background-size: 32px 32px;
}

.main--map .leaflet-touch .leaflet-bar a.leaflet-control-zoom-in,
.main--map .leaflet-touch .leaflet-bar a.leaflet-control-zoom-out,
.main--weather .leaflet-touch .leaflet-bar a.leaflet-control-zoom-in,
.main--weather .leaflet-touch .leaflet-bar a.leaflet-control-zoom-out {
  width: 48px;
  height: 48px;
  line-height: 48px;
  font-size: 30px;
  font-weight: normal;

  border-radius: 50%;
}
.main--map .leaflet-touch .leaflet-bar a.leaflet-control-zoom-in,
.main--weather .leaflet-touch .leaflet-bar a.leaflet-control-zoom-in {
  margin-bottom: 2px;
}

/*** Weather ***/

@media (max-width: 768px) {
  .main--weather .leaflet-top {
    margin-top: 24px;
  }
}

@media (max-width: 768px) {
  .main--weather .leaflet-control-club,
  .main--weather .leaflet-control-profile,
  .main--weather .leaflet-control-home,
  .main--weather .leaflet-control-photos,
  .main--weather .leaflet-control-weather {
    display: block;
  }
}

#weather-map {
  width: 50%;
  position: fixed;
  z-index: 0;
  top: 0;
  bottom: 0;
  left: 0;
}
@media (max-width: 768px) {
  #weather-map {
    width: 100%;
  }
}

.charts-container-large {
  height: 100vh !important;
  overflow: auto !important;
  width: 50%;
  flex: 0 0 50%;
  margin-left: 50%;
  background: #fff;
  z-index: 1;
}
@media (max-width: 768px) {
  .charts-container-large {
    width: 100%;
    transform: translateY(100%);
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    transition: all 0.5s;
  }
}

@media (max-width: 768px) {
  .main.has-charts .charts-container-large {
    transform: translateY(0);
  }
}

.weather-toggler {
  width: 36px;
  height: 36px;
  border-radius: 50% 50% 0 0;
  border: 1px solid var(--primary);
  background: rgba(255, 255, 255, 0.8);
  position: fixed;
  z-index: 1000;
  top: calc(100% - 35px);
  left: 50%;
  transform: translateX(-50%);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.5s;
}
@media (max-width: 768px) {
  .weather-toggler {
    display: flex;
  }
}

.main.has-charts .weather-toggler {
  top: -1px;
  transform: translateX(-50%) scaleY(-1);
}

/** Map nav buttons **/

.leaflet-touch .leaflet-bar.leaflet-control-home,
.leaflet-touch .leaflet-bar.leaflet-control-weather,
.leaflet-touch .leaflet-bar.leaflet-control-photos,
.leaflet-touch .leaflet-bar.leaflet-control-profile,
.leaflet-touch .leaflet-bar.leaflet-control-club {
  margin-bottom: 16px;
  font-size: 14px;
}

.leaflet-touch .leaflet-bar.leaflet-control-home a,
.leaflet-touch .leaflet-bar.leaflet-control-weather a,
.leaflet-touch .leaflet-bar.leaflet-control-photos a,
.leaflet-touch .leaflet-bar.leaflet-control-profile a,
.leaflet-touch .leaflet-bar.leaflet-control-club a {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Satellite toggler */
.satellite-toggler {
  width: 48px;
  height: 24px;
  border-radius: 12px;
  padding: 4px;
  background: var(--yellow);
  cursor: pointer;
  transition: all 0.2s;
  margin: 0 0 8px;
}
.satellite-toggler:hover {
  box-shadow: 0 4px 4px rgba(142, 141, 208, 0.16);
}

.satellite-toggler span {
  display: block;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: all 0.2s;
}
.satellite-toggler.is-active {
  background: var(--blue);
}
.satellite-toggler.is-active:hover {
  /* background: var(--primary); */
  box-shadow: none;
}

.satellite-toggler.is-active span {
  margin-left: 24px;
}
.satellite-label {
  font-size: 12px;
  text-align: center;
}

/* Scale */
.leaflet-bottom .leaflet-control.leaflet-control-scale {
  position: fixed;
  bottom: 1px;
  right: 1px;
  margin: 0;
}
.leaflet-control-scale-line {
  background: rgba(255, 255, 255, 0.5);
  border-width: 0 1px 1px;
  border-style: solid;
  border-color: rgba(0, 0, 0, 0.5);
  text-shadow: 1px 1px rgba(255, 255, 255, 0.5);
  padding: 0 5px;
  text-align: center;
  font-size: 10px;
}

/* Add Report Button */

.leaflet-control-add {
  margin-top: 16px;
}

.leaflet-touch .leaflet-bar a.add-report-button {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  box-shadow: 4px 6px 10px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
}
.leaflet-touch .leaflet-bar a.add-report-button:hover {
  background: var(--primary-hover);
}

/* .leaflet-control-layers input[type="radio"] {
  border-radius: 50% !important;
}

.leaflet-control-layers input[type="radio"]:checked {
  border: 1px solid #ccc;
  width: 14px !important;
  height: 14px !important;
  background-color: #fff !important;
} */

/* .leaflet-touch .leaflet-bar a,
.leaflet-control-geocoder,
.leaflet-control-geocoder-expanded {
  border: 0.3px solid #ccc !important;
  height: 41.5px !important;
  width: 41.5px !important;
  padding: 5px !important;
  border-radius: 20px !important;
} */

/* .leaflet-touch .leaflet-control-fullscreen a {
  background-position: 6.9px 9px !important;
  height: 42px !important;
}


.leaflet-control-geocoder-expanded .leaflet-control-geocoder-form {
  display: inline-block;
  background: white;
}

.leaflet-control-geocoder-form {
  display: none;
  vertical-align: middle;
  margin-left: 42px;
  margin-top: -45px;
  border-radius: 10px;
  height: 25px;
}

.leaflet-control-geocoder-alternatives,
.leaflet-control-geocoder-options-open {
  background-color: #fff !important;
}

.trail-map-legend:hover {
  transform: scale(1) !important;
  transition: transform 0.1s !important;
}

.leaflet-control-layers-separator {
  border: none;
  margin: 0;
} */

.leaflet-control-geocoder {
  /* min-width: 25px !important;
  min-height: 25px !important; */
  min-width: 36px !important;
  min-height: 36px !important;
  border: 1px solid var(--grey-light);
  margin: 24px 0 40px 24px;
}
@media (max-width: 768px) {
  .leaflet-control-geocoder {
    margin: 78px 0 16px 16px;
  }
}

.leaflet-control-geocoder-form input {
  width: 361px;
  font-size: 14px;
  padding: 0;
  color: var(--dark);
  height: 34px;
}
@media (max-width: 1280px) {
  .leaflet-control-geocoder-form input {
    width: 261px;
  }
}
@media (max-width: 768px) {
  .leaflet-control-geocoder-form input {
    width: 200px;
  }
}

.leaflet-control-geocoder-form input::placeholder {
  color: #7bd7ff;
  opacity: 1;
  font-style: italic;
}
.leaflet-control-geocoder-form input::-webkit-input-placeholder {
  color: #7bd7ff;
  opacity: 1;
}
.leaflet-control-geocoder-form input:-ms-input-placeholder {
  color: #7bd7ff;
  opacity: 1;
}
.leaflet-control-geocoder-form input::-moz-placeholder {
  color: #7bd7ff;
  opacity: 1;
}

#leaflet-control-geocoder-icon,
#print-btn,
.leaflet-control-geocoder-icon {
  border-radius: 18px !important;
}

#print-conainer::after {
  margin-top: 10px;
}

#print-container {
  margin-top: 10px !important;
}

.leaflet-touch .leaflet-control-geocoder-icon {
  width: 39px !important;
  height: 34px !important;
  background: url("../images/icons/search.svg") 50% 50% no-repeat;
}

.leaflet-control-attribution {
  display: none;
}

.weather-button {
  cursor: pointer;
}

.charts-loader-container {
  position: relative;
  top: 50%;
  margin: auto;
  text-align: center;
}

.is-satellite .white-marker {
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
}
.is-satellite .white-marker img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.toggle-button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  margin-bottom: 5px;
  padding: 0;
  color: #333;
  margin: 1px;
}

.toggle-button:hover {
  color: #007bff;
}

.leaflet-container .leaflet-marker-pane.report-marker-icon img {
  max-width: 100% !important;
  max-height: 100% !important;
}
