/* Container-Stil anpassen */
.container {
    max-width: 980px;
    margin: 0 auto; /* Zentrieren */
    position: relative; /* Relative Positionierung für absolute Kinder */
}

/* Text vor den Button hinzufügen */
.chat-text {
    position: absolute; /* Fixiert an der Seite des Containers */
    bottom: 60px;
    right: 80px; 
}

/* Stile für den Chat-Button und das Chat-Fenster */
.chat-button {
    position: absolute; /* Fixiert an der Seite des Containers */
    bottom: 60px;
    right: 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.chat-window {
    position: absolute; /* Fixiert an der Seite des Containers */
    bottom: 120px;
    right: 20px;
    width: 300px;
    max-width: 90%;
    height: 400px; /* Standardhöhe */
    max-height: 90%; /* Maximale Höhe auf 90% des verfügbaren Bildschirmbereichs begrenzen */
    border: 1px solid #ccc;
    border-radius: 10px;
    background-color: white;
    display: none;
    flex-direction: column;
    z-index: 1000;
    overflow: hidden; /* Verhindern, dass der Inhalt außerhalb des Containers angezeigt wird */
}

.chat-header {
    background-color: #007bff;
    color: white;
    padding: 10px;
    text-align: center;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    flex-shrink: 0; /* Verhindern, dass das Header verkleinert wird */
}

.chat-body {
    flex: 1;
    padding: 10px;
    overflow-y: auto; /* Scrollen aktivieren */
    max-height: 100%; /* Maximale Höhe auf 100% des verfügbaren Bereichs begrenzen */
    display: flex;
    flex-direction: column;
}

.chat-input {
    display: flex;
    border-top: 1px solid #ccc;
    flex-shrink: 0; /* Verhindern, dass das Input-Bereich verkleinert wird */
}

.chat-input input {
    flex: 1;
    padding: 10px;
    border: none;
    border-bottom-left-radius: 10px;
}

.chat-input button {
    padding: 10px;
    border: none;
    background-color: #007bff;
    color: white;
    cursor: pointer;
    border-bottom-right-radius: 10px;
}

@media (max-width: 600px) {
    .chat-button {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .chat-window {
        bottom: 110px;
        right: 10px;
        width: calc(100% - 20px); /* Breite auf 100% minus Platz für den Chat-Button */
        height: 20%; /* Weiter reduzierte Höhe für mobile Geräte */
        max-height: 20%; /* Sicherstellen, dass die maximale Höhe auch 20% beträgt */
    }

    .chat-header {
        font-size: 14px;
    }

    .chat-input input, .chat-input button {
        font-size: 14px;
    }
}
