.n8ncbdm-widget {
    position: fixed;
    bottom: var(--n8ncbdm-offset-y, 18px);
    z-index: 999999;
    font-family: var(--n8ncbdm-font, inherit);
}
.n8ncbdm-widget.is-right { right: var(--n8ncbdm-offset-x, 18px); }
.n8ncbdm-widget.is-left { left: var(--n8ncbdm-offset-x, 18px); }
.n8ncbdm-hide-mobile { }
.n8ncbdm-hide-tablet { }
.n8ncbdm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.18);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}
.n8ncbdm-widget.is-open .n8ncbdm-overlay { opacity: 1; pointer-events: auto; }
.n8ncbdm-shell {
    position: absolute;
    bottom: calc(var(--n8ncbdm-launcher-size, 48px) + var(--n8ncbdm-launcher-gap, 12px));
    width: var(--n8ncbdm-panel-width, 320px);
    height: var(--n8ncbdm-panel-height, 520px);
    overflow: hidden;
    border-radius: var(--n8ncbdm-radius, 16px);
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(11, 17, 32, 0.92);
    box-shadow: 0 22px 54px rgba(0,0,0,.38);
    backdrop-filter: blur(16px);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .2s ease, transform .2s ease;
}
.n8ncbdm-widget.is-open .n8ncbdm-shell { opacity: 1; transform: translateY(0); }
.n8ncbdm-widget.is-right .n8ncbdm-shell { right: 0; }
.n8ncbdm-widget.is-left .n8ncbdm-shell { left: 0; }
.n8ncbdm-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.01));
    border-bottom: 1px solid rgba(255,255,255,.06);
    color: var(--n8ncbdm-text, #F9FAFB);
}
.n8ncbdm-title { font-size: 15px; font-weight: 600; }
.n8ncbdm-close {
    appearance: none;
    border: var(--n8ncbdm-close-border-width, 1px) solid var(--n8ncbdm-close-border-colour, #CBD5E1);
    background: var(--n8ncbdm-close-bg, #FFFFFF);
    color: var(--n8ncbdm-close-text, #111827);
    width: var(--n8ncbdm-close-size, 32px);
    height: var(--n8ncbdm-close-size, 32px);
    border-radius: var(--n8ncbdm-close-radius, 10px);
    font-size: var(--n8ncbdm-close-font-size, 18px);
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.n8ncbdm-chat-wrap { height: calc(100% - 53px); }
.n8ncbdm-header[hidden] + .n8ncbdm-chat-wrap { height: 100%; }
.n8ncbdm-chat-root, .n8ncbdm-chat-root > * { width: 100%; height: 100%; }
.n8ncbdm-launcher-row {
    appearance: none;
    width: var(--n8ncbdm-launcher-size, 48px);
    height: var(--n8ncbdm-launcher-size, 48px);
    border-radius: var(--n8ncbdm-launcher-radius, 14px);
    border: var(--n8ncbdm-launcher-border-width, 1px) solid var(--n8ncbdm-launcher-border-colour, #334155);
    background: var(--n8ncbdm-launcher-bg, #0B1220);
    color: var(--n8ncbdm-text, #F9FAFB);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 16px 34px rgba(0,0,0,.28);
    cursor: pointer;
    padding: 0;
}
.n8ncbdm-launcher-icon,
.n8ncbdm-launcher-icon img,
.n8ncbdm-launcher-icon svg {
    width: var(--n8ncbdm-launcher-icon-size, 18px);
    height: var(--n8ncbdm-launcher-icon-size, 18px);
    display: block;
}
.n8ncbdm-launcher-icon img,
.n8ncbdm-launcher-icon svg { object-fit: contain; }
@media (max-width: 767px) {
    .n8ncbdm-hide-mobile { display: none !important; }
    .n8ncbdm-widget:not(.n8ncbdm-hide-mobile) {
        left: 12px !important;
        right: 12px !important;
        bottom: 12px !important;
    }
    .n8ncbdm-widget:not(.n8ncbdm-hide-mobile) .n8ncbdm-shell {
        width: auto;
        left: 0 !important;
        right: 0 !important;
        height: min(72vh, var(--n8ncbdm-panel-height, 520px));
    }
}
@media (min-width: 768px) and (max-width: 1024px) {
    .n8ncbdm-hide-tablet { display: none !important; }
}
