@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --rkc-yellow: #feed01;
    --rkc-purple: #431c5d;
    --rkc-purple-light: #5a277d;
    --rkc-bg-light: #f8f9fc;
    --rkc-text-dark: #2d3748;
    --rkc-text-muted: #718096;
    --rkc-border: #e2e8f0;
    --rkc-shadow: 0 10px 25px rgba(67, 28, 93, 0.15);
    --rkc-shadow-hover: 0 15px 35px rgba(67, 28, 93, 0.25);
    --rkc-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#rkc-chatbot-widget {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.rkc-chat-launcher {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--rkc-purple), var(--rkc-purple-light));
    border: 3px solid var(--rkc-yellow);
    box-shadow: var(--rkc-shadow);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--rkc-transition);
}

.rkc-chat-launcher:hover {
    transform: scale(1.08) translateY(-3px);
    box-shadow: var(--rkc-shadow-hover);
}

.rkc-chat-launcher svg {
    width: 28px;
    height: 28px;
    fill: #ffffff;
}

.rkc-chat-launcher .rkc-close-icon {
    display: none;
}

.rkc-chat-window {
    width: 380px;
    height: 520px;
    max-height: calc(100vh - 120px);
    border-radius: 20px;
    background: #ffffff;
    border: 1px solid var(--rkc-border);
    box-shadow: var(--rkc-shadow-hover);
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    pointer-events: none;
    transition: var(--rkc-transition);
    overflow: hidden;
}

.rkc-chatbot-widget.active .rkc-chat-window {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.rkc-chatbot-widget.active .rkc-chat-launcher {
    background: #ffffff;
    border: 3px solid var(--rkc-purple);
}

.rkc-chatbot-widget.active .rkc-chat-launcher svg {
    fill: var(--rkc-purple);
}

.rkc-chatbot-widget.active .rkc-chat-launcher .rkc-msg-icon {
    display: none;
}

.rkc-chatbot-widget.active .rkc-chat-launcher .rkc-close-icon {
    display: block;
}

.rkc-chat-header {
    background: linear-gradient(135deg, var(--rkc-purple), var(--rkc-purple-light));
    color: #ffffff;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 3px solid var(--rkc-yellow);
}

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

.rkc-chat-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: var(--rkc-yellow);
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    color: var(--rkc-purple);
    font-size: 18px;
}

.rkc-chat-title {
    font-size: 16px;
    font-weight: 600;
}

.rkc-chat-status {
    font-size: 11px;
    color: var(--rkc-yellow);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}

.rkc-chat-status::before {
    content: '';
    width: 6px;
    height: 6px;
    background-color: #48bb78;
    border-radius: 50%;
}

.rkc-chat-close-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.7);
    transition: var(--rkc-transition);
}

.rkc-chat-close-btn:hover {
    color: var(--rkc-yellow);
}

.rkc-chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: var(--rkc-bg-light);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rkc-chat-messages::-webkit-scrollbar {
    width: 5px;
}

.rkc-chat-messages::-webkit-scrollbar-thumb {
    background: rgba(67, 28, 93, 0.2);
    border-radius: 10px;
}

.rkc-message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
    animation: messageFadeIn 0.3s ease;
}

.rkc-message.user {
    align-self: flex-end;
    background-color: var(--rkc-purple);
    color: #ffffff;
    border-bottom-right-radius: 4px;
}

.rkc-message.bot {
    align-self: flex-start;
    background-color: #ffffff;
    color: var(--rkc-text-dark);
    border-bottom-left-radius: 4px;
    border: 1px solid var(--rkc-border);
}

.chat-link {
    color: var(--rkc-purple);
    font-weight: 600;
    text-decoration: underline;
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    background-color: rgba(67, 28, 93, 0.05);
    transition: var(--rkc-transition);
}

.chat-link:hover {
    color: #ffffff;
    background-color: var(--rkc-purple-light);
    text-decoration: none;
}

.rkc-chat-suggestions {
    padding: 10px 15px;
    background-color: #ffffff;
    border-top: 1px solid var(--rkc-border);
    display: flex;
    gap: 8px;
    overflow-x: auto;
}

.rkc-chat-suggestions::-webkit-scrollbar {
    display: none;
}

.rkc-suggestion-pill {
    padding: 8px 14px;
    background-color: var(--rkc-bg-light);
    border: 1px solid var(--rkc-border);
    border-radius: 20px;
    font-size: 12px;
    color: var(--rkc-purple);
    cursor: pointer;
    transition: var(--rkc-transition);
    white-space: nowrap;
}

.rkc-suggestion-pill:hover {
    background-color: var(--rkc-yellow);
    border-color: var(--rkc-yellow);
    transform: translateY(-1px);
}

.rkc-chat-input-area {
    padding: 12px 15px;
    background-color: #ffffff;
    border-top: 1px solid var(--rkc-border);
    display: flex;
    align-items: center;
    gap: 10px;
}

.rkc-chat-input-area input {
    flex: 1;
    border: 1.5px solid var(--rkc-border);
    border-radius: 25px;
    padding: 12px 18px;
    font-size: 14px;
    outline: none;
    transition: var(--rkc-transition);
}

.rkc-chat-input-area input:focus {
    border-color: var(--rkc-purple);
}

.rkc-chat-send-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--rkc-purple);
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--rkc-transition);
}

.rkc-chat-send-btn:hover {
    background-color: var(--rkc-purple-light);
}

.rkc-chat-send-btn svg {
    width: 18px;
    height: 18px;
    fill: #ffffff;
    margin-left: 2px;
}

.rkc-typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    background-color: #ffffff;
    border-radius: 12px;
    border: 1px solid var(--rkc-border);
    align-self: flex-start;
}

.rkc-typing-indicator span {
    width: 6px;
    height: 6px;
    background-color: var(--rkc-purple);
    border-radius: 50%;
    opacity: 0.4;
    animation: typingBounce 1.4s infinite ease-in-out both;
}

.rkc-typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.rkc-typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

@keyframes messageFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media screen and (max-width: 480px) {
    #rkc-chatbot-widget { bottom: 15px; right: 15px; left: 15px; }
    .rkc-chat-window { width: 100%; height: 80vh; }
}
