/* Grunnleggende styling */
body {
    display: flex;
    flex-direction: column;
    height: 100vh;
    margin: 0;
    font-family: Arial, sans-serif;
    font-size: large;
}

header, footer {
    background-color: #0078d4;
    color: white;
    text-align: center;
    height: 8%;
}

.container {
    display: flex;
    flex: 1;
}

/* Venstre panel for samtalelisten */
.conversation-list {
    width: 30%;
    border-right: 1px solid #ccc;
    overflow-y:hidden;
    padding: 10px;
}

.conversation-list h2 {
    margin-top: 0;
}

.conversation-list ul {
    list-style-type: none;
    padding: 0;
}

.conversation-list li {
    padding: 8px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    margin-block: 5px;
}

.conversation-list li:hover {
    background-color: #f0f0f0;
}

/* Høyre panel for chat */
.chat-window {
    width: 70%;
    display: flex;
    flex-direction: column;
    height: 84vh;
    overflow: scroll;
}

.chat-window h2 {
    margin-left: 10px;
}

.chat-display {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    background-color: #f9f9f9;
}

.chat-message {
    margin-bottom: 10px;
}

.assistantbubble {
    text-align: right;
    color: white;
    background-color: #0078d4;
    padding: 10px;
    border-radius: 10px;
    width: fit-content;
    margin-left: auto;
    margin-block: 10px;
}

.userbubble {
    text-align: left;
    color: black;
    background-color: #6ada14;
    padding: 10px;
    border-radius: 10px;
    width: fit-content;
    margin-right: auto;
    margin-block: 10px;
}

.chat-input {
    display: flex;
    padding: 10px;
    border-top: 1px solid #ccc;
}

.chat-input input {
    flex: 1;
    padding: 8px;
}

.chat-input button {
    padding: 8px 12px;
    margin-left: 10px;
    background-color: #0078d4;
    color: white;
    border: none;
    cursor: pointer;
}

.chat-input button:hover {
    background-color: #005bb5;
}

#messageInput {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: large;
}

/* Animasjon for å få boblen til å pulsere */

@keyframes pulsate {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes hideFor3Seconds {
    0% {
        opacity: 0;
    }
    33% {
        opacity: 0;
    }
    99% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

.assistantbubbleWait {
    text-align: right;
    color: white;
    background-color: #0078d4;
    padding: 10px;
    border-radius: 10px;
    width: fit-content;
    margin-left: auto;
    margin-block: 10px;
    opacity: 0;
  
    /* Make it disappear for 3 seconds, then start pulsating */
    animation: hideFor3Seconds 3s forwards, pulsate 1s infinite 3s;
}

.blink {
    animation: pulsate 1s infinite;
}