/**
 * Vanessa widget — shell, FAB, panel, header (BEM: bt-vanessa)
 * Nessun !important. Caricare prima di vanessa-widget-messages.css.
 */

.bt-vanessa {
    font-family: 'Inter', system-ui, sans-serif;
    box-sizing: border-box;
}

.bt-vanessa *,
.bt-vanessa *::before,
.bt-vanessa *::after {
    box-sizing: border-box;
}

/* RENAMED (CSS): .bt-vanessa__badge → .bt-vanessa__fab — id #bt-vanessa-launch invariato per JS */
.bt-vanessa__fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9998;
    width: 52px;
    height: 52px;
    padding: 0;
    border: 1px solid #333;
    border-radius: 50%;
    background: #222;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.bt-vanessa__fab:hover {
    transform: scale(1.07);
    background: #333;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
}

.bt-vanessa__fab:active {
    transform: scale(0.97);
}

.bt-vanessa__fab:focus-visible {
    outline: 2px solid #555;
    outline-offset: 3px;
}

.bt-vanessa__fab-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
}

.bt-vanessa__fab-icon svg {
    width: 24px;
    height: 24px;
    display: block;
}

.bt-vanessa__panel {
    position: fixed;
    bottom: 90px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    width: 380px;
    max-width: calc(100vw - 48px);
    height: min(520px, calc(100svh - 120px));
    max-height: calc(100svh - 120px);
    background: #111;
    border: 1px solid #333;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}

/* Prompt 3: stato aperto con classe (migrazione da hidden). */
.bt-vanessa__panel--open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Visibilità: solo .bt-vanessa__panel--open (dopo remove hidden, JS aggiunge la classe). */
.bt-vanessa__panel[hidden] {
    display: none;
}

.bt-vanessa__header {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 52px;
    padding: 0 16px;
    background: #080808;
    border-bottom: 1px solid #1a1a1a;
}

.bt-vanessa__header-brand {
    display: flex;
    align-items: center;
    min-width: 0;
}

.bt-vanessa__logo {
    width: 24px;
    height: 24px;
    margin-right: 10px;
    flex-shrink: 0;
    object-fit: contain;
}

.bt-vanessa__brand-title {
    font-size: 15px;
    font-weight: 600;
    color: #ccc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bt-vanessa__close {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #888;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
}

.bt-vanessa__close:hover {
    color: #ccc;
    background: rgba(255, 255, 255, 0.06);
}

.bt-vanessa__close:focus-visible {
    outline: 2px solid #555;
    outline-offset: 2px;
}

.bt-vanessa__close-icon {
    display: block;
}

.bt-vanessa__main {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
