body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

.remap-app {
  --remap-text: #1f2933;
  --remap-muted: #64707d;
  --remap-border: #d9e0e7;
  --remap-surface: #ffffff;
  --remap-soft: #f4f7f9;
  --remap-focus: #eb212a;
  --remap-shadow: 0 18px 44px rgba(21, 35, 48, 0.18);
  --remap-repair: #ff8f5d;
  --remap-clean-point: #0fa69d;
  --remap-sddr: #9151b8; 
}

.remap-app,
.remap-app * {
  box-sizing: border-box;
}

.remap-app {
  display: grid;
  grid-template-columns: minmax(320px, 390px) minmax(0, 1fr);
  height: 80vh;
  color: var(--remap-text);
  background: var(--remap-surface);
  font-family: Arial, Helvetica, sans-serif;
}

.remap-panel {
  display: flex;
  min-width: 0;
  min-height: 80vh;
  flex-direction: column;
  background: var(--remap-surface);
}

.remap-panel__header {
  padding: 20px 20px 14px;
}

.remap-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}

.remap-count {
  margin: 6px 0 0;
  color: var(--remap-muted);
  font-size: 14px;
}

.remap-filter-form {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 10px;
  padding: 14px 16px;
  margin-top: 2.3rem;
}

.remap-field {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.remap-field:first-child,
.remap-field--type,
.remap-filter-actions {
  grid-column: 1 / -1;
}

.remap-field-categories {
  grid-column: 1 / -1;
}

.remap-field-child-categories {
  grid-column: 1 / -1;
}

.remap-filter-form--has-child-categories {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.remap-filter-form--has-child-categories .remap-field-categories,
.remap-filter-form--has-child-categories .remap-field-child-categories {
  grid-column: span 1;
}

.remap-field--type .remap-label {
  display: none;
}

.remap-field-search-group {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 10px;
  padding: 14px 16px 18px;
  background: #edeff1;
  border-radius: 0.8rem;
  grid-column: 1 / -1;
}

.remap-mobile-bottom-menu {
  grid-column: 1 / -1;
}

.remap-field--location {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 3fr);
  gap: 10px;
}

.remap-field--location .remap-field {
  grid-column: inherit;
}

.remap-field[hidden] {
  display: none;
}

.remap-label {
  color: var(--remap-muted);
  font-size: 12px;
  font-weight: 700;
}

.remap-input,
.remap-select {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--remap-border);
  border-radius: 6px;
  color: var(--remap-text);
  background: #ffffff;
  font: inherit;
  font-size: 14px;
}

.remap-select:disabled {
  color: var(--remap-muted);
  background: #eef2f5;
}

.remap-input:focus,
.remap-select:focus {
  border-color: var(--remap-focus);
  outline: 0;
}

.remap-type-buttons {
  display: grid;
  /* grid-template-columns: repeat(4, minmax(0, 1fr)); */
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  padding: 0;
  border-radius: 0.8rem;
  background: #edeff1;
}

.remap-type-button {
  min-height: 48px;
  padding: 0 10px;
  border: 0;
  border-radius: 0.8rem;
  color: var(--remap-text);
  background: #edeff1;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  opacity: 0.5;
  line-height: 1.1;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.remap-type-button:not(.remap-type-button--active):hover,
.remap-type-button:not(.remap-type-button--active):focus {
  outline: 0;
  opacity: 1;
}

.remap-type-button--active {
  border-color: var(--remap-focus);
  color: #ffffff;
  background: var(--remap-focus);
  box-shadow: 0 2px 8px rgba(0, 110, 207, 0.2);
  opacity: 1;
}

.remap-type-button--active[data-remap-type-value="repair"] {
  border-color: #ff8f5d;
  background: #ff8f5d;
  box-shadow: 0 2px 8px rgba(15, 166, 157, 0.2);
}

.remap-type-button--active[data-remap-type-value="clean_point"] {
  border-color: #0fa69d;
  background: #0fa69d;
  box-shadow: 0 2px 8px rgba(15, 166, 157, 0.2);
}

.remap-type-button--active[data-remap-type-value="sddr"] {
  border-color: #9151b8;
  background: #9151b8;
  box-shadow: 0 2px 8px rgba(145, 81, 184, 0.2);
}

.remap-filter-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.remap-button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--remap-border);
  border-radius: 6px;
  color: var(--remap-text);
  background: #ffffff;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.remap-button-reset {
  border-color: #52647a;
}

.remap-button--primary {
  border-color: var(--remap-focus);
  color: #ffffff;
  background: var(--remap-focus);
}

.remap-button:hover,
.remap-button:focus {
  border-color: var(--remap-focus);
  outline: 0;
}

.remap-button-has-icon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  justify-content: center;
}

.remap-button-has-icon .remap-button-icon {
  width: 18px;
  height: 18px;
  display: block;
}

@media (min-width: 841px) {
  .remap-list-icon,
  .remap-type-buttons--mobile {
    display: none;
  }
}

.remap-geolocation-result {
  margin: 4px 0 0;
  color: var(--remap-muted);
  font-size: 13px;
  line-height: 1.35;
}

.remap-geolocation-result[hidden] {
  display: none;
}

.remap-filter-actions .remap-button:last-child {
  grid-column: 1 / -1;
}

.remap-status {
  margin: 0 16px 0;
  padding: 10px 12px;
  border: 1px solid #272833;
  border-radius: 6px;
  color: #fff;
  background: #272833;
  font-size: 14px;
}

.remap-status[hidden] {
  display: none;
}

.remap-results {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  max-height: calc(80vh - 380px);
  padding: 14px 12px 18px;
  overflow: auto;
  list-style: none;
}

.remap-result {
  margin: 0;
}

.remap-result__button {
  display: flex;
  width: 100%;
  min-height: 72px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--remap-border);
  border-radius: 8px;
  color: var(--remap-text);
  background: #ffffff;
  text-align: left;
  cursor: pointer;
}

.remap-result--repair .remap-result__button:hover,
.remap-result--repair .remap-result__button:focus {
  border-color: var(--remap-repair);
  outline: 0;
}

.remap-result--repair .remap-result__button--active {
  border-color: var(--remap-repair);
  background-color: var(--remap-repair);
  color: #ffffff;
}

.remap-result--clean_point .remap-result__button:hover,
.remap-result--clean_point .remap-result__button:focus {
  border-color: var(--remap-clean-point);
  outline: 0;
}

.remap-result--clean_point .remap-result__button--active {
  border-color: var(--remap-clean-point);
  background-color: var(--remap-clean-point);
  color: #ffffff;
}

.remap-result--sddr .remap-result__button:hover,
.remap-result--sddr .remap-result__button:focus {
  border-color: var(--remap-sddr);
  outline: 0;
}

.remap-result--sddr .remap-result__button--active {
  border-color: var(--remap-sddr);
  background-color: var(--remap-sddr);
  color: #ffffff;
}

.remap-result__title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
}

.remap-result__meta,
.remap-result__tags {
  color: var(--remap-muted);
  font-size: 13px;
  line-height: 1.3;
}

.remap-result__button--active .remap-result__meta,
.remap-result__button--active .remap-result__tags {
  color: #fff;
}

.remap-map-shell {
  position: relative;
  min-width: 0;
  min-height: 80vh;
  border-radius: 2rem;
  overflow: hidden;
}

.remap-map {
  width: 100%;
  height: 80vh;
  min-height: 520px;
}

.remap-card {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 700;
  width: min(390px, calc(100% - 36px));
  max-height: calc(80vh - 36px);
  overflow: auto;
  padding: 18px;
  border: 1px solid rgba(18, 32, 45, 0.12);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--remap-shadow);
}

.remap-card[hidden] {
  display: none;
}

.remap-card__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border: 1px solid var(--remap-border);
  border-radius: 6px;
  color: var(--remap-text);
  background: #ffffff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.remap-card__close:hover,
.remap-card__close:focus {
  border-color: var(--remap-focus);
  outline: 0;
}

.remap-card__type {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 42px 8px 0;
  color: var(--remap-muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.remap-card__type-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.remap-card__type-icon img {
  width: 100%;
  height: 100%;
  display: block;
}

.remap-card__title {
  margin: 0 42px 12px 0;
  font-size: 24px;
  line-height: 1.1;
}

.remap-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px;
}

.remap-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  color: #324150;
  background: #edf2f6;
  font-size: 12px;
  line-height: 1.2;
}

.remap-card__field {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--remap-border);
}

.remap-card__field dt {
  color: var(--remap-muted);
  font-size: 13px;
  font-weight: 700;
}

.remap-card__field dd {
  min-width: 0;
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.remap-card__field a {
  color: var(--remap-focus);
  text-decoration: none;
}

.remap-card--repair .remap-card__field a, 
.remap-card--repair .remap-card__type {
  color: var(--remap-repair);
  text-decoration: none;
}

.remap-card--clean_point .remap-card__field a,
.remap-card--clean_point .remap-card__type {
  color: var(--remap-clean-point);
  text-decoration: none;
}

.remap-card--sddr .remap-card__field a,
.remap-card--sddr .remap-card__type {
  color: var(--remap-sddr);
  text-decoration: none;
}

.remap-card__field a:hover,
.remap-card__field a:focus {
  text-decoration: underline;
}

.remap-marker {
  background: transparent;
}

.remap-marker__pin {
  display: block;
  width: 24px;
  height: 24px;
  border: 3px solid #ffffff;
  border-radius: 50% 50% 50% 0;
  background: var(--remap-marker-color, #5b6573);
  box-shadow: 0 5px 14px rgba(16, 28, 39, 0.28);
  transform: rotate(-45deg);
}

.remap-marker--repair .remap-marker__pin {
  background: #ff8f5d;
}

.remap-marker--clean_point .remap-marker__pin {
  background: #0fa69d;
}

.remap-marker--sddr .remap-marker__pin {
  background: #9151b8;
}

.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
  background-color: rgba(0, 110, 207, 0.2);
}

.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
  color: #ffffff;
  background-color: #2d3f54;
  font-weight: 700;
}

@media (max-width: 840px) {
  .remap-app {
    grid-template-columns: 1fr;
    position: relative;
    background: transparent;
    height: 80vh;
    overflow: hidden;
  }

  .remap-panel {
    min-height: 42vh;
    border-right: 0;
    border-bottom: 1px solid var(--remap-border);
    background: transparent;
  }

  .remap-field--type {
    position: absolute;
    z-index: 9;
    top: 20px;
    width: calc(100% - 32px);
  }

  .remap-type-buttons {
    border: 1px solid var(--remap-border);
    overflow: hidden;
  }

  .remap-field-categories {
    position: absolute;
    z-index: 9;
    top: 78px;
    left: 16px;
    width: calc(100% - 96px);
  }

  .remap-field-child-categories {
    position: absolute;
    z-index: 9;
    top: 78px;
    left: calc(16px + ((100% - 106px) / 2) + 10px);
    width: calc((100% - 106px) / 2);
  }

  .remap-filter-form--has-child-categories .remap-field-categories {
    width: calc((100% - 106px) / 2);
  }

  .remap-field-categories .remap-label,
  .remap-field-child-categories .remap-label {
    display: none;
  }

  .remap-field-categories .remap-select,
  .remap-field-child-categories .remap-select {
    border-radius: 0.8rem;
    min-height: 50px;
  }

  .remap-field-search-group {
    position: absolute;
    top: 100vh;
    width: calc(100% - 32px);
    z-index: 8;
    border: 1px solid var(--remap-border);
    transition: top 180ms ease;
  }

  .remap-app--search-open .remap-field-search-group {
    top: 135px;
  }

  .remap-mobile-bottom-menu {
    position: absolute;
    z-index: 9;
    bottom: 0;
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    background: #edeff1;
    width: 100%;
    left: 0;
    padding: 10px 0;
    border-top: 1px solid var(--remap-border);
  }

  .remap-search-icon {
            position: absolute;
        z-index: 9;
        top: 78px;
        width: auto;
        right: 16px;
        background: #edeff1;
        border: 1px solid var(--remap-border);
        overflow: hidden;
        border-radius: 0.8rem;
  }
  .remap-search-icon .remap-type-button {
    min-height: 48px;
    padding: 0 10px;
    border: 0;
    border-radius: 0.8rem;
    
    background: #edeff1;
    font: inherit;
    font-size: 14px;
    cursor: pointer;
    opacity: 1;
    line-height: 1.1;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
    border-radius: 0.8rem;
    overflow: hidden;
   
    min-width: 48px;
  }
  .remap-search-icon .remap-type-button:not(.remap--active) {
    background-color: #DA1414;
     color: #fff;
  }

  .remap-search-icon .remap-type-button:not(.remap--active) .remap-button-icon {
    width: 24px;
    height: 24px;
  }
  /* .remap-field--location {
    grid-template-columns: 1fr;
  } */

  .remap-results {
    z-index: 8;
    position: absolute;
    width: 100%;
    top: 100vh;
    background:#edeff1;
    height: calc(80vh - 194px);
    max-height: none;
    transition: top 180ms ease;
    border: 1px solid var(--remap-border);
  }

  .remap-app--results-open .remap-results {
    top: 135px;
  }

  .remap-list-icon.remap--active {
    border-color: var(--remap-focus);
  }

  .remap-result__button {
    min-height: 39px;
  }

  .remap-map-shell {
    min-height: 58vh;
    height: 100%;
    position: absolute;
    z-index: 1;
    top: 0;
    width: 100%;
    border-radius: 0;
  }

  .remap-map {
    height: 100%;
    min-height: 420px;
  }

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

  .remap-card {
    top: auto;
    right: 12px;
    bottom: 73px;
    left: 12px;
    width: auto;
    max-height: min(72vh, 460px);
  }
}

@media (max-width: 540px) {
  .remap-button-tex-hidden {
    display: none;
  }
}


.leaflet-left .leaflet-control {
  margin-left: 1.25rem;
}
.leaflet-top .leaflet-control {
  margin-top: 1.25rem;
    border-radius: 10px;
    overflow: hidden;
}

.remap-field[hidden],
.remap-status[hidden],
.remap-card[hidden],
.remap-geolocation-result[hidden] {
  display: none;
}
