/* Chatbot Styles */
#chatbot-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    font-family: inherit;
}

#chatbot-button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #22c55e, #15803d);
    box-shadow: 0 8px 20px rgba(34, 197, 94, 0.4), inset 0 2px 2px rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#chatbot-button:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 35px rgba(34, 197, 94, 0.6), inset 0 2px 2px rgba(255,255,255,0.3);
}

#chatbot-button svg {
    fill: #ffffff;
    width: 26px;
    height: 26px;
    transition: transform 0.3s;
}

#chatbot-button.open svg {
    transform: rotate(90deg) scale(0);
    opacity: 0;
}

#chatbot-button-close-icon {
    position: absolute;
    width: 24px;
    height: 24px;
    fill: #ffffff;
    opacity: 0;
    transform: rotate(-90deg) scale(0);
    transition: all 0.3s;
}

#chatbot-button.open #chatbot-button-close-icon {
    opacity: 1;
    transform: rotate(0) scale(1);
}

#chatbot-window {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 310px;
    height: 420px;
    max-height: calc(100vh - 100px);
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 20px rgba(34, 197, 94, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px) scale(0.95);
    transform-origin: bottom right;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#chatbot-window.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

#chatbot-header {
    padding: 12px 16px;
    background: rgba(34, 197, 94, 0.1);
    border-bottom: 1px solid rgba(34, 197, 94, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
}

.chatbot-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #22c55e, #15803d);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.4);
}

.chatbot-avatar svg {
    fill: #ffffff;
    width: 18px;
    height: 18px;
}

.chatbot-title {
    flex: 1;
}

.chatbot-title h3 {
    margin: 0;
    font-size: 1rem;
    color: #ffffff;
    font-weight: 600;
}

.chatbot-title span {
    font-size: 0.75rem;
    color: #22c55e;
    display: flex;
    align-items: center;
    gap: 4px;
}

.chatbot-title span::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 5px #22c55e;
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

#chatbot-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scroll-behavior: smooth;
}

#chatbot-messages::-webkit-scrollbar {
    width: 4px;
}
#chatbot-messages::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
}
#chatbot-messages::-webkit-scrollbar-thumb {
    background: rgba(34, 197, 94, 0.3);
    border-radius: 10px;
}

.chat-bubble {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 0.85rem;
    line-height: 1.5;
    animation: slideIn 0.3s ease-out forwards;
}

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

.chat-bot {
    align-self: flex-start;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(255,255,255,0.05);
    color: #e2e8f0;
    border-bottom-left-radius: 4px;
}

.chat-user {
    align-self: flex-end;
    background: linear-gradient(135deg, #22c55e, #15803d);
    color: #ffffff;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.2);
}

.chat-typing {
    display: flex;
    gap: 4px;
    padding: 12px;
    align-items: center;
}

.chat-typing .dot {
    width: 5px;
    height: 5px;
    background: #94a3b8;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out both;
}

.chat-typing .dot:nth-child(1) { animation-delay: -0.32s; }
.chat-typing .dot:nth-child(2) { animation-delay: -0.16s; }

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

#chatbot-input-area {
    padding: 12px;
    background: rgba(15, 23, 42, 0.9);
    border-top: 1px solid rgba(255,255,255,0.05);
    display: flex;
    gap: 8px;
}

#chatbot-input {
    flex: 1;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 8px 14px;
    color: #fff;
    font-size: 0.85rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.3s;
}

#chatbot-input:focus {
    border-color: #22c55e;
}

#chatbot-input::placeholder {
    color: #64748b;
}

#chatbot-send {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #22c55e;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

#chatbot-send:hover {
    background: #16a34a;
    transform: scale(1.05);
}

#chatbot-send svg {
    fill: #ffffff;
    width: 16px;
    height: 16px;
    margin-left: 2px;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    #chatbot-window {
        width: calc(100vw - 32px);
        height: 60vh;
        max-height: 400px;
        right: 0;
        bottom: 60px;
    }
    #chatbot-widget {
        bottom: 16px;
        right: 16px;
    }
}
