:root{
    --scale: 1;
    --ai-red: #e4003a;
    --border-distance: 2rem;
    --background: white;
    --background-dark: #e9e9e9;
    --user-message-background: #ce0437;
    --bot-message-background: rgb(119, 119, 119);
    --grey: rgb(189, 189, 189);
    --grey-background: rgb(124, 124, 124);
}

#openChat{
    height: calc(6rem * var(--scale));
    width: calc(6rem * var(--scale));
    background-color: var(--ai-red);
    border-radius: 100%;
    position: fixed;
    bottom: var(--border-distance);
    right: var(--border-distance);
    display: flex;
    text-align: center;
    justify-content: center;
    align-items: center;
    transition: all;
}

#openChat.hide{
    animation: flip-and-hide .2s forwards;
}

#openChat.show{
    animation: flip-and-show 1s forwards;
}

#openChat img{
    width: calc(4rem * var(--scale));
}

#chatBot{
    background-color: var(--background);
    height: calc(50rem * var(--scale));
    width: calc(35rem * var(--scale));
    position: fixed;
    bottom: var(--border-distance);
    right: var(--border-distance);
    border-radius: 1rem;
    border: 1px solid var(--ai-red);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

#chatBot.disappear{
    animation: slide-and-hide .5s forwards;
}

#chatBot.appear{
    animation: slide-and-show .5s forwards;
}

#chatHeader{
    user-select: None;
    background-color: var(--ai-red);
    height: calc(6rem * var(--scale));
    border-radius: 1rem 1rem 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    color: var(--background);
    text-align: center;
}

#chatClose{
    width: calc(2rem * var(--scale));
    height: calc(2rem * var(--scale));
}

#chatMessages{
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    padding: 2rem;
    gap: 1rem;
    scroll-behavior: smooth;
    height: 100%;
}

#chatQuestion{
    font-size: 1.5rem;
    color: var(--grey);
}

#chatQuestion p{
    margin: 0;
}

#chatQuestion button{
    color: white;
    background-color: var(--grey);
    padding: 1rem;
    margin: 0.2rem 1rem;
    padding: .2rem .5rem;
    border-radius: .5rem;
}

#chatFooter{
    background-color: var(--background-dark);
    border-radius: 0 0 1rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 1rem;
    gap: 1rem;
}

#chatFooter form{
    width: 100%;
}

#chatInput{
    min-height: 4rem;
    width: 100%;
    padding: 1rem;
    border-radius: .5rem;
    background-color: var(--background);
    font-size: 1.5rem;
}

#chatSend{
    user-select: None;
    height: 4rem;
    width: 4rem;
    background-color: var(--ai-red);
    padding: 1rem;
    border-radius: .5rem;
}

.userMessage{
    background-color:var(--user-message-background);
    border-radius: 1.5rem 1.5rem 0 1.5rem;
    align-self: flex-end;
    color: var(--background);
}

.botMessage{
    background-color:var(--bot-message-background);
    border-radius: 1.5rem 1.5rem 1.5rem 0;
    align-self: flex-start;
    color: var(--background);
}

.userMessage, .botMessage{
    padding: .5rem 1rem;
    max-width: 70%;
    font-size: 1.5rem;
    overflow-wrap: break-word;
}

/* CSS Animationen */
@keyframes slide-and-hide {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateY(20px) scale(.9);
        visibility: hidden;
        opacity: 0;
    }
}

@keyframes slide-and-show {
    0% {
        transform: translateY(20px) scale(.9);
        visibility: visible;
        opacity: 0;
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes flip-and-hide {
    0% {
        transform: rotateX(0);
        opacity: 1;
    }
    100% {
        transform: rotateX(70deg);
        opacity: 0;
    }
}

@keyframes flip-and-show {
    0% {
        transform: rotateX(70deg);
        opacity: 0;
    }
    100% {
        transform: rotateX(0);
        opacity: 1;
    }
}
  