#espe-chatbot-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    font-family: 'Inter', sans-serif;
}

#espe-chat-trigger {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #006b3f 0%, #1e3a8a 100%);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
}

#espe-chat-trigger:hover {
    transform: scale(1.1) rotate(5deg);
}

#espe-chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    max-height: 600px;
    height: 70vh;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 10px 40px -10px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.075, 0.82, 0.165, 1);
    transform-origin: bottom right;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

#espe-chat-window.hidden {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
    pointer-events: none;
}

.chat-header {
    background: linear-gradient(135deg, #006b3f 0%, #1e3a8a 100%);
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
}

.chat-logo {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 8px;
    padding: 2px;
}

.chat-title h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.chat-title .status {
    font-size: 11px;
    opacity: 0.8;
}

.chat-title .status::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    margin-right: 5px;
}

#close-chat {
    position: absolute;
    right: 20px;
    top: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    opacity: 0.7;
}

#close-chat:hover { opacity: 1; }

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

.message {
    padding: 12px 16px;
    border-radius: 18px;
    max-width: 85%;
    font-size: 14px;
    line-height: 1.5;
    position: relative;
    animation: messageIn 0.3s ease-out;
}

@keyframes messageIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.message.assistant {
    background: #f1f5f9;
    color: #1e293b;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.message.user {
    background: #006b3f;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chat-input-area {
    padding: 20px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    gap: 10px;
    background: white;
}

#chat-input {
    flex-grow: 1;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 15px;
    outline: none;
    transition: border-color 0.3s;
}

#chat-input:focus {
    border-color: #006b3f;
}

#send-chat {
    background: #006b3f;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

#send-chat:hover {
    background: #005a35;
    transform: scale(1.05);
}

.typing-indicator {
    align-self: flex-start;
    background: #f1f5f9;
    padding: 12px 20px;
    border-radius: 18px;
    display: flex;
    gap: 4px;
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    background: #64748b;
    border-radius: 50%;
    animation: typing 1s infinite alternate;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    from { opacity: 0.3; transform: scale(1); }
    to { opacity: 1; transform: scale(1.2); }
}

@media (max-width: 480px) {
    #espe-chat-window {
        width: calc(100vw - 40px);
        height: 60vh;
        bottom: 70px;
        right: -10px;
    }
}
