/* Chat Widget Styles */
.chat-widget-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
    z-index: 9998;
    transition: all 0.3s ease;
}

.chat-widget-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.6);
}

.chat-widget-button .chat-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #EF4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.chat-widget-container {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 380px;
    height: 600px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    z-index: 9999;
    transform: translateY(100%);
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

.chat-widget-container.chat-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
}

.chat-header {
    background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
    color: white;
    padding: 16px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header-content h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.chat-status {
    margin: 4px 0 0 0;
    font-size: 12px;
    opacity: 0.9;
}

.chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.chat-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: #F9FAFB;
}

.chat-message {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
}

.chat-message-user {
    align-items: flex-end;
}

.chat-message-bot {
    align-items: flex-start;
}

.chat-message-content {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 12px;
    word-wrap: break-word;
    line-height: 1.4;
}

.chat-message-user .chat-message-content {
    background: #4F46E5;
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-message-bot .chat-message-content {
    background: white;
    color: #1F2937;
    border: 1px solid #E5E7EB;
    border-bottom-left-radius: 4px;
}

.chat-message-time {
    font-size: 11px;
    color: #6B7280;
    margin-top: 4px;
    padding: 0 4px;
}

.chat-link {
    color: #4F46E5;
    text-decoration: underline;
    font-weight: 500;
}

.chat-link:hover {
    color: #7C3AED;
}

.chat-input-container {
    display: flex;
    padding: 12px;
    background: white;
    border-top: 1px solid #E5E7EB;
    border-radius: 0 0 12px 12px;
    gap: 8px;
}

.chat-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.chat-input:focus {
    border-color: #4F46E5;
}

.chat-send-btn {
    padding: 10px 20px;
    background: #4F46E5;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.chat-send-btn:hover {
    background: #7C3AED;
}

.chat-send-btn:active {
    transform: scale(0.98);
}

/* Scrollbar styling */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #F3F4F6;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #D1D5DB;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #9CA3AF;
}

/* Typing indicator */
.typing-indicator {
    opacity: 0.7;
}

.typing-dots {
    display: inline-flex;
    gap: 4px;
    align-items: center;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #667eea;
    animation: typing-bounce 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

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

/* Mobile responsive */
@media (max-width: 480px) {
    .chat-widget-container {
        width: calc(100% - 40px);
        height: calc(100vh - 120px);
        bottom: 90px;
        right: 20px;
        left: 20px;
    }
}


