.herbie-launcher {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 999999;
    border-radius: 999px;
    border: none;
    padding: 12px 18px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0,0,0,.2);
    background: #111;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    gap: 8px;
    align-items: center;
    transition: transform .15s, box-shadow .15s;
}
.herbie-launcher:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(0,0,0,.3);
}

.herbie-panel {
    position: fixed;
    right: 18px;
    bottom: 78px;
    width: 360px;
    max-width: 92vw;
    height: 520px;
    max-height: 75vh;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 14px 40px rgba(0,0,0,.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 999999;
    transition: opacity .2s, transform .2s;
}
.herbie-panel.herbie-hidden {
    display: none;
}

.herbie-header {
    padding: 12px 14px;
    background: #111;
    color: #fff;
    font-weight: 600;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.herbie-body {
    flex: 1;
    overflow-y: auto;
    background: #fafafa;
    padding: 14px;
    scroll-behavior: smooth;
}

/* Messaggi */
.herbie-msg {
    margin-bottom: 10px;
    line-height: 1.45;
    display: flex;
}
.herbie-msg.user {
    justify-content: flex-end;
}
.herbie-msg.bot {
    justify-content: flex-start;
}

.herbie-bubble {
    max-width: 85%;
    padding: 10px 13px;
    border-radius: 14px;
    font-size: 14px;
    word-break: break-word;
}
.herbie-bubble.user {
    background: #111;
    color: #fff;
    border-top-right-radius: 4px;
}
.herbie-bubble.bot {
    background: #fff;
    border: 1px solid #e9e9e9;
    border-top-left-radius: 4px;
    color: #222;
}
.herbie-bubble.bot p { margin: .3em 0; }
.herbie-bubble.bot ul { padding-left: 1.2em; margin: .3em 0; }
.herbie-bubble.bot h2,
.herbie-bubble.bot h3,
.herbie-bubble.bot h4 { margin: .5em 0 .2em; color: #111; }
.herbie-bubble.bot strong { color: #111; }

.herbie-footer {
    display: flex;
    gap: 8px;
    padding: 10px;
    background: #fff;
    border-top: 1px solid #eee;
    flex-shrink: 0;
}

.herbie-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    transition: border-color .15s;
}
.herbie-input:focus {
    border-color: #111;
}

.herbie-send {
    padding: 10px 14px;
    border: none;
    background: #111;
    color: #fff;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background .15s;
}
.herbie-send:hover { background: #333; }
.herbie-send:disabled { background: #ccc; cursor: default; }
