/* Professional Ollama Chat Bot Styling */
.simple-ollama-chat-container {
    max-width: 400px;
    margin: 20px auto;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow: hidden;
}

.simple-ollama-chat-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    font-weight: 600;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.simple-ollama-chat-header::before {
    content: "🤖";
    font-size: 20px;
}

.simple-ollama-chat-messages {
    height: 300px;
    overflow-y: auto;
    padding: 15px;
    background: #f8f9fa;
}

.simple-ollama-message {
    margin-bottom: 12px;
    padding: 10px 14px;
    border-radius: 18px;
    max-width: 80%;
    word-wrap: break-word;
    line-height: 1.4;
}

.simple-ollama-user-message {
    background: #007bff;
    color: white;
    margin-left: auto;
    text-align: right;
}

.simple-ollama-bot-message {
    background: #e9ecef;
    color: #333;
    margin-right: auto;
}

.simple-ollama-chat-input-container {
    padding: 15px;
    background: white;
    border-top: 1px solid #e1e5e9;
    display: flex;
    gap: 10px;
}

.simple-ollama-chat-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 25px;
    outline: none;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.simple-ollama-chat-input:focus {
    border-color: #007bff;
}

.simple-ollama-chat-send {
    background: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.simple-ollama-chat-send:hover {
    background: #0056b3;
}

.simple-ollama-chat-send::before {
    content: "➤";
    font-size: 16px;
}

.simple-ollama-typing {
    display: none;
    color: #666;
    font-style: italic;
    padding: 5px 14px;
    background: #e9ecef;
    border-radius: 18px;
    margin-right: auto;
    max-width: 80px;
}

.simple-ollama-typing.active {
    display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
    .simple-ollama-chat-container {
        margin: 10px;
        max-width: 100%;
    }
    
    .simple-ollama-chat-messages {
        height: 250px;
    }
    
    .simple-ollama-message {
        max-width: 90%;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .simple-ollama-chat-container {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .simple-ollama-chat-messages {
        background: #1a202c;
    }
    
    .simple-ollama-bot-message {
        background: #4a5568;
        color: #e2e8f0;
    }
    
    .simple-ollama-chat-input-container {
        background: #2d3748;
        border-top-color: #4a5568;
    }
    
    .simple-ollama-chat-input {
        background: #4a5568;
        border-color: #718096;
        color: #e2e8f0;
    }
}

/* Floating chat widget */
.floating-ollama-chat {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99999;
    width: 500px;
    height: 700px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    pointer-events: auto;
}

.floating-chat-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.floating-chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.floating-chat-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.floating-chat-content {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: calc(100% - 60px);
}

.floating-ollama-chat .simple-ollama-chat-container {
    margin: 0;
    max-width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: none;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
}

.floating-ollama-chat .simple-ollama-chat-header {
    display: none;
}

.floating-ollama-chat .simple-ollama-chat-messages {
    flex: 1;
    height: auto;
    max-height: 550px;
    overflow-y: auto;
}

.floating-ollama-chat .simple-ollama-chat-input-container {
    border-top: 1px solid #e1e5e9;
    padding: 15px;
    flex-shrink: 0;
}

.floating-chat-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 99998;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    pointer-events: auto;
}

.floating-chat-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.floating-chat-button::before {
    content: "💬";
}

/* Responsive design for floating chat */
@media (max-width: 768px) {
    .floating-ollama-chat {
        width: 95%;
        right: 2.5%;
        left: 2.5%;
        bottom: 10px;
        height: 85vh;
        max-height: 700px;
    }
    
    .floating-ollama-chat .simple-ollama-chat-messages {
        max-height: calc(85vh - 120px);
    }
    
    .floating-chat-button {
        bottom: 10px;
        right: 10px;
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .floating-ollama-chat {
        height: 90vh;
        max-height: 600px;
    }
    
    .floating-ollama-chat .simple-ollama-chat-messages {
        max-height: calc(90vh - 120px);
    }
}