.chat-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #007bff;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 1000;
    font-size: 30px;
    line-height: 1;
}

.chat-button i {
    font-size: 24px;
}

.chat-window {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 350px;
    height: 500px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    overflow: hidden;
    display: none;
}

.chat-header {
    padding: 15px;
    background-color: #007bff;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
}

.chat-controls {
    display: flex;
    align-items: center;
}

.chat-header .close-btn, 
.chat-header .clear-btn {
    cursor: pointer;
    font-size: 18px;
    margin-left: 10px;
}

.chat-header .clear-btn:hover,
.chat-header .close-btn:hover {
    opacity: 0.8;
}

.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.message {
    max-width: 80%;
    padding: 10px 15px;
    margin-bottom: 10px;
    border-radius: 15px;
    word-wrap: break-word;
}

.user-message {
    align-self: flex-end;
    background-color: #e3f2fd;
    color: #000;
    border-bottom-right-radius: 5px;
}

.assistant-message {
    align-self: flex-start;
    background-color: #f1f1f1;
    color: #000;
    border-bottom-left-radius: 5px;
}

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

.chat-input input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
}

.chat-input button {
    min-width: 40px;
    width: 40px;
    min-height: 40px;
    height: 40px;
    margin-left: 3px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    line-height: 1;
    padding: 0;
    box-sizing: border-box;
}

.timestamp {
    font-size: 10px;
    color: #888;
    margin-top: 5px;
}

/* Loading animation styles */
.loading-dots {
    display: flex;
    align-items: center;
    height: 24px;
}

.loading-dots .dot {
    font-size: 24px;
    opacity: 0;
    animation: fade 1.4s infinite;
    margin: 0 2px;
}

.loading-dots .dot:nth-child(1) {
    animation-delay: 0s;
}

.loading-dots .dot:nth-child(2) {
    animation-delay: 0.4s;
}

.loading-dots .dot:nth-child(3) {
    animation-delay: 0.8s;
}

@keyframes fade {
    0%, 100% {
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
}

/* Markdown styling */
.message-content {
    font-size: 14px;
    line-height: 1.4;
}

.message-content p {
    margin: 0 0 10px 0;
}

.message-content p:last-child {
    margin-bottom: 0;
}

.message-content h1, 
.message-content h2, 
.message-content h3, 
.message-content h4, 
.message-content h5, 
.message-content h6 {
    margin-top: 10px;
    margin-bottom: 10px;
    font-weight: 600;
    line-height: 1.25;
}

.message-content h1 {
    font-size: 1.5em;
}

.message-content h2 {
    font-size: 1.3em;
}

.message-content h3 {
    font-size: 1.2em;
}

.message-content ul, 
.message-content ol {
    margin-top: 0;
    margin-bottom: 10px;
    padding-left: 20px;
}

.message-content code {
    font-family: monospace;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
    padding: 0.2em 0.4em;
    font-size: 85%;
}

.message-content pre {
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
    padding: 10px;
    overflow-x: auto;
    margin: 10px 0;
}

.message-content pre code {
    background: none;
    padding: 0;
    font-size: 90%;
}

.message-content blockquote {
    margin: 0 0 10px 0;
    padding-left: 10px;
    border-left: 3px solid #ccc;
    color: #555;
}

.message-content table {
    border-collapse: collapse;
    margin: 10px 0;
    font-size: 0.9em;
    width: 100%;
}

.message-content table th,
.message-content table td {
    padding: 6px 8px;
    border: 1px solid #ddd;
    text-align: left;
}

.message-content table th {
    background-color: #f2f2f2;
    font-weight: bold;
}

.message-content a {
    color: #007bff;
    text-decoration: underline;
}

.message-content img {
    max-width: 100%;
    height: auto;
    margin: 10px 0;
}

/* Responsive styles */
@media (max-width: 480px) {
    .chat-window {
        width: 90%;
        right: 5%;
        left: 5%;
        height: 70vh;
    }
    
    .chat-button {
        bottom: 10px;
        right: 10px;
    }
} 