/* ===============================
   New AI Chat Bot Component
   Clean & Simple
================================*/

/* Container */
.ai-chat-new-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999999;
    font-family: 'Inter', sans-serif;
    pointer-events: auto;
}

/* Trigger Button */
.ai-chat-trigger {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(220, 38, 38, 0.4);
    transition: all 0.3s ease;
    position: relative;
    outline: none;
    border: 3px solid lime !important; /* Debug border - super visible */
}

.ai-chat-trigger:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(220, 38, 38, 0.6);
}

.ai-chat-trigger:active {
    transform: scale(0.95);
}

.ai-chat-trigger i {
    font-size: 24px;
    color: #ffffff;
    pointer-events: none;
}

/* Pulse Animation */
.ai-chat-pulse {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid #dc2626;
    animation: pulse 2s infinite;
    pointer-events: none;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

/* Menu Panel */
.ai-chat-menu {
    position: absolute;
    bottom: 70px;
    right: 0;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.ai-chat-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Menu Items */
.ai-chat-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    cursor: pointer;
    transition: background 0.2s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
}

.ai-chat-menu-item:hover {
    background: #f9fafb;
    color: #dc2626;
}

.ai-chat-menu-item:first-child {
    border-radius: 16px 16px 0 0;
}

.ai-chat-menu-item:last-child {
    border-radius: 0 0 16px 16px;
}

.ai-chat-menu-item i {
    width: 20px;
    text-align: center;
    color: #dc2626;
    font-size: 16px;
}

/* Chat Window */
.ai-chat-window {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 380px;
    height: 500px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.ai-chat-window.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Chat Header */
.ai-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: #ffffff;
    border-radius: 16px 16px 0 0;
}

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

.ai-chat-avatar {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.ai-chat-title h6 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.ai-chat-title span {
    font-size: 12px;
    opacity: 0.9;
}

.ai-chat-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: background 0.2s ease;
}

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

/* Chat Messages */
.ai-chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8f9fa;
}

.ai-chat-message {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.ai-chat-message.user {
    flex-direction: row-reverse;
}

.ai-chat-bubble {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
}

.ai-chat-message.bot .ai-chat-bubble {
    background: #ffffff;
    color: #374151;
    border-top-left-radius: 4px;
}

.ai-chat-message.user .ai-chat-bubble {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
    border-top-right-radius: 4px;
}

/* Chat Input */
.ai-chat-input-area {
    padding: 16px 20px;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 10px;
    border-radius: 0 0 16px 16px;
}

.ai-chat-input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
}

.ai-chat-input:focus {
    border-color: #dc2626;
}

.ai-chat-send {
    width: 40px;
    height: 40px;
    background: #dc2626;
    border: none;
    border-radius: 50%;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.ai-chat-send:hover {
    background: #b91c1c;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .ai-chat-window {
        width: calc(100vw - 40px);
        height: 60vh;
        right: -10px;
    }
    
    .ai-chat-menu {
        right: -10px;
    }
}
