/* AI panel on the home page (UCHomeAssistant.ascx): reuses the FAB, chat window and header
   from quotation-assistant.css; the chat layout (bubbles, product carousel, links) is here, scoped under .assistant-home. */

.assistant-home .assistant-chat-messages {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 560px;
}

.assistant-home .assistant-chat-messages > * {
    flex-shrink: 0;
}

.assistant-home .assistant-riga {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.assistant-home .assistant-riga-me {
    justify-content: flex-end;
}

.assistant-home .assistant-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    flex: none;
    margin-top: 2px;
}

.assistant-home .assistant-bolla {
    max-width: 82%;
    padding: 9px 12px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.45;
}

.assistant-home .assistant-bolla-bot {
    background: #ffffff;
    border: 1px solid #e1dfd9;
    border-bottom-left-radius: 4px;
}

.assistant-home .assistant-bolla-me {
    background: #e6f1e8;
    border-bottom-right-radius: 4px;
}

.assistant-home .assistant-carosello {
    position: relative;
    margin-left: 30px;
}

.assistant-home .assistant-scorri {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding: 2px 2px 6px;
}

.assistant-home .assistant-scorri::-webkit-scrollbar {
    display: none;
}

.assistant-home .assistant-card {
    flex: 0 0 210px;
    scroll-snap-align: start;
    background: #ffffff;
    border: 1px solid #e1dfd9;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.assistant-home .assistant-card:hover {
    border-color: #111111;
}

.assistant-home .assistant-card-foto {
    aspect-ratio: 5 / 3;
    background: #f0efeb center / cover no-repeat;
}

.assistant-home .assistant-card-foto-vuota {
    display: none;
}

.assistant-home .assistant-card-corpo {
    padding: 9px 11px 11px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.assistant-home .assistant-card-titolo {
    font-weight: 600;
    font-size: 13px;
    line-height: 1.25;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.assistant-home .assistant-pill-ai {
    font-size: 9.5px;
    font-weight: 500;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #2d7a52;
    border: 1px solid currentColor;
    border-radius: 10px;
    padding: 1px 6px;
    white-space: nowrap;
}

.assistant-home .assistant-card-motivo {
    font-size: 12px;
    color: #626a6e;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.assistant-home .assistant-card-vai {
    margin-top: 4px;
    font-size: 12px;
    font-weight: 500;
    color: #111111;
}

.assistant-home .assistant-card-vai::after {
    content: " \2197";
}

.assistant-home .assistant-punti {
    display: flex;
    gap: 5px;
    justify-content: center;
    margin-top: 2px;
}

.assistant-home .assistant-punti span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #e1dfd9;
    display: block;
}

.assistant-home .assistant-punti span.on {
    background: #111111;
}

.assistant-home .assistant-freccia {
    position: absolute;
    top: 58px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid #e1dfd9;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
    font-size: 13px;
    line-height: 24px;
    text-align: center;
    cursor: pointer;
    padding: 0;
}

.assistant-home .assistant-freccia-prev {
    left: -13px;
}

.assistant-home .assistant-freccia-next {
    right: -8px;
}

.assistant-home .assistant-suggerimenti {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    margin-left: 30px;
    margin-top: 12px;
}

.assistant-home .assistant-suggerimenti small {
    font-size: 11px;
    color: #626a6e;
}

.assistant-home .assistant-suggerimento {
    font: inherit;
    font-size: 12.5px;
    color: #111111;
    background: none;
    border: none;
    border-bottom: 1px solid #e1dfd9;
    border-radius: 0;
    padding: 0;
    cursor: pointer;
}

.assistant-home .assistant-suggerimento::before {
    content: "\2192  ";
    color: #626a6e;
}

.assistant-home .assistant-suggerimento:hover {
    border-color: #111111;
}

.assistant-home .assistant-pastiglia {
    align-self: flex-start;
    margin-left: 30px;
    margin-top: -6px;
    font-size: 12.5px;
    color: #111111;
    text-decoration: none;
    border-bottom: 1px solid #e1dfd9;
    max-width: calc(100% - 30px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.assistant-home .assistant-pastiglia::before {
    content: "\2192  ";
    color: #626a6e;
}

.assistant-home .assistant-pastiglia::after {
    content: " \2197";
    color: #626a6e;
}

.assistant-home .assistant-pastiglia:hover {
    border-color: #111111;
}

.assistant-home .assistant-nascosto {
    display: none;
}

.assistant-home .assistant-riparti {
    align-self: center;
    font-size: 12px;
    font-weight: 500;
    color: #626a6e;
    text-decoration: underline;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px 0;
}

.assistant-home .assistant-riparti:hover {
    color: #111111;
}

.assistant-home .assistant-chat-input:focus {
    outline: none;
    border-color: #111111;
}

@media (prefers-reduced-motion: reduce) {
    .assistant-home .assistant-scorri {
        scroll-behavior: auto;
    }
}

/* The "typing" dots are a bot bubble at the bottom of the thread, after the bubble the customer
   has just sent (both placed by home-assistant.js while the postback runs). Both rows carry
   .assistant-caricamento: hidden here with the same specificity as .assistant-riga, shown by
   the .caricamento rule of quotation-assistant.css, which is more specific. */
.assistant-home .assistant-caricamento {
    display: none;
    margin: 0;
}

.assistant-home .assistant-bolla-pensa {
    display: flex;
    align-items: center;
    padding: 12px;
}
