/* -----------------------------
   Chat Bubble (floating button)
------------------------------ */
#hyperion-chat-bubble {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #007bff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 999999;
}

#hyperion-chat-bubble img {
    width: 32px;
    height: 32px;
}


/* -----------------------------
   Chat Panel
------------------------------ */
#hyperion-chat-panel {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 330px;
    height: 430px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 999999;
}

#hyperion-chat-header {
    background: #007bff;
    color: white;
    padding: 14px;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
}


/* -----------------------------
   Message Container
------------------------------ */
#hyperion-chat-messages {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
    background: #f8f9fa;
}

#hyperion-chat-messages {
    white-space: normal !important;
}

#hyperion-chat-messages .message {
    display: block !important;
    max-width: 100% !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}

#hyperion-chat-messages .bot-message,
#hyperion-chat-messages .user-message {
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
}

/* Hide scrollbar (looks cleaner) */
#hyperion-chat-messages::-webkit-scrollbar {
    width: 6px;
}
#hyperion-chat-messages::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}


/* -----------------------------
   Messages
------------------------------ */
.message {
    max-width: 85%;
    padding: 10px 12px;
    margin-bottom: 10px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.3;
}

.user-message {
    background: #00d2c6;
    color: white;
    align-self: flex-end;
    margin-left: auto;
}

.bot-message {
    background: white;
    border: 1px solid #e3e3e3;
    color: #333;
    align-self: flex-start;
    margin-right: auto;
}


/* -----------------------------
   Input Row
------------------------------ */
#hyperion-chat-input-row {
    display: flex;
    padding: 10px;
    border-top: 1px solid #ddd;
    background: #fff;
}

#hyperion-chat-input {
    flex: 1;
    padding: 10px;
    font-size: 14px;
    border-radius: 8px;
    border: 1px solid #ccc;
}

#hyperion-chat-send {
    margin-left: 8px;
    background: #007bff;
    border: none;
    padding: 0 16px;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    cursor: pointer;
    transition: 0.2s;
}

#hyperion-chat-send:hover {
    background: #005dc0;
}


/* -----------------------------
   Typing Indicator (bouncing dots)
------------------------------ */

.typing-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #f1f1f1;
    border-radius: 12px;
    font-size: 13px;
    color: #555;
    font-style: italic;
}

.typing-dots {
    display: inline-flex;
    gap: 4px;
    align-items: center;
}

.typing-dots div {
    width: 6px;
    height: 6px;
    background: #888;
    border-radius: 50%;
    animation: typing-bounce 1.4s infinite ease-in-out;
}

.typing-dots div:nth-child(1) { animation-delay: 0s; }
.typing-dots div:nth-child(2) { animation-delay: 0.15s; }
.typing-dots div:nth-child(3) { animation-delay: 0.3s; }

@keyframes typing-bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}


/* -----------------------------
   Small Screen Adjustments
------------------------------ */
@media (max-width: 480px) {
    #hyperion-chat-panel {
        width: 90%;
        right: 5%;
    }
}
/* FORCE typing animation even if theme overrides animations */
#hyperion-chat-panel .typing-dots div {
    width: 6px;
    height: 6px;
    background: #888;
    border-radius: 50%;
    display: inline-block !important;
    animation: typing-bounce 1.4s infinite ease-in-out !important;
}

#hyperion-chat-panel .typing-indicator {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
}

/* Increase specificity for animation keyframes */
@keyframes typing-bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}