html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

#npw-map-wrapper {
  display: none;
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100dvh !important;
  height: 100vh; /* fallback */
  max-width: none !important;
  top: 0 !important;
  left: 0 !important;
  transform: none !important;
  margin: 0 !important;
  border-radius: 0;
  box-shadow: none;
  z-index: 99999;
  background-color: #fff;
  overflow: hidden;
  border-top: none;
  font-family:
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Arial,
    sans-serif;
  box-sizing: border-box;
}

.npw-display-block #npw-map-wrapper {
  display: flex !important;
  flex-direction: row;
}

#npw-map {
  height: 100%;
  flex: 1 1 auto;
  min-width: 0;
  float: none !important;
}

#npw-map-sidebar {
  height: 100%;
  flex: 0 0 min(360px, 35vw);
  max-width: 420px;
  float: none !important;
}

#npw-map-sidebar-header {
  width: 100%;
  height: 48px;
  padding: 10px 13px;
  box-sizing: border-box;
  background-color: #ed1c23;

  display: flex;
  align-items: center;
  gap: 10px;
}

#npw-map-logo,
#npw-map-back {
  float: none !important;
}

#npw-map-sidebar-search {
  flex: 1 1 auto;
  min-width: 0;
}

#npw-map-logo {
  background: none !important;
  width: 20px;
  height: 20px;
  margin: 4px 0 0 9px;
  float: left;
}

#npw-map-back {
  display: none;
  width: 28px;
  height: 28px;
  margin: 0;
  float: left;

  background-image: url('/np/icon-left.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: 18px 18px;

  /* на всякий — гарантируем отсутствие "фона" */
  background-color: transparent !important;

  /* чтобы не “прыгал” */
  opacity: 0.95;
}

#npw-map-back:hover {
  opacity: 0.7;
  cursor: pointer;
}

#npw-map-close-button {
  background: none !important;
  width: 45px;
  height: 45px;
  position: absolute;
  top: calc(8px + env(safe-area-inset-top, 0px));
  right: calc(8px + env(safe-area-inset-right, 0px));
  z-index: 20;
}

#npw-map-close-button:hover {
  background-position: 0 -46px;
  cursor: pointer;
}

#npw-map-back:hover {
  cursor: pointer;
}

#npw-map-sidebar input,
#npw-map-sidebar select {
  border-radius: 4px;
  color: #6c737b;
  line-height: 17px;
  font-size: 13px;
  padding: 0 10px 2px 10px;
  background: #fbfbfb;
  height: 38px;
  border: 1px solid #e0e0e0;
  box-sizing: border-box;
  outline: none;
  font-family:
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Arial,
    sans-serif;
}

#npw-map-sidebar #npw-map-sidebar-search {
  height: 28px;
}

#npw-map-sidebar input {
  width: 80%;
  float: right;
}

#npw-map-sidebar select {
  width: 100%;
  margin-bottom: 10px;
}

#npw-map-sidebar ul {
  padding: 0 7px;
  margin: 0;
  overflow: auto;
  height: 498px;
}

#npw-map-sidebar ul li {
  margin-bottom: 8px;
  list-style-type: none;
  font-size: 16px;
  line-height: 20px;
  border: 1px solid #e7e9eb;
  border-radius: 2px;
  padding: 12px;
  color: #6c737b;
  box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.06);
  text-align: left;
}

#npw-map-sidebar ul li:hover {
  border: solid 1px #b1b9c1;
  background-color: #fbfbfb;
}

#npw-map-state-details {
  display: none;
  margin: 7px;
  font-size: 12px;
  line-height: 20px;
  border: 1px solid #e7e9eb;
  border-radius: 2px;
  padding: 26px 12px 2px 12px;
  color: #6c737b;
  box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.06);
  box-sizing: border-box;
  text-align: left;
}

#npw-map-state-details div {
  margin-bottom: 9px;
}

#npw-map-state-details a {
  display: block;
  font-size: 12px;
  color: #c1c2c2;
  text-decoration: underline;
  padding: 12px 0 5px 0;
  margin-top: 12px;
  border-top: 1px solid #e7e9eb;
}

#npw-map-state-details a:hover {
  text-decoration: none;
}

#npw-map-sidebar ul li div {
  line-height: 16px;
  margin-bottom: 7px;
}

.npw-list-city {
  font-size: 14px;
}
.npw-list-warehouse {
  font-size: 16px;
  border-bottom: 1px solid #e7e9eb;
  padding-bottom: 4px;
  margin-bottom: 4px;
}
.npw-list-address {
  font-size: 12px;
  color: #b1b9c1;
}

.npw-details-title {
  font-size: 18px;
  color: #f63743;
  border-bottom: 1px solid #e7e9eb;
  padding-bottom: 12px;
  margin-bottom: 16px;
}

#npw-map-sidebar ul li:hover {
  cursor: pointer;
}

.npw-display-block {
  display: block !important;
}

#npw-map-open-button {
  width: 200px;
  height: 38px;
  outline: none;
  border-radius: 4px;
  border: solid 1px #ef232b;
  color: #fff;
  font-size: 11px;
  font-style: normal;
  text-align: right;
  padding-right: 21px;
  background: #ed1c23 10px;
  font-family:
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Arial,
    sans-serif;
  /*position: relative;*/
}

#npw-map-open-button.npw-map-open-button-opened {
  background-color: #b1b9c1 !important;
  border: 1px solid transparent;
}

#npw-map-open-button:hover,
#npw-map-open-button:focus,
#npw-map-open-button:active {
  cursor: pointer;
  outline: none;
}

@media (max-width: 520px) {
  #npw-map-sidebar {
    flex-basis: 44vw;
    max-width: none;
  }
}

html[data-np-view='list'] #npw-map {
  display: none !important;
}
html[data-np-view='list'] #npw-map-sidebar {
  width: 100% !important;
  float: none !important;
  height: 100% !important;
}

html[data-np-view='map'] #npw-map-sidebar {
  display: none !important;
}
html[data-np-view='map'] #npw-map {
  width: 100% !important;
  float: none !important;
  height: 100% !important;
}

#npw-map {
  min-width: 0 !important;
}
#npw-map-sidebar {
  min-width: 0 !important;
}

#npw-map-close-button {
  pointer-events: none !important;
  opacity: 0 !important;
  cursor: default !important;
}
