/* VIP AI Chat Widget - Premium Glassmorphism Design */
:root {
    --vip-navy: #002147;
    --vip-blue: #2563eb;
    --vip-gold: #c5a059;
    --vip-light: #f8fafc;
    --vip-text: #334155;
    --chat-width: 380px;
    --chat-height: 600px;
    --chat-border-radius: 20px;
}

/* Floating Action Button */
.vip-ai-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, var(--vip-navy), var(--vip-blue));
    border-radius: 50%;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.4), 0 0 0 2px rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9999;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}

.vip-ai-fab:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 15px 35px rgba(37, 99, 235, 0.5), 0 0 0 4px rgba(255, 255, 255, 0.3);
}

.vip-ai-fab-icon {
    width: 32px;
    height: 32px;
    fill: white;
    z-index: 2;
    transition: transform 0.3s ease;
}

.vip-ai-fab:hover .vip-ai-fab-icon {
    transform: rotate(15deg);
}

.vip-ai-fab::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.3s, transform 0.5s;
}

.vip-ai-fab:hover::before {
    opacity: 1;
    transform: scale(1);
}

/* Chat Window Container */
.vip-ai-widget {
    position: fixed;
    bottom: 110px;
    right: 30px;
    width: var(--chat-width);
    height: var(--chat-height);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--chat-border-radius);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 255, 255, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 9998;
    transform-origin: bottom right;
    transform: scale(0);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.vip-ai-widget.active {
    transform: scale(1);
    opacity: 1;
    pointer-events: all;
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    .vip-ai-widget {
        width: calc(100% - 40px);
        height: calc(100% - 150px);
        bottom: 110px;
        right: 20px;
        left: 20px;
    }

    .vip-ai-fab {
        bottom: 20px;
        right: 20px;
    }
}

/* Header */
.vip-ai-header {
    background: linear-gradient(135deg, var(--vip-navy), var(--vip-blue));
    padding: 20px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.vip-ai-header-content {
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 2;
}

.vip-ai-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.3);
    position: relative;
}

.vip-ai-status-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 10px;
    height: 10px;
    background-color: #10b981;
    border-radius: 50%;
    border: 2px solid var(--vip-navy);
}

.vip-ai-title {
    font-family: 'Syne', sans-serif;
    font-weight: 700;
    font-size: 16px;
    margin: 0;
    letter-spacing: 0.5px;
}

.vip-ai-subtitle {
    font-family: 'Manrope', sans-serif;
    font-size: 12px;
    opacity: 0.8;
}

.vip-ai-close {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    z-index: 2;
    padding: 5px;
}

.vip-ai-close:hover {
    opacity: 1;
}

/* Header Background Patterns */
.vip-ai-header::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(197, 160, 89, 0.2) 0%, transparent 60%);
    border-radius: 50%;
    filter: blur(20px);
}

/* Chat Body */
.vip-ai-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: #f8fafc;
    background-image:
        radial-gradient(at 10% 10%, rgba(37, 99, 235, 0.03) 0%, transparent 50%),
        radial-gradient(at 90% 90%, rgba(197, 160, 89, 0.03) 0%, transparent 50%);
    scroll-behavior: smooth;
}

/* Messages */
.vip-ai-message {
    margin-bottom: 16px;
    max-width: 85%;
    display: flex;
    flex-direction: column;
    animation: slideIn 0.3s ease-out forwards;
    opacity: 0;
    transform: translateY(10px);
}

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

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

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

.vip-ai-bubble {
    padding: 12px 16px;
    border-radius: 16px;
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    position: relative;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.vip-ai-message.ai .vip-ai-bubble {
    background: white;
    color: var(--vip-text);
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.vip-ai-message.user .vip-ai-bubble {
    background: linear-gradient(135deg, var(--vip-navy), var(--vip-blue));
    color: white;
    border-bottom-right-radius: 4px;
}

.vip-ai-timestamp {
    font-size: 10px;
    color: #94a3b8;
    margin-top: 4px;
    padding: 0 4px;
}

/* Typing Indicator */
.vip-ai-typing {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: white;
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    width: fit-content;
    margin-bottom: 16px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    display: none;
    /* Hidden by default */
}

.vip-ai-typing.active {
    display: flex;
}

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

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

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

@keyframes bounce {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

/* Suggestions Area */
.vip-ai-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    margin-bottom: 10px;
}

.vip-ai-suggestion-chip {
    background: white;
    border: 1px solid #e2e8f0;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    color: var(--vip-navy);
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
}

.vip-ai-suggestion-chip:hover {
    background: var(--vip-light);
    border-color: var(--vip-blue);
    color: var(--vip-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Input Area */
.vip-ai-footer {
    padding: 15px;
    background: white;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.vip-ai-input {
    flex: 1;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    padding: 10px 16px;
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.vip-ai-input:focus {
    border-color: var(--vip-blue);
}

.vip-ai-send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--vip-navy);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.vip-ai-send:hover {
    background: var(--vip-blue);
    transform: scale(1.05);
}

.vip-ai-send:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    transform: none;
}

/* Scrollbar within chat */
.vip-ai-body::-webkit-scrollbar {
    width: 6px;
}

.vip-ai-body::-webkit-scrollbar-track {
    background: transparent;
}

.vip-ai-body::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 20px;
}