@import url('/vendor/leaflet/leaflet.css');

.catalog-map { min-width: 0; }
.catalog-map [hidden] { display: none; }
.catalog-map-profile { margin-top: 24px; }
.catalog-map-listing {
  margin-bottom: 18px;
  padding: 0 14px;
  border: 1px solid #e4e3ea;
  border-radius: 16px;
  background: #faf9fc;
}
.catalog-map-listing[open] { padding-bottom: 12px; }

.catalog-map-open, .catalog-map-coordinates summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  cursor: pointer;
  font-weight: 690;
  overflow-wrap: anywhere;
}
.catalog-map-open > span { flex: 1; }
.catalog-map-icon, .catalog-map-external svg {
  flex: none;
  width: 18px;
  height: 18px;
}
.catalog-map-open::-webkit-details-marker,
.catalog-map-coordinates summary::-webkit-details-marker { display: none; }
.catalog-map-open::after,
.catalog-map-coordinates summary::after {
  flex: none;
  width: 8px;
  height: 8px;
  margin-inline: 4px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px);
  content: '';
}
details[open] > .catalog-map-open::after,
.catalog-map-coordinates[open] > summary::after { transform: rotate(225deg); }

.catalog-map-region { min-width: 0; }
.catalog-map-surface {
  position: relative;
  isolation: isolate;
  min-width: 0;
  width: 100%;
  height: clamp(210px, 54vw, 350px);
  overflow: hidden;
  border: 1px solid #dddde8;
  border-radius: 13px;
  background: #e8edea;
}
.catalog-map-listing .catalog-map-surface { height: clamp(235px, 55vw, 360px); }
.catalog-map-surface.is-map-touch:not(.is-map-moving) { touch-action: pan-y; }
.catalog-map-surface.is-map-moving { touch-action: none; }
.catalog-map-surface:focus-visible { outline-offset: 3px; }
.catalog-map-surface.leaflet-container { font-family: inherit; }
.catalog-map-surface .leaflet-control-zoom {
  border: 1px solid #d8d5e2;
  border-radius: 10px;
  box-shadow: 0 2px 8px #2d233026;
}
.catalog-map-surface .leaflet-control-zoom :is(.leaflet-control-zoom-in, .leaflet-control-zoom-out) {
  width: 44px;
  height: 44px;
  line-height: 44px;
  color: #332c49;
}
.catalog-map-surface .leaflet-control-zoom a.leaflet-disabled { color: #8b8893; }

.catalog-map-marker::before, .catalog-map-marker::after {
  position: absolute;
  display: block;
  content: '';
}
.catalog-map-marker::before {
  top: 12px;
  left: 9px;
  width: 26px;
  height: 26px;
  border: 2px solid #fff;
  border-radius: 50% 50% 50% 2px;
  background: #cb2040;
  box-shadow: 0 1px 5px #3b263a60;
  transform: rotate(-45deg);
}
.catalog-map-marker::after {
  top: 21px;
  left: 18px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
}
.catalog-map-popup { display: grid; gap: 5px; }
.catalog-map-popup .catalog-map-popup-link {
  display: flex;
  align-items: center;
  min-height: 36px;
  color: #462952;
  font-size: 14px;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.catalog-map-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-top: 7px;
}
.catalog-map-credit {
  margin-inline-start: auto;
  color: #4f495b;
  font-size: 12px;
  line-height: 1.35;
}
.catalog-map-credit a { color: inherit; text-underline-offset: 2px; }
.catalog-map-tool, .catalog-map-clear, .catalog-map-external {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 7px 11px;
  border: 1px solid #ded9e6;
  border-radius: 9px;
  background: #fff;
  color: #44395b;
  font: inherit;
  font-size: 13px;
  font-weight: 670;
  overflow-wrap: anywhere;
  text-decoration: none;
  cursor: pointer;
}
.catalog-map-tool:hover, .catalog-map-clear:hover, .catalog-map-external:hover { background: #f3f0f6; }
.catalog-map-tool[aria-pressed='true'] {
  border-color: #d7adbb;
  background: #fbedf1;
  color: #77293c;
}
.catalog-map-status, .catalog-map-note, .catalog-map-message, .catalog-map-error {
  margin: 7px 0 9px;
  color: #545062;
  font-size: 13px;
  line-height: 1.42;
  overflow-wrap: anywhere;
}
.catalog-map-status:empty, .catalog-map-message:empty { display: none; }
.catalog-map-message { color: #62526a; }
.catalog-map-error { color: #872542; }
.catalog-map-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-block: 0 10px;
}
.catalog-map-fields label {
  display: grid;
  gap: 5px;
  min-width: 0;
  font-size: 14px;
  font-weight: 650;
  overflow-wrap: anywhere;
}
.catalog-map-input {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 8px 11px;
  border: 1px solid #ded9e6;
  border-radius: 9px;
  background: #fcfbfd;
  color: inherit;
  font: inherit;
  font-size: 16px;
}
.catalog-map-clear { margin-top: 4px; }
.catalog-map-external { gap: 8px; }
.catalog-map-profile .catalog-map-external { margin-top: 8px; }

@media (max-width: 420px) {
  .catalog-map-fields { grid-template-columns: 1fr; }
  .catalog-map-listing { padding-inline: 11px; }
}
