/* CreaBot v2 - Advanced Lead Capture Chatbot Styles */
:root {
    --cb-primary: #0f172a;
    --cb-secondary: #1e293b;
    --cb-accent: #2563eb;
    --cb-white: #ffffff;
    --cb-gray: #94a3b8;
    --cb-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    --cb-transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Toggler */
.creabot-toggler {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background: var(--cb-accent);
    color: var(--cb-white);
    padding: 15px 25px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.3);
    z-index: 2000;
    transition: var(--cb-transition);
    border: none;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
}

.creabot-toggler:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 40px rgba(37, 99, 235, 0.4);
}

.creabot-toggler i {
    font-size: 1.4rem;
}

/* Chat Window */
.creabot-window {
    position: fixed;
    bottom: 100px;
    left: 30px;
    width: 380px;
    height: 600px;
    max-height: 80vh;
    background: var(--cb-secondary);
    border-radius: 24px;
    box-shadow: var(--cb-shadow);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(30px) scale(0.95);
    transition: var(--cb-transition);
    font-family: 'Inter', sans-serif;
}

.creabot-window.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Header */
.creabot-header {
    background: var(--cb-primary);
    padding: 20px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.creabot-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.creabot-brand img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--cb-accent);
}

.creabot-brand-info h6 {
    color: var(--cb-white);
    margin: 0;
    font-weight: 600;
    font-size: 0.95rem;
}

.creabot-brand-info span {
    color: var(--cb-accent);
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.creabot-brand-info span::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--cb-accent);
    border-radius: 50%;
    display: inline-block;
}

/* Body */
.creabot-body {
    flex: 1;
    padding: 25px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: radial-gradient(circle at top right, rgba(30, 41, 59, 1), rgba(15, 23, 42, 1));
}

.creabot-msg {
    max-width: 85%;
    padding: 14px 18px;
    border-radius: 18px;
    font-size: 0.92rem;
    line-height: 1.4;
    position: relative;
    animation: cb-fade-in 0.3s ease-out forwards;
}

@keyframes cb-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cb-msg-bot {
    background: rgba(255, 255, 255, 0.05);
    color: var(--cb-white);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.cb-msg-user {
    background: var(--cb-accent);
    color: var(--cb-white);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    font-weight: 500;
}

/* Typing Indicator */
.cb-typing {
    display: flex;
    gap: 4px;
    padding: 10px 15px !important;
}

.cb-typing span {
    width: 6px;
    height: 6px;
    background: var(--cb-gray);
    border-radius: 50%;
    animation: cb-typing 1.4s infinite ease-in-out both;
}

.cb-typing span:nth-child(1) { animation-delay: -0.32s; }
.cb-typing span:nth-child(2) { animation-delay: -0.16s; }

@keyframes cb-typing {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1.0); }
}

/* Quick Replies */
.creabot-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 5px;
    justify-content: flex-end;
}

.cb-btn-reply {
    background: transparent;
    border: 1px solid var(--cb-accent);
    color: var(--cb-accent);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.cb-btn-reply:hover {
    background: var(--cb-accent);
    color: var(--cb-primary);
}

/* Footer */
.creabot-footer {
    padding: 20px 25px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.cb-input-group {
    display: flex;
    gap: 12px;
}

.cb-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 10px 15px;
    color: var(--cb-white);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.cb-input:focus {
    outline: none;
    border-color: var(--cb-accent);
    background: rgba(255, 255, 255, 0.06);
}

.cb-send-btn {
    background: var(--cb-accent);
    color: var(--cb-primary);
    border: none;
    border-radius: 12px;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--cb-transition);
}

.cb-send-btn:hover {
    transform: scale(1.1);
}

/* Mobile Adjustments */
@media (max-width: 480px) {
    .creabot-window {
        right: 15px;
        left: 15px;
        width: auto;
        bottom: 90px;
        height: 70vh;
    }

    .creabot-toggler {
        bottom: 20px;
        left: 20px;
    }
}