/* chat.css - Chat container and message styling */

#chatContainer {
    margin-top: auto;
    padding-top: 10px;
    position: relative;
    display: flex;
    flex-direction: column;
}

#chatContainer > div:last-child {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #111;
    padding: 10px 0 0 0;
}

#chatInput:focus {
    outline: none;
    border: 1px solid #444;
}

#chatHandle {
    height: 5px;
    position: relative;
    cursor: ns-resize;
    user-select: none;
    background: transparent;
    border: none;
    border-bottom: none;
    border-top: none;
    border-left: none;
    border-right: none;
    margin: 0;
    padding: 0;
    outline: none;
}

#chatHandle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 0;
    right: 0;
    height: 1px;
    background: #2d2d2d;
}

#chatHandle:hover::after {
    background: #3d3d3d;
}

/* ChatGPT response styling */
#chatMessages {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: absolute;
    bottom: 60px;
    left: 0;
    right: 0;
    top: 10px;
    overflow-y: auto;
    padding: 10px;
    background: #1a1a1a;
    border-radius: 5px;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
    line-height: 1.4;
    z-index: 1;
}

/* Custom scrollbar styling */
#chatMessages::-webkit-scrollbar {
    width: 8px;
}

#chatMessages::-webkit-scrollbar-track {
    background: transparent;
}

#chatMessages::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

#chatMessages::-webkit-scrollbar-thumb:hover {
    background: #444;
}

#chatMessages::-webkit-scrollbar-button {
    display: none;
}

#chatMessages .message {
    margin-bottom: 10px;
    padding: 8px 12px;
    border-radius: 6px;
    max-width: 100%;
    box-sizing: border-box;
}

#chatMessages .user-message {
    background: #2ecc71;
    color: #fff;
    border-radius: 18px 18px 4px 18px;
    padding: 10px 16px;
    margin: 0 0 0 auto;
    display: block;
    max-width: 70%;
    word-wrap: break-word;
    word-break: break-word;
    text-align: left;
    font-size: 1em;
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

#chatMessages .assistant-message {
    background: #232323;
    color: #eee;
    border-radius: 18px 18px 18px 4px;
    padding: 10px 16px;
    margin: 0 auto 0 0;
    display: block;
    max-width: 70%;
    word-wrap: break-word;
    word-break: break-word;
    text-align: left;
    font-size: 1em;
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

#chatMessages .model-info {
    font-size: 0.7em;
    color: #888;
    margin-top: 4px;
    font-style: italic;
}

#chatMessages .chat-error {
    color: #ff6b6b;
    font-size: 0.9em;
    padding: 8px;
    background: rgba(255, 107, 107, 0.1);
    border-radius: 4px;
    margin-bottom: 8px;
}
