/* Grundlegende Layout-Einstellungen */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden; /* Verhindert horizontales Scrollen */
}

/* Überschrift */
h1 {
    font-size: 1.5rem; /* Angepasst für bessere Lesbarkeit auf mobilen Geräten */
    text-align: center;
    margin-top: 20px;
    color: #2c3e50;
}

/* Form-Container */
form {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 500px;
    padding: 15px;
    margin: 15px 0;
    box-sizing: border-box; /* Verhindert, dass Padding den Container über die Bildschirmbreite hinaus erweitert */
}

/* Label */
label {
    font-size: 1rem;
    color: #34495e;
    display: block;
    margin-bottom: 8px;
}

/* Eingabefelder */
input[type="text"] {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    border: 2px solid #bdc3c7;
    border-radius: 8px;
    margin-bottom: 15px;
    box-sizing: border-box;
    font-size: 1rem;
}

/* Button */
button {
    background-color: #27ae60;
    color: white;
    padding: 12px;
    font-size: 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #2ecc71;
}

button:disabled {
    background-color: #95a5a6;
    cursor: not-allowed;
}

/* Ergebnisse */
#results {
    width: 90%;
    max-width: 500px;
    margin-top: 20px;
    text-align: center;
}

.result {
    background-color: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Ergebnistexte */
.result strong {
    font-size: 1.1rem;
    color: #2c3e50;
}

/* Teilen-Button */
.result .share-button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-top: 10px;
    display: inline-block;
    transition: background-color 0.3s ease;
}

.result .share-button:hover {
    background-color: #2980b9;
}

/* Karte-Button */
#mapButton {
    background-color: #f39c12;
    color: white;
    padding: 12px;
    border: none;
    border-radius: 8px;
    width: 100%;
    cursor: pointer;
    margin-top: 20px;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

#mapButton:hover {
    background-color: #e67e22;
}

#mapButton:disabled {
    background-color: #e1e1e1;
    cursor: not-allowed;
}

#legend {
    position: fixed; /* Fixiert die Legende an einer Stelle */
    top: 20px; /* Abstand vom oberen Rand */
    right: 20px; /* Abstand vom rechten Rand */
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.9); /* Transparente Hintergrundfarbe */
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 100; /* Damit die Legende immer oben angezeigt wird */
}

#legend h2 {
    margin: 0;
    font-size: 1.2em;
    color: #333;
    margin-bottom: 10px;
}

#legend ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

#legend ul li {
    margin-bottom: 8px;
    font-size: 1rem;
    color: #555;
    display: flex;
    align-items: center;
}

.legend-icon {
    margin-right: 8px;
    font-size: 1.2em; /* Passende Symbolgröße */
}

.legend-icon.wc {
    color: #f4a261;
}

.legend-icon.gross {
    color: #2a9d8f;
}

.legend-icon.privat {
    color: #e76f51;
}

/* Responsivität für kleinere Bildschirme */
@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem;
    }

    form {
        width: 95%; /* Formulare breiter machen für kleinere Bildschirme */
        padding: 10px;
    }

    input[type="text"], button {
        padding: 10px;
    }

    .result {
        padding: 12px;
    }

    .result .share-button {
        padding: 6px 10px;
        font-size: 0.85rem;
    }

    #mapButton {
        font-size: 0.9rem;
    }

    #legend {
        top: 10px;
        right: 10px;
        padding: 8px;
    }

    #legend h2 {
        font-size: 1.1em;
    }

    #legend ul li {
        font-size: 0.9rem;
    }
}
