html, body {
    height: 100%;
    padding: 0;
    margin: 0;
    font-family: 'Alternate Gothic No3 D', 'Arial Narrow', Arial, sans-serif;
    font-size: 16px;
}


#map {
    width: 100%;
    height: 100%;
}

.ol-control {
	clear: both;
	box-shadow: 0 3px 14px rgba(0, 0, 0, 0.4);
}

.ol-selectable {
	z-index: 3;
}

.ol-popup {
    display: none;
    position: absolute;
    background-color: white;
    border: 1px solid #bfe6ea;
    padding: 15px;
	border-radius: 10px;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    max-width: min(560px, calc(100vw - 24px));
    width: max-content;
    z-index: 30;
	box-shadow: 0 8px 24px rgba(0, 90, 100, 0.18);
}

.ol-popup:after, .ol-popup:before {
    top: 100%;
    border: solid transparent;
    content: " ";
    position: absolute;
}

.ol-popup:after {
    border-top-color: white;
    border-width: 10px;
    left: 50%;
    margin-left: -10px;
}

.ol-popup:before {
    border-top-color: #bfe6ea;
    border-width: 11px;
    left: 50%;
    margin-left: -11px;
}

.ol-popup-closer {
	text-decoration: none;
    position: absolute;
    top: 4px;
    right: 4px;
    text-align: center;
    width: 19px;
    color: #00909d;
    font-family: 'Alternate Gothic No3 D', 'Arial Narrow', Arial, sans-serif;
    font-weight: bold;
}

.ol-popup-closer:after {
    content: "X";
}

#popup-content {
	font-size: 12px;
    line-height: 1.2;
    margin-top: 5px;
	max-height: 70vh;
	max-width: min(70vw, 520px);
	overflow: auto;
	-webkit-overflow-scrolling: touch;
}

#popup-content ul {
    list-style-type: none;
    padding-left: 0;
	margin: unset;
}

#popup-content li {
    margin-bottom:0.25em;
}

#popup-content>ul>li>a {
    position: relative;
    display: block;
    padding: 2px;
    border-bottom: 1px solid #666;
    font-size: 12.5px;
}

#popup-content>table {
    font-size: 11.4px;
}

.roller-switcher {
	background-image: url(lds-roller.gif);
	background-size: contain;
	height: 19px;
	width: 19px;
	display: inline-block;
}

th, td {
    vertical-align: top;
    text-align: left;
	color: #0f3f44;
}

th {
	min-width: 100px;
}
td {
	min-width: 100px;
}

td img {
	max-height: 50vh!important;
	max-width: 50vw!important;
}

td video {
	max-height: 50vh!important;
	max-width: 50vw!important;
}

.ol-overlaycontainer-stopevent #top-right-container .layer-switcher:hover ~ .ol-overlaycontainer-stopevent .ol-overlay-container .ol-popup {
    display: none!important;
}


#top-left-container {
    position: absolute;
    left: 0;
    top: 0;
}
#bottom-left-container {
    position: absolute;
    left: 0;
    bottom: 0;
}
#top-right-container {
    position: absolute;
    right: 0;
    top: 0;
    display: contents;
}
#bottom-right-container {
    position: absolute;
    right: 0;
    bottom: 0;
}

.top-left-title, .top-left-abstract  {
    position: relative;
    float: left;
    margin-top: 8px;
    margin-left: 8px;
}
.bottom-left-title, .bottom-left-abstract  {
    position: relative;
    float: left;
    margin-bottom: 8px;
    margin-left: 8px;
}
.top-right-title, .top-right-abstract  {
    position: relative;
    float: right;
    margin-top: 8px;
    margin-right: 8px;
}
.bottom-right-title, .bottom-right-abstract  {
    position: relative;
    float: right;
    margin-bottom: 8px;
    margin-right: 8px;
}


.project-title  {
    margin: 1px;
    padding: 5px;
}

#abstract {
    max-width: 30%;
}
.ol-touch #abstract {
    max-width: 50%;
}

.project-abstract {
    font: bold 18px 'Lucida Console', Monaco, monospace;
    width: 20px;
    height: 20px;
    display: block;
    text-align: center;
    cursor: pointer;
    padding: 3px;
    
}

.project-abstract-uncollapsed {
    width: auto;
    height: auto;
    display: block;
    padding: 3px;
    cursor: default;
    margin: 1px;
}


.ol-zoom {
	position: relative;
    float: left;
    top: unset;
    left: unset;
    margin-top: 8px;
    margin-left: 8px;
}


/* measurement */
.measure-control {
	position: relative;
    float: left;
    top: unset !important;
    left: unset !important;
    margin-top: 8px;
    margin-left: 8px;
	display: flex;
}

.tooltip {
    position: relative;
    background: rgba(0, 144, 157, 0.9);
    border-radius: 4px;
    color: white;
    padding: 4px 8px;
    opacity: 0.7;
    white-space: nowrap;
  }
  .tooltip-measure {
    opacity: 1;
    font-weight: bold;
  }
  .tooltip-static {
    background-color: #00909d;
    color: white;
    border: 1px solid #ffffff;
  }
  .tooltip-measure:before,
  .tooltip-static:before {
    border-top: 6px solid rgba(0, 0, 0, 0.5);
    border-right: 6px solid transparent;
    border-left: 6px solid transparent;
    content: "";
    position: absolute;
    bottom: -6px;
    margin-left: -7px;
    left: 50%;
  }
  .tooltip-static:before {
    border-top-color: #00909d;
  }
  .ol-touch .measure-control {
    top: 130px;
  }
  .measure-control label {
    padding: 1px;
    padding-right: 4px;
  }


 .geolocate {
 position: relative !important;
 float: left;
 top: unset !important;
 left: unset !important;
 margin-top: 8px;
 margin-left: 8px;
}


.ol-geocoder.gcd-gl-container {
    position: relative !important;
    float: left !important;
    top: unset;
    left: unset;
	margin-top: 8px;
    margin-left: 8px;
    clear: both;
}
.gcd-gl-control {
	position: relative !important;
}
.gcd-gl-control button:after{
	display: none;
}

.search-layer {
	position: relative !important;
    float: left;
    top: unset !important;
    left: unset !important;
    margin-top: 8px;
    margin-left: 8px;
}

.search-layer-input-search{
    left: 26px;
    width: 144px;
    top: 3px;
    padding: 3px;
}

.search-layer-input-search:after{
    left: 27px;
    width: 139px;
    top: 0px;
    padding: 4px;
    border: 3px solid rgba(255,255,255,.4) !important;
}

.ol-scale-line {
    background: none !important;
    position: relative;
    float: left;
    bottom: unset;
    left: unset;
    margin-bottom: 8px;
    margin-left: 8px;
}
.ol-scale-line-inner {
    border: 2px solid ;
    border-top: none ;
    background: rgba(255, 255, 255, 0.5);
    color: white;
	margin: unset;
}

.layer-switcher {
    position: relative;
    float: right;
    top: unset;
    right: 0;
    bottom: unset!important;
    margin-top: 8px;
    margin-right: 8px;
	padding: 3px;
	background-color: rgba(255,255,255,.4)!important;
}

.layer-switcher:hover{
	background-color: rgba(255, 255, 255, .6)!important;
}

.layer-switcher .panel {
	border: unset;
	border-radius: unset;
    float: right;
    width: fit-content;
	margin: 1px;
	max-height: calc(100vh - 200px);
    box-sizing: unset;
}

.layer-switcher.shown{
    align-items: flex-end;
}

.layer-switcher.shown.layer-switcher-activation-mode-click > button {
    position: relative;
	border-radius: 5px;
	font-size: x-large;
	font-family: serif;
    z-index: 2;
}

.layer-switcher img {
    max-width: 22px;
    max-height: 22px;
}


.ol-attribution {
	display: none;
}
.bottom-attribution {
	float: right;
	position: relative;
	display: flex;
    font-size: 0.9rem;
	}
.bottom-attribution a {
	color:#00909d;
    text-decoration: none;
	}
.bottom-attribution a:hover {
    text-decoration: underline;
    }
.bottom-attribution button {
	display: none;
	}
.bottom-attribution ul {
	padding: unset;
	margin: unset;
	display: flex;
	list-style: none;
	} 	
.bottom-attribution > li {
	padding-left: 8px !important;
	list-style: none;	
	}

.fa-exclamation-triangle {
    color: #00909d;
	font-size: 15px;
}

body, button, input, textarea, select, .ol-control, .ol-popup, .layer-switcher, .search-layer-input-search, .gcd-gl-control input {
    font-family: inherit;
}

#popup-content {
    color: #0f3f44;
    line-height: 1.35;
}

.search-layer-input-search,
.gcd-gl-control input {
    border: 1px solid #bfe6ea;
    border-radius: 8px;
    color: #0f3f44;
}

.ol-scale-line-inner {
    border-color: #006f7a;
    color: #00535c;
}

.layer-switcher .panel,
.layer-switcher.shown.layer-switcher-activation-mode-click > button {
    color: #0f3f44;
}



/* Czytelniejsze kontrolki i większa typografia */
#top-left-container {
    left: 10px;
    top: 10px;
}
#bottom-left-container {
    left: 10px;
    bottom: 10px;
}
#bottom-right-container {
    right: 10px;
    bottom: 10px;
}
.ol-control {
    box-shadow: 0 8px 24px rgba(0, 90, 100, 0.18) !important;
}
.ol-control button {
    font-weight: 700;
}
.ol-zoom,
.measure-control,
.geolocate,
.ol-geocoder.gcd-gl-container,
.search-layer,
.layer-switcher {
    margin-top: 10px;
    margin-left: 10px;
}
.measure-control label {
    padding: 6px 4px 6px 8px;
    font-size: 14px;
}
.measure-control select {
    min-height: 36px;
    border-radius: 8px;
    border: 1px solid #bfe6ea;
    color: #0f3f44;
    padding: 4px 8px;
    font-size: 14px;
}
.search-layer-input-search{
    width: 220px;
    padding: 8px 12px;
    font-size: 15px;
}
.search-layer-input-search:after{
    left: 50px;
    width: 220px;
}
.gcd-gl-control input,
.photon-input {
    width: 220px;
    padding: 0 12px;
    font-size: 15px;
}
.photon-autocomplete li {
    font-size: 15px;
    padding: 8px 12px;
}
.tooltip {
    font-size: 14px;
    padding: 6px 10px;
}


/* Ikony kontrolek bez zależności od fontów webowych */
.control-icon-btn,
.geolocate-button,
.measure-button,
.gcd-gl-btn,
.search-layer button,
.layer-switcher button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    padding: 0;
    border-radius: 10px !important;
    border: 1px solid #bfe6ea !important;
    background: rgba(255,255,255,0.96) !important;
    color: transparent !important;
    font-size: 0 !important;
    line-height: 0 !important;
    text-indent: -9999px;
    overflow: hidden;
}
.control-icon-btn::before,
.geolocate-button::before,
.measure-button::before,
.gcd-gl-btn::before,
.search-layer button::before,
.layer-switcher button::before {
    content: "";
    width: 20px;
    height: 20px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    display: block;
}
.ol-control button:hover,
.geolocate-button:hover,
.measure-button:hover,
.gcd-gl-btn:hover,
.search-layer button:hover,
.layer-switcher button:hover {
    background: #eaf7f8 !important;
}

.geolocate-button::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%23006973' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.9'%3E%3Ccircle cx='12' cy='12' r='4.2'/%3E%3Cpath d='M12 2.5v3.1M12 18.4v3.1M2.5 12h3.1M18.4 12h3.1'/%3E%3C/g%3E%3C/svg%3E");
}
.measure-button::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%23006973' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.8'%3E%3Cpath d='M6 16.5 16.5 6a2.1 2.1 0 0 1 3 3L9 19.5a2.1 2.1 0 0 1-3-3Z'/%3E%3Cpath d='m13 9 2 2M10 12l2 2M7 15l2 2'/%3E%3C/g%3E%3C/svg%3E");
}
.gcd-gl-btn::before,
.search-layer button::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%23006973' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='5.5'/%3E%3Cpath d='m16 16 4.2 4.2'/%3E%3C/g%3E%3C/svg%3E");
}
.layer-switcher button::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%23006973' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.8'%3E%3Cpath d='m12 4.5 7 3.6-7 3.6-7-3.6 7-3.6Z'/%3E%3Cpath d='m5 12.2 7 3.6 7-3.6M5 15.8l7 3.7 7-3.7'/%3E%3C/g%3E%3C/svg%3E");
}

.ol-zoom .ol-zoom-in,
.ol-zoom .ol-zoom-out {
    width: 38px;
    height: 38px;
    font-size: 20px !important;
    line-height: 1 !important;
    color: #006973 !important;
    text-indent: 0;
}

.photon-geocoder-autocomplete.ol-control,
.search-layer.ol-control,
.measure-control,
.geolocate,
.layer-switcher,
.ol-zoom {
    background: transparent !important;
    padding: 0 !important;
    border: 0 !important;
}

.layer-switcher {
    background-color: transparent !important;
    padding: 0 !important;
}
.layer-switcher:hover {
    background-color: transparent !important;
}
.layer-switcher.shown.layer-switcher-activation-mode-click > button {
    font-family: inherit !important;
    font-size: 0 !important;
    line-height: 0 !important;
}

.measure-control label {
    background: rgba(255,255,255,0.96);
    border: 1px solid #bfe6ea;
    border-radius: 10px;
    margin-left: 8px;
}

.bottom-attribution {
    font-size: 12px;
    background: rgba(255,255,255,0.96);
    border: 1px solid #bfe6ea;
    border-radius: 10px;
    padding: 4px 8px;
    box-shadow: 0 4px 12px rgba(0, 90, 100, 0.12);
}

/* Zachowanie pola wyszukiwania */
.search-layer-input-search,
.gcd-gl-control input,
.photon-input {
    line-height: normal;
}


#popup-content table {
    width: 100%;
    table-layout: fixed;
}

#popup-content th,
#popup-content td {
    min-width: 0;
    word-break: break-word;
}

#popup-content img,
#popup-content video {
    max-width: 100% !important;
    height: auto !important;
}

@media (max-width: 720px) {
    #top-left-container {
        left: 8px;
        top: 8px;
    }

    #bottom-left-container,
    #bottom-right-container {
        bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    }

    .ol-zoom,
    .measure-control,
    .geolocate,
    .ol-geocoder.gcd-gl-container,
    .search-layer,
    .layer-switcher {
        margin-top: 8px;
        margin-left: 8px;
    }

    .layer-switcher {
        margin-right: 8px;
    }

    .layer-switcher .panel {
        max-width: min(84vw, 320px);
        max-height: min(50dvh, 360px);
        overflow: auto;
    }

    .measure-control label {
        margin-left: 6px;
        padding: 6px 6px 6px 8px;
    }

    .bottom-attribution {
        max-width: calc(100vw - 16px);
        font-size: 11px;
        flex-wrap: wrap;
    }
}


@media (max-width: 720px) {
    .ol-popup {
        top: auto !important;
        left: 50% !important;
        right: auto !important;
        bottom: calc(74px + env(safe-area-inset-bottom, 0px));
        width: min(calc(100vw - 20px), 360px);
        max-width: calc(100vw - 20px);
        transform: translateX(-50%) !important;
        padding: 14px 14px 12px;
        border-radius: 14px;
    }

    .ol-popup:before,
    .ol-popup:after {
        display: none;
    }

    #popup-content {
        max-width: 100%;
        max-height: min(42dvh, 320px);
        overflow: auto;
    }

    .ol-popup-closer {
        top: 6px;
        right: 8px;
        width: 24px;
        font-size: 18px;
    }
}
