body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#map-container {
    display: flex;
    height: 100vh;
}

#sidebar {
    width: 350px;
    background: #f8f9fa;
    border-right: 1px solid #ddd;
    overflow-y: auto;
    padding: 15px;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

#map {
    flex: 1;
    height: 100%;
}

.map-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

.search-box {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.category-title {
    font-weight: bold;
    margin: 15px 0 10px 0;
    color: #0056b3;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.category-title i {
    transition: transform 0.3s;
}

.category-title.collapsed i {
    transform: rotate(-90deg);
}

.location-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: block;
}

.location-list.collapsed {
    display: none;
}

.location-item {
    padding: 8px 10px;
    margin-bottom: 5px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.location-item:hover {
    background-color: #e9ecef;
}

.location-item.active {
    background-color: #d4edff;
    font-weight: bold;
}

.location-icon {
    margin-right: 8px;
    color: #0056b3;
    width: 20px;
    text-align: center;
}

.location-details {
    display: none;
    padding: 15px;
    background: white;
    border-radius: 4px;
    margin-top: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.location-details.active {
    display: block;
}

.location-details h3 {
    margin-top: 0;
    color: #0056b3;
}

.location-details img {
    max-width: 100%;
    height: auto;
    margin-bottom: 10px;
    border-radius: 4px;
}

.close-details {
    float: right;
    cursor: pointer;
    font-size: 1.2em;
}

.custom-control {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
    background: white;
    padding: 5px;
    border-radius: 4px;
    box-shadow: 0 1px 5px rgba(0,0,0,0.2);
}

.custom-control button {
    display: block;
    width: 100%;
    margin-bottom: 5px;
    padding: 5px 10px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 3px;
    cursor: pointer;
}

.custom-control button:hover {
    background: #e9ecef;
}

.logo-container {
    text-align: center;
    margin-bottom: 20px;
}

.logo-container img {
    max-height: 60px;
}

.location-status {
    background: #e3f2fd;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    border-left: 4px solid #2196f3;
}

.location-status h4 {
    margin: 0 0 5px 0;
    color: #1976d2;
}

.location-status p {
    margin: 0;
    font-size: 0.9em;
    color: #666;
}

.location-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.location-btn {
    flex: 1;
    padding: 8px 12px;
    background: #2196f3;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
}

.location-btn:hover {
    background: #1976d2;
}

.location-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.distance-info {
    background: #f5f5f5;
    padding: 8px;
    border-radius: 4px;
    margin-top: 10px;
    font-size: 0.9em;
}

@media (max-width: 768px) {
    #map-container {
        flex-direction: column-reverse;
    }
    
    #sidebar {
        width: 100%;
        height: 40vh;
    }
    
    #map {
        height: 60vh;
    }
}

/* Sidebar toggle button */
.toggle-btn {
    position: absolute;
    top: 10px;
    right: -15px;
    width: 30px;
    height: 30px;
    background: #0056b3;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.toggle-btn:hover {
    background: #003d7a;
}

/* Sidebar collapsed state */
#sidebar.collapsed {
    width: 50px !important;
    overflow: visible;
}

#sidebar.collapsed .sidebar-content {
    display: none;
}

#sidebar.collapsed .toggle-btn {
    right: -15px;
}

#sidebar.collapsed .toggle-btn i {
    transform: rotate(180deg);
}

/* Sidebar expanded state */
#sidebar {
    width: 350px;
    transition: width 0.3s ease;
    position: relative;
}

.sidebar-content {
    transition: opacity 0.2s ease;
}

/* Map adjustment when sidebar is collapsed */
#sidebar.collapsed ~ #map {
    margin-left: 50px;
}

/* Responsive design for mobile */
@media (max-width: 768px) {
    #map-container {
        flex-direction: column;
    }
    
    #sidebar {
        width: 100%;
        height: 40vh;
    }
    
    #sidebar.collapsed {
        width: 100% !important;
        height: 50px !important;
    }
    
    #sidebar.collapsed ~ #map {
        height: calc(100vh - 50px);
        margin-left: 0;
    }
    
    .toggle-btn {
        top: 10px;
        right: 10px;
    }
}