/* General Reset and Base Styles */
html, body {
    height: 100%;
    margin: 0;
}

body, .leaflet-container {
    background-color: #03081e; 
	color: #e0e0e0;
    cursor: grab;
    transition: background-color 0.3s ease-in-out;
}

body.editing-mode, body.editing-mode .leaflet-container {
    background-color: #1e0803;
    cursor: crosshair;
}

body.distance-mode, body.distance-mode .leaflet-container {
    background-color: #031e08;
    cursor: crosshair;
}

body.distance-mode .leaflet-container path {
    cursor: crosshair;
}

/* Button to toggle the menu - positioned at the top left */
.menu-toggle-btn {
    position: fixed;
    top: 0px;
    left: 5px;
    z-index: 1100; /* Ensures the button is on top of the menu */
}

/* The vertical menu - hidden by default */
.vertical-menu {
    width: 130px;
    height: 100%;
    position: fixed;
    top: 0;
    left: -130px;
    background-color: #111;
    overflow-x: hidden;
    transition: 0.3s;
    z-index: 1000; /* Menu has a lower z-index than the button */
    padding-top: 60px;
}

/* Menu items */
.vertical-menu a {
    padding: 10px 15px;
    text-decoration: none;
    font-size: 18px;
    color: white;
    display: block;
    transition: 0.3s;
}

/* When hovered */
.vertical-menu a:hover {
    background-color: #575757;
}

/* When active */
.vertical-menu a.active {
    background-color: #0d6efd;
	color: #FFF;
}

/* Show the menu when active */
.vertical-menu.show {
    left: 0px;
}

/* Map Container */
#map {
    width: 100vw;
    height: 100%;
}

/* Top and Side Menu */
#menu_top {
    text-align: center;
    z-index: 401;
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
}

#menu_side {
    z-index: 401;
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px; /* Space between buttons */
}

/* Edit Controls */
.edit_controls {
    position: absolute;
    right: 5px;
    z-index: 402;
}

#edit_controls-2 {
    top: 50px;
}

.edit_controls button {
    margin-bottom: 5px;
}

/* POI Marker Label */
.marker-label_text {
    color: white;
    top: -15px;
    position: relative;
    min-width: 100px;
    max-width: 200px;
    opacity: 0.9;
    font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
    font-size: 1.2rem;
    letter-spacing: 1px;
    font-weight: bold;
    text-shadow: 3px 3px 2px #000000;
    text-align: left;
    pointer-events: none;
}

.marker-label-double-clue {
    color: orange;
}

/* POI Popup */
.poi_popup .leaflet-popup-content-wrapper {
    background: none;
    box-shadow: none;
}

.poi_popup .leaflet-popup-tip-container {
    margin-top: -1px;
}

.poi_popup .leaflet-popup-tip {
    background-color: gold;
}

.poi_popup .leaflet-popup-content {
    margin: 0;
}

/* Image Popup */
.image-popup {
    position: absolute;
    display: none;
    padding: 2px;
    background-color: #fff;
    border-radius: 5px;
    z-index: 1000;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.image-popup img {
    max-width: 750px;
    border-radius: 6px;
    object-fit: cover;
}

.image-popup figcaption {
    display: none;
    margin-top: 3px;
    font-size: 14px;
    color: #333;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    text-align: center;
}

/* Hover Element */
.hover-element {
    cursor: pointer;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    color: #007BFF;
}

.hover-element:hover {
    color: #0056b3;
}

/* POI Image */
.poi_popup img {
    min-width: 500px;
    border: 5px solid gold;
}

/* POI Text */
.poi_text {
    margin-left: -6px !important;
    margin-top: -15px !important;
    color: #333;
    font-size: 1.7em;
    font-weight: 600;
}

/* Full-Screen Carousel Modal */
#fullScreenCarouselModal img {
    max-width: 80%;
    max-height: 100%;
    cursor: pointer;
    margin: auto;
}

#carouselControls {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.carousel-control-prev, .carousel-control-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
}

/* Hide Utility Class */
.hide {
    display: none;
}

/* Legend Styling */
#legend {
    display: none;
    position: absolute;
    top: 0px;
    right: 5px;
    background-color: #333;
    padding: 5px;
    opacity: 1;
    font-size: 1em;
    border: 1px solid #CCC;
    z-index: 404;
    font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
    line-height: 1.5;
}

#legend label {
    cursor: pointer;
}

#legend hr {
    margin: 5px 0;
}

#legend .circle {
    width: 15px;
    height: 15px;
    display: inline-block;
    border-radius: 50%;
    border: 2px solid #000;
    margin-left: 5px;
}

#legend a {
    color: #FFF;
}

/* Modal Content */
.modal-content {
    color: #000;
}

/* Image Upload Handling */
input#ImageUrl {
    display: none;
}

.image-wrapper {
    position: relative;
    display: inline-block;
    margin: 10px;
}

.image-wrapper .delete-image {
    position: absolute;
    top: 0;
    right: 0;
    background: red;
    color: white;
    border: 0;
    margin: 0;
}

/* Distance Mode Labels */
.distance-label {
    font-size: 12px;
    font-weight: bold;
    color: #446644;
    background-color: white;
    padding: 2px;
    border-radius: 3px;
    width: 50px !important;
    height: auto !important;
    text-align: center;
}

/* Loading Bar */
.loadingBarContainer {
    background-color: rgba(255, 255, 255, 0.8);
    display: none;
    width: 100%;
}

.loadingBar {
    height: 5px;
    transition: width 0.4s ease;
    width: 0%;
    background-color: #4CAF50;
}
