/* Chat Icon */
#chatbot-icon {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    border-radius: 50px;
    display: flex;
    align-items: center;
    cursor: pointer;
    z-index: 9999;
    box-shadow: 0 6px 15px rgba(37, 99, 235, 0.4);
    transition: all 0.3s ease;
    padding: 5px 15px 5px 5px;
    min-width: 120px;
    height: 45px;
}

#chatbot-icon:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.6);
}

#chatbot-icon svg {
    width: 28px;
    height: 28px;
    fill: white;
}

/* AI Bot Logo */
.ai-bot-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    position: absolute;
    left: -25px;
    top: -10px;
    z-index: 2;
    filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.2));
    transition: all 0.3s ease;
}

#chatbot-icon:hover .ai-bot-logo {
    transform: scale(1.1) rotate(-5deg);
}

.ask-text {
    font-weight: 700;
    font-size: 18px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    margin-left: 40px; /* Space for logo */
    flex-grow: 1;
    text-align: right;
    padding-right: 10px;
    letter-spacing: 0.5px;
}

.icon-container {
    display: flex;
    align-items: center;
    width: 100%;
    position: relative;
}


/* Chat Box */
#chatbot-box {
    position: fixed;
    bottom: 110px;
    right: 25px;
    width: 90vw;
    max-width: 380px;
    height: 70vh;
    max-height: 600px;
    background: #fff;
    border-radius: 16px;
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 9999;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    font-family: 'Segoe UI', system-ui, sans-serif;
}

/* Header */
.chat-header {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-avatar {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
}

.chat-title {
    flex: 1;
    font-weight: 600;
    font-size: 18px;
}

.chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
    line-height: 1;
}

.chat-close:hover {
    opacity: 1;
}

/* Chat Content */
#chat-content {
    padding: 16px;
    overflow-y: auto;
    flex: 1;
    background-color: #f8fafc;
    display: flex;
    flex-direction: column;
    max-height: calc(60vh - 90px);
    height: 60vh;
    gap: 12px;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f1f5f9;
}

/* Message Bubbles */
#chat-content > div {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    line-height: 1.4;
    position: relative;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

#chat-content > div:not(.typing-indicator):after {
    content: '';
    position: absolute;
    bottom: 0;
    width: 10px;
    height: 10px;
}

/* User Messages */
#chat-content > div:nth-child(odd) {
    align-self: flex-end;
    background: #2563eb;
    color: white;
    border-bottom-right-radius: 4px;
}

/* Bot Messages */
#chat-content > div:nth-child(even) {
    align-self: flex-start;
    background: #e2e8f0;
    color: #1e293b;
    border-bottom-left-radius: 4px;
}

/* Typing Indicator */
.typing-indicator {
    background: #e2e8f0;
    padding: 12px 16px;
    border-radius: 18px;
    width: fit-content;
    border-bottom-left-radius: 4px;
    font-size: 14px;
    color: #64748b;
}

.typing-indicator .dot {
    display: inline-block;
    animation: blink 1.4s infinite;
}

.typing-indicator .dot:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator .dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes blink {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* Input Area */
.chat-input-container {
    display: flex;
    border-top: 1px solid #e2e8f0;
    padding: 12px;
    gap: 8px;
    background: white;
    align-items: flex-end;
}

#chatbot-input {
    flex: 1;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    padding: 12px 16px;
    resize: none;
    max-height: 120px;
    font-size: 15px;
    transition: border-color 0.3s;
}

#chatbot-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

#chatbot-send {
    background: #2563eb;
    border: none;
    /*border-radius: 50%;*/
    /*width: 44px;*/
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s;
}

#chatbot-send:hover {
    background: #1d4ed8;
}

#chatbot-send svg {
    width: 20px;
    height: 20px;
    fill: white;
}
/* User Messages */
/*.user-msg {*/
/*    align-self: flex-end;*/
/*    background: #2563eb;*/
/*    color: white;*/
/*    border-bottom-right-radius: 4px;*/
/*    max-width: 80%;*/
/*    padding: 12px 16px;*/
/*    border-radius: 18px;*/
/*    line-height: 1.4;*/
/*}*/

/* Bot Messages */
.bot-msg {
    align-self: flex-start;
    background: #e2e8f0;
    color: #1e293b;
    border-bottom-left-radius: 4px;
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    line-height: 1.4;
}

/* Error Messages */
.error-msg {
    align-self: center;
    background: #fee2e2;
    color: #b91c1c;
    border-radius: 18px;
    max-width: 90%;
    padding: 12px 16px;
    text-align: center;
    font-size: 14px;
}

/**/
/* Webkit browsers scrollbar styling */
#chat-content::-webkit-scrollbar {
    width: 6px;
}

#chat-content::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

#chat-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

#chat-content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Ensure message bubbles don't overflow */
#chat-content > div {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    line-height: 1.4;
    position: relative;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Keep existing message styles */
.user-msg {
    align-self: flex-end;
    background: #2563eb;
    color: white;
    border-bottom-right-radius: 4px;
}

.bot-msg {
    align-self: flex-start;
    background: #e2e8f0;
    color: #1e293b;
    border-bottom-left-radius: 4px;
}

.error-msg {
    align-self: center;
    background: #fee2e2;
    color: #b91c1c;
    text-align: center;
    font-size: 14px;
}

/* Add to the end of the file */
.welcome-message {
    animation: fadeIn 0.5s ease;
    margin-bottom: 15px;
    background-color: white !important;
    align-self: flex-start !important;
}

.welcome-message .bot-msg {
    background: #dbeafe;
    color: #1e40af;
    padding: 15px;
    border-radius: 18px;
    line-height: 1.5;
}

.welcome-message ul {
    margin: 10px 0 0 20px;
    padding-left: 10px;
}

.welcome-message li {
    margin-bottom: 8px;
    font-size: 14px;
}

