* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: Arial, sans-serif;
}

.top-bar {
    height: 5vh;
    min-height: 40px;
    background: #f8f9fa;
    padding: 5px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 1000;
}

.search-container {
    flex-grow: 1;
    display: flex;
    margin-right: 10px;
}

#search-input {
    flex-grow: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 14px;
}

#search-button {
    padding: 8px 12px;
    background: #0078A8;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

#locate {
    padding: 8px 12px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    margin-right: 10px;
    cursor: pointer;
    white-space: nowrap;
}

#basemap-toggle {
    padding: 8px 12px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.basemap-switcher {
    position: absolute;
    top: 5vh;
    right: 10px;
    background: white;
    padding: 10px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
    z-index: 1000;
    display: none;
}

.basemap-switcher.show {
    display: block;
}

.basemap-switcher button {
    display: block;
    width: 100%;
    padding: 8px;
    margin-bottom: 5px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

.basemap-switcher button:last-child {
    margin-bottom: 0;
}

#map {
    flex-grow: 1;
    width: 100%;
    cursor: crosshair;
}

.bottom-bar {
    height: 5vh;
    min-height: 30px;
    background: #f8f9fa;
    padding: 5px 10px;
    display: flex;
    align-items: center;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
    z-index: 1000;
    font-size: 14px;
    overflow: hidden;
}

#coordinates {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 600px) {
    .top-bar {
        flex-wrap: wrap;
        height: auto;
        padding: 5px;
    }
    
    .search-container {
        width: 100%;
        margin-bottom: 5px;
    }
    
    #locate {
        margin-right: 5px;
    }
    
    .basemap-switcher {
        top: auto;
        bottom: 5vh;
        right: 10px;
    }
}