[hidden]{display:none!important}

.nv-chat{
    position:fixed;
    right:24px;
    bottom:24px;
    z-index:120;
    --chat-night:#091723;
    --chat-surface:#102633;
    --chat-raised:#16313f;
    --chat-border:rgba(215,231,233,.14);
    --chat-text:#eef2ef;
    --chat-muted:#a5b3b7;
    --chat-coral:#ed7958;
    font-family:'DM Sans','Noto Sans SC',Arial,sans-serif;
    color:var(--chat-text);
}

.nv-chat-launcher{
    position:relative;
    display:flex;
    align-items:center;
    gap:12px;
    min-width:158px;
    height:62px;
    padding:7px 17px 7px 9px;
    border:1px solid rgba(237,121,88,.82);
    border-radius:6px;
    background:rgba(9,23,35,.96);
    box-shadow:0 10px 30px rgba(4,14,23,.38),0 0 0 4px rgba(237,121,88,.18),inset 3px 0 0 #ed7958;
    -webkit-backdrop-filter:blur(16px);
    backdrop-filter:blur(16px);
    cursor:pointer;
    transition:transform .2s ease,border-color .2s ease,box-shadow .2s ease;
}
.nv-chat-launcher::before{
    position:absolute;
    left:8px;
    top:8px;
    width:44px;
    height:44px;
    border:1px solid rgba(237,121,88,.52);
    border-radius:50%;
    content:"";
    pointer-events:none;
}
.nv-chat-launcher:hover{
    transform:translateY(-2px);
    border-color:#ff9a78;
    box-shadow:0 13px 34px rgba(4,14,23,.44),0 0 0 5px rgba(237,121,88,.24),inset 3px 0 0 #ff9a78;
}
.nv-chat-launcher img{position:relative;z-index:1;flex:none;width:40px;height:40px;object-fit:contain;filter:brightness(0) invert(1)}
.nv-chat-launcher>span{position:relative;z-index:1;color:#fff;font-size:14px;font-weight:700;line-height:1.3;white-space:nowrap}

.nv-chat-panel{
    position:absolute;
    right:0;
    bottom:80px;
    display:flex;
    flex-direction:column;
    width:min(400px,calc(100vw - 32px));
    height:min(600px,calc(100dvh - 112px));
    min-height:390px;
    overflow:hidden;
    border:1px solid rgba(221,235,237,.2);
    border-radius:8px;
    background:rgba(9,23,35,.94);
    box-shadow:0 24px 70px rgba(3,12,20,.5);
    -webkit-backdrop-filter:blur(22px) saturate(125%);
    backdrop-filter:blur(22px) saturate(125%);
    transform-origin:bottom right;
    animation:nv-chat-in .18s ease-out;
}
@keyframes nv-chat-in{from{opacity:0;transform:translateY(8px) scale(.985)}to{opacity:1;transform:translateY(0) scale(1)}}

.nv-chat-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    min-height:76px;
    padding:13px 17px;
    border-bottom:1px solid var(--chat-border);
    background:rgba(6,18,28,.62);
}
.nv-chat-brand{display:flex;align-items:center;gap:12px;min-width:0}
.nv-chat-brand>img{
    width:40px;
    height:40px;
    padding:5px;
    border:1px solid rgba(237,121,88,.35);
    border-radius:50%;
    background:rgba(255,255,255,.96);
    object-fit:contain;
}
.nv-chat-brand>div{display:grid;gap:5px;min-width:0}
.nv-chat-brand strong{overflow:hidden;color:#f5f4ef;font-size:14px;font-weight:700;text-overflow:ellipsis;white-space:nowrap}
.nv-chat-brand>div>span{display:flex;align-items:center;gap:7px;color:var(--chat-muted);font-size:11px}
.nv-chat-brand>div>span::before{width:6px;height:6px;border-radius:50%;background:var(--chat-coral);content:"";box-shadow:0 0 10px rgba(237,121,88,.45)}
.nv-chat-tools{display:flex;align-items:center;gap:4px;flex:none}
.nv-chat-icon-button{
    display:grid;
    place-items:center;
    width:35px;
    height:35px;
    border:1px solid transparent;
    border-radius:4px;
    background:transparent;
    color:#b8c5c7;
    font-size:21px;
    cursor:pointer;
    transition:color .15s ease,background .15s ease,border-color .15s ease;
}
.nv-chat-icon-button:hover{border-color:var(--chat-border);background:rgba(255,255,255,.06);color:#fff}

.nv-chat-messages{
    flex:1;
    min-height:0;
    overflow-y:auto;
    padding:20px 17px 14px;
    overscroll-behavior:contain;
    scrollbar-color:rgba(198,215,217,.28) transparent;
    scrollbar-width:thin;
}
.nv-chat-welcome{
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    margin:1px 0 17px;
    padding:0 0 17px;
    border-bottom:1px solid var(--chat-border);
    background:transparent;
}
.nv-chat-welcome-mark{display:grid;place-items:center;width:34px;height:34px;margin-bottom:12px;border:1px solid rgba(237,121,88,.35);border-radius:50%;background:#fff}
.nv-chat-welcome-mark img{width:30px;height:30px;object-fit:contain}
.nv-chat-welcome strong{color:#f4f2ec;font-size:14px;line-height:1.65}
.nv-chat-welcome p{margin:6px 0 0;color:#afbdc0;font-size:12px;line-height:1.8}
.nv-chat-suggestions{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:16px}
.nv-chat-suggestions button{
    max-width:100%;
    padding:8px 10px;
    border:1px solid rgba(210,228,230,.2);
    border-radius:4px;
    background:rgba(255,255,255,.035);
    color:#d5dedd;
    font-size:11px;
    line-height:1.5;
    text-align:left;
    cursor:pointer;
    transition:border-color .15s ease,color .15s ease,background .15s ease;
}
.nv-chat-suggestions button:hover{border-color:rgba(237,121,88,.68);background:rgba(237,121,88,.09);color:#ffc0a9}
.nv-chat-message{
    width:fit-content;
    max-width:88%;
    margin:10px 0;
    padding:10px 12px;
    border:1px solid rgba(213,229,231,.1);
    border-radius:6px;
    background:rgba(22,49,63,.84);
    color:#e8efed;
    font-size:13px;
    line-height:1.75;
    white-space:pre-wrap;
    overflow-wrap:anywhere;
}
.nv-chat-message[data-role="user"]{
    margin-left:auto;
    border-color:rgba(244,157,128,.6);
    background:#b95f47;
    color:#fff8f4;
}
.nv-chat-message[data-role="error"]{border-color:rgba(237,121,88,.38);background:rgba(107,48,41,.42);color:#ffc1ad;font-size:12px}
.nv-chat-typing{display:flex;align-items:center;gap:4px;height:27px;padding:0 18px;color:#aab8ba;font-size:11px}
.nv-chat-typing>span:nth-child(-n+3){width:5px;height:5px;border-radius:50%;background:#e58a6e;animation:nv-chat-pulse 1s infinite ease-in-out}
.nv-chat-typing>span:nth-child(2){animation-delay:.12s}
.nv-chat-typing>span:nth-child(3){animation-delay:.24s}
.nv-chat-typing>span:last-child{margin-left:4px}
@keyframes nv-chat-pulse{0%,60%,100%{opacity:.35;transform:translateY(0)}30%{opacity:1;transform:translateY(-3px)}}

.nv-chat-form{
    display:flex;
    align-items:flex-end;
    gap:8px;
    margin:0 12px;
    padding:8px 8px 8px 13px;
    border:1px solid rgba(213,229,231,.22);
    border-radius:6px;
    background:rgba(17,39,52,.92);
    transition:border-color .15s ease,background .15s ease;
}
.nv-chat-form:focus-within{border-color:rgba(237,121,88,.76);background:#122b38}
.nv-chat-form textarea{flex:1;min-width:0;max-height:120px;min-height:25px;padding:3px 0;border:0;outline:0;resize:none;background:transparent;color:#f0f3ef;font:inherit;font-size:13px;line-height:1.6}
.nv-chat-form textarea::placeholder{color:#8fa0a5}
.nv-chat-form button{
    display:grid;
    place-items:center;
    flex:none;
    width:35px;
    height:35px;
    border:1px solid rgba(255,255,255,.12);
    border-radius:4px;
    background:var(--chat-coral);
    color:#fff;
    font-size:22px;
    line-height:1;
    cursor:pointer;
    transition:background .15s ease,opacity .15s ease;
}
.nv-chat-form button:hover{background:#d76548}
.nv-chat-form button:disabled{opacity:.45;cursor:wait}
.nv-chat-disclaimer{margin:9px 14px 12px;color:#8d9da1;font-size:10px;line-height:1.55;text-align:center}
.nv-chat :focus-visible{outline:2px solid #f09272;outline-offset:2px}
.nv-chat-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

@media(max-width:560px){
    .nv-chat{right:16px;bottom:max(16px,env(safe-area-inset-bottom))}
    .nv-chat[data-open="true"]{inset:0;z-index:1000}
    .nv-chat[data-open="true"] .nv-chat-launcher{display:none}
    .nv-chat[data-open="true"] .nv-chat-panel{position:absolute;inset:0;width:100%;height:100dvh;min-height:0;max-height:100dvh;border:0;border-radius:0;animation:none}
    .nv-chat-header{min-height:calc(66px + env(safe-area-inset-top));padding:env(safe-area-inset-top) 16px 10px}
    .nv-chat-messages{padding:17px 16px 10px}
    .nv-chat-form{margin-inline:12px}
    .nv-chat-disclaimer{padding-bottom:env(safe-area-inset-bottom)}
}
@media(prefers-reduced-motion:reduce){
    .nv-chat-panel{animation:none}
    .nv-chat-launcher,.nv-chat-typing>span{transition:none;animation:none}
}
