/* Azure AI Chatbot Styles */
:root {
    --azure-chatbot-primary: #0073aa;
    --azure-chatbot-secondary: #f1f1f1;
    --azure-chatbot-text: #333;
    --azure-chatbot-bg: #fff;
    --azure-chatbot-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

#azure-chatbot-container {
    position: fixed;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.azure-chatbot-bottom-right {
    bottom: 20px;
    right: 20px;
}

.azure-chatbot-bottom-left {
    bottom: 20px;
    left: 20px;
}

.azure-chatbot-top-right {
    top: 20px;
    right: 20px;
}

.azure-chatbot-top-left {
    top: 20px;
    left: 20px;
}

#azure-chatbot-button {
    width: 60px;
    height: 60px;
    background: var(--azure-chatbot-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--azure-chatbot-shadow);
    transition: all 0.3s ease;
    color: white;
}

#azure-chatbot-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

#azure-chatbot-button.minimized {
    background: #28a745;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

#azure-chatbot-widget {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 350px;
    height: 500px;
    background: var(--azure-chatbot-bg);
    border-radius: 12px;
    box-shadow: var(--azure-chatbot-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.azure-chatbot-bottom-left #azure-chatbot-widget,
.azure-chatbot-top-left #azure-chatbot-widget {
    right: auto;
    left: 0;
}

.azure-chatbot-top-right #azure-chatbot-widget,
.azure-chatbot-top-left #azure-chatbot-widget {
    bottom: auto;
    top: 70px;
}

.azure-chatbot-header {
    background: var(--azure-chatbot-primary);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.azure-chatbot-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.azure-chatbot-controls {
    display: flex;
    gap: 5px;
}

.azure-chatbot-controls button {
    background: transparent;
    border: none;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    line-height: 1;
}

.azure-chatbot-controls button:hover {
    background: rgba(255,255,255,0.2);
}

#azure-chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.azure-chatbot-message {
    display: flex;
    flex-direction: column;
    max-width: 80%;
}

.azure-chatbot-message.user-message {
    align-self: flex-end;
    align-items: flex-end;
}

.azure-chatbot-message.bot-message {
    align-self: flex-start;
    align-items: flex-start;
}

.message-content {
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
}

.user-message .message-content {
    background: var(--azure-chatbot-primary);
    color: white;
    border-bottom-right-radius: 4px;
}

.bot-message .message-content {
    background: var(--azure-chatbot-secondary);
    color: var(--azure-chatbot-text);
    border-bottom-left-radius: 4px;
}

.message-time {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
    padding: 0 8px;
}

.azure-chatbot-input-area {
    border-top: 1px solid #eee;
    padding: 15px 20px;
}

#azure-chatbot-typing {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 12px;
    color: #666;
}

.typing-indicator {
    display: flex;
    gap: 3px;
}

.typing-indicator span {
    width: 4px;
    height: 4px;
    background: #999;
    border-radius: 50%;
    animation: typing-pulse 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.typing-indicator span:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing-pulse {
    0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

.azure-chatbot-input-wrapper {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

#azure-chatbot-input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 10px 15px;
    font-size: 14px;
    resize: none;
    max-height: 100px;
    min-height: 40px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.3s ease;
}

#azure-chatbot-input:focus {
    border-color: var(--azure-chatbot-primary);
}

#azure-chatbot-send {
    width: 40px;
    height: 40px;
    background: var(--azure-chatbot-primary);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

#azure-chatbot-send:hover {
    background: #005a87;
    transform: scale(1.05);
}

#azure-chatbot-send:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Mobile responsive */
@media (max-width: 480px) {
    #azure-chatbot-widget {
        width: calc(100vw - 40px);
        height: calc(100vh - 140px);
        bottom: 70px;
        right: 20px;
        left: 20px;
    }
    
    .azure-chatbot-bottom-left #azure-chatbot-widget,
    .azure-chatbot-top-left #azure-chatbot-widget {
        left: 20px;
        right: 20px;
    }
}

/* Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.azure-chatbot-message {
    animation: slideInUp 0.3s ease;
}

/* Scrollbar styling */
#azure-chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

#azure-chatbot-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

#azure-chatbot-messages::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

#azure-chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: #999;
}