I’m in northern Spain and have to take a train to Madrid to get to a flight. But I arrive to the train station too late at 11:40 so booking is not an option since most places check in are at 12:00 and I’d probably not get in time.
Would it be too dangerous to stay up all night on the street?
Call somewhere and ask. Let them know the timing. And ask if they have prorated booking (it’s extremely rare, but never hurts to ask).