/* styles.css */

/* Allgemeine Stile */
body {
    font-family: 'Arial', sans-serif;
    background-color: #f7f7f7;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: 100vh;
    color: #333;
    padding-top: 20px;
}

h1 {
    color: #4CAF50;
    font-size: 3rem;
    margin-top: 20px;
}

.table-container {
    max-width: 100%;     /* Verhindert, dass der Container breiter als 100% der Bildschirmbreite wird */
    #overflow-x: auto;    /* Fügt einen horizontalen Scrollbalken hinzu, falls der Inhalt zu breit ist */
    word-wrap: break-word; /* Verhindert das horizontale Überlaufen des Textes */
}

table {
#    width: 90%;
#    max-width: 800px;
    margin-top: 10px;
    border-collapse: collapse;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
#    max-height: 400px;
    overflow-y: auto; /* Vertikaler Scrollbalken */
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #4CAF50;
    color: white;
}

td {
    background-color: #f9f9f9;
    transition: background-color 0.3s;
}

td[contenteditable="true"]:empty:before {
    content: "Klicken Sie hier zum Bearbeiten";
    color: #888;
}

td:hover {
    background-color: #e1f7d5;
}

input {
    width: 100%;
    padding: 8px;
    margin-top: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #f9f9f9;
}

.save-button {
    background-color: #007bff;  /* Blau */
}

.save-button:hover {
    background-color: #0056b3;  /* Dunkleres Blau bei Hover */
}

.save-button:focus {
    outline: none;              /* Keine Umrandung bei Fokus */
}


button {
    margin-top: 15px;
    padding: 12px 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    width: 200px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #45a049;
}

.icon-remove {
    cursor: pointer;
    color: #ff4d4d;
    font-size: 1.1rem;
    border: none;
    background: none;
    padding: 0;
}

.icon-remove:hover {
    color: #d9534f;
}

/* Responsive Design */
@media (max-width: 768px) {
    table {
        width: 95%;
        max-width: 100%;
    }

    h1 {
        font-size: 1.5rem;
    }

    td, th {
        padding: 10px;
    }

    button {
        width: 100%;
    }
}

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

    table {
        width: 100%;
    }

    td, th {
        padding: 8px;
    }

    input, button {
        width: 100%;
        font-size: 1rem;
    }
}

/* reduzierte Breite für die "Aktionen"-Spalte */
th:nth-child(4), td:nth-child(4) {
    width: 40px;
    text-align: center;
}


