/* ==============================
   💬 Chat Widget Container
============================== */
.smit-aichat-widget {
    width: 380px;
    max-width: 95%;
    border: 1px solid #ddd;
    border-radius: 12px;
    background: #fff;
    font-family: Arial, sans-serif;
    position: fixed;
    bottom: 90px; /* appear above toggle button */
    right: 20px;
    z-index: 9999;
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    0% { transform: translateY(30px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

/* ==============================
   🧠 Chat Header
============================== */
.smit-aichat-header {
    font-weight: bold;
    font-size: 16px;
    padding: 12px;
    color: #fff;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    text-align: center;
}

/* ==============================
   📜 Messages Area
============================== */
.smit-aichat-messages {
    max-height: 320px;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    scroll-behavior: smooth;
}

/* Nice scrollbar for modern browsers */
.smit-aichat-messages::-webkit-scrollbar {
    width: 6px;
}
.smit-aichat-messages::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}
.smit-aichat-messages::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* ==============================
   ✍️ Input Box
============================== */
.smit-aichat-input {
    display: flex;
    padding: 10px;
    border-top: 1px solid #ddd;
    background: #fafafa;
}

.smit-aichat-input input {
    flex: 1;
    padding: 8px 10px;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 14px;
    outline: none;
}

.smit-aichat-input input:focus {
    border-color: #007bff;
}

.smit-aichat-input button {
    margin-left: 8px;
    padding: 8px 14px;
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
    font-size: 14px;
}

.smit-aichat-input button:hover {
    background: #0056b3;
}
div#smit-aichat-widget {
    background: linear-gradient(to bottom, #FFB347 20%, #FFD180 34%, #FFFFFF 90%, #FFFFFF 100%);

}
h2.text {
    font-weight: bold;
}
/* ==============================
   🧰 Quick Action Section
============================== */
.chat-history-section {
    padding: 10px;
    
}

.chat-history-title {
    font-weight: bold;
    margin-bottom: 6px;
    display: block;
    font-size: 14px;
}

.chat-history-grid {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.chat-history-button {
    flex: 1;
    padding: 6px;
    background: #f1f1f1;
    border: 1px solid #ccc;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.3s;
    font-size: 13px;
    text-align: center;
}

.chat-history-button:hover {
    background: #007bff;
    color: #fff;
    border-color: #007bff;
}

/* ==============================
   💬 Floating Toggle Button
============================== */
#chat-toggle-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
    cursor: pointer;
    z-index: 10000;
    transition: transform 0.3s ease;
}

#chat-toggle-button:hover {
    transform: scale(1.1);
    background: #0056b3;
}

/* ==============================
   📝 Message Bubbles
============================== */
.message-bubble {
    padding: 10px 12px;
    border-radius: 14px;
    max-width: 75%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
    font-size: 14px;
}

.ai-message {
    background: #f1f1f1;
    color: #333;
    align-self: flex-start;
}

.user-message {
    background: #007bff;
    color: #fff;
    align-self: flex-end;
}

/* Profile Icons */
.chat-profile-image {
    border-radius: 50%;
    background-size: cover;
    background-position: center;
}

/* ==============================
   📱 Responsive
============================== */
@media (max-width: 600px) {
    .smit-aichat-widget {
        width: 95%;
        right: 2.5%;
        bottom: 80px;
    }

    #chat-toggle-button {
        width: 50px;
        height: 50px;
    }
}
#smit-aichat-messages {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    max-height: 400px;
}

.message-wrapper {
    display: flex;
    align-items: flex-start;
    margin-bottom: 10px;
}

.message-bubble {
    max-width: 70%;
    padding: 10px 12px;
    word-wrap: break-word;
    border-radius: 15px;
}

.user-message {
    background-color: #007bff;
    color: #fff;
    border-radius: 15px 15px 0 15px;
}

.ai-message {
    background-color: #e5e5e5;
    color: #333;
    border-radius: 15px 15px 15px 0;
}

.chat-profile-image {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-size: cover;
}
