

.directions-container {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 6;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80%;
    max-width: 800px;
}

.nearby-clinic-btn {
    background-color: #009970;
    color: #fff;
    font-size: 14px;
    padding: 8px 20px;
    border-radius: 50px;
    text-decoration: none;
    transition: 0.3s background-color;
    white-space: nowrap;
}

.nearby-clinic-btn:hover{
    background-color: #00B383;
}

#directions-card {
    position: relative;
    width: 100%;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 50vh;
    overflow-y: auto;
    opacity: 0;
    transform: translateY(-20px);
    display: none;
}

.flex {
    display: flex;
    height: 100%;
}

#directions-card.show {
    opacity: 1;
    transform: translateY(0);
    display: block;
}

#directions-toggle {
    background: white;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 7;
}

#directions-toggle svg {
    transition: transform 0.3s ease;
}

#directions-toggle.active svg {
    transform: rotate(180deg);
}

#directions-content {
    padding: 20px;
}

#map-overlay {
    position: relative;
    top: 3;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    display: none;
    z-index: 4;
}

#map-overlay.show {
    pointer-events: none; 
}

#sidebar {
    max-height: 100vh; 
    overflow-y: auto;
}

#map {
    height: 100%; /* Ensure the map takes full height */
}

#map-container {
    height: 100vh; /* Set full height for the map */
    width: 70%; /* Set the remaining width for the map */
}

#sidebar::-webkit-scrollbar {
    width: 8px; 
}

#sidebar::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.3); 
    border-radius: 10px; 
}

#sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.5); 
}

.marker {
    background-image: url("{{ asset('image/clinic_pin.png') }}"); 
    background-size: contain; 
    width: 50px; 
    height: 50px; 
    border-radius: 50%; 
    cursor: pointer; 
}
/* Sidebar Toggle Button Styles */
#sidebar-toggle {
    position: fixed;
    top: 6rem;
    left: 0rem;
    z-index: 30;
    background: white;
    padding: 0.75rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: none;
    cursor: pointer;
    border: none;
}

/* Sidebar Transition */
#sidebar {
    transition: transform 0.3s ease-in-out;
}

/* Overlay for Mobile Sidebar */
#sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 40;
}

/* Mobile Styles */
@media (max-width: 768px) {
    
    #sidebar-toggle {
        display: block;
    }

    #sidebar {
        position: fixed;
        transform: translateX(-100%);
        top: 0;
        bottom: 0;
        width: 80%;
        max-width: 320px;
        z-index: 50;
    }

    #sidebar.show {
        transform: translateX(0);
    }

    #sidebar-overlay.show {
        display: block;
    }

    #map-container {
        width: 100%;
        height: calc(100vh - 64px); /* Adjust the height to fill the viewport minus space for footer */
        overflow: hidden;
    }

    .directions-container {
        top: 60px;
        left: 50%;
        transform: translateX(-50%);
    }
}

/* Tablet Styles */

@media (min-width: 769px) and (max-width: 1024px) {
    #sidebar {
        width: 30%;
    }

    #map-container {
        width: 70%;
    }
}

        /* Add general styles for the suggestion list */
#suggestions {
    position: absolute;
    background-color: white;
    border: 1px solid #ddd;
    width: 100%; /* Ensures it matches the width of the parent container */
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    z-index: 10;
}

/* Styling for individual suggestion items */
.suggestion-item {
    display: flex;
    align-items: center;
    padding: 10px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.2s ease;
}

.suggestion-item:hover {
    background-color: #f1f1f1;
}

/* Map pin icon */
.suggestion-item i {
    margin-right: 10px;
    color: #007bff;
}

/* Place name styling */
.place-name {
    flex-grow: 1;
}

/* Loading state */
.loading {
    padding: 10px;
    text-align: center;
    color: #007bff;
}

/* No results state */
.no-results {
    padding: 10px;
    text-align: center;
    color: #888;
}

/* Error message state */
.error-message {
    padding: 10px;
    text-align: center;
    color: red;
}

/* Hide the suggestions list when no results or during loading */
#suggestions {
    display: none;
}

