html, body {
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

#myfullScreenPopup, #infoAndBattleContainer, #mybattleListContainer, #mygoogleMapsButtonsContainer {
	overflow-x: hidden; 
    max-width: 100vw; /* Prevent these elements from exceeding the viewport width */
    box-sizing: border-box;
}

/* Style for the map and side panels container */
/* Map and Legend Container */

#mymap {
     width: 100%;
    height: 600px;
	margin-top: 50px;
	margin-bottom: 20px;
}

/* Container for total info and battle list with responsive layout */
#infoAndBattleContainer {
    display: flex;
    gap: 0px; /* Add space between the two containers */
    justify-content: space-between;
    align-items: flex-start;
}

/* Total info and selected battles each take half of the available width */
#totalInfoContainer, #mybattleListContainer {
    flex: 1;
}

/* Responsive adjustments for mobile screens */
@media (max-width: 768px) {
    #infoAndBattleContainer {
        flex-direction: column; /* Stack vertically on smaller screens */
    }
    
    #totalInfoContainer, #mybattleListContainer {
        width: 100%; /* Full width for each on mobile */
    }
}

#totalInfoContainer {
    text-align: center;
    margin-top: 20px;
	
}

#totalInfoContainer div {
    margin-bottom: 20px;
	font-size: 18px;
}

/* Selected Battles Container */
#mybattleListContainer {
    float: right;
    margin-top: 20px;
    text-align: left; /* Change from 'center' to 'left' */
    border: 2px solid;
    border-radius: 15px;
    background-color: #f9f9f9;
    padding: 20px;
    box-sizing: border-box;
}

@media (max-width: 768px) {
#mybattleListContainer {
	
	width: auto;
	float: center;
    margin-top: 20px;
	margin-left: 20px;
	margin-right: 20px;
	text-align: left;
    border: 2px solid;
    border-radius: 15px;
    background-color: #f9f9f9;
    padding: 20px;
}
}

/* Google Maps Buttons styling */
#mygoogleMapsButtonsContainer {
		 display: flex;
 flex-direction: column;
    align-items: center;
    margin: auto;
	padding-top: 20px;
    width: 100%; /* Ensure it doesn't overflow */
    box-sizing: border-box;
}


#mybattleListContainer h3 {
	
	font-size: 22px;
    margin-top: 15px;
	text-align: center;
	font-family: "Ubuntu Sans";
}


#myfullScreenPopup {
    position: fixed; /* Use fixed positioning to ensure it takes the entire viewport */
    top: 0;
    left: 0;
    width: 100vw; /* Full viewport width */
	height: 100vh; /* Full viewport height */
    background: rgba(0, 0, 0, 0.8);
    color: white;
    display: none;
    z-index: 9999;
    justify-content: center;
    align-items: center;
	overflow: hidden; /* Prevent scrolling within the main popup container */
    box-sizing: border-box;
}

#popupContent, #mypopupContent {
    max-width: 90vw; /* Ensure it fits within the viewport width */
    margin: 0 auto; /* Center it horizontally */
    box-sizing: border-box;
	overflow: hidden; /* Prevent scrolling within the popup */
}


#mypopupContent {
    background: white;
    color: black;
    padding: 20px;
    border-radius: 10px;
    max-width: 800px; /* Fit within viewport width */
    max-height: 90vh; /* Fit within viewport height */
    overflow-y: auto; /* Allow vertical scrolling if content overflows */
    position: relative;
    text-align: center;
    box-sizing: border-box;
	margin: auto; /* Center the content */
}


#mypopupTitle {
    font-size: 24px;
    margin-bottom: 10px;
}

#mypopupDate {
    font-size: 18px;
    margin-bottom: 20px;
    background-color: #BFA280;
	color: white;
    padding: 10px;
    border-radius: 5px;
}

#mypopupDescription {
    font-size: 16px;
	text-align: left;
}

#mypopupImage {
    display: block;
    margin: 0 auto 10px;
}

#mypopupReadMore {
    display: block;
    margin-top: 20px;
    padding: 10px;
    background-color: grey;
    color: white;
    text-decoration: none;
    text-align: center;
    border-radius: 5px;
}

#mypopupReadMore:hover {
    background-color: black;
}

#closeMyPopupButton {
 position: absolute;
    top: 20px;
    right: 20px;
    background: red;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;

}

#closeMyPopupButton:hover {
    background: darkred;
}

/* Styling for the Google Maps link button */
.my-google-button {
    max-width: 90vw; /* Ensure buttons fit within the viewport width on mobile */
    width: auto; 
    padding: 10px;
    background-color: #09403F !important;
    color: white!important;
    text-align: center;
	border: none!important; 
    text-decoration: none;
    border-radius: 5px;
    font-size: 16px;
    margin-bottom: 20px; /* Add some spacing between buttons */
}

.my-google-button:hover {
    background-color: #B0B9CA!important;
}


.marker-content img {
    animation: drop 0.5s ease;
    transition: transform 0.2s ease;
}

#mypopupAddToRoute {
	padding-top: 20px;
	padding-bottom: 20px;
    margin-top: 30px;
    font-size: 1.4em;
    cursor: pointer;
	font-weight: bold;
	border-radius: 5px;
    background-color: #6CB4EE;
	
}

#mypopupAddToRoute #myheartIcon {
    margin-left: 10px;
    font-size: 1.2em;
}

.full-screen-popup {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    justify-content: center;
    align-items: center;
    z-index: 2000;
    flex-direction: column;
}

.popup-content {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    max-width: 300px;
}

.popup-button {
    width: 100%;
    padding: 20px;
    margin: 10px 0;
     background-color: #09403F !important;
    color: white;
    border: none!important;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
}

.popup-button:hover {
     background-color: #B0B9CA!important;
	 border: none!important;
}

/* Selected Battle Row */
.battle-row {
    display: flex;
    justify-content: flex-start; /* Align content to the left */
    align-items: center; /* Ensure elements are vertically aligned */
   /* margin-bottom: 10px;*/
    padding: 10px 0;
    border-bottom: 1px solid #ccc;
}

/* Hover effect for battle rows */
.battle-row:hover {
    background-color: lightblue;
}

/* Battle Title in the row */
.battle-row span {
    font-size: 16px;
   /* flex: 1;  Ensures that the text takes up remaining space in the row */
    text-align: left; /* Ensure text is aligned to the left */
}

.heart-icon {
	font-size: 24px;
    cursor: pointer;
	padding: 10px 10px 10px 10px;
}

/* Hover effect for hearts */
.heart-icon:hover::after {
    content: 'X';
    color: white;
    background-color: red;
    border-radius: 50%;
    padding: 5px;
    display: inline-block;
    width: 24px;
    height: 24px;
    text-align: left;
    line-height: 14px;
	z-index: 2000;
}

.heart-icon:hover {
    color: transparent; /* Hide the heart icon text on hover */
}


/* Legend container (centered above the map) */
#legendContainer {
    text-align: left;
    max-width: 800px; /* Limit width to wrap around content */
    margin: 0 auto 20px auto;
    padding: 15px;
    border: 2px solid;
    border-radius: 15px;
}

#legendContainer h3 {
	text-align: center;
	font-size: 22px;
	margin-top: 0;
    font-family: "Ubuntu Sans";
}

/* Grid layout for legend items - 2 columns on desktop, 1 column on mobile */
#legendGrid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    #legendGrid {
        grid-template-columns: 1fr; /* Switch to 1 column on small screens */
    }

    #legendContainer {
        width: auto; /* Adapt container to content */
        padding: 10px;
    }
}


.legend-item {
	font-size: 13px;
	font-weight:500;
    display: flex;
    align-items: center;
	justify-content: start;
    gap: 10px;
    
}

.legend-item img {
    width: 30px;
    height: 30px;
   
    vertical-align: middle;
}

/* Ensure proper box-sizing */
#mybattleListContainer, #legendContainer {
    box-sizing: border-box;
}


.battle-row:hover {
    background-color: white;
    cursor: pointer; /* This makes it clear it's clickable */
}


/* Add this CSS to your stylesheet or within a <style> tag */

/* Container for the search bar and results */
#mapContainer {
    position: relative;
	 width: 100%;
}

/* Style the search bar */
#mapSearchBar {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    z-index: 10;
    font-size: 14px;
	background-color: rgba(255, 255, 255, 0.9);
}

/* Style the search results dropdown */
.search-results {
    position: absolute;
    top: 45px; /* Position below the search bar */
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    max-height: 300px;
    overflow-y: auto;
    background-color: #fff;
    border: 1px solid #ccc;
    border-top: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 10;
    display: none; /* Hidden by default */
}

/* Style each search result item */
.search-result-item {
    padding: 8px 12px;
    cursor: pointer;
}

.search-result-item:hover {
    background-color: #f0f0f0;
}

/* Optional: Style for "No results found" */
.no-results {
    padding: 8px 12px;
    color: #888;
}

/* Export PDF button styling */
.my-export-button {
    display: flex;
    justify-content: center; /* Align content to the center */
    align-items: center; /* Center align vertically */
    width: 200px;
    margin: 20px auto;
    background-color: #09403F !important;
    color: white;
    padding: 10px;
    font-size: 16px;
    border: none!important; /* Use 'none' or remove '!important' to avoid conflicts */
    border-radius: 5px;
    cursor: pointer;
}


.my-export-button:hover {
background-color: #B0B9CA!important;
}