/* Network map: country list by region on the left, map with pins on the right (templates network-map.tpl, js/network-map.js) */
.net-map__layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 30px;
  align-items: center;
}

.net-map__list {
  padding: 20px 18px;
  background: #efefef;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

.net-map__region + .net-map__region {
  margin-top: 18px;
}

.net-map__region-title {
  margin: 0 0 8px 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8dbf41;
}

.net-map__items {
  margin: 0;
  padding: 0;
  list-style: none;
}

.net-map__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 8px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: #363f45;
  font: 600 14px/18px 'Open Sans', sans-serif;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease;
}

.net-map__item:hover,
.net-map__item:focus,
.net-map__item.is-highlight {
  background: #ffffff;
  outline: none;
}

.net-map__flag {
  flex: none;
  width: 24px;
  height: 16px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.net-map__map {
  position: relative;
}

.net-map__frame {
  position: relative;
}

.net-map__image {
  display: block;
  width: 100%;
  height: auto;
}

.net-map__pin {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  padding: 0;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: #8dbf41;
  box-shadow: 0 0 0 5px rgba(141, 191, 65, 0.28), 0 2px 6px rgba(49, 53, 61, 0.25);
  cursor: pointer;
  transition: box-shadow 0.2s ease;
}

.net-map__pin--office {
  background: #31353d;
  box-shadow: 0 0 0 5px rgba(49, 53, 61, 0.2), 0 2px 6px rgba(15, 23, 42, 0.3);
}

.net-map__pin:hover,
.net-map__pin:focus,
.net-map__pin.is-highlight {
  z-index: 3;
  outline: none;
  box-shadow: 0 0 0 8px rgba(141, 191, 65, 0.35), 0 4px 12px rgba(49, 53, 61, 0.3);
}

.net-map__pin--office:hover,
.net-map__pin--office:focus,
.net-map__pin--office.is-highlight {
  box-shadow: 0 0 0 8px rgba(49, 53, 61, 0.25), 0 4px 12px rgba(15, 23, 42, 0.35);
}

/* City name above the pin while it is hovered or its country is hovered in the list */
.net-map__pin::after {
  content: attr(data-label);
  position: absolute;
  bottom: calc(100% + 11px);
  left: 50%;
  padding: 5px 10px;
  border-radius: 999px;
  background: #31353d;
  color: #ffffff;
  font: 600 12px/16px 'Open Sans', sans-serif;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.net-map__pin:hover::after,
.net-map__pin:focus-visible::after,
.net-map__pin.is-highlight::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.net-map__count {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 116px;
  height: 116px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
  text-align: center;
}

.net-map__count strong {
  font-size: 42px;
  font-weight: 600;
  line-height: 1;
  color: #8dbf41;
}

.net-map__count span {
  max-width: 90px;
  margin-top: 6px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b7278;
}

.net-map__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 12px;
  font-size: 13px;
  color: #6b7278;
}

.net-map__legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.net-map__legend i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #8dbf41;
}

.net-map__legend i.is-office {
  background: #31353d;
}

/* Location details, opened in the middle of the screen (moved to <body> by the script) */
.net-map-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: rgba(20, 24, 30, 0.45);
}

.net-map-modal[hidden] {
  display: none;
}

.net-map-modal__dialog {
  position: relative;
  width: min(320px, 100%);
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  padding: 20px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 24px 44px rgba(15, 23, 42, 0.25);
  color: #363f45;
}

.net-map-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f1f3f6;
  color: #31353d;
  font-size: 16px;
  cursor: pointer;
}

.net-map-modal__close:hover,
.net-map-modal__close:focus-visible {
  background: #8dbf41;
  color: #ffffff;
  outline: none;
}

.net-map-modal__eyebrow {
  display: inline-block;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #8dbf41;
}

.net-map-modal__eyebrow.is-office {
  color: #31353d;
}

.net-map-modal__title {
  margin: 0 40px 14px 0;
  font-size: 18px;
  line-height: 1.25;
  color: #363f45;
}

.net-map-modal__note {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #6b7278;
}

.net-map-modal__ips {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.net-map-modal__ip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 12px 12px 14px;
  border: 1px solid #e3e8f0;
  border-radius: 14px;
  background: #f7f9fc;
}

.net-map-modal__ip-label {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6f7984;
}

.net-map-modal__ip-value {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #31353d;
  word-break: break-all;
}

.net-map-modal__copy {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  border: 1px solid #d6deea;
  border-radius: 12px;
  background: #ffffff;
  color: #31353d;
  font-size: 18px;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.net-map-modal__copy:hover,
.net-map-modal__copy:focus {
  border-color: #8dbf41;
  box-shadow: 0 10px 18px rgba(141, 191, 65, 0.18);
  outline: none;
}

.net-map-modal__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.net-map-modal__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 170px;
  padding: 11px 18px;
  border: 1px solid #31353d;
  border-radius: 999px;
  background: #31353d;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.net-map-modal__cta:hover,
.net-map-modal__cta:focus {
  border-color: #8dbf41;
  background: #8dbf41;
  color: #ffffff;
  text-decoration: none;
  outline: none;
}

.net-map-modal__cta.is-ghost {
  border-color: #d6deea;
  background: transparent;
  color: #31353d;
}

.net-map-modal__cta.is-ghost:hover,
.net-map-modal__cta.is-ghost:focus {
  border-color: #31353d;
  background: #31353d;
  color: #ffffff;
}

@media (max-width: 979px) {
  .net-map__layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  /* Map first, list below in columns */
  .net-map__list {
    order: 2;
    column-count: 3;
    column-gap: 10px;
    padding: 16px 10px;
  }

  /* Space below each region, so every column starts at the same height */
  .net-map__region {
    break-inside: avoid;
    padding-bottom: 14px;
  }

  .net-map__region + .net-map__region {
    margin-top: 0;
  }
}

@media (max-width: 767px) {
  .net-map__list {
    column-count: 2;
  }

  .net-map__item {
    padding: 6px;
    font-size: 13px;
  }

  /* Show Europe and Africa larger */
  .net-map__map {
    overflow: hidden;
  }

  .net-map__frame {
    width: 235%;
    margin-left: -67.5%;
  }

  .net-map__count {
    top: 8px;
    right: 8px;
    width: 84px;
    height: 84px;
  }

  .net-map__count strong {
    font-size: 30px;
  }

  .net-map__count span {
    max-width: 70px;
    font-size: 8px;
  }
}
