/* Assistente virtuale (templates/web/components/chat-bot.ftl, static-assets/js/chat-bot.js) */
.chat-launcher-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50% !important;
    background: var(--secondary);
    color: #fff;
    border: none;
    box-shadow: 0 8px 24px rgba(var(--secondary-rgb), 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    z-index: 1050;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}
.chat-launcher-btn:hover {
    transform: scale(1.08);
    background: var(--secondary-active);
    box-shadow: 0 12px 28px rgba(var(--secondary-rgb), 0.45);
    color: #fff;
}

#chat {
    position: fixed;
    bottom: 92px;
    right: 24px;
    width: 380px;
    max-width: calc(100vw - 32px);
    border-radius: var(--radius-card);
    box-shadow: 0 12px 40px rgba(var(--primary-active-rgb), 0.22);
    border: 1px solid rgba(var(--primary-active-rgb), 0.1);
    background: #fff;
    z-index: 1050;
    overflow: hidden;
}

#chat .card-header {
    background: linear-gradient(135deg, var(--primary-active) 0%, var(--primary) 100%);
    color: #fff;
    padding: 14px 18px;
    border-bottom: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#chat .card-body {
    height: 380px;
    overflow-y: auto;
    padding: 16px;
    background: var(--surface-soft);
}

.chat-list {
    padding: 0;
    margin: 0;
    list-style: none;
    font-size: 0.9rem;
}

.chat-list li {
    margin-bottom: 12px;
    overflow: hidden;
}

.chat-list .chat-body {
    max-width: 85%;
}

.chat-list .in .chat-body {
    float: right;
}

.chat-list .out .chat-body {
    float: left;
}

.chat-list .chat-message {
    border-radius: 14px;
    padding: 10px 14px;
    display: inline-block;
}

.chat-list .in .chat-message {
    background: var(--secondary);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.chat-list .out .chat-message {
    background: #fff;
    color: var(--primary-active);
    border: 1px solid rgba(var(--primary-active-rgb), 0.1);
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 6px rgba(var(--primary-active-rgb), 0.05);
}

.chat-list .chat-message p {
    margin: 0;
    line-height: 1.5;
}

.chat-input-area {
    padding: 12px;
    background: #fff;
    border-top: 1px solid rgba(var(--primary-active-rgb), 0.08);
}

.chat-list .chat-message p {
    font-size: 0.9rem;
}

.chat-list .chat-link {
    font-size: 0.9rem;
}

.chat-decision {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
}

.chat-decision .btn {
    flex: 0 0 40%;
}
