#map{
	width: 100%;
	height: 850px;
	z-index: 1;
	border-style: solid;
}

/*variables globales*/
:root{
	--header-height: 60px;
	--sidebar-width: 200px;
	--primary-color: #3498db;
	--border-color: #437fc4;
}

/*encabezado*/
.cabecera {
	background-color: var(--primary-color);
	border-style: solid;
	border-color: var(--border-color);
	color: white;
	height: var(--header-height);
	display: flex;
	justify-content: flex-start;
	align-items: center;
	padding: 0 10px;
	position: relative;
	width: 99%;
	top: 0;
	z-index: 1000;
	box-shadow: 0 2px 5px rgba(0,0,0,0.1);
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.cabecera img {
	margin-right: 30px;
}

header h1 {
	font-size: 1.4rem;
	font-weight: 500;
}

/* Popup final de la medicion */
.total-popup {
  width: auto !important;
  height: auto !important;
  padding-left: 15px;
  margin-top: -10px !important;
  background-color: transparent;
}

.total-popup-content {
  padding: 1px 7px;
  background-color: #4d90fe;
  border-radius: 8px;
  color: white;
  font-weight: bold;
  white-space: nowrap;
  text-align: center;
}

.total-popup-content .poly-close {
  display: none;
}

.total-popup-content .poly-close:hover {
  opacity: 0.7;
}

.total-popup-content:hover .poly-close {
  display: inline;
  margin-left: 10px;
  position: relative;
  cursor: pointer;
}

.total-popup-content svg {
  width: 15px;
  height: 10px;
  position: relative !important;
  top: 0px !important;
  left: 5px !important;
}


.leaflet-control-linear-measure-toggle {
  background-image: url('images/measure.png');
  background-size: 10px 10px;
  background-repeat: no-repeat;
  background-position: center;
  text-indent: -9999px;
  overflow: hidden;
}

.icon-active {
  	background-color: #ffc !important;
}

.icon-ruler {
  cursor: pointer;
  width: 22px;
  height: 22px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' stroke='%23222' fill='none' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M3 6h18v12H3z'/><line x1='6' y1='6' x2='6' y2='10'/><line x1='9' y1='6' x2='9' y2='8'/><line x1='12' y1='6' x2='12' y2='10'/><line x1='15' y1='6' x2='15' y2='8'/><line x1='18' y1='6' x2='18' y2='10'/></svg>"); 
  background-size: contain;
  background-repeat: no-repeat;
}

.ruler-map {
  cursor: crosshair !important;
}

/* Leyenda */
.info.legend {
		background: white; 
		padding: 12px 15px; 
		border-radius: 8px; 
		box-shadow: 0 2px 8px rgba(0,0,0,0.25); 
		font-family: "Segoe UI", sans-serif; 
		font-size: 14px; 
		line-height: 18px; 
} 

.info.legend h4 { 
		margin: 0 0 8px 0; 
		font-size: 15px; 
		font-weight: 600; 
		color: #333; 
} 

.legend-item { 
		display: flex; 
		align-items: center; 
		margin-bottom: 6px; 
} 

.legend-item:last-child { 
		margin-bottom: 0; 
} 

.legend-icon { 
		width: 20px; 
		height: 20px; 
		margin-right: 8px; 
} 

.legend-color { 
		width: 18px; 
		height: 18px; 
		border-radius: 50%; 
		display: inline-block; 
		margin-right: 8px; 
}

.leaflet-control-layers { 
		background: white !important; 
		padding: 12px 15px; 
		border-radius: 8px; 
		box-shadow: 0 2px 8px rgba(0,0,0,0.25); 
		font-family: "Segoe UI", sans-serif; 
		font-size: 14px; 
} 

.leaflet-control-layers-expanded { 
		padding: 10px; 
} 

.leaflet-control-layers label { 
		display: flex; 
		align-items: center; 
		margin-bottom: 6px; 
} 

.leaflet-control-layers label img.legend-icon { 
		width: 32px; height: auto; margin-right: 8px; 
} 

.leaflet-control-layers-separator { 
		margin: 10px 0; border-top: 1px solid #ccc; 
}

.layer-header {
    padding: 6px 10px;
    background: #eaeaea;
    border-bottom: 1px solid #ccc;
    font-weight: bold;
}

.section-title { 
		margin: 16px 0 14px 0; 
		padding: 4px 8px; 
		background: #56A5F0; 
		border-left: 3px solid #0078ff; 
		font-size: 18px; 
		font-weight: bold;
}

.icon-info {
  width: 48px;
  height: 32px;
  cursor: pointer;
  background-color: #fff;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 22px;
  border-radius: 4px;
}

/* Icono cuando la herramienta está desactivada */
.icon-info.off {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' stroke='%23000' fill='none' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='10'/><line x1='12' y1='16' x2='12' y2='12'/><circle cx='12' cy='8' r='1'/></svg>");
}

/* Icono cuando la herramienta está activada */
.icon-info.on {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' stroke='%23007aff' fill='none' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='10'/><line x1='12' y1='16' x2='12' y2='12'/><circle cx='12' cy='8' r='1'/></svg>");
  background-color: #e6f0ff;
}

.leaflet-bar .custom {
    width: 60px !important;   /* o el ancho que quieras */
    height: 32px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.leaflet-control.custom {
    width: 60px;
    height: 32px;
    background: white;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}