#kathya-chat {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.chat-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    transition: transform 0.3s ease;
}

.chat-button:hover {
    transform: scale(1.1);
}

.chat-popup {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: none;
    flex-direction: column;
}

.chat-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 15px 15px 0 0;
    flex-shrink: 0;
}

.chat-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.chat-header button {
    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;
    line-height: 1;
}

.chat-body {
    flex: 1;
    padding: 15px;
    background: #f8f9fa;
    overflow-y: scroll;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chat-message {
    flex-shrink: 0;
}

.chat-message p {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #333;
}

.quick-questions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quick-questions button {
    background: white;
    color: #333;
    border: 1px solid #ddd;
    padding: 10px 15px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 13px;
    text-align: left;
    transition: all 0.2s;
    font-weight: 500;
}

.quick-questions button:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateX(5px);
}

#kathya-chat-messages {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.user-message, .bot-message {
    padding: 12px 16px;
    border-radius: 15px;
    max-width: 85%;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
    flex-shrink: 0;
}

.user-message {
    background: #667eea;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 5px;
}

.bot-message {
    background: white;
    color: #333;
    align-self: flex-start;
    border: 1px solid #e0e0e0;
    border-bottom-left-radius: 5px;
}

.bot-message.loading {
    background: #f0f0f0;
    border-color: #d0d0d0;
}

.bot-message.error {
    background: #fee;
    border-color: #fcc;
    color: #c33;
}

.typing-indicator {
    display: inline-block;
    font-size: 20px;
    letter-spacing: 2px;
    animation: typing 1.4s infinite;
}

@keyframes typing {
    0%, 60%, 100% {
        opacity: 0.3;
    }
    30% {
        opacity: 1;
    }
}

.chat-input {
    padding: 15px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
    background: white;
    border-radius: 0 0 15px 15px;
    flex-shrink: 0;
}

.chat-input input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
    font-size: 14px;
    color: #333;
    background: white;
}

.chat-input input::placeholder {
    color: #999;
}

.chat-input input:focus {
    border-color: #667eea;
}

.chat-input button {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
}

.chat-input button:hover {
    background: #5a6fd8;
}

@media (max-width: 480px) {
    .chat-popup {
        width: 100vw;
        height: 100vh;
        bottom: 0;
        right: 0;
        border-radius: 0;
    }

    .chat-header {
        border-radius: 0;
    }

    .chat-input {
        border-radius: 0;
    }
}