/* =============================================
   GURUKRUPA AI CHATBOT STYLES
   ============================================= */

/* Floating Trigger Button */
.chatbot-trigger {
    position: fixed;
    bottom: 96px;
    right: 28px;
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.3rem;
    box-shadow: 0 4px 18px rgba(26,58,92,0.35);
    cursor: pointer;
    z-index: 1001;
    transition: all 0.3s ease;
    animation: chatEntrance 0.6s ease 1s both;
    border: none;
    outline: none;
}
.chatbot-trigger:hover {
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 8px 30px rgba(26,58,92,0.45);
}
.chatbot-trigger:active { transform: scale(0.95); }
.chatbot-trigger .chat-tooltip {
    position: absolute;
    right: 66px;
    background: var(--gray-900);
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    font-family: 'Poppins', sans-serif;
}
.chatbot-trigger .chat-tooltip::after {
    content: '';
    position: absolute;
    right: -5px;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-left-color: var(--gray-900);
}
.chatbot-trigger:hover .chat-tooltip { opacity: 1; visibility: visible; right: 70px; }

@keyframes chatEntrance {
    from { opacity: 0; transform: scale(0); }
    to { opacity: 1; transform: scale(1); }
}

/* Chat Window */
.chatbot-window {
    position: fixed;
    bottom: 95px;
    right: 28px;
    width: 380px;
    height: 600px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 16px 60px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 1002;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
}
.chatbot-window.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Header */
.chatbot-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
.chatbot-avatar {
    width: 38px;
    height: 38px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #fff;
}
.chatbot-header-info { flex: 1; }
.chatbot-header-info h5 { color: #fff; font-size: 0.88rem; font-weight: 600; margin: 0; }
.chatbot-header-info span { color: rgba(255,255,255,0.6); font-size: 0.7rem; display: flex; align-items: center; gap: 4px; }
.chatbot-header-info span::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #4ade80; }
.chatbot-close {
    width: 30px; height: 30px; border-radius: 50%;
    background: rgba(255,255,255,0.1); border: none;
    color: #fff; font-size: 0.8rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.chatbot-close:hover { background: rgba(255,255,255,0.2); }

/* Messages Area */
.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.chatbot-messages::-webkit-scrollbar { width: 4px; }
.chatbot-messages::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 4px; }

/* Message Bubbles */
.chat-msg {
    max-width: 85%;
    animation: msgIn 0.3s ease;
}
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.chat-msg.bot { align-self: flex-start; }
.chat-msg.user { align-self: flex-end; }

.chat-msg .msg-bubble {
    padding: 11px 15px;
    border-radius: 16px;
    font-size: 0.84rem;
    line-height: 1.6;
    position: relative;
}
.chat-msg.bot .msg-bubble {
    background: var(--gray-50);
    color: var(--gray-700);
    border-bottom-left-radius: 4px;
    border: 1px solid var(--gray-100);
}
.chat-msg.user .msg-bubble {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    border-bottom-right-radius: 4px;
}
.chat-msg .msg-time {
    font-size: 0.62rem;
    color: var(--gray-400);
    margin-top: 4px;
    padding: 0 4px;
}
.chat-msg.user .msg-time { text-align: right; }

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 15px;
    background: var(--gray-50);
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    width: fit-content;
    border: 1px solid var(--gray-100);
}
.typing-indicator span {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--gray-400);
    animation: typingDot 1.4s infinite;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingDot { 0%,60%,100% { transform: translateY(0); } 30% { transform: translateY(-5px); } }

/* Quick Actions */
.chat-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}
.chat-quick-btn {
    padding: 6px 12px;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--primary);
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Poppins', sans-serif;
}
.chat-quick-btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* CTA Buttons inside chat */
.chat-cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}
.chat-cta-btn {
    padding: 7px 14px;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
    font-family: 'Poppins', sans-serif;
}
.chat-cta-btn.primary { background: var(--secondary); color: #fff; }
.chat-cta-btn.primary:hover { background: var(--secondary-dark); transform: translateY(-1px); }
.chat-cta-btn.outline { background: #fff; border: 1px solid var(--gray-200); color: var(--primary); }
.chat-cta-btn.outline:hover { border-color: var(--primary); background: rgba(26,58,92,0.03); }

/* Input Area */
.chatbot-input {
    padding: 12px 16px;
    border-top: 1px solid var(--gray-100);
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
    background: #fff;
}
.chatbot-input input {
    flex: 1;
    padding: 10px 14px;
    border: 2px solid var(--gray-200);
    border-radius: 50px;
    font-size: 0.84rem;
    font-family: 'Poppins', sans-serif;
    outline: none;
    transition: border-color 0.3s;
}
.chatbot-input input:focus { border-color: var(--primary); }
.chatbot-input button {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary), var(--secondary-light));
    border: none;
    color: #fff;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.chatbot-input button:hover { transform: scale(1.05); box-shadow: 0 4px 12px rgba(232,122,46,0.3); }

/* Responsive */
@media (max-width: 768px) {
    .chatbot-trigger { bottom: 80px; right: 18px; width: 46px; height: 46px; font-size: 1.1rem; }
    .chatbot-trigger .chat-tooltip { display: none; }
    .chatbot-window {
        bottom: 0; right: 0; left: 0;
        width: 100%; height: 100%;
        border-radius: 0;
        max-height: 100vh;
    }
}
