/* IMA Chatbot Widget Styles */

.ima-chatbot-bottom-right {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

.ima-chatbot-bottom-left {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 9999;
}

/* Chat Button */
.ima-chatbot-button {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    color: white;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
}

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

.ima-chatbot-button-text {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Chat Window */
.ima-chatbot-window {
    position: absolute;
    bottom: 80px;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 500px;
    max-height: calc(100vh - 100px);
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ima-chatbot-bottom-left .ima-chatbot-window {
    right: 0;
}

.ima-chatbot-bottom-right .ima-chatbot-window {
    left: 0;
}

/* Header */
.ima-chatbot-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.ima-chatbot-header-content h3 {
    margin: 0 0 4px 0;
    font-size: 18px;
    font-weight: 600;
}

.ima-chatbot-header-content p {
    margin: 0;
    font-size: 12px;
    opacity: 0.9;
}

.ima-chatbot-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.ima-chatbot-close:hover {
    opacity: 1;
}

/* Messages Container */
.ima-chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f5f5f5;
}

.ima-chatbot-message {
    display: flex;
    max-width: 80%;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ima-chatbot-message-user {
    align-self: flex-end;
    margin-left: auto;
}

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

.ima-chatbot-message-content {
    padding: 12px 16px;
    border-radius: 12px;
    word-wrap: break-word;
}

.ima-chatbot-message-user .ima-chatbot-message-content {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.ima-chatbot-message-bot .ima-chatbot-message-content {
    background: white;
    color: #333;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.ima-chatbot-message-content p {
    margin: 0;
    line-height: 1.5;
    font-size: 14px;
}

.ima-chatbot-message-content a {
    color: inherit;
    text-decoration: underline;
}

/* Typing Indicator */
.ima-chatbot-typing {
    padding: 0 20px 12px;
    display: flex;
    gap: 4px;
}

.ima-chatbot-typing span {
    width: 8px;
    height: 8px;
    background: #999;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.ima-chatbot-typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.ima-chatbot-typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Input Container */
.ima-chatbot-input-container {
    display: flex;
    padding: 12px;
    background: white;
    border-top: 1px solid #e0e0e0;
    gap: 8px;
}

.ima-chatbot-input {
    flex: 1;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    padding: 10px 16px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.ima-chatbot-input:focus {
    border-color: #667eea;
}

.ima-chatbot-send {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.ima-chatbot-send:hover {
    transform: scale(1.1);
}

.ima-chatbot-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Responsive */
@media (max-width: 480px) {
    .ima-chatbot-window {
        width: calc(100vw - 20px);
        height: calc(100vh - 100px);
        bottom: 80px;
    }
    
    .ima-chatbot-bottom-right,
    .ima-chatbot-bottom-left {
        bottom: 10px;
        right: 10px;
        left: 10px;
    }
    
    .ima-chatbot-bottom-right .ima-chatbot-window,
    .ima-chatbot-bottom-left .ima-chatbot-window {
        left: 0;
        right: 0;
    }
}

/* Scrollbar Styling */
.ima-chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.ima-chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}

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

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

