.smartfaq-chatbot {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 99999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif
}

.smartfaq-chatbot.smartfaq-position-left {
    right: auto;
    left: 20px;
}

.smartfaq-chatbot .smartfaq-toggle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: #120739;
    box-shadow: 0 6px 18px rgba(13, 110, 253, .35);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .2s ease, box-shadow .2s ease
}

.smartfaq-chatbot .smartfaq-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(13, 110, 253, .4)
}

/* El color del hover se aplicará dinámicamente via inline styles */

.smartfaq-chatbot .smartfaq-toggle img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    display: block;
}

/* Solo aplicar filtro invert si es necesario para SVGs sin colores definidos */
.smartfaq-chatbot .smartfaq-toggle img[src$=".svg"] {
    filter: none;
}

.smartfaq-chatbot .smartfaq-window {
    position: absolute;
    right: 0;
    bottom: 72px;
    width: 320px;
    max-height: 70vh;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .15);
    display: none;
    flex-direction: column;
    overflow: hidden
}

.smartfaq-chatbot.smartfaq-position-left .smartfaq-window {
    right: auto;
    left: 0;
}

.smartfaq-chatbot .smartfaq-window.open {
    display: flex;
    animation: smartfaq-pop .18s ease-out
}

@keyframes smartfaq-pop {
    0% {
        transform: scale(.98);
        opacity: .0
    }

    100% {
        transform: scale(1);
        opacity: 1
    }
}

.smartfaq-chatbot .smartfaq-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #120739;
    color: #fff;
    padding: 10px 12px
}

.smartfaq-chatbot .smartfaq-title {
    font-weight: 600
}

.smartfaq-chatbot .smartfaq-header-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: contain;
    display: block;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px;
}

.smartfaq-chatbot .smartfaq-header-avatar[src$=".svg"] {
    filter: none;
    background: transparent;
}

.smartfaq-chatbot .smartfaq-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer
}

.smartfaq-chatbot .smartfaq-messages {
    padding: 12px;
    gap: 8px;
    display: flex;
    flex-direction: column;
    overflow: auto;
    scrollbar-width: thin;
    max-height: 50vh
}

.smartfaq-chatbot .bubble {
    padding: 10px 12px;
    border-radius: 12px;
    max-width: 82%;
    line-height: 1.35;
    font-size: 14px;
    animation: smartfaq-bubble-in .2s ease-out;
    word-wrap: break-word;
}

@keyframes smartfaq-bubble-in {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.smartfaq-chatbot .bubble.user {
    align-self: flex-end;
    background: #e9f2ff;
    color: #120739;
    border-bottom-right-radius: 4px
}

.smartfaq-chatbot .bubble.bot {
    align-self: flex-start;
    background: #f5f5f7;
    color: #333;
    border-bottom-left-radius: 4px
}

.smartfaq-chatbot .smartfaq-input {
    display: flex;
    gap: 8px;
    padding: 10px;
    border-top: 1px solid #eee
}

.smartfaq-chatbot .smartfaq-input input {
    flex: 1;
    border: 1px solid #d0d7de;
    border-radius: 10px;
    padding: 10px 12px;
    outline: none;
    transition: border .15s ease
}

.smartfaq-chatbot .smartfaq-input input:focus {
    border-color: #0d6efd
}

.smartfaq-chatbot .smartfaq-input button {
    border: none;
    background: #0d6efd;
    color: #fff;
    padding: 10px 14px;
    border-radius: 10px;
    cursor: pointer;
    transition: background .2s ease, transform .1s ease;
    font-weight: 500;
}

.smartfaq-chatbot .smartfaq-input button:hover {
    background: #0b5ed7;
    transform: scale(1.05);
}

.smartfaq-chatbot .smartfaq-input button:active {
    transform: scale(0.98);
}

.smartfaq-chatbot .smartfaq-suggestion {
    display: inline-block;
    margin: 4px 6px 0 0;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid #d0d7de;
    background: #fff;
    color: #333;
    font-size: 12px;
    cursor: pointer;
    transition: all .2s ease;
}

.smartfaq-chatbot .smartfaq-suggestion:hover {
    border-color: #0d6efd;
    color: #0d6efd;
    background: #f0f7ff;
    transform: translateY(-1px);
}

.smartfaq-chatbot .smartfaq-restart {
    transition: transform .2s ease, color .2s ease;
}

.smartfaq-chatbot .smartfaq-restart:hover {
    transform: rotate(180deg);
    color: #fff !important;
}

.smartfaq-chatbot .smartfaq-typing {
    display: inline-flex;
    gap: 4px;
    padding: 8px 12px;
}

.smartfaq-chatbot .smartfaq-typing span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #999;
    animation: smartfaq-typing-dot 1.4s infinite ease-in-out;
}

.smartfaq-chatbot .smartfaq-typing span:nth-child(1) {
    animation-delay: 0s;
}

.smartfaq-chatbot .smartfaq-typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.smartfaq-chatbot .smartfaq-typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes smartfaq-typing-dot {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-8px);
        opacity: 1;
    }
}

.smartfaq-chatbot .smartfaq-messages::-webkit-scrollbar {
    width: 6px;
}

.smartfaq-chatbot .smartfaq-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.smartfaq-chatbot .smartfaq-messages::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.smartfaq-chatbot .smartfaq-messages::-webkit-scrollbar-thumb:hover {
    background: #555;
}

@media (max-width:480px) {
    .smartfaq-chatbot .smartfaq-window {
        width: 92vw;
        right: 4vw;
    }
    
    .smartfaq-chatbot {
        right: 4vw;
        bottom: 4vw;
    }
    
    .smartfaq-chatbot.smartfaq-position-left {
        right: auto;
        left: 4vw;
    }
    
    .smartfaq-chatbot.smartfaq-position-left .smartfaq-window {
        right: auto;
        left: 4vw;
    }
}