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

body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

h1 {
    color: #333;
    margin-bottom: 30px;
    text-align: center;
}

/* Steuerelemente */
.controls {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

label {
    font-weight: bold;
    color: #555;
    font-size: 14px;
}

select {
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    background: white;
    cursor: pointer;
    min-width: 150px;
}

select:hover {
    border-color: #999;
}

select:focus {
    outline: none;
    border-color: #007bff;
}

button {
    padding: 10px 30px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #0056b3;
}

button:active {
    transform: scale(0.98);
}

/* Ladeindikator */
.loading {
    text-align: center;
    padding: 20px;
    color: #007bff;
    font-size: 16px;
    font-weight: bold;
}

.loading.hidden {
    display: none;
}

/* Datenanzeige */
.data-display {
    display: none;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 4px;
    min-height: 200px;
}

.data-display p {
    color: #666;
    text-align: center;
}

/* Parkhaus-Liste (wird in Schritt 4 verwendet) */
.parkhaus-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.parkhaus-item {
    background: white;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.parkhaus-item h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 18px;
}

.parkhaus-item p {
    color: #666;
    margin: 5px 0;
    text-align: left;
}

.parkhaus-item .free-spaces {
    font-size: 24px;
    font-weight: bold;
    color: #007bff;
}

.parkhaus-item .warning {
    color: #ff9800;
    font-size: 12px;
    margin-top: 10px;
    font-style: italic;
}

/* Karte soll den Platz nutzen */
.map-wrapper svg {
    width: 100%;
    height: auto;
    display: block;
    position: relative;
}

/* Container kann später das ganze Viewport füllen */
body, html {
    height: 100%;
}

.container {
    max-width: none;
    width: 100%;
    height: 100%;
}

/* Popup-Overlay */
.popup {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.3);
    z-index: 1000;
}

.popup.hidden {
    display: none;
}

.popup-content {
    background: #ffffff;
    padding: 16px 20px;
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
    min-width: 260px;
    max-width: 320px;
}

.popup-content h2 {
    margin-bottom: 8px;
    font-size: 18px;
}

.popup-content p {
    margin: 0;
    font-size: 14px;
    color: #444;
}

.popup-close {
    border: none;
    background: transparent;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    float: right;
}

/* Kleines Label direkt auf der Karte für jeden Pin */
.pin-popup {
    position: absolute;
    background: #ffffff;
    padding: 10px 14px 8px 10px; /* mehr Platz, rechts Platz fürs X */
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    font-size: 12px;
    line-height: 1.3;
    pointer-events: auto;
    z-index: 10;
}


.pin-popup.hidden {
    display: none;
}

.pin-popup-title {
    font-weight: 600;
    margin-bottom: 2px;
}

.pin-popup-close {
    position: absolute;
    top: 4px;
    right: 6px;
    border: none;
    background: transparent;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    color: #000000; /* schwarz */
}


/* Karte soll den Platz nutzen */
.map-wrapper {
    position: relative;  /* wichtig für absolute Popups */
}

.map-wrapper svg {
    width: 100%;
    height: auto;
    display: block;
}

/* Container kann später das ganze Viewport füllen */
html, body {
    height: 100%;
}

.container {
    max-width: none;
    width: 100%;
    height: 100%;
}

/* Kleine Popups direkt auf der Karte */
.pin-popup {
    position: absolute;
    background: #ffffff;
    padding: 6px 8px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    font-size: 12px;
    line-height: 1.3;
    pointer-events: auto;
    z-index: 10;
}

.pin-popup.hidden {
    display: none;
}

.pin-popup-title {
    font-weight: 600;
    margin-bottom: 2px;
}

.pin-popup-text {
    font-size: 12px;
}

.pin-popup-close {
    position: absolute;
    top: 2px;
    right: 4px;
    border: none;
    background: transparent;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
}

