/* MATECIA Chatbot Styles */

.matecia-chatbot-minimized {
    animation: slideIn 0.3s ease-out;
}

/* MATECIA AI chatbot bounce animation */
#matecia-chatbot-root .matecia-restore-button {
    animation: mateciaBounce 2s infinite;
}

@keyframes mateciaBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-12px);
    }
    60% {
        transform: translateY(-6px);
    }
}


.matecia-restore-button {
    color: #ffffff !important;
    border: none !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    background: linear-gradient(90deg, #DCB15A 0%, #E3691A 100%);
    border-radius: 100px !important;
    display: flex !important;
    gap: 8px !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 8px 16px 8px 8px !important;
    transition: background-color .3s !important;
    white-space: nowrap;
    cursor: pointer;
	outline: none;
}

.matecia-restore-button:hover {
    background: linear-gradient(90deg, #DCB15A 0%, #E3691A 100%);
}

/* Message Wrapper */
.matecia-message {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    animation: fadeIn 0.3s ease-in;
}

.matecia-message.matecia-user {
    flex-direction: row-reverse;
}

/* Avatar */
.matecia-message-avatar {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
}

.matecia-bot-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e27625;
}

.matecia-user-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(90deg, #DCB15A 0%, #E3691A 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    border: 2px solid #e27625;
}

/* Message Content */
.matecia-message-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 75%;
}

.matecia-message.matecia-user .matecia-message-content {
    align-items: flex-end;
}

/* Message Bubble */
.matecia-message-bubble {
    padding: 12px 16px;
    border-radius: 12px;
    word-wrap: break-word;
    line-height: 1.5;
    max-width: 100%;
}

.matecia-bot .matecia-message-bubble {
    background: white;
    color: #1e293b;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.matecia-user .matecia-message-bubble {
    background: linear-gradient(90deg, #DCB15A 0%, #E3691A 100%);
    color: white;
    border-bottom-right-radius: 4px;
    margin-left: auto;
}

/* Message Time */
.matecia-message-time {
    font-size: 11px;
    color: #64748b;
    display: block;
    padding: 0 4px;
    margin-top: 4px;
}

/* Typing Indicator */
.matecia-typing-indicator {
    padding: 12px 16px;
    background: white;
    border-radius: 12px;
    width: fit-content;
    animation: pulse 1.5s infinite;
}

/* Header */
.matecia-chat-header {
    background: linear-gradient(90deg, #DCB15A 0%, #E3691A 100%);
    color: #fff;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.matecia-header-info h3 {
    margin: 0 0 5px 0;
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    -webkit-text-fill-color: white;
}

.matecia-status {
    font-size: 13px;
    opacity: 0.9;
}

/* Header Buttons */
.matecia-icon-btn {
    background: #fff;
    border: none;
    color: #e27625;
    padding: 8px 12px;
    margin-left: 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
}

.matecia-icon-btn:hover {
    background: #fff;
	color: #e27625;
}

/* Messages Container */
.matecia-messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
}

/* Scrollbar styling */
.matecia-messages-container::-webkit-scrollbar {
    width: 6px;
}

.matecia-messages-container::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.matecia-messages-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.matecia-messages-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Input Area */
.matecia-input-container {
    padding: 20px;
    background: white;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 10px;
}

.matecia-input {
    flex: 1;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    resize: none;
    outline: none;
    transition: all 0.2s;
    height: 60px;
}

.matecia-input:focus {
    border-color: #e27625;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.matecia-send-btn {
    padding: 12px 24px 12px 24px;
    background: linear-gradient(90deg, #DCB15A 0%, #E3691A 100%);
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.matecia-send-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.matecia-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

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

@keyframes slideIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .matecia-chatbot-container {
        width: calc(100vw - 20px) !important;
        height: calc(100vh - 20px) !important;
        bottom: 10px !important;
        right: 10px !important;
        left: 10px !important;
    }
    
    .matecia-message-content {
        max-width: 85%;
    }
}