/* === Floating Widget Styles === */
#thorbot-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: 'Inter', sans-serif;
}

#chat-toggle {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

#chat-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 18px rgba(0,0,0,0.4);
}

#chat-popup {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 550px;
    transition: all 0.3s ease-in-out;
}

#chat-popup.hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.chat-container {
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 15px;
    text-align: center;
}

.chat-header h1 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
}

.chat-header p {
    font-size: 12px;
    opacity: 0.9;
}

.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f7f7f7;
}

.message {
    margin-bottom: 12px;
    display: flex;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {opacity: 0; transform: translateY(10px);}
    to {opacity: 1; transform: translateY(0);}
}

.message.user { justify-content: flex-end; }

.message-content {
    max-width: 70%;
    padding: 10px 14px;
    border-radius: 18px;
    word-wrap: break-word;
    line-height: 1.4;
}

.message.user .message-content {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.message.bot .message-content {
    background: white;
    color: #333;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.message.error .message-content {
    background: #fee;
    color: #c33;
    border-left: 3px solid #c33;
}

.typing-indicator {
    display: none;
    padding: 10px 14px;
    background: white;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    width: 60px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
}

.typing-indicator.active { display: block; }

.typing-indicator span {
    height: 8px;
    width: 8px;
    background: #1e3c72;
    border-radius: 50%;
    display: inline-block;
    margin-right: 4px;
    animation: bounce 1.4s infinite ease-in-out both;
}

.typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.typing-indicator span:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
    0%,80%,100% { transform: scale(0); }
    40% { transform: scale(1); }
}

.chat-input-container {
    padding: 15px;
    background: white;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
}

.chat-input {
    flex: 1;
    padding: 10px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.chat-input:focus { border-color: #1e3c72; }

.send-button {
    padding: 10px 20px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.send-button:hover { transform: translateY(-2px); }
.send-button:disabled { opacity: 0.5; cursor: not-allowed; }

.powered-by {
    text-align: center;
    padding: 10px;
    font-size: 11px;
    color: #999;
    background: #f7f7f7;
}

.powered-by a {
    color: #1e3c72;
    text-decoration: none;
}

.chat-messages::-webkit-scrollbar { width: 6px; }
.chat-messages::-webkit-scrollbar-thumb { background: #1e3c72; border-radius: 3px; }
.chat-messages::-webkit-scrollbar-thumb:hover { background: #2a5298; }
