html,
body.public-gis-body {
  width: 100%;
  height: 100%;
  margin: 0;
}

body.public-gis-body {
  --portal-primary: #2f669b;
  --portal-primary-strong: #14395d;
  --portal-text: #18364f;
  --portal-text-soft: #60778f;
  overflow: hidden;
  background: #d8e2eb;
  color: var(--portal-text);
  font-family: "Source Sans 3", Arial, sans-serif;
}

.public-gis {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: #d8e2eb;
}

.public-gis__map {
  position: absolute;
  inset: 0;
}

.public-gis--tool-active .leaflet-interactive {
  cursor: crosshair !important;
}

.public-gis__left-panel,
.public-gis__layers-panel,
.public-gis__top-tools,
.public-gis__measure,
.public-gis__street,
.public-gis__external {
  position: absolute;
  z-index: 520;
}

.public-gis__left-panel {
  top: 14px;
  left: 14px;
  width: min(330px, calc(100% - 28px));
  display: grid;
  gap: 10px;
  pointer-events: none;
}

.public-gis__left-panel > * {
  pointer-events: auto;
}

.public-gis__brand {
  display: grid;
  gap: 1px;
  width: fit-content;
  max-width: 100%;
  padding: 10px 13px;
  border: 1px solid rgba(202, 214, 226, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 22px rgba(31, 59, 87, 0.08);
}

.public-gis__brand span {
  color: var(--portal-primary);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.public-gis__brand strong {
  color: var(--portal-primary-strong);
  font-size: 19px;
  line-height: 1.05;
}

.public-gis__layers-panel {
  top: 0;
  right: 0;
  bottom: 0;
  width: 260px;
  overflow: auto;
  padding: 10px 10px 18px;
  background: rgba(255, 255, 255, 0.88);
  border-left: 1px solid rgba(107, 124, 142, 0.35);
  backdrop-filter: blur(5px);
  box-shadow: -16px 0 28px rgba(20, 43, 67, 0.13);
}

.public-gis__top-tools {
  top: 14px;
  left: 360px;
  right: 278px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  pointer-events: none;
}

.public-gis__top-tools button {
  pointer-events: auto;
}

.public-gis__return {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid #cfdce8;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--portal-primary-strong);
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(18, 43, 70, 0.12);
}

.public-gis__panel-section,
.public-gis__layer-group {
  border: 1px solid rgba(202, 214, 226, 0.92);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 22px rgba(31, 59, 87, 0.08);
}

.public-gis__panel-section {
  padding: 14px;
  border-radius: 8px;
}

.public-gis__search {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.public-gis__search span,
.public-gis__panel-section h2,
.public-gis__layer-group h2 {
  margin: 0;
  color: var(--portal-primary-strong);
  font-size: 14px;
  font-weight: 900;
}

.public-gis__search input {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid #c9d5e2;
  border-radius: 6px;
  color: var(--portal-primary-strong);
  font: inherit;
}

.public-gis__info {
  max-height: calc(100vh - 310px);
  overflow: auto;
}

.public-gis__info h2 {
  margin-bottom: 12px;
}

.public-gis__info strong {
  display: block;
  margin-bottom: 10px;
  color: var(--portal-primary-strong);
  font-size: 16px;
}

.public-gis__info dl {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 7px 10px;
  margin: 0;
}

.public-gis-info-group {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(202, 214, 226, 0.9);
}

.public-gis-info-group:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.public-gis-info-group h4 {
  margin: 0 0 8px;
  color: #5d7286;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.public-gis__info dt {
  color: var(--portal-text-soft);
  font-size: 13px;
}

.public-gis__info dd {
  margin: 0;
  color: var(--portal-primary-strong);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.public-gis__top-tools button,
.public-gis__base-list button {
  min-height: 36px;
  border: 1px solid #cfdce8;
  border-radius: 6px;
  background: #ffffff;
  color: var(--portal-primary-strong);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(18, 43, 70, 0.12);
}

.public-gis__top-tools button {
  padding: 0 13px;
}

.public-gis__top-tools button.is-active,
.public-gis__base-list button.is-active {
  border-color: var(--portal-primary);
  background: var(--portal-primary);
  color: #ffffff;
}

.public-gis__layer-group {
  margin-bottom: 10px;
  padding: 10px;
}

.public-gis__layer-group h2 {
  padding-bottom: 6px;
  border-bottom: 2px solid rgba(15, 44, 73, 0.16);
  text-transform: uppercase;
}

.public-gis__layer-group label {
  display: grid;
  grid-template-columns: auto 16px minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  margin-top: 8px;
  color: #284154;
  font-size: 14px;
}

.public-gis__base-list {
  display: grid;
  gap: 7px;
  margin-top: 8px;
}

.public-gis__base-list button {
  min-height: 32px;
  text-align: left;
  padding: 0 9px;
}

.public-gis__layer-group--muted p {
  margin: 8px 0 0;
  color: #596f82;
  font-size: 13px;
}

.public-gis__legend-dot,
.public-gis__legend-line {
  display: inline-block;
  justify-self: center;
}

.public-gis__legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
}

.public-gis__legend-dot--parcel {
  background: #2f80ed;
}

.public-gis__legend-dot--hydrant {
  background: #0ea5e9;
}

.public-gis__legend-dot--station {
  background: #2563eb;
}

.public-gis__legend-dot--network {
  background: #64748b;
}

.public-gis-import-marker,
.public-gis-station-marker {
  width: 26px;
  height: 26px;
  border: 2px solid rgba(255, 255, 255, .96);
  box-shadow: 0 5px 14px rgba(15, 23, 42, .26);
  color: #fff;
  display: grid;
  place-items: center;
}

.public-gis-import-marker {
  border-radius: 999px;
}

.public-gis-station-marker {
  background: #2563eb;
  border-radius: 8px;
}

.public-gis-import-marker svg,
.public-gis-import-marker img,
.public-gis-station-marker svg {
  width: 15px;
  height: 15px;
  display: block;
  object-fit: contain;
}

.public-gis__legend-line {
  width: 16px;
  height: 3px;
  border-radius: 999px;
}

.public-gis__legend-line--contour {
  background: repeating-linear-gradient(90deg, #facc15 0 6px, transparent 6px 9px);
}

.public-gis__legend-line--catastro {
  background: #b469ff;
}

.public-gis__legend-line--pipe {
  background: #14b8a6;
}

.public-gis__measure {
  left: 58px;
  bottom: 14px;
  max-width: min(520px, calc(100% - 304px));
  padding: 10px 14px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--portal-primary-strong);
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(18, 43, 70, 0.16);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.public-gis__measure[hidden] {
  display: none;
}

.public-gis__measure button {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  background: #dbe6ef;
  color: var(--portal-primary-strong);
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.public-gis__measure button:hover {
  background: #c7d6e4;
}

.public-gis__street {
  top: 42px;
  right: 274px;
  bottom: 42px;
  width: min(520px, calc(100vw - 650px));
  display: grid;
  grid-template-rows: 38px minmax(0, 1fr) auto;
  border: 1px solid rgba(24, 43, 61, 0.55);
  background: #ffffff;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.35);
}

.public-gis__street[hidden] {
  display: none;
}

.public-gis__street header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  background: rgba(242, 245, 247, 0.96);
  color: #000;
}

.public-gis__street button {
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: #111827;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.public-gis__street iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.public-gis__street a {
  padding: 8px 10px;
  background: #f6f8fa;
  font-size: 13px;
}

.public-gis__external {
  top: 64px;
  right: 274px;
  bottom: 14px;
  width: min(300px, calc(100% - 28px));
  overflow: auto;
  border: 1px solid rgba(24, 43, 61, 0.55);
  background: rgba(255, 255, 255, 0.9);
  background-image: linear-gradient(rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.82));
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(4px);
}

.public-gis__external[hidden] {
  display: none;
}

.public-gis__external header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  padding: 0 8px;
  border-bottom: 1px solid rgba(24, 43, 61, 0.25);
  background: rgba(242, 245, 247, 0.96);
  color: #000;
  text-transform: uppercase;
}

.public-gis__external header button {
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: #111827;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.public-gis__external-form {
  display: grid;
  gap: 9px;
  padding: 12px;
  border-bottom: 1px solid rgba(24, 43, 61, 0.16);
}

.public-gis__external-form label {
  display: grid;
  gap: 4px;
  color: var(--portal-primary-strong);
  font-size: 13px;
  font-weight: 800;
}

.public-gis__external-form select,
.public-gis__external-form input {
  min-height: 32px;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #b9c9d8;
  border-radius: 4px;
  background: #fff;
  color: #122c44;
  font: inherit;
}

.public-gis__external-form input[type="file"] {
  min-height: auto;
  padding: 5px;
}

.public-gis__external-form p {
  margin: 0;
  color: #516b82;
  font-size: 12px;
  line-height: 1.3;
}

.public-gis__external-form button {
  min-height: 36px;
  border: 0;
  border-radius: 5px;
  background: #0ea5e9;
  color: #fff;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.public-gis__external-status {
  min-height: 16px;
}

.public-gis__external-list {
  padding: 12px;
}

.public-gis__external-list h2 {
  margin: 0 0 8px;
  color: var(--portal-primary-strong);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.public-gis__external-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  gap: 6px;
  align-items: center;
  padding: 7px 0;
  border-top: 1px solid rgba(202, 214, 226, 0.85);
}

.public-gis__external-item label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  color: var(--portal-primary-strong);
  font-size: 13px;
  font-weight: 800;
}

.public-gis__external-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-gis__external-item small {
  color: #5d7286;
  font-weight: 900;
}

.public-gis__external-item button {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: #e9f0f6;
  color: var(--portal-primary-strong);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.public-gis-pegman {
  position: relative;
  width: 28px;
  height: 40px;
  background: transparent;
  filter:
    drop-shadow(0 2px 0 #8a5600)
    drop-shadow(0 4px 5px rgba(0, 0, 0, 0.36));
}

.public-gis-pegman__body,
.public-gis-pegman__arm,
.public-gis-pegman__head {
  position: absolute;
  display: block;
}

.public-gis-pegman__body {
  left: 9px;
  top: 13px;
  width: 10px;
  height: 24px;
  background: linear-gradient(90deg, #f0a800 0%, #ffc400 38%, #ffc400 70%, #e59a00 100%);
  border: 1px solid #b97000;
  border-radius: 3px 3px 5px 5px;
  clip-path: polygon(6% 0, 94% 0, 82% 100%, 18% 100%);
}

.public-gis-pegman__body::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 0;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 10px solid rgba(161, 88, 0, 0.72);
}

.public-gis-pegman__arm {
  top: 15px;
  width: 5px;
  height: 19px;
  background: linear-gradient(#ffc400, #f0a800);
  border: 1px solid #b97000;
  border-radius: 4px;
}

.public-gis-pegman__arm--left {
  left: 5px;
}

.public-gis-pegman__arm--right {
  right: 5px;
}

.public-gis-pegman__head {
  left: 7px;
  top: 0;
  width: 14px;
  height: 14px;
  background: #ffc400;
  border: 1px solid #b97000;
  border-radius: 999px;
  box-shadow: inset 2px -2px 0 rgba(191, 107, 0, 0.2);
}

.public-gis-popup.leaflet-popup {
  margin-bottom: 20px;
}

.public-gis-popup .leaflet-popup-content-wrapper {
  overflow: hidden;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 18px 44px rgba(9, 31, 52, 0.26);
  backdrop-filter: blur(6px);
}

.public-gis-popup .leaflet-popup-content {
  width: 300px !important;
  margin: 0;
}

.public-gis-popup .leaflet-popup-tip {
  width: 22px;
  height: 22px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 12px 24px rgba(9, 31, 52, 0.18);
}

.public-gis-popup .leaflet-popup-close-button {
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  color: #8aa0b4;
  font-size: 22px;
  line-height: 26px;
}

.public-gis-popup .leaflet-popup-close-button:hover {
  background: #edf3f8;
  color: var(--portal-primary-strong);
}

.public-gis-popup-card {
  padding: 18px 18px 16px;
}

.public-gis-popup-card h3 {
  margin: 0 30px 12px 0;
  color: var(--portal-primary-strong);
  font-size: 19px;
  line-height: 1.15;
  letter-spacing: 0;
}

.public-gis-popup-card dl {
  display: grid;
  grid-template-columns: minmax(80px, 0.78fr) minmax(0, 1fr);
  gap: 7px 12px;
  margin: 0;
}

.public-gis-popup-card .public-gis-info-group {
  margin-top: 12px;
  padding: 10px 0 0;
  border-top: 1px solid #d5e0ea;
}

.public-gis-popup-card .public-gis-info-group:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.public-gis-popup-card .public-gis-info-group h4 {
  margin-bottom: 8px;
  color: #607890;
  font-size: 11px;
  letter-spacing: 0.1em;
}

.public-gis-popup-card dt {
  color: #5f768d;
  font-size: 14px;
  line-height: 1.25;
}

.public-gis-popup-card dd {
  margin: 0;
  color: var(--portal-primary-strong);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.public-gis-popup-card dd:has(+ dt) {
  margin-bottom: 1px;
}

@media (max-width: 1100px) {
  .public-gis__left-panel {
    width: 300px;
  }

  .public-gis__layers-panel {
    width: 230px;
  }

  .public-gis__top-tools {
    left: 328px;
    right: 248px;
  }

  .public-gis__street {
    right: 244px;
    width: min(480px, calc(100vw - 570px));
  }

  .public-gis__external {
    right: 244px;
  }
}

@media (max-width: 820px) {
  .public-gis__left-panel {
    top: 10px;
    left: 10px;
    right: 10px;
    width: auto;
  }

  .public-gis__info {
    display: none;
  }

  .public-gis__top-tools {
    top: auto;
    right: 10px;
    bottom: 12px;
    left: 10px;
  }

  .public-gis__layers-panel {
    top: 74px;
    right: 10px;
    bottom: auto;
    width: min(260px, calc(100% - 20px));
    max-height: 44%;
    border: 1px solid rgba(107, 124, 142, 0.35);
  }

  .public-gis__measure {
    left: 54px;
    bottom: 70px;
    max-width: calc(100% - 20px);
  }

  .public-gis__street {
    top: 10px;
    right: 10px;
    bottom: auto;
    width: calc(100% - 24px);
    height: calc(100% - 90px);
  }

  .public-gis__external {
    top: 74px;
    right: 10px;
    bottom: 70px;
    width: auto;
  }
}
