* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f0f0f0;
    overflow: hidden;
}

.container {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.instructions {
    background-color: white;
    padding: 15px 20px;
    border-bottom: 1px solid #ddd;
    font-size: 14px;
    line-height: 1.4;
}

.instructions p {
    margin: 2px 0;
}

.controls {
    background-color: white;
    padding: 15px 20px;
    border-bottom: 1px solid #ddd;
    display: flex;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.location-controls {
    display: flex;
    gap: 20px;
    align-items: center;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    position: relative; /* ensure the suggestions container can size/position relative to this */
}

.control-group label {
    font-size: 12px;
    font-weight: bold;
    color: #333;
}

#city-select {
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 14px;
    background-color: white;
    width: 150px;
}

#address-input {
    padding: 6px 10px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 14px;
    width: 420px; /* widened for better autocomplete visibility on desktop */
}

.driving-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.direction-controls {
    display: flex;
    gap: 10px;
}

.control-btn {
    padding: 8px 16px;
    border: 1px solid #ccc;
    border-radius: 3px;
    background-color: #f8f8f8;
    cursor: pointer;
    font-size: 14px;
    user-select: none;
    -webkit-user-select: none;
    touch-action: manipulation;
}

.control-btn:hover {
    background-color: #e8e8e8;
}

.control-btn:active {
    background-color: #d8d8d8;
    transform: translateY(1px);
}

.control-btn.brake {
    background-color: #ffe8e8;
}

.control-btn.brake:hover {
    background-color: #ffd8d8;
}

.status {
    display: flex;
    gap: 20px;
    margin-left: auto;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 16px;
    font-weight: bold;
}

.label {
    color: #666;
}

.value {
    color: #333;
    font-size: 18px;
}

.main-content {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.street-view-container {
    flex: 1;
    position: relative;
    background-color: #000;
}

#street-view {
    width: 100%;
    height: 100%;
}

.street-view-overlay {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 16px;
    border-radius: 5px;
    font-size: 14px;
    max-width: 300px;
}

.location-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

#location-text {
    font-weight: bold;
    line-height: 1.3;
}

.navigation-info {
    font-size: 12px;
    color: #ccc;
}

.map-container {
    width: 400px;
    position: relative;
    border-left: 1px solid #ddd;
}

#map {
    width: 100%;
    height: 100%;
}

.map-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    background-color: white;
    border-radius: 3px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    overflow: hidden;
}

.map-control {
    padding: 8px 16px;
    border: none;
    background-color: white;
    cursor: pointer;
    font-size: 13px;
    border-right: 1px solid #ddd;
}

.map-control:last-child {
    border-right: none;
}

.map-control:hover {
    background-color: #f5f5f5;
}

.map-control.active {
    background-color: #4285f4;
    color: white;
}

@media (max-width: 1200px) {
    .map-container {
        width: 350px;
    }
}

@media (max-width: 900px) {
    .controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .location-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .status {
        margin-left: 0;
    }
    
    .main-content {
        flex-direction: column;
    }
    
    .map-container {
        width: 100%;
        height: 200px;
        border-left: none;
        border-top: 1px solid #ddd;
    }
}

@media (max-width: 600px) {
    .instructions {
        font-size: 12px;
        padding: 10px 15px;
    }
    
    .controls {
        padding: 10px 15px;
    }
    
    #city-select, #address-input {
        width: 100%;
    }
    
    .driving-controls {
        width: 100%;
    }
    
    .direction-controls {
        width: 100%;
        justify-content: space-between;
    }
    
    .control-btn {
        flex: 1;
        text-align: center;
    }
    
    .status {
        flex-direction: column;
        gap: 10px;
    }
}