html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
}

#header {
    height: 50px;
    background-color: #1d4f6f;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
}

#header-title {
    font-size: 24px;
    font-weight: bold;
    color: white;
}

#header-banner {
    height: 44px;
    max-width: 300px;
    object-fit: cover;
    border-radius: 4px;
}

#header h2 {
    margin: 0;
    font-size: 20px;
}

#map {
    height: calc(100vh - 55px);
    width: 100%;
	
	border: 1px solid ##b0b0b0;
    box-sizing: border-box;
}


#search-panel {
    position: absolute;
    top: 60px;
    left: 100px;
    z-index: 1000;
    background: white;
    padding: 8px;
    border-radius: 4px;
    box-shadow: 0 0 5px rgba(0,0,0,0.3);
}

#search-input {
    width: 180px;
}

#search-results {
    position: absolute;
    top: 100px;
    left: 100px;
    z-index: 1000;
    background: white;
    max-height: 250px;
    overflow-y: auto;
    width: 250px;
    border-radius: 4px;
    box-shadow: 0 0 5px rgba(0,0,0,0.3);
}

.search-result {
    padding: 8px;
    cursor: pointer;
    border-bottom: 1px solid #ddd;
}

.search-result:hover {
    background: #f0f0f0;
}

.munro-popup {
    text-align: center;
}

.munro-popup h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

.munro-popup img {
    width: 250px;
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 10px;
}

.ascended {
    color: green;
    font-weight: bold;
}

.not-ascended {
    color: red;
    font-weight: bold;
}

#photo-overlay {
    display: none;
    position: fixed;
    z-index: 9999;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    cursor: pointer;
}

#photo-overlay img {
    position: absolute;
    max-width: 90%;
    max-height: 90%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 3px solid white;
    border-radius: 6px;
    box-shadow: 0 0 20px black;
}

#legend {
    position: absolute;
    top: 60px;
    right: 10px;
    z-index: 1000;
    background: white;
    padding: 10px;
    border: 1px solid #999;
    border-radius: 4px;
    font-size: 14px;
}

#legend strong {
    display: block;
    margin-bottom: 6px;
    text-align: center;
    font-size: 15px;
}

#legend div {
    margin: 5px 0;
}

.legend-green,
.legend-red {
    display: inline-block;
    width: 0;
    height: 0;
    margin-right: 8px;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-bottom: 12px solid;
}

.legend-green {
    border-bottom-color: #008000;
}

.legend-red {
    border-bottom-color: #cc0000;
}

#copyright {
    position: absolute;
    bottom: 5px;
    left: 10px;
    z-index: 1000;
    background: rgba(255,255,255,0.8);
    padding: 4px 8px;
    font-size: 11px;
    border-radius: 3px;
}

#north-arrow {
    position: absolute;
    right: 15px;
    bottom: 25px;
    z-index: 1000;
}

#north-arrow img {
    display: block;
    width: 40px;
    height: 40px;
}

#help-button {
    position: absolute;
    top: 135px;
    left: 12px;
    z-index: 1000;
    width: 30px;
    height: 30px;
    background: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
}

#help-button img {
	width: 20px;
    height: 20px;
    margin-top: 5px;
}

#help-button:hover {
    background: #f4f4f4;
}

#locate-button {
    position: absolute;
    top: 170px;
    left: 12px;
    z-index: 1000;
    width: 30px;
    height: 30px;
    background: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
}

#locate-button:hover {
    background: #f4f4f4;
}

#locate-button img {
    width: 20px;
    height: 20px;
    margin-top: 5px;
}

#help-panel {
    display: none;
    position: absolute;
    top: 140px;
    left: 100px;
    width: 380px;
    max-height: 70vh;
    overflow-y: auto;
    z-index: 2000;
    background: white;
    border: 1px solid #999;
    border-radius: 6px;
    padding: 15px;
	font-size: 12px;
    box-shadow: 0 0 10px rgba(0,0,0,0.4);
}

#help-panel h3 {
    margin-top: 0;
    color: #1d4f6f;
	font-size: 16px;
	font-size: 14px;
}

#help-panel h4 {
    margin-bottom: 5px;
    color: #1d4f6f;
}

#help-close {
    float: right;
    cursor: pointer;
    font-weight: bold;
    color: #666;
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {

    #map {
        height: calc(100vh - 150px);
    }

}

/* Phone */
@media (max-width: 768px) {

    #legend {
        top: 110px;
        right: 10px;

        font-size: 12px;
        padding: 6px;
    }
	
	#help-button {
		left: 12px;
		font-size: 12px;
	}
	
	#locate-button {
		left: 12px;
		font-size: 12px;
	}

    #map {
        height: calc(100vh - 110px);
    }

    .leaflet-control-scale {
        margin-bottom: 40px !important;
    }

    #north-arrow {
        bottom: 40px;
    }
	
	#help-panel {
		left: 10px;
		right: 10px;
		width: auto;
		max-width: none;
		top: 140px;
		max-height: 60vh;
		padding: 10px;
		font-size: 10px;
	}
	#header-title {
		font-size: 18px;
	}

	#header-banner {
		max-width: 120px;
		height: 35px;
	}
}