/*
 * Stylesheet for DuckieW's Trip site
 */

#map { height: 100vh; }

.body {
  margin: 0;
  padding: 0;
}

/* Remove Leaflet's default padding & background from content */
.leaflet-popup-content-wrapper {
  background: none;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
}

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

/* remove default tip styling (optional if it clashes) */
.leaflet-popup-tip-container {
  display: none; /* optional: hides the popup "arrow" */
}

/* my custom popup */
.custom-popup {
  width: 160px;
  font-family: sans-serif;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.popup-header {
  background-color: #336699; /* dark blue */
  color: white;
  font-weight: bold;
  height: 20px;
  line-height: 20px;
  padding: 0 6px;
}

.popup-body {
  background-color: white;
  padding: 8px;
  color: #333;
}

.custom-buttons {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    z-index: 1000;
}

.leaflet-control-button {
    position: relative; /* Position relative for tooltip positioning */
    background-color: white;
    border: 2px solid rgba(128,128,128,0.5);
    border-radius: 4px;
    padding: 3px;
    cursor: pointer;
    outline: none;
}

.tooltip {
    visibility: hidden; /* Hidden by default */
    width: 120px; /* Width of the tooltip */
    background-color: #EEEEEE; /* Background color */
    color: #222222; /* Text color */
    text-align: center; /* Centered text */
    border-radius: 5px; /* Rounded corners */
    padding: 5px; /* Padding */
    position: absolute; /* Positioning */
    z-index: 1; /* Ensure it appears above other elements */
    bottom: -50%; /* Position above the button */
    left: -350%; /* Position to the left of the button */
    transform: translateY(-5px); /* Adjust vertical position */
    opacity: 0; /* Start invisible */
    transition: opacity 0.3s; /* Fade effect */
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.leaflet-control-button:hover .tooltip {
    visibility: visible; /* Show tooltip on hover */
    opacity: 1; /* fade in */
}

.leaflet-control-button .show  {
    visibility: visible; /* Show tooltip on click */
    opacity: 1; /* fade in */
}

.fade-out {
    opacity: 0; /* final opacity for fade-out */
}

.busy-indicator {
    position: fixed;
    bottom: 50px;
    left: 50px;
    background-color: rgba(255, 255, 255, 0); /* transparent */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: sans-serif;
    z-index: 1000; /* above other elements */
}

.spinner {
    border: 8px solid #f3f3f3; /* Light grey */
    border-top: 8px solid #3498db; /* Blue */
    border-radius: 50%;
    width: 50px;  /* spinner size */
    height: 50px; /* spinner size */
    animation: spin 1s linear infinite; /* spinner animation */
}

@keyframes spin {
    0%   { transform: rotate(0deg);   }
    100% { transform: rotate(360deg); }
}

.modal {
    display: none; /* hidden by default */
    position: fixed; /* stay in place */
    z-index: 999; /* sit on top */
    right: 50px;
    top: 8px;
    min-width: 220px;
    max-width: 400px;
    height: 380px;
    padding-left: 4px;
    padding-right: 4px;
    border-radius: 10px; /* Rounded corners */
    border: 2px solid rgba(128,128,128,0.5);
    overflow-x: hidden;
    overflow-y: hidden;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    /* background-color: rgb(255,255,255); Fallback color */
    background-color: rgba(255,255,255,0.8); /* white slightly transparent */
}

.modal-content {
    padding: 2px;
    border: none;
    width: 100%; /* could be more or less, depending on screen size */
    height: 100%; /* could be more or less, depending on screen size */
    font-family: sans-serif;
    font-size: 14px;
}

.modal-content h2 {
    font-size: 30px;
    margin-bottom: 15px;
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.reset-div {
  margin: 0;          /* Reset margin */
  padding: 0;         /* Reset padding */
  border: none;       /* Remove border */
  background: none;   /* Remove background */
  width: auto;        /* Reset width */
  height: auto;       /* Reset height */
  --nf-intput-size: 16px;
  font-size: 16px;
}

.settings-button {
    display: flex; /* Use flexbox for alignment */
    align-items: center; /* Vertically center the content */
    border: none; /* Remove default border */
    border-radius: 12px; /* Rounded corners */
    padding: 6px; /* Padding for the button */
    background: #bbbbbb;
    color: white; /* Text color */
    cursor: pointer; /* Pointer cursor on hover */
}

.button-icon {
    width: 24px; /* Set width for the image */
    height: 24px; /* Set height for the image */
    margin-right: 8px; /* Space between image and text */
}

.button-text {
    font-size: 15px; /* Font size for the text */
    font-weight: medium;
}

.button-container {
    display: flex;
    gap: 10px;
}
