/* Modern Dark/Grey + Orange Theme */
:root {
    --ativacb-bg-dark: #222;
    --ativacb-bg-light: #f4f4f4;
    --ativacb-primary: #f57f25;
    /* Default, overridden by JS */
    --ativacb-text: #fff;
    --ativacb-msg-user: #e0e0e0;
    --ativacb-msg-bot: #f57f25;
}

#ativacb-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999999;
    font-family: 'Inter', sans-serif;
}

/* Hidden state - ensures chat starts minimized */
.ativacb-hidden,
#ativacb-window.ativacb-hidden {
    display: none !important;
}

/* Toggle Button */
#ativacb-toggle {
    background: var(--ativacb-primary);
    color: var(--ativacb-text);
    border: none;
    padding: 12px 20px;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    transition: transform 0.2s;
}

#ativacb-toggle:hover {
    transform: scale(1.05);
}

.ativacb-slide-in {
    animation: slideInUp 0.5s ease-out;
}

/* Window */
#ativacb-window {
    width: 350px;
    height: 500px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: absolute;
    bottom: 0;
    right: 0;
    animation: fadeIn 0.3s;
}

#ativacb-window .ativacb-header {
    background: var(--ativacb-primary);
    color: var(--ativacb-text, #fff);
    padding: 12px 15px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}

.ativacb-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 15px;
}

.ativacb-logo-sm {
    width: 75px;
    height: 24px;
    object-fit: contain;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    /* Subtle backing for logo */
    padding: 2px;
}

#ativacb-window .ativacb-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: inherit;
}

#ativacb-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}

.ativacb-body {
    flex: 1;
    background: #f9f9f9;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Messages */
.ativacb-msg {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
}

.ativacb-msg-bot {
    background: #fff;
    color: #333;
    border-top-left-radius: 2px;
    border: 1px solid #eee;
    align-self: flex-start;
}

.ativacb-msg-user {
    background: #333;
    color: #fff;
    border-top-right-radius: 2px;
    align-self: flex-end;
}

/* Products in chat */
.ativacb-product-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    margin-top: 5px;
}

.ativacb-product-card h4 {
    margin: 0 0 5px 0;
    font-size: 13px;
    color: #333;
}

.ativacb-product-btn {
    display: block;
    background: var(--ativacb-primary);
    color: #fff;
    text-align: center;
    padding: 6px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 12px;
    margin-top: 5px;
}

.ativacb-product-btn:hover {
    color: #fff;
    opacity: 0.9;
}

/* Footer */
.ativacb-footer {
    padding: 10px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 8px;
    background: #fff;
}

#ativacb-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
}

#ativacb-send {
    background: var(--ativacb-primary);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ativacb-msg li {
    margin-bottom: 10px;
    background: #f6f6f6;
    padding: 10px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 16px;
    border-left: 5px solid #3c5788;
    box-shadow: #00000017 5px 0px 5px;
}

.ativacb-msg a {
    display: block;
    padding-bottom: 5px;
    font-size: 12px;
    font-weight: 500;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}