html,
body,
#map {
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  background-color: #e5e5e5;
}

body {
  max-height: 100vh;
  overflow: hidden;
  font-family: Public Sans;
}

h3 {
  margin: 0;
}

ul,
li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.leaflet-pane.leaflet-polygons-pane>.leaflet-zoom-animated>g {
  filter: drop-shadow(8px 0px 12px rgb(0 0 0 / 0.12));
}

.item {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hidden {
  display: none;
}

.opacity-0 {
  opacity: 0;
  pointer-events: none;
}

.tooltips__country {
  position: absolute;
  left: calc(100% + 13px);
  top: 6px;
  color: #0f0f0f;
  font-size: 32px;
  font-weight: 700;
  line-height: 28px;
  text-transform: uppercase;
}

.leaflet-tooltip {
  white-space: normal;
}

.tooltips__left_text {
  color: #fafafa;
  text-align: right;
  font-family: Piazzolla;
  font-size: 16px;
  font-style: italic;
  font-weight: 500;
  line-height: 24px;
  width: min(20rem, 80vw);
  overflow-wrap: break-word;
}

.tooltips__left_author {
  max-width: min(20rem, 80vw);
  color: #a3a3a3;
  text-align: right;
  font-size: 12px;
  font-weight: 400;
  line-height: 20px;
  overflow-wrap: break-word;
}

.label {
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease;
}

.tooltips__left {
  justify-items: end;
  text-align: right;
  position: relative;
  display: grid;
  gap: 4px;
  background-color: #0f0f0f;
  color: #fafafa;
  padding: 12px 16px;
}

.data-exists {
  -webkit-backface-visibility: hidden;
  -moz-backface-visibility: hidden;
  -webkit-transform: translate3d(0, 0, 0);
  -moz-transform: translate3d(0, 0, 0);
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

/* Styles for all browsers */
.data-exists:hover {
  filter: url(#blur);
}

/* Override styles for Safari */
@supports not (backdrop-filter: none) {
  .data-exists:hover {
    filter: none;
  }
}

.country__pin {
  background: #292929;
  width: 8px;
  height: 8px;
}

.pin-disabled .label {
  opacity: 0;
}

header {
  position: fixed;
  z-index: 2000;
  top: 0;
  left: 0;
  right: 0;
}

.menu {
  justify-self: end;
  align-self: end;
  display: flex;
  gap: 16px;
  align-items: center;
}

.header-up {
  background-color: #141414;
  text-align: center;
  color: #d6d6d6;
  text-align: center;
  font-size: 10px;
  font-weight: 600;
  line-height: 16px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.header-down {
  position: relative;
  justify-content: end;
  display: flex;
  align-items: center;
  padding: 16px 12px 16px 12px;
  background: #f0f0f0;
  border-bottom: 2px solid #d6d6d6;
}

.range {
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 75%;
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  max-width: calc(100vw - 386px);
  /* todo: temp styles, remove after fool timeline will be added */
}

.link {
  padding: 8px;
  white-space: nowrap;
  background-color: white;
  border: 1px #D6D6D6 solid;
  color: #737373;
  font-weight: 700;
  line-height: 16px;
  color: #a3a3a3;
  text-decoration: none;
  border: 1px solid #D6D6D6;
  padding: 10px 16px;
  background: white;
  white-space: nowrap;
}

.warn {
  font-size: 10px;
  font-weight: 600;
  line-height: 16px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: #737373;
}

.range__item {
  background-image: url(/img/tab.svg);
  width: 32px;
  height: 49px;
  font-size: 18px;
  font-weight: 700;
  line-height: 24px;
  color: #737373;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  cursor: pointer;
}

.range__item-text:not(.active) {
  background-image: url(/img/tag-gray.svg);
}

.range__item.active {
  color: #b10204;
  background: none;
  position: relative;
}

.range__item.active:after {
  content: "";
  position: absolute;
  bottom: 0px;
  left: calc(50% - 4px);
  display: block;
  width: 8px;
  height: 8px;
  background-color: #b10204;
  margin: 0 auto;
}

.popup-details {
  position: fixed;
  width: 100vw;
}

.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {
  position: absolute;
  transform: none !important;
  right: 0;
  top: 0;
  height: 100vh;
  left: initial !important;
  bottom: initial !important;
}

.custom-popup {
  position: fixed;
  right: 0;
  background: rgba(245, 245, 245, 0.92);
  width: 372px;
  backdrop-filter: blur(6px);
  bottom: 0;
  height: calc(100vh - 66px);
  z-index: 2001;
  transition: all 0.3s ease;
  overflow: auto;
}

.custom-popup-wrapper {
  position: absolute;
  bottom: 0;
  overflow: auto;
  width: 100%;
  height: 100%;
}

.custom-popup-first {
  padding: 24px 24px 15px 24px;
  border-bottom: 1px solid #e5e5e5;
}

.custom-popup-second {
  padding: 24px;
}

.custom-popup-second__inn {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.custom-popup-second-more {
  margin-top: 24px;
  color: #a3a3a3;
  text-align: center;
  font-size: 10px;
  font-weight: 600;
  line-height: 16px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.close-icon {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
}

.custom-popup__header {
  font-size: 24px;
  font-weight: 700;
  line-height: 28px;
  text-transform: uppercase;
}

.custom-popup__percent {
  color: #b10204;
  font-size: 20px;
  font-weight: 700;
  line-height: 24px;
  margin: 24px 0;
}

.custom-popup__quotes {
  color: #737373;
  font-size: 20px;
  font-weight: 700;
  line-height: 24px;
  margin: 24px 0 0;
}

.custom-popup-quote {
  background-color: #fafafa;
  border-left: 2px solid #ff2322;
  padding: 12px 16px 12px 12px;
}

.custom-popup-quote-header {
  color: #0f0f0f;
  font-family: Piazzolla;
  font-size: 18px;
  font-style: italic;
  font-weight: 500;
  line-height: 24px;
}

.custom-popup-quote-text {
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  margin-top: 4px;
}

.close-icon {
  cursor: pointer;
}

.copyright {
  position: fixed;
  bottom: 16px;
  right: 12px;
  left: 12px;
  z-index: 2000;
}

.copyright__inn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.legend {
  pointer-events: none;
  width: max-content;
  margin-bottom: 10px;
  border: 1px solid #d6d6d6;
  padding: 16px 16px 8px 16px;
  background-color: #e5e5e5;
}

.legend__name {
  color: #292929;
  margin-bottom: 16px;
  font-weight: 700;
  line-height: 16px;
}

.legend__item-color {
  border: 1px solid #fffbfa;
  width: 12px;
  height: 12px;
}

.legend__item {
  display: flex;
  gap: 8px;
  color: #292929;
  font-size: 12px;
  margin-bottom: 8px;
  line-height: 16px;
}

.leaflet-left {
  top: 100px;
  z-index: 2001;
}

.legend__item_text-mob {
  display: none;
}

.warn {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.disclaimer {
  border: 1px solid #ffbfc0;
  background: #fef1f0;
  color: #92090a;
  position: fixed;
  top: 80px;
  left: 12px;
  z-index: 100000;
  max-width: 600px;
  flex: 0 0 auto;
  flex-wrap: wrap;
  display: flex;
  width: 456px;
  padding: 8px 12px;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.disclaimer__header {
  margin-bottom: 4px;
  color: var(--red-900, #92090A);
  font-family: Public Sans;
  font-size: 14px;
  font-style: normal;
  font-weight: 700;
  line-height: 20px;
  /* 142.857% */
  letter-spacing: 0.14px;
}

.disclaimer__text {
  color: #92090a;
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  font-family: Public Sans;
}

@media (max-width: 1279px) {
  .copyright__inn {
    display: none;
  }

  header {
    top: initial;
    bottom: 0;
    display: flex;
    flex-direction: column-reverse;
  }

  .header-down {
    height: 48px;
  }

  .menu {
    position: fixed;
    top: 8px;
    right: 16px;
    right: 50%;
    transform: translateX(50%);
    width: 100vw;
    justify-content: center;
    padding-top: 8px;
  }

  .copyright {
    bottom: 63px;
    right: 0;
    left: 0;
    max-width: 100%;
  }

  .disclaimer {
    top: 50px;
    max-width: 600px;
    margin-left: 0;
    display: block;
    font-size: 13px;
    left: initial;
    right: 50%;
    transform: translateX(50%);
    min-width: 320px;
    width: 335px;
  }

  .legend {
    border: none;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    max-width: 100%;
    width: 100%;
    margin-bottom: 0;
  }

  .legend__name {
    grid-column-start: 1;
    grid-column-end: 6;
    text-align: center;
  }

  .legend__item_text-desk {
    display: none;
  }

  .legend__item_text-mob {
    display: block;
  }

  .range {
    width: 100%;
    justify-content: space-evenly;
    max-width: initial;
  }

  .range__item:first-child,
  .range__item:nth-child(2),
  .range__item:nth-child(3),
  .range__item:nth-child(4),
  .range__item:nth-child(5) {
    display: none;
  }

  .range .range__item {
    position: relative;
    background: none;
  }

  .range__item:before {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0%;
    left: 0%;
    z-index: -1;
    transform: rotate(180deg);
    background: url(/img/tab.svg) 0 0 no-repeat;
  }

  .range__item.active:after {
    top: 0;
    bottom: initial;
  }

  .range__item-text:not(.active):before {
    background-image: url(/img/tag-gray.svg);
  }

  .warn {
    font-size: 10px;
    font-weight: 600;
    line-height: 12px;
    letter-spacing: 0.6px;
    max-width: 50%;
    margin: 40px auto 0 auto;
    text-align: center;
  }

  .custom-popup {
    width: 100%;
    z-index: 20001;
    height: 70vh;
  }

  .custom-popup-first {
    padding-top: 40px;
  }
}

@media (max-width: 1024px) {
  .menu {
    justify-content: end;
    transform: initial;
    right: 16px;
  }

  .link {
    display: flex;
    padding: 8px 12px;
    justify-content: center;
    align-items: center;
    gap: 4px;
    border: 1px solid var(--grey-300, #D6D6D6);
    background: var(--base-white, #FFF);
    color: var(--grey-700, #424242);
    font-family: Public Sans;
    font-size: 14px;
    font-style: normal;
    font-weight: 600;
    line-height: 20px;
  }

  .disclaimer {
    top: 73px;
    right: 16px;
    transform: initial;
    min-width: initial;
    box-sizing: border-box;
  }
}

@media (max-width: 480px) {
  .disclaimer {
    width: 100%;
    max-width: calc(100vw - 32px);
  }
}