/* Chat Widget Styles - Krishna WorldWide */
:root {
    --chat-primary: #6366f1;
    --chat-secondary: #a855f7;
    --chat-bg: #0f0f23;
    --chat-text: #ffffff;
    --chat-glass: rgba(15, 15, 35, 0.95);
}

.kww-chat-widget-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    font-family: 'Inter', sans-serif;
}

/* Toggle Button */
.kww-chat-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--chat-primary), var(--chat-secondary));
    border: none;
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.5);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.kww-chat-toggle:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 15px 40px rgba(168, 85, 247, 0.6);
}

.kww-chat-toggle svg {
    width: 30px;
    height: 30px;
    fill: white;
}

/* Chat Window */
.kww-chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 600px;
    background: var(--chat-glass);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transform-origin: bottom right;
    transform: scale(0);
    opacity: 0;
    transition: all 0.3s ease;
    overflow: hidden;
    visibility: hidden;
}

.kww-chat-window.open {
    transform: scale(1);
    opacity: 1;
    visibility: visible;
}

/* Header */
.kww-chat-header {
    padding: 20px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(168, 85, 247, 0.2));
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.kww-chat-title h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
}

.kww-chat-title span {
    font-size: 0.8rem;
    color: #c7d2fe;
    display: flex;
    align-items: center;
    gap: 5px;
}

.kww-chat-title span::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    display: inline-block;
}

.kww-chat-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    font-size: 1.5rem;
    transition: color 0.3s;
}

.kww-chat-close:hover {
    color: white;
}

/* Messages Area */
.kww-chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    scroll-behavior: smooth;
}

.kww-message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.5;
    position: relative;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.kww-message.bot {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    border-bottom-left-radius: 2px;
}

.kww-message.user {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--chat-primary), var(--chat-secondary));
    color: white;
    border-bottom-right-radius: 2px;
}

.kww-typing {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.05);
    padding: 10px 15px;
    border-radius: 12px;
    display: flex;
    gap: 5px;
    align-items: center;
}

.kww-dot {
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out both;
}

.kww-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.kww-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typing {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

/* Input Area */
.kww-chat-input-area {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 10px;
}

.kww-chat-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 12px 20px;
    color: white;
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s;
}

.kww-chat-input:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--chat-primary);
}

.kww-chat-send {
    background: linear-gradient(135deg, var(--chat-primary), var(--chat-secondary));
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.kww-chat-send:hover {
    transform: scale(1.1);
}

.kww-chat-send svg {
    width: 20px;
    height: 20px;
    fill: white;
    margin-left: 2px;
}

/* Mobile */
@media (max-width: 480px) {
    .kww-chat-window {
        width: calc(100vw - 40px);
        height: 80vh;
        bottom: 90px;
        right: 20px;
    }
}