.mapboxgl-ctrl-group-cad {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.mapboxgl-ctrl-group-cad button {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  line-height: 1;
  position: relative;
  padding: 0;
  text-align: center;
}

.mapboxgl-ctrl-group-cad button svg {
  width: 16px;
  height: 16px;
  display: block;
}

.mapboxgl-ctrl-group-cad button img {
  width: 16px;
  height: 16px;
  display: block;
  margin: 0 auto;
}

.mapboxgl-ctrl-group-draw button {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  line-height: 1;
  font-weight: 400;
  color: #111827;
}

.mapboxgl-ctrl-group-draw button.active {
  background-color: #e5e7eb;
}

body.portal-assegnazioni #surfaceGroupNavWindow {
  display: none !important;
}

body.portal-assegnazioni .mapboxgl-ctrl-group-cad,
body.portal-assegnazioni .mapboxgl-ctrl-group-draw {
  display: none !important;
}

.mapboxgl-ctrl-group-draw svg {
  width: 16px;
  height: 16px;
  display: block;
}

.mapboxgl-ctrl-group .mapboxgl-ctrl-geoloc,
.mapboxgl-ctrl-group .mapboxgl-ctrl-reset,
.mapboxgl-ctrl-group .mapboxgl-ctrl-streetview {
  background-image: none;
  text-indent: 0;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  line-height: 1;
}

.mapboxgl-ctrl-top-left {
  display: flex;
  flex-direction: column;
  padding: 10px 0 0 10px;
  z-index: 3600;
}

.mapboxgl-ctrl-top-left .mapboxgl-ctrl {
  margin: 0 !important;
}

.mapboxgl-ctrl-top-left .mapboxgl-ctrl-group-cad {
  margin-top: 15px !important;
}

.mapboxgl-ctrl-top-left .mapboxgl-ctrl-group-draw {
  margin-top: 15px !important;
}

.mapboxgl-ctrl-top-left .mapboxgl-style-switcher {
  margin-top: 10px !important;
  margin-bottom: 10px !important;
  padding: 4px;
  width: auto;
  min-width: 0;
}

.mapboxgl-ctrl-group .mapboxgl-style-switcher {
  width: 30px;
  height: 30px;
  padding: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 54.849 54.849' fill='%23475569'><path d='M54.497,39.614l-10.363-4.49l-14.917,5.968c-0.537,0.214-1.165,0.319-1.793,0.319c-0.627,0-1.254-0.104-1.79-0.318l-14.921-5.968L0.351,39.614c-0.472,0.203-0.467,0.524,0.01,0.716L26.56,50.81c0.477,0.191,1.251,0.191,1.729,0L54.488,40.33C54.964,40.139,54.969,39.817,54.497,39.614z'/><path d='M54.497,27.512l-10.364-4.491l-14.916,5.966c-0.536,0.215-1.165,0.321-1.792,0.321c-0.628,0-1.256-0.106-1.793-0.321l-14.918-5.966L0.351,27.512c-0.472,0.203-0.467,0.523,0.01,0.716L26.56,38.706c0.477,0.19,1.251,0.19,1.729,0l26.199-10.479C54.964,28.036,54.969,27.716,54.497,27.512z'/><path d='M0.361,16.125l13.662,5.465l12.537,5.015c0.477,0.191,1.251,0.191,1.729,0l12.541-5.016l13.658-5.463c0.477-0.191,0.48-0.511,0.01-0.716L28.277,4.048c-0.471-0.204-1.236-0.204-1.708,0L0.351,15.41C-0.121,15.614-0.116,15.935,0.361,16.125z'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px 16px;
}

.mapboxgl-style-switcher {
  display: block !important;
}

.mapboxgl-ctrl-group {
  position: relative;
  overflow: visible !important;
  display: inline-flex !important;
  flex-direction: column !important;
  z-index: 3600;
}

.mapboxgl-ctrl-group.mapboxgl-ctrl {
  display: inline-flex !important;
  flex-direction: column !important;
  align-items: stretch;
}

.mapboxgl-ctrl-group.mapboxgl-ctrl > button {
  display: block;
}

.mapboxgl-ctrl-group .mapboxgl-style-switcher.style-switcher-open {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 54.849 54.849' fill='%236b7280'><path d='M54.497,39.614l-10.363-4.49l-14.917,5.968c-0.537,0.214-1.165,0.319-1.793,0.319c-0.627,0-1.254-0.104-1.79-0.318l-14.921-5.968L0.351,39.614c-0.472,0.203-0.467,0.524,0.01,0.716L26.56,50.81c0.477,0.191,1.251,0.191,1.729,0L54.488,40.33C54.964,40.139,54.969,39.817,54.497,39.614z'/><path d='M54.497,27.512l-10.364-4.491l-14.916,5.966c-0.536,0.215-1.165,0.321-1.792,0.321c-0.628,0-1.256-0.106-1.793-0.321l-14.918-5.966L0.351,27.512c-0.472,0.203-0.467,0.523,0.01,0.716L26.56,38.706c0.477,0.19,1.251,0.19,1.729,0l26.199-10.479C54.964,28.036,54.969,27.716,54.497,27.512z'/><path d='M0.361,16.125l13.662,5.465l12.537,5.015c0.477,0.191,1.251,0.191,1.729,0l12.541-5.016l13.658-5.463c0.477-0.191,0.48-0.511,0.01-0.716L28.277,4.048c-0.471-0.204-1.236-0.204-1.708,0L0.351,15.41C-0.121,15.614-0.116,15.935,0.361,16.125z'/></svg>");
}

.mapboxgl-style-list {
  position: absolute;
  top: 0;
  left: 36px;
  transform: none;
  z-index: 3605;
  display: none;
  min-width: 160px;
  max-width: 220px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  padding: 4px 0;
}

.mapboxgl-ctrl-group .mapboxgl-style-list button {
  font-size: 13px;
  padding: 6px 10px 5px;
  text-align: left;
}

.mapboxgl-style-switcher select {
  font-size: 13px;
  line-height: 1.2;
  padding: 2px 6px;
  width: auto;
  min-width: 0;
}

.mapboxgl-ctrl-bottom-left {
  display: flex;
  flex-direction: column;
  padding: 0 0 10px 10px;
}

.mapboxgl-ctrl-bottom-left .mapboxgl-ctrl {
  margin: 0 !important;
}

.mapboxgl-ctrl-bottom-left .mapboxgl-ctrl-group-cad {
  margin-bottom: 10px !important;
}

.mapboxgl-ctrl-bottom-left .mapboxgl-ctrl-group.mapboxgl-ctrl {
  display: inline-flex !important;
  flex-direction: column !important;
  align-items: stretch;
}

.mapboxgl-ctrl-bottom-left .mapboxgl-ctrl-group.mapboxgl-ctrl > button {
  display: block;
}

.mapboxgl-ctrl-group .mapboxgl-ctrl-zoom-in,
.mapboxgl-ctrl-group .mapboxgl-ctrl-zoom-out {
  background: #ffffff !important;
  background-image: none !important;
  border: none;
  border-radius: 6px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
  width: 30px;
  height: 30px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  mask-image: none !important;
  -webkit-mask-image: none !important;
}

.mapboxgl-ctrl-group .mapboxgl-ctrl-zoom-in .mapboxgl-ctrl-icon,
.mapboxgl-ctrl-group .mapboxgl-ctrl-zoom-out .mapboxgl-ctrl-icon {
  display: none !important;
  background-image: none !important;
}

.mapboxgl-ctrl-group .mapboxgl-ctrl-zoom-in::before {
  content: "+";
  color: var(--text-secondary);
  font-size: 19px;
  font-weight: 700;
  line-height: 1;
}

.mapboxgl-ctrl-group .mapboxgl-ctrl-zoom-out::before {
  content: "−";
  color: var(--text-secondary);
  font-size: 19px;
  font-weight: 700;
  line-height: 1;
}

.mapboxgl-ctrl-group .mapboxgl-ctrl-zoom-in::after,
.mapboxgl-ctrl-group .mapboxgl-ctrl-zoom-out::after {
  display: none !important;
  content: none !important;
  background: none !important;
}


.mapboxgl-ctrl-geoloc svg,
.mapboxgl-ctrl-reset svg {
  width: 16px;
  height: 16px;
}

.mapboxgl-ctrl-streetview svg,
.mapboxgl-ctrl-streetview img {
  width: 17px;
  height: 17px;
  display: block;
}

.mapboxgl-ctrl-streetview .streetview-icon-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mapboxgl-ctrl-streetview img {
  margin: 0 auto;
  object-fit: contain;
  object-position: center;
}

.mapboxgl-ctrl-group .mapboxgl-ctrl-streetview:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.mapboxgl-ctrl-fit {
  background-image: none !important;
  background-color: #ffffff;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mapboxgl-ctrl-zoom-indicator {
  width: 30px;
  height: 24px;
  margin: 3px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  color: #334155;
  background: #f8fafc;
  border: 1px solid #d5dbe3;
  border-radius: 6px;
  user-select: none;
  pointer-events: none;
}

.mapboxgl-ctrl-fit::before {
  content: "⤢";
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.mapboxgl-ctrl-group-cad button.active {
  background-color: #e5e7eb;
}



/* marker selezionato leggermente più grande */
.cad-pin-selected img,
.cad-pin-selected svg,
.cad-pin-selected {
  transform: scale(1.1);
}

/* cursore marker + croce (overlay personalizzato) */
#catastoCursor {
  position: absolute;
  width: 32px;
  height: 32px;
  pointer-events: none;
  transform: translate(-16px, -32px);
  display: none;
  z-index: 50;
}

#catastoCursor .catasto-cursor-cross {
  position: absolute;
  bottom: 2px;
  left: 16px;
  width: 16px;
  height: 16px;
  transform: translate(-50%, 0);
}

#catastoCursor .catasto-cursor-cross::before,
#catastoCursor .catasto-cursor-cross::after {
  content: "";
  position: absolute;
  background: #111827;
}

#catastoCursor .catasto-cursor-cross::before {
  width: 1px;
  height: 16px;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
}

#catastoCursor .catasto-cursor-cross::after {
  width: 16px;
  height: 1px;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}

#catastoCursor .catasto-cursor-pin {
  position: absolute;
  bottom: 10px;
  left: 16px;
  width: 18px;
  height: 18px;
  background: var(--interactive);
  border-radius: 50% 50% 50% 0;
  transform: translate(-50%, 0) rotate(-45deg);
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.5);
}

#catastoCursor .catasto-cursor-pin::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffffff;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
