.chatbot-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    font-family: 'Inter', sans-serif;
}

.chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #1e40af;
    border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.3s ease;
    padding: 0;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
}

.chatbot-toggle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    opacity: 1;
    transform: translateY(0);
}

.chatbot-window.hidden {
    opacity: 0;
    transform: translateY(20px) scale(0.9);
    pointer-events: none;
}

.chatbot-header {
    background: #1e40af;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.admin-link {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.admin-link:hover {
    opacity: 1;
}

.agent-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.agent-info img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.3);
}

.agent-info h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}

.ai-badge {
    background: #fbbf24;
    color: #1e3a8a;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 4px;
    margin-left: 5px;
}

.agent-info p {
    margin: 0;
    font-size: 12px;
    opacity: 0.8;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    opacity: 0.7;
}

.chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: #f8fafc;
}

.message {
    max-width: 85%;
    display: flex;
}

.message.ai {
    align-self: flex-start;
}

.message.user {
    align-self: flex-end;
}

.bubble {
    padding: 10px 15px;
    border-radius: 15px;
    font-size: 13px;
    line-height: 1.5;
    white-space: pre-wrap;
}

.message.ai .bubble {
    background: white;
    color: #334155;
    border-bottom-left-radius: 2px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.message.user .bubble {
    background: #1e40af;
    color: white;
    border-bottom-right-radius: 2px;
}

.chatbot-input {
    padding: 15px;
    background: white;
    display: flex;
    gap: 10px;
    border-top: 1px solid #e2e8f0;
}

.chatbot-input input {
    flex: 1;
    border: 1px solid #e2e8f0;
    border-radius: 25px;
    padding: 8px 15px;
    font-size: 13px;
    outline: none;
}

.chatbot-input input:focus {
    border-color: #1e40af;
}

.chatbot-send-btn {
    background: #1e40af !important;
    color: white !important;
    border: none !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background 0.3s !important;
    padding: 0 !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
}

.chatbot-send-btn:hover {
    background: #1d4ed8 !important;
}

.chatbot-send-btn svg {
    width: 20px !important;
    height: 20px !important;
    fill: white !important;
}

.chatbot-footer {
    padding: 10px;
    text-align: center;
    font-size: 10px;
    color: #94a3b8;
    background: #f8fafc;
}

/* Typing Animation */
.typing-dots {
    display: flex;
    gap: 4px;
    padding: 5px 10px;
}

.dot {
    width: 6px;
    height: 6px;
    background: #cbd5e1;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

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

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