html,
        body {
            margin: 0;
            height: 100%;
            font-family: sans-serif;
        }
        #map {
            position: absolute;
            top: 0;
            bottom: 16px;
            width: 100%;
        }
        #controls {
            position: absolute;
            top: 55px;
            left: 5px;
            background: #ffffffbb;
            padding: 8px 12px;
            border-radius: 6px;
            box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
			backdrop-filter: blur(2px);
            z-index: 10;
			max-height: 85%;
			overflow: auto;
        }
		summary {
			font-size: 130%;
		}
        #controls label {
            display: block;
            margin-bottom: 4px;
        }
		#header {
			z-index: 999;
			position: absolute;
			left: 0;
			right: 0;
			height: 40px;
			background-color: #24559bbb;
			background-image: url(wi.png);
			background-repeat: no-repeat;
			font-size: min(5vw,33px);
			padding: 3px;
			padding-left: 64px;
			color: #fff;
			backdrop-filter: blur(2px);
		}
		#footer {
			z-index: 999;
			position: absolute;
			left: 0;
			right: 0;
			bottom: 0;
			height: 16px;
			background-color: #24559b;
			background: linear-gradient(90deg,rgba(36, 85, 155) 0%, rgba(227,224,211) 80%);
			font-size: 12px;
			padding: 2px;
			color: #fff;
		}		
		h3 {
			padding-top: 5px;
			margin: 0;
		}
		.maplibregl-ctrl-top-right {
			top: 45px !important;
		}
		.maplibregl-ctrl-attrib.maplibregl-compact {
			background: #ffffffaa !important;
			backdrop-filter: blur(2px) !important;
		}
		.maplibregl-popup-close-button {
			position: fixed;
			top: 4px;
			right: 14px;
			font-size: 12pt;
		}
		.maplibregl-popup-content {
			  border-radius: 8px;
			  border: 2px solid #24559bbb;
			  max-height: 40vh;
			overflow: auto;
		}
		#popup_list {
			max-height: 40vh;
			overflow: auto;
		}
		.popup-preheader {
		  width: 430px;
		}
		.popup-header {
		  background-color: #eef;
		  padding: 3px;
		  margin-top: 5px;
		  cursor: pointer;
		  width: 400px;
		}
		.popup-entries {
			padding: 0;
			padding-left: 16px;
		}
		.popup-entry {
			padding: 3px;
			background: #f8faff;
			width: 400px;
		}
		.header-spacer {
			min-width: 90px;
			display: inline-block;
		}
		.header-val {
			display: inline-block;
			min-width: 60px;
			margin-left: 14px;
			text-align: right;
			font-size: 88%;
		}
		.header-txt {
			display: inline-block;
			min-width: 60px;
			text-align: left;
			font-weight: bold;
		}
		.header-lp {
			display: inline-block;
			min-width: 16px;
			text-align: right;
			margin-right: 5px;
			font-size: 95%;
		}
		.blue {
			color: blue;
			font-weight: bold;
		}
		.red {
			color: red;
			font-weight: bold;
		}
		.smaller {
			font-size: 80%;
		}
		.modal {
		  display: none;
		  position: fixed;
		  z-index: 9999;
		  left: 0;
		  top: 0;
		  width: 100%;
		  height: 100%;
		  overflow: auto;
		  background-color: rgb(0,0,0);
		  background-color: rgba(0,0,0,0.4);
		  backdrop-filter: blur(2px);
		}
		.modal-content {
		  background-color: #ffffffcc;
		  backdrop-filter: blur(2px);
		  margin: 15% auto;
		  padding: 20px;
		  border: 1px solid #888;
		  width: 80%;
		  max-width: 512px;
		}
		.open:hover,
		.open:focus {
		  cursor: pointer;
		}
		.close {
		  color: #aaa;
		  float: right;
		  font-size: 28px;
		  font-weight: bold;
		}
		.close:hover,
		.close:focus {
		  color: black;
		  text-decoration: none;
		  cursor: pointer;
		}
		.button {
			display: inline-block;
			vertical-align: middle;
			border: none;
			border-radius: 5px;
			background-color: rgb(233, 233, 237); 
			padding: 2px 4px;
			border: 1px solid rgb(143, 143, 157);
			color: #fff;
			background-color: #47e;
			text-decoration: none;
			font-size: 12px;
			text-align: center;
			cursor: pointer;
			white-space: nowrap;
		}
		.off::before {font-size: 14px; content: "➕ ";}
		.on::before {font-size: 14px; content: "➖ ";}
		.legend {
			width: 24px;
			height: 12px;
			display: inline-block;
		}
    .control-panel-add {
      position: absolute;
      top: 225px;
      right: 10px;
      background: white;
      padding: 3px;
      border-radius: 4px;
      box-shadow: 0 0 10px rgba(0,0,0,0.2);
      z-index: 10;
      display: flex;
      gap: 8px;
    }

    .control-btn-add {
      background: white;
      color: black;
      border: none;
      width: 24px;
      height: 24px;
      border-radius: 10%;
      font-size: 28px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: background 0.2s;
    }
	
	/* container do rysowania */
     .maplibregl-ctrl-group:has(.maplibregl-terradraw-measure-add-control) {
		margin-top: 45px;
	}

        .map-header {
            z-index: 999;
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 40px;
            background-color: #24559bbb;
            backdrop-filter: blur(2px);
            border-bottom: 1px solid rgba(0,0,0,0.1);
            background-image: url(wi.png);
            background-repeat: no-repeat;
	    display: flex;
            align-items: center;
            justify-content: space-between;
            font-size: min(5vw,33px);
            padding: 3px;
            padding-left: 64px;
            color: #fff;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        }

        .map-title {
            font-size: min(5vw,33px);
            font-weight: bold;
            color: #fff;
        }

        .social-links a {
            color: #fff;
            font-size: 26px;
	    margin-right: 8px;
            transition: all 0.2s; 
            text-decoration: none;
            border-radius: 10%;
	    border: 1px solid #fff;
            background: none;
        }

        .social-links button {
            color: #fff;
            font-size: 23px;
	    margin-right: 1px;
            transition: all 0.2s; 
            text-decoration: none;
            border-radius: 10%;
	    border: 1px solid #fff;
            background: none;
        }

        .social-links a:hover {
            transform: scale(1.2);
            color: #1da1f2;
        }

	.social-links button:hover {
            transform: scale(1.0);
            color: #1da1f2;
        }

        /* Style do udostępniania widoku 24.11.2025 r*/
        .share-modal {
            display: none;
            position: absolute;
            top: 50%; left: 50%;
            transform: translate(-50%, -50%);
            width: 90%;
            max-width: 500px;
            background: white;
            border-radius: 12px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.3);
            z-index: 2000;
            padding: 20px;
            text-align: center;
        }

        .share-modal.visible { display: block; }

        .share-overlay {
            display: none;
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            background: rgba(0,0,0,0.5);
            z-index: 1999;
        }

        .share-overlay.visible { display: block; }

        #shareLink {
            width: 95%;
            padding: 12px;
            margin: 15px 0;
            border: 1px solid #ddd;
            border-radius: 8px;
            font-family: monospace;
            font-size: 14px;
        }

        .copy-btn {
            background: #1da1f2;
            color: white;
            border: none;
            padding: 10px 20px;
            border-radius: 8px;
            cursor: pointer;
            font-weight: bold;
        }

        .close-modal {
            position: absolute;
            top: 10px; right: 15px;
            font-size: 28px;
            cursor: pointer;
            color: #999;
        }