/* Allgemeine Stile */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f9f9f9;
    color: #333;
}

header {
    background-color: #ff4d4d;
    color: white;
    padding: 20px;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1);
}

h1 {
    margin: 0;
    font-size: 2em;
}

h2 {
    display: block;
    font-size: 1.5em;
    margin-top: 0px;
    font-weight: bold;
    unicode-bidi: isolate;
}

main {
    padding: 20px;
    background-color: lightgrey;
}

/* Tabellen */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    margin-top: 20px;
    table-layout: auto; /* Automatische Breitenanpassung */
}

table th,
table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
    font-size: 0.9em;
    word-wrap: break-word; /* Text in Zellen umbrechen */
}

table th {
    background-color: #ffcccc;
}

tr:nth-child(even) {
    background-color: #f2f2f2;
}

tr:hover {
    background-color: #ffdddd;
}

/* Buttons */
button {
    background-color: #ff4d4d;
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 1em;
}

button:hover {
    background-color: #e60000;
}

/* Formulare */
form {
    font-size: 1em;
    display: grid;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: normal;
}

form label {
    font-weight: bold;
    font-size: 0.9em;
    margin-bottom: 5px;
}

form input,
form select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1em;
    box-sizing: border-box;
}

form button {
    width: 100%;
    padding: 10px;
    font-size: 1em;
    background-color: #d8000c;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

form button:hover {
    background-color: #d8000c;
}

/* Fehler- und Erfolgsmeldungen */
.error,
.success {
    text-align: center;
    margin-top: 10px;
    padding: 10px;
    border-radius: 5px;
}

.error {
    background-color: #ffdede;
    color: #d8000c;
    border: 1px solid #d8000c;
}

.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #155724;
}

/* Details (Zusammenklappbare Bereiche) */
details ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

details ul li {
    padding: 5px 0;
}

/* Vorschläge */
.suggestions {
    border-radius: 5px;
    max-height: 150px;
    overflow-y: auto;
    background: white;
    position: absolute;
    width: calc(100% - 2px);
    z-index: 1000;
    list-style-type: none;
    margin: 0;
    padding: 0;
}

.suggestions li {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.suggestions li:last-child {
    border-bottom: none;
}

.suggestions li:hover {
    background-color: #d8000c;
    color: white;
}

.error {
    color: red;
    font-weight: bold;
    margin-top: 10px;
    text-align: center;
}

/* Responsive Anpassungen */
@media (max-width: 768px) {
    header {
        font-size: 1.2em;
        padding: 15px;
    }

    h1 {
        font-size: 1.5em;
    }

    form {
        width: 90%;
        padding: 15px;
    }

    table th,
    table td {
        font-size: 0.8em;
        padding: 6px;
    }

    button {
        font-size: 0.9em;
        padding: 8px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.2em;
    }

    form {
        gap: 10px;
        padding: 10px;
    }

    form button {
        font-size: 0.8em;
    }

    table th,
    table td {
        font-size: 0.7em;
        padding: 5px;
    }
}

/* Abschnitt-Styling */
#box {
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Formular */
.responsive-form {
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.form-group {
    display: flex;
    flex-direction: column;
    flex: 1 1 calc(33.333% - 15px); /* Drei Spalten auf größeren Bildschirmen */
}

.form-group label {
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 0.9em;
    color: #333;
}

.form-group input,
.form-group select {
    padding: 8px;
    font-size: 1em;
    border: 1px solid #ccc;
    border-radius: 5px;
    width: 100%;
    box-sizing: border-box;
}

.submit-button {
    background-color: #d8000c;
    color: #fff;
    padding: 10px;
    font-size: 1em;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.3s;
}

.submit-button:hover {
    background-color: #e60000;
}

/* Mobile Ansicht */
@media (max-width: 768px) {
    .form-group {
        flex: 1 1 100%; /* Eine Spalte pro Zeile auf kleinen Bildschirmen */
    }

    .submit-button {
        font-size: 1em;
        padding: 12px;
    }
}
