/* Vorkes Floating AI Chat Widget */
#vorkes-chat-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

#vorkes-chat-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--color-red, #E82127);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(232, 33, 39, 0.4);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
}

#vorkes-chat-button:hover {
    transform: scale(1.1);
}

#vorkes-chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: var(--color-bg, #0a0a0a);
    border: 1px solid var(--glass-border, rgba(255,255,255,0.08));
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

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

#vorkes-chat-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-bottom: 1px solid var(--glass-border, rgba(255,255,255,0.08));
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#vorkes-chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    background: var(--color-red, #E82127);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
}

.chat-title {
    color: var(--color-text, #f7f7f5);
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.2;
}

.chat-status {
    color: #4ade80;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.chat-status::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px #4ade80;
}

#vorkes-chat-close {
    background: none;
    border: none;
    color: var(--color-text-muted, #a1a1aa);
    font-size: 1.5rem;
    cursor: pointer;
    transition: 0.2s;
}

#vorkes-chat-close:hover {
    color: white;
}

#vorkes-chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#vorkes-chat-messages::-webkit-scrollbar { width: 5px; }
#vorkes-chat-messages::-webkit-scrollbar-track { background: transparent; }
#vorkes-chat-messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }

.chat-bubble {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.4;
    animation: chatPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    transform-origin: bottom left;
}

@keyframes chatPop {
    0% { opacity: 0; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1); }
}

.chat-bubble.ai {
    background: rgba(255,255,255,0.08);
    color: var(--color-text, #f7f7f5);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.chat-bubble.user {
    background: var(--color-red, #E82127);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    transform-origin: bottom right;
}

#vorkes-chat-input-area {
    padding: 15px;
    background: rgba(0,0,0,0.2);
    border-top: 1px solid var(--glass-border, rgba(255,255,255,0.08));
    display: flex;
    gap: 10px;
}

#vorkes-chat-input {
    flex: 1;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border, rgba(255,255,255,0.1));
    border-radius: 20px;
    padding: 10px 15px;
    color: white;
    font-size: 0.95rem;
    outline: none;
    transition: 0.3s;
}

#vorkes-chat-input:focus {
    border-color: rgba(232, 33, 39, 0.5);
    background: rgba(255,255,255,0.08);
}

#vorkes-chat-send {
    background: var(--color-red, #E82127);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

#vorkes-chat-send:hover {
    background: #ff4b4b;
    transform: scale(1.05);
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 5px 0;
}
.typing-indicator span {
    width: 6px;
    height: 6px;
    background: var(--color-text-muted, #a1a1aa);
    border-radius: 50%;
    animation: typing 1.4s infinite both;
}
.typing-indicator span:nth-child(1) { animation-delay: 0s; }
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 80%, 100% { transform: translateY(0); opacity: 0.5; }
    40% { transform: translateY(-4px); opacity: 1; }
}

@media (max-width: 480px) {
    #vorkes-chat-window {
        position: fixed;
        bottom: 0;
        right: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
        z-index: 10000;
    }
    #vorkes-chat-button {
        bottom: 20px;
        right: 20px;
    }
}
