/* Chatbot-Icon-Styling */
.chatbot-icon {
    position: fixed;
    bottom: 20px; /* Position anpassen für Floating-Effekt */
    right: 20px;
    width: 80px;
    height: 80px;
    background-image: url('images/PBXAssistent.gif');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.7;
    cursor: pointer;
    transition: opacity 0.3s ease, transform 0.5s ease;
}

/* Hover-Effekt für das Chatbot-Icon */
.chatbot-icon:hover {
    opacity: 1;
}

/* Floating-Effekt für das Chatbot-Icon */
.chatbot-icon {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0); }
}

/* Chatbox-Styling */
.chatbox {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 350px;
    max-height: 80vh; /* Maximale Höhe im responsiven Design */
    background-color: #ffffff; /* Weiß für Klarheit */
    border-radius: 12px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s, opacity 0.5s linear;
    border: 3px solid #DDDEE2; /* Sanfter Rahmen */
}

/* Sichtbare Chatbox */
.chatbox.visible {
    visibility: visible;
    opacity: 1;
}

/* Styling des Headers in der Chatbox */
.chatbox-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #0599D5; /* Primärfarbe für den Header */
    padding: 10px;
    display: flex;
    align-items: center;
    color: #ffffff;
    border-bottom: 1px solid #DDDEE2; /* Dünner, heller Rand unten für Abgrenzung */
    border-radius: 12px 12px 0 0; /* Abgerundete Ecken oben */
}

/* Styling des Chatbot-Icons im Header */
.chatbox-header-icon {
    width: 40px;
    height: 40px;
    margin-right: 10px;
}

/* Styling des Chatbot-Namens */
.chatbox-header-title {
    font-size: 18px;
    font-weight: bold;
    flex-grow: 1; /* Platz für den Titel schaffen */
}

/* Styling des Schließen-Buttons */
.close-chat {
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    width: 30px;
    height: 30px;
    background-color: #363636;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

/* Hover-Effekt für den Schließen-Button */
.close-chat:hover {
    background-color: #1a1a1a;
}

/* Nachrichtenbereich der Chatbox */
.chatbox-messages {
    flex: 1;
    padding: 10px;
    background-color: #F0F0F0; /* Hintergrundfarbe der Nachrichten */
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Styling für allgemeine Nachrichten */
.chatbox-message {
    background-color: #DDDEE2;
    color: #363636;
    padding: 15px;
    border-radius: 20px; /* Rundere Ecken für ein moderneres Aussehen */
    max-width: 80%;
    word-wrap: break-word;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2); /* Dezenter Schatten für die Nachrichten */
    opacity: 0;
    animation: fadeIn 0.5s forwards; /* Fade-In-Animation für Nachrichten */
}

/* Spezifisches Styling für Nutzernachrichten */
.chatbox-message.user {
    background-color: #0599D5;
    color: #DDDEE2;
    align-self: flex-end;
    border-radius: 20px 20px 0 20px; /* Rundere Ecken für Nutzernachrichten */
}

/* Spezifisches Styling für Bot-Nachrichten */
.chatbox-message.bot {
    background-color: #363636;
    color: #DDDEE2;
    align-self: flex-start;
    border-radius: 20px 20px 20px 0; /* Rundere Ecken für Bot-Nachrichten */
}

/* Fade-In-Animation für Nachrichten */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Eingabebereich der Chatbox */
.chatbox-input {
    padding: 10px;
    background-color: #0599D5; /* Primärfarbe für den Inputbereich */
    color: #ffffff; /* Weißer Text */
    text-align: center;
}

/* Styling der Antwort-Buttons */
.chatbox-answer {
    background-color: #DDDEE2; /* Helles Grau für die Antwort-Buttons */
    color: #363636; /* Dunkelgrau für den Text */
    border: none;
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    margin: 10px 0;
    width: 100%;
    text-align: left;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

/* Hover-Effekt für die Antwort-Buttons */
.chatbox-answer:hover {
    background-color: #C0C0C0; /* Etwas dunkleres Grau */
    transform: translateY(-2px); /* Leichtes Anheben */
}

/* Media Queries für responsives Design */
@media (max-width: 768px) {
    .chatbox {
        width: 100%;
        height: 80%;
        border-radius: 0; /* Ecken anpassen */
        bottom: 0;
        right: 0;
    }

    .chatbot-icon {
        width: 60px;
        height: 60px;
        bottom: 10px;
        right: 10px;
    }
}
