.geo-switcher,
.geo-network {
  --geo-accent: #6cabd9;
  --geo-accent-strong: #2b75aa;
  --geo-panel: #10141c;
  --geo-text: #ffffff;
  font-family: inherit;
}

.geo-switcher {
  position: relative;
  z-index: 10020;
  flex: 0 0 auto;
  margin-inline: 10px;
  direction: ltr;
}

.geo-switcher__toggle {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 7px 11px;
  border: 1px solid color-mix(in srgb, var(--geo-accent) 72%, white 12%);
  border-radius: 15px;
  background: color-mix(in srgb, var(--geo-panel) 88%, var(--geo-accent) 12%);
  color: var(--geo-text);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  font: 800 14px/1 inherit;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.geo-switcher__toggle:hover,
.geo-switcher__toggle:focus-visible,
.geo-switcher.is-open .geo-switcher__toggle {
  border-color: var(--geo-accent);
  background: color-mix(in srgb, var(--geo-panel) 72%, var(--geo-accent) 28%);
  outline: none;
}

.geo-switcher__flag,
.geo-network__flag {
  display: block;
  flex: 0 0 auto;
  width: 31px;
  height: 31px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  background: #fff;
  object-fit: cover;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
}

.geo-switcher__caret {
  width: 9px;
  height: 9px;
  margin-inline: 2px 1px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(135deg) translate(-1px, 1px);
  transition: transform 0.2s ease;
}

.geo-switcher.is-open .geo-switcher__caret {
  transform: rotate(-45deg) translate(-1px, 1px);
}

.geo-switcher__menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: max-content;
  min-width: 112px;
  max-height: min(560px, calc(100vh - 94px));
  margin: 0;
  padding: 10px;
  overflow-y: auto;
  border: 1px solid color-mix(in srgb, var(--geo-accent) 36%, transparent);
  border-radius: 19px;
  background: color-mix(in srgb, var(--geo-panel) 94%, var(--geo-accent) 6%);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.42);
  list-style: none;
}

.geo-switcher__menu[hidden] {
  display: none !important;
}

html.geo-switcher-menu-open [data-promo-open],
html.geo-switcher-menu-open .promo-launcher {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

html.geo-switcher-menu-open [data-promo-wheel] {
  display: none !important;
}

.has-geo-switcher:has(#geo-switcher-menu-ph) {
  z-index: 1700 !important;
}

.geo-switcher__link {
  display: grid;
  grid-template-columns: 30px 34px;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  padding: 5px 7px;
  border-radius: 12px;
  color: var(--geo-text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
}

.geo-switcher__link:hover,
.geo-switcher__link:focus-visible {
  background: color-mix(in srgb, var(--geo-accent) 23%, transparent);
  color: #fff;
  outline: none;
}

.geo-network {
  width: min(100% - 32px, 1500px);
  margin: 28px auto;
  padding: 22px 24px;
  border: 1px solid color-mix(in srgb, var(--geo-accent) 52%, transparent);
  border-radius: 18px;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--geo-accent-strong) 70%, #07090e 30%),
    color-mix(in srgb, var(--geo-panel) 72%, var(--geo-accent) 28%)
  );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 14px 36px rgba(0, 0, 0, 0.14);
}

.geo-network__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.geo-network__link,
.geo-network__current {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  gap: 9px;
  padding: 7px 14px 7px 8px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  background: rgba(8, 12, 20, 0.47);
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.2;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.geo-network__link:hover,
.geo-network__link:focus-visible {
  border-color: #fff;
  background: rgba(8, 12, 20, 0.7);
  color: #fff;
  outline: none;
  transform: translateY(-1px);
}

.geo-network__current {
  border-color: color-mix(in srgb, var(--geo-accent) 70%, white 30%);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--geo-accent) 25%, transparent);
}

@media (max-width: 760px) {
  .geo-switcher {
    margin-inline: 5px;
  }
  .has-geo-switcher > .geo-switcher {
    position: absolute;
    top: 8px;
    left: 50%;
    right: auto;
    margin: 0;
    transform: translateX(-50%);
  }
  .has-geo-switcher:has(#geo-switcher-menu-ca) > .geo-switcher {
    top: 50%;
    right: 3.9rem;
    left: auto;
    transform: translateY(-50%);
  }
  .has-geo-switcher:has(#geo-switcher-menu-ca) .geo-switcher__toggle {
    height: 2.9rem;
    min-height: 2.9rem;
    border-radius: 999px;
  }
  .has-geo-switcher:has(#geo-switcher-menu-au) > .geo-switcher {
    top: 50%;
    right: 4.125rem;
    left: auto;
    transform: translateY(-50%);
  }
  .has-geo-switcher:has(#geo-switcher-menu-au) .geo-switcher__toggle {
    height: 44px;
    min-height: 44px;
    border-radius: 999px;
  }
  .has-geo-switcher:has(#geo-switcher-menu-nz) > .geo-switcher {
    top: 8px;
    right: 4.25rem;
    left: auto;
    transform: none;
  }
  .has-geo-switcher:has(#geo-switcher-menu-nz) .geo-switcher__toggle {
    height: 44px;
    min-height: 44px;
    border-radius: var(--radius, 10px);
  }
  .has-geo-switcher:has(#geo-switcher-menu-br) > .geo-switcher {
    top: 8px;
    right: 4.25rem;
    left: auto;
    transform: none;
  }
  .has-geo-switcher:has(#geo-switcher-menu-br) .geo-switcher__toggle {
    height: 44px;
    min-height: 44px;
    border-radius: var(--radius, 10px);
  }
  .has-geo-switcher:has(#geo-switcher-menu-cl) > .geo-switcher {
    top: 8px;
    right: 4.25rem;
    left: auto;
    transform: none;
  }
  .has-geo-switcher:has(#geo-switcher-menu-cl) .geo-switcher__toggle {
    height: 44px;
    min-height: 44px;
    border-radius: 5px;
  }
  .has-geo-switcher:has(#geo-switcher-menu-za) > .geo-switcher {
    top: 8px;
    right: 4.25rem;
    left: auto;
    transform: none;
  }
  .has-geo-switcher:has(#geo-switcher-menu-za) .geo-switcher__toggle {
    height: 44px;
    min-height: 44px;
    border-radius: var(--radius, 10px);
  }
  .has-geo-switcher:has(#geo-switcher-menu-mx) > .geo-switcher {
    top: 8px;
    right: 4.25rem;
    left: auto;
    transform: none;
  }
  .has-geo-switcher:has(#geo-switcher-menu-mx) .geo-switcher__toggle {
    height: 44px;
    min-height: 44px;
    border-radius: var(--radius, 10px);
  }
  .has-geo-switcher:has(#geo-switcher-menu-ph) > .geo-switcher {
    top: 8px;
    right: 4.25rem;
    left: auto;
    transform: none;
  }
  .has-geo-switcher:has(#geo-switcher-menu-ph) .geo-switcher__toggle {
    height: 44px;
    min-height: 44px;
    border-radius: 6px;
  }
  .has-geo-switcher:has(#geo-switcher-menu-bd) > .geo-switcher {
    top: 8px;
    right: 4.25rem;
    left: auto;
    transform: none;
  }
  .has-geo-switcher:has(#geo-switcher-menu-bd) .geo-switcher__toggle {
    height: 42px;
    min-height: 42px;
    border-radius: 5px;
  }
  .has-geo-switcher:has(#geo-switcher-menu-in) > .geo-switcher {
    top: 50%;
    right: 4.25rem;
    left: auto;
    transform: translateY(-50%);
  }
  .has-geo-switcher:has(#geo-switcher-menu-in) .geo-switcher__toggle {
    height: 44px;
    min-height: 44px;
    border-radius: 10px;
  }
  .geo-switcher__toggle {
    height: 42px;
    min-height: 42px;
    gap: 4px;
    padding: 5px 7px;
    border-radius: 10px;
    box-sizing: border-box;
  }
  .geo-switcher__flag {
    width: 24px;
    height: 24px;
  }
  .geo-network__flag {
    width: 28px;
    height: 28px;
  }
  .geo-switcher__menu {
    position: fixed;
    top: var(--geo-menu-top, 72px);
    right: 12px;
    min-width: 108px;
    max-height: calc(100dvh - var(--geo-menu-top, 72px) - 12px);
  }
  .geo-network {
    width: min(100% - 24px, 430px);
    margin-block: 22px;
    padding: 22px 14px;
  }
  .geo-network__list {
    flex-direction: column;
    align-items: stretch;
    gap: 9px;
  }
  .geo-network__link,
  .geo-network__current {
    width: min(100%, 300px);
    justify-content: flex-start;
    margin-inline: auto;
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .geo-switcher__caret,
  .geo-network__link {
    transition: none;
  }
}
