/* Floating Chatbot Toggle */
#ux-chat-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, #11a35e, #0e8a4f);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(17,163,94,0.5), 0 0 0 0 rgba(17,163,94,0.7);
    z-index: 10000;
    transition: transform 0.3s ease, background 0.3s;
    
    /* NEW: Levitation and pulse animations to grab attention */
    animation: levitate 3s ease-in-out infinite, pulseGlow 2s infinite;
}

@keyframes levitate {
    0% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0); }
}

@keyframes pulseGlow {
    0% { box-shadow: 0 5px 20px rgba(17,163,94,0.5), 0 0 0 0 rgba(17,163,94,0.7); }
    70% { box-shadow: 0 5px 20px rgba(17,163,94,0.5), 0 0 0 15px rgba(17,163,94,0); }
    100% { box-shadow: 0 5px 20px rgba(17,163,94,0.5), 0 0 0 0 rgba(17,163,94,0); }
}

/* NEW: Jiggle animation for the robot icon */
#ux-chat-toggle i.fa-robot {
    animation: jiggle 4s ease-in-out infinite;
}

@keyframes jiggle {
    0%, 80%, 100% { transform: rotate(0deg); }
    85% { transform: rotate(-15deg); }
    90% { transform: rotate(15deg) scale(1.1); }
    95% { transform: rotate(-10deg); }
}

#ux-chat-toggle:hover {
    transform: scale(1.1);
    animation: none; /* Stop levitation on hover */
}

#ux-chat-toggle:hover i {
    animation: none;
}

/* Tooltip on hover */
#ux-chat-tooltip {
    position: fixed;
    bottom: 45px;
    right: 110px;
    background: rgba(0, 0, 0, 0.85);
    color: #11a35e;
    font-weight: bold;
    padding: 10px 18px;
    border-radius: 20px;
    font-size: 14px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    white-space: nowrap;
    z-index: 10000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

body.light-mode #ux-chat-tooltip {
    background: white;
    color: #11a35e;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

#ux-chat-toggle:hover + #ux-chat-tooltip {
    opacity: 1;
}

/* Chat Window */
#ux-chat-window {
    position: fixed;
    bottom: 110px;
    right: 30px;
    width: 380px;
    height: 550px;
    max-height: 75vh;
    background: #050505;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    z-index: 9999;
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden;
}

body.light-mode #ux-chat-window {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    box-shadow: 0 15px 50px rgba(0,0,0,0.1);
}

#ux-chat-window.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

/* Chat Header */
#ux-chat-header {
    background: #11a35e;
    color: white;
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    font-size: 16px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

#ux-chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: transform 0.2s;
}

#ux-chat-close:hover {
    transform: scale(1.2);
}

/* Chat Body */
#ux-chat-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    font-family: inherit;
    scroll-behavior: smooth;
}

/* Messages */
.ux-msg {
    max-width: 85%;
    padding: 14px 18px;
    border-radius: 18px;
    font-size: 14.5px;
    line-height: 1.6;
}

.ux-msg-bot {
    background: rgba(255,255,255,0.08);
    color: #e0e0e0;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

body.light-mode .ux-msg-bot {
    background: #f1f3f5;
    color: #333333;
}

.ux-msg-user {
    background: #11a35e;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

/* Options */
.ux-chat-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.ux-option-btn {
    background: rgba(17,163,94,0.1);
    color: #11a35e;
    border: 1px solid rgba(17,163,94,0.3);
    padding: 12px 18px;
    border-radius: 20px;
    cursor: pointer;
    text-align: left;
    font-size: 13.5px;
    font-weight: bold;
    transition: all 0.2s;
}

.ux-option-btn:hover {
    background: rgba(17,163,94,0.25);
    transform: translateX(5px);
}

body.light-mode .ux-option-btn {
    background: #e8f6f0;
}

body.light-mode .ux-option-btn:hover {
    background: #d1efdf;
}

/* Input Area (disabled but visually there) */
#ux-chat-input-area {
    padding: 15px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    gap: 10px;
}

body.light-mode #ux-chat-input-area {
    border-top: 1px solid #eeeeee;
}

#ux-chat-input {
    flex: 1;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 12px 15px;
    border-radius: 20px;
    color: white;
    outline: none;
    font-size: 14px;
}

body.light-mode #ux-chat-input {
    background: #f8f9fa;
    border: 1px solid #cccccc;
    color: #333333;
}

#ux-chat-send {
    background: #11a35e;
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.5;
    font-size: 16px;
}
