/* ── AI Chat Widget ── */
.ai-widget {
    position: fixed;
    bottom: 9.5rem; /* Encima de WhatsApp */
    right: 2rem;
    z-index: 1000;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.ai-widget__button {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #FF385C;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: transform 0.3s ease, background 0.3s ease;
    font-weight: 800;
    font-size: 0.9rem;
    letter-spacing: -0.5px;
}

.ai-widget__button:hover {
    transform: translateY(-3px);
    background: #E31C5F;
}

.ai-widget__window {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 360px;
    height: 500px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

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

.ai-widget__header {
    background: #FF385C;
    color: #fff;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ai-widget__header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
}

.ai-widget__messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: #f7f7f7;
}

.message {
    max-width: 85%;
    padding: 0.75rem 1rem;
    border-radius: 15px;
    font-size: 0.875rem;
    line-height: 1.4;
}

.message--user {
    align-self: flex-end;
    background: #FF385C;
    color: #fff;
    border-bottom-right-radius: 2px;
}

.message--ai {
    align-self: flex-start;
    background: #fff;
    color: #222;
    border-bottom-left-radius: 2px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.ai-widget__input-area {
    padding: 1rem;
    background: #fff;
    border-top: 1px solid #eee;
    display: flex;
    gap: 0.5rem;
}

.ai-widget__input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 25px;
    padding: 0.6rem 1rem;
    font-size: 0.875rem;
    outline: none;
}

.ai-widget__send {
    background: #FF385C;
    color: #fff;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-widget__footer {
    padding: 0.5rem;
    text-align: center;
    font-size: 0.65rem;
    color: #999;
    background: #fff;
}

/* Typing indicator */
.typing {
    display: flex;
    gap: 4px;
    padding: 4px 8px;
}
.typing span {
    width: 6px;
    height: 6px;
    background: #FF385C;
    border-radius: 50%;
    animation: blink 1.4s infinite both;
}
.typing span:nth-child(2) { animation-delay: 0.2s; }
.typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes blink {
    0%, 80%, 100% { opacity: 0; }
    40% { opacity: 1; }
}

@media (max-width: 480px) {
    .ai-widget__window {
        width: 90vw;
        right: -4rem;
        height: 70vh;
    }
}
