#assistant-chat-box {
    max-width: 800px;
    margin: 20px auto;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #f9f9f9;
    display: flex;
    flex-direction: column;
}

#chat-display {
    height: 500px;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#chat-input-container {
    display: flex;
    gap: 10px;
    padding: 15px;
    border-top: 1px solid #ddd;
    background: white;
    border-radius: 0 0 8px 8px;
}

#chat-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

#send-chat,
#reset-chat {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    background-color: #007bff;
    color: white;
    transition: background-color 0.2s;
}

#reset-chat {
    background-color: #6c757d;
}

#send-chat:hover,
#reset-chat:hover {
    opacity: 0.9;
}

/* Message Styles */
.user-message {
    align-self: flex-end;
    background-color: #007bff;
    color: white;
    border-radius: 15px 15px 0 15px;
    padding: 10px 15px;
    max-width: 70%;
    margin: 5px 0;
    word-wrap: break-word;
}

.assistant-response {
    align-self: flex-start;
    background-color: #e9ecef;
    color: #212529;
    border-radius: 15px 15px 15px 0;
    padding: 10px 15px;
    max-width: 70%;
    margin: 5px 0;
    word-wrap: break-word;
}

.typing-indicator {
    color: #666;
    font-style: italic;
    background-color: transparent;
    padding: 5px 15px;
}

/* Markdown styles within assistant responses */
.assistant-response pre {
    background: #f4f4f4;
    padding: 10px;
    border-radius: 4px;
    overflow-x: auto;
}

.assistant-response code {
    background: #f4f4f4;
    padding: 2px 4px;
    border-radius: 3px;
    font-family: monospace;
}

.assistant-response p {
    margin: 0 0 10px 0;
}

.assistant-response p:last-child {
    margin-bottom: 0;
}

.assistant-response ul, 
.assistant-response ol {
    margin: 0;
    padding-left: 20px;
}

.assistant-response a {
    color: #0066cc;
    text-decoration: underline;
}

/* Display mode specific styles */
#assistant-chat-box.display-mode-floating-icon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    margin: 0;
    z-index: 1000;
    border-radius: 100px;
}

#chat-icon {
    width: 60px;
    height: 60px;
    background: #007bff;
    border-radius: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

#chat-icon svg {
    width: 30px;
    height: 30px;
    color: white;
}

.display-mode-floating-icon #chat-container {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.display-mode-floating-icon #chat-display {
    height: calc(100% - 70px);
}

/* Add these new styles */
#chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #007bff;
    color: white;
    border-radius: 8px 8px 0 0;
}

#close-chat {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0 5px;
    line-height: 1;
}

#close-chat:hover {
    opacity: 0.8;
}

/* Update this existing style to account for the header */
.display-mode-floating-icon #chat-display {
    height: calc(100% - 110px); /* Adjusted for header height */
}
