@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap');

/* Resets */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
li {
    margin: 0;
    padding: 0;
}

a {
    text-decoration: none;
}

li {
    list-style: none;
}

/* Typography */
body {
    font-family: 'Poppins', sans-serif;
}

h1 {
    font-weight: 600;
    font-size: 1.5rem;
}

/* Layout */
.wrapper {
    display: flex;
    height: 100vh;
}

.main {
    flex-grow: 1;
    overflow: hidden;
    transition: all 0.35s ease-in-out;
    background-color: white;
}

/* Sidebar */
#sidebar {
    width: 260px;
    min-width: 260px;
    z-index: 1000;
    transition: all .25s ease-in-out;
    display: flex;
    flex-direction: column;
    background-color: #6f4eb2; /* Adjusted to a lighter purple for better contrast */
}

#toggle-btn {
    background-color: transparent;
    cursor: pointer;
    border: none;
    padding: 1rem 1.5rem;
}

#toggle-btn i {
    font-size: 1.5rem;
    color: white;
}

.sidebar-logo a {
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    display: block;
    padding: 1rem 1.5rem;
}

.sidebar-nav {
    padding: 1rem;
    flex-grow: 1;
}

.sidebar-link,
.dropdown-style,
.sidebar-form input,
.sidebar-form button {
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
    width: calc(100% - 1.5rem); /* Adjust width to include padding */
    border: 1px solid white;
    background: transparent;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s;
}

.sidebar-link:hover,
.dropdown-style:hover,
.sidebar-form button:hover {
    background-color: rgba(255, 255, 255, 0.075);
}

.sidebar-form input[type="file"] {
    display: none;
}

.sidebar-form input[type="file"] + label {
    cursor: pointer;
}

.sidebar-form input[type="number"],
.sidebar-form input[type="text"],
.sidebar-form select {
    background-color: #6f4eb2; /* Consistent with sidebar background */
    color: white;
}

/* Active styles for dropdown */
.dropdown-style:active,
.dropdown-style:focus,
.sidebar-form input[type="number"]:active,
.sidebar-form input[type="number"]:focus,
.sidebar-form input[type="text"]:active,
.sidebar-form input[type="text"]:focus {
    outline: none;
    border: 1px solid #a17adc; /* Lighter purple for visible focus */
}

.sidebar-form button[type="submit"] {
    background-color: #a17adc; /* Lighter purple for contrast */
    color: white;
}

/* Map */
#map {
    position: relative;
    height: 100%;
    width: 100%;
}

/* Misc */
.search {
    position: absolute;
    top: 10px;
    right: 10px;
}

.loader {
    display: none; /* Shows the spinner */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 140px;
    background-image:
      radial-gradient(circle 30px, #0000FF 100%, transparent 0),
      radial-gradient(circle 5px, #0000FF 100%, transparent 0),
      radial-gradient(circle 5px, #0000FF 100%, transparent 0),
      linear-gradient(#0000FF 20px, transparent 0); /* Adjusted to blue */
    background-position: center 127px, 94px 102px, 16px 18px, center 114px;
    background-size: 60px 60px, 10px 10px, 10px 10px, 4px 14px;
    background-repeat: no-repeat;
    z-index: 1000; /* Ensures it's above other elements */
}

.loader::before {
    content: '';
    position: absolute;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid #0000FF; /* Changed to blue */
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    border-right-color: transparent;
    box-sizing: border-box;
}

.loader::after {
    content: '';
    position: absolute;
    height: 80px;
    width: 80px;
    transform: translate(-50%, -50%) rotate(-45deg);
    left: 50%;
    top: 50%;
    box-sizing: border-box;
    border: 7px solid #ff5900; /* Changed to blue */
    border-radius: 50%;
    animation: rotate 0.5s linear infinite;
}

@keyframes rotate {
    to {
        transform: translate(-50%, -50%) rotate(-45deg) rotateY(360deg);
    }
}
/* Custom button style */
.my-btn-style {
    background-color: transparent;
    color: white;
    border: 1px solid white;
    width: calc(100% - 1.5rem);
}

.my-btn-style:hover {
    background-color: rgba(255, 255, 255, 0.075);
}
/* Results Container */
#results-container {
    margin-top: 20px;
    padding: 10px;
    background-color: #6f4eb2; /* Purple background for the container */
    border-radius: 5px;
    color: #fff; /* White text for better contrast */
}

#results-container h5 {
    margin-bottom: 15px;
    color: #fff; /* White color for the section titles */
    font-weight: 600;
}

/* Results List */
#results {
    max-height: 400px; /* Adjustable based on your preference */
    overflow-y: auto; /* Allows scrolling within the container */
    padding-left: 20px; /* Indentation for list items */
}

.buffer-results {
    margin-bottom: 15px;
}

.buffer-results h6 {
    font-size: 1rem;
    color: #fff; /* White heading color for the buffer names */
    margin-bottom: 10px;
}

.buffer-results ul {
    padding-left: 0;
    margin-left: 0; /* Ensure no indentation */
}

.buffer-results li {
    font-size: 0.9rem;
    color: #000; /* Black text color for the layer names */
    list-style-type: none; /* Removes default list styling */
    margin-bottom: 5px;
    background-color: transparent; /* Remove the lighter background */
    padding: 5px;
    border-radius: 4px;
}
