/* === AI Chatbot Widget (Production Ready) === */
.chatbot-toggler {
    position: fixed;
    bottom: 100px;
    right: 35px;
    outline: none;
    border: none;
    height: 50px;
    width: 50px;
    display: flex;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    transition: all 0.3s ease;
    z-index: 100000;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}

.chatbot-toggler:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.6);
}

.chatbot-toggler span {
    position: absolute;
    font-size: 1.4rem;
}

.chatbot-toggler .close-icon {
    opacity: 0;
}

body.show-chatbot .chatbot-toggler .open-icon {
    opacity: 0;
}

body.show-chatbot .chatbot-toggler .close-icon {
    opacity: 1;
}

.chatbot {
    position: fixed;
    right: 35px;
    bottom: 95px;
    width: 400px;
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: scale(0.5);
    transform-origin: bottom right;
    box-shadow: 0 0 128px 0 rgba(0, 0, 0, 0.1), 0 32px 64px -48px rgba(0, 0, 0, 0.5);
    transition: all 0.2s ease;
    z-index: 100001;
    display: flex;
    flex-direction: column;
    max-height: 600px;
}

body.show-chatbot .chatbot {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.chatbot header {
    padding: 16px 20px;
    text-align: center;
    color: #fff;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    position: relative;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.chatbot header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.chatbot header .close-btn {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 1.3rem;
    opacity: 0.8;
    transition: opacity 0.2s;
    display: none;
}

.chatbot header .close-btn:hover {
    opacity: 1;
}

.quick-chips {
    display: flex;
    gap: 8px;
    padding: 12px 15px;
    overflow-x: auto;
    background: linear-gradient(to bottom, #f8f9fa, #ffffff);
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
}

.quick-chips::-webkit-scrollbar {
    height: 4px;
}

.quick-chips::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 2px;
}

.chip {
    background: white;
    border: 1.5px solid #e5e7eb;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    color: #1e40af;
    font-weight: 500;
    transition: all 0.2s;
    flex-shrink: 0;
}

.chip:hover {
    background: #1e40af;
    color: white;
    border-color: #1e40af;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(30, 64, 175, 0.3);
}

.chatbox {
    overflow-y: auto;
    height: 400px;
    padding: 20px;
    background: #f9fafb;
    flex-grow: 1;
}

.chatbox::-webkit-scrollbar {
    width: 6px;
}

.chatbox::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 25px;
}

.chatbox::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 25px;
}

.chatbox .chat {
    display: flex;
    list-style: none;
    margin-bottom: 15px;
}

.chatbox .outgoing {
    justify-content: flex-end;
}

.chatbox .incoming .bot-icon {
    width: 32px;
    height: 32px;
    color: #fff;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    text-align: center;
    line-height: 32px;
    border-radius: 50%;
    margin-right: 10px;
    font-size: 1.1rem;
    flex-shrink: 0;
    align-self: flex-end;
}

.chatbox .chat p {
    padding: 12px 16px;
    border-radius: 12px;
    max-width: 75%;
    font-size: 0.95rem;
    line-height: 1.5;
    word-wrap: break-word;
}

.chatbox .outgoing p {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    border-radius: 12px 12px 0 12px;
}

.chatbox .incoming p {
    border-radius: 12px 12px 12px 0;
    color: #1f2937;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
}

.chat-input {
    display: flex;
    gap: 8px;
    padding: 12px 15px;
    background: #fff;
    border-top: 2px solid #e5e7eb;
    align-items: center;
}

.chat-input textarea {
    height: 50px;
    width: 100%;
    border: none;
    outline: none;
    resize: none;
    padding: 12px 0;
    font-size: 0.95rem;
    font-family: inherit;
    color: #1f2937;
}

.chat-input textarea::placeholder {
    color: #9ca3af;
}

.chat-input span {
    color: #1e40af;
    cursor: pointer;
    font-size: 1.5rem;
    padding: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.chat-input span:hover {
    background: #eff6ff;
    transform: scale(1.1);
}

.chat-input .voice-btn {
    font-size: 1.3rem;
}

/* Mobile Responsive */
@media (max-width: 500px) {
    .chatbot-toggler {
        right: 20px;
        bottom: 20px;
    }

    .chatbot {
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
        max-height: 100vh;
    }

    .chatbot header .close-btn {
        display: block;
    }

    .chatbox {
        height: calc(100vh - 200px);
    }
}