#ts-shb{
    --ts-shb-accent:#CB3522;
    --ts-shb-accent-dark:#A62B1C;

    position:fixed;
    bottom:24px;
    z-index:999999;

    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    color:#17202a;
}

#ts-shb.ts-shb--right{
    right:24px;
}

#ts-shb.ts-shb--left{
    left:24px;
}


/* ========================================
   MAIN NEED HELP LAUNCHER
======================================== */

.ts-shb__launcher{
    width:170px;
    min-width:170px;
    height:58px;
    padding:0 18px;

     display:inline-flex !important;
    flex-direction:row !important;
    flex-wrap:nowrap !important;
    align-items:center !important;
    justify-content:center !important;
    gap:8px;

    white-space:nowrap !important;


    border:1px solid #e5e7eb;
    border-radius:9999px !important;

    background:#fff !important;
    color:var(--ts-shb-accent) !important;

    cursor:pointer;

    box-shadow:
        0 10px 28px rgba(15,23,42,.12),
        inset 0 1px 0 rgba(255,255,255,.9);

    transition:
        transform .25s ease,
        box-shadow .25s ease;

    animation:ts-shb-pulse 3s infinite;
}

.ts-shb__launcher:hover{
    background:#fff !important;
    color:var(--ts-shb-accent) !important;
    border-color:#e5e7eb !important;

    transform:scale(1.08);

    box-shadow:
        0 18px 40px rgba(15,23,42,.16),
        inset 0 1px 0 rgba(255,255,255,.9);
}

.ts-shb__launcher-icon{
    width:22px;
    height:22px;
    flex:0 0 22px;

    display:flex;
    align-items:center;
    justify-content:center;

    color:var(--ts-shb-accent) !important;
}

.ts-shb__launcher-icon svg{
    display:block;
    width:20px;
    height:20px;
}

.ts-shb__launcher-label{
    color:var(--ts-shb-accent) !important;
    font-size:17px;
    line-height:1;
    font-weight:550;
    white-space:nowrap;
}

.ts-shb__launcher-close{
    display:none;

    font-size:33px;
    line-height:1;
    font-weight:300;

    margin-top:-3px;
}

.ts-shb.is-open .ts-shb__launcher{
    width:58px;
    min-width:58px;
    height:58px;
    padding:0;

    animation:none;
}

.ts-shb.is-open .ts-shb__launcher-icon,
.ts-shb.is-open .ts-shb__launcher-label{
    display:none;
}

.ts-shb.is-open .ts-shb__launcher-close{
    display:block;
}

@keyframes ts-shb-pulse{
    0%,
    100%{
        box-shadow:
            0 10px 28px rgba(15,23,42,.12),
            0 0 0 0 rgba(15,23,42,.07);
    }

    60%{
        box-shadow:
            0 10px 28px rgba(15,23,42,.12),
            0 0 0 14px rgba(255,255,255,0);
    }
}


/* ========================================
   PROACTIVE MESSAGE
======================================== */

.ts-shb__proactive{
    position:absolute;
    bottom:78px;
    right:0;

    width:235px;
    padding:16px 18px;

    border:none;
    border-radius:24px;

    background:#fff;
    color:#344052;

    box-shadow:
        0 18px 45px rgba(15,23,42,.18),
        0 4px 12px rgba(15,23,42,.06);

    font-size:14px;
    line-height:1.45;

    opacity:0;
    visibility:hidden;
    transform:translateY(8px);

    transition:
        opacity .24s ease,
        transform .24s ease,
        visibility .24s ease;

    cursor:pointer;
}

.ts-shb--left .ts-shb__proactive{
    left:0;
    right:auto;
}

.ts-shb__proactive.is-visible{
    opacity:1;
    visibility:visible;
    transform:none;
}

.ts-shb__proactive::after{
    content:"";

    position:absolute;
    right:32px;
    bottom:-8px;

    width:16px;
    height:16px;

    background:#fff;

    transform:rotate(45deg);
}

.ts-shb--left .ts-shb__proactive::after{
    left:32px;
    right:auto;
}

.ts-shb__proactive-close{
    display:none;
}


/* ========================================
   CHAT PANEL
======================================== */

.ts-shb__panel{
    position:absolute;
    bottom:76px;

    width:min(380px, calc(100vw - 28px));
    height:min(610px, calc(100vh - 120px));

    display:flex;
    flex-direction:column;

    overflow:hidden;

    background:#fff;
    border:1px solid rgba(10,23,39,.1);
    border-radius:22px;

    box-shadow:0 24px 75px rgba(5,20,35,.25);

    opacity:0;
    visibility:hidden;
    transform:translateY(15px) scale(.97);
    transform-origin:bottom;

    transition:
        opacity .22s ease,
        transform .22s ease,
        visibility .22s ease;
}

.ts-shb--right .ts-shb__panel{
    right:0;
}

.ts-shb--left .ts-shb__panel{
    left:0;
}

.ts-shb.is-open .ts-shb__panel{
    opacity:1;
    visibility:visible;
    transform:none;
}


/* ========================================
   HEADER
======================================== */

.ts-shb__header{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;

    padding:18px 19px 16px;

    color:#fff;

    background:linear-gradient(
        135deg,
        var(--ts-shb-accent),
        var(--ts-shb-accent-dark)
    );
}

.ts-shb__header h3{
    margin:0;

    color:#fff;

    font-size:19px;
    line-height:1.15;
    font-weight:550;
}

.ts-shb__header p{
    margin:4px 0 0;

    color:rgba(255,255,255,.8);

    font-size:12px;
    line-height:1.4;
}

.ts-shb__eyebrow{
    display:none;
}

.ts-shb__close{
    width:34px;
    height:34px;

    display:flex;
    align-items:center;
    justify-content:center;

    appearance:none;

    border:1px solid rgba(255,255,255,.35);
    border-radius:50%;

    background:rgba(255,255,255,.12);
    color:#fff;

    font-size:23px;
    line-height:1;

    cursor:pointer;

    transition:
        background .2s ease,
        transform .2s ease;
}

.ts-shb__close:hover{
    background:rgba(255,255,255,.22);
    transform:scale(1.05);
}


/* ========================================
   WELCOME SCREEN
======================================== */

.ts-shb__welcome-screen{
    flex:1;

    overflow-y:auto;

    padding:20px;

    background:#f6f7f9;
}

.ts-shb__welcome-copy{
    margin-bottom:17px;
}

.ts-shb__welcome-copy h4{
    margin:0 0 6px;

    color:#17202a;

    font-size:16px;
    line-height:1.25;
    font-weight:550;
}

.ts-shb__welcome-copy p{
    margin:0;

    color:#6b7580;

    font-size:13px;
    line-height:1.5;
}


/* ========================================
   SERVICE PILLS
======================================== */

.ts-shb__service-wrap{
    margin:0;
}

.ts-shb__service-title{
    display:none;
}

.ts-shb__service-cards{
    display:flex;
    flex-wrap:wrap;
    align-items:center;

    gap:9px;
}

.ts-shb__service-card{
    width:auto !important;
    min-width:0 !important;
    min-height:0 !important;

    padding:10px 17px !important;

    display:inline-flex !important;
    align-items:center;
    justify-content:center;
    gap:0;

    border:none !important;
    border-radius:9999px !important;

    background:#fff !important;
    color:#303a48 !important;

    box-shadow:
        0 8px 22px rgba(15,23,42,.09),
        0 2px 6px rgba(15,23,42,.04) !important;

    font:inherit;
    font-size:12px;
    line-height:1;
    font-weight:550;

    text-align:center;
    white-space:nowrap;

    cursor:pointer;

    transition:
        transform .22s ease,
        color .22s ease,
        box-shadow .22s ease !important;
}

.ts-shb__service-card:hover{
    border:none !important;

    background:#fff !important;
    color:var(--ts-shb-accent) !important;

    transform:translateY(-2px);

    box-shadow:
        0 14px 30px rgba(15,23,42,.14),
        0 4px 10px rgba(15,23,42,.07) !important;
}

.ts-shb__service-card:active{
    transform:translateY(0) scale(.97);
}

.ts-shb__service-arrow{
    display:none !important;
}

.ts-shb__service-icon{
    display:none !important;
}


/* ========================================
   CHAT MESSAGES
======================================== */

.ts-shb__messages{
    display:none;
    flex:1;

    overflow-y:auto;

    padding:18px;

    background:#f5f7f9;

    scroll-behavior:smooth;
}

.ts-shb.is-chatting .ts-shb__welcome-screen{
    display:none;
}

.ts-shb.is-chatting .ts-shb__messages{
    display:block;
}

.ts-shb__message{
    display:flex;
    align-items:flex-end;
    gap:9px;

    margin-bottom:14px;

    animation:ts-shb-message-in .22s ease both;
}

.ts-shb__message--user{
    justify-content:flex-end;
}

@keyframes ts-shb-message-in{
    from{
        opacity:0;
        transform:translateY(6px);
    }

    to{
        opacity:1;
        transform:none;
    }
}

.ts-shb__avatar{
    width:32px;
    height:32px;
    flex:0 0 32px;

    display:grid;
    place-items:center;

    overflow:hidden;

    border-radius:50%;

    background:#17202a;
    color:#fff;

    font-size:10px;
    font-weight:500;
}

.ts-shb__avatar img{
    width:100%;
    height:100%;

    object-fit:cover;
}

.ts-shb__bubble{
    max-width:82%;

    padding:12px 14px;

    border-radius:16px 16px 16px 5px;

    background:#fff;

    box-shadow:0 4px 16px rgba(16,31,46,.07);

    font-size:14px;
    line-height:1.55;

    white-space:normal;
    overflow-wrap:anywhere;
}

.ts-shb__message--user .ts-shb__bubble{
    background:#111;
    color:#fff;

    border-radius:16px 16px 5px 16px;
}


/* ========================================
   CONTACT ACTIONS
======================================== */

.ts-shb__contact-actions{
    display:flex;
    flex-wrap:wrap;

    gap:7px;

    margin-top:10px;
}

.ts-shb__contact-actions a,
.ts-shb__contact-actions button,
.ts-shb__bubble a.ts-shb__contact{
    display:inline-flex;
    align-items:center;
    justify-content:center;

    padding:9px 12px;

    border-radius:999px;

    background:#111;
    color:#fff;

    text-decoration:none;
    border:0;
    cursor:pointer;
    font-family:inherit;
    line-height:1.15;

    font-size:11px;
    font-weight:550;

    transition:
        transform .2s ease,
        background .2s ease;
}

.ts-shb__contact-actions a:hover,
.ts-shb__contact-actions button:hover,
.ts-shb__bubble a.ts-shb__contact:hover{
    background:#242424 !important;
    color:#fff !important;
    text-decoration:none;
    transform:translateY(-1px);
}


/* ========================================
   SUGGESTED QUESTIONS
======================================== */

.ts-shb__suggestions{
    display:flex;
    flex-wrap:wrap;

    gap:7px;

    margin:2px 0 15px 41px;
}

.ts-shb__suggestions button{
    padding:7px 11px;

    border:1px solid #e1e5e9;
    border-radius:999px;

    background:#fff;
    color:#27313c;

    font-size:11px;
    line-height:1.25;

    cursor:pointer;

    transition:
        border-color .2s ease,
        color .2s ease,
        transform .2s ease;
}

.ts-shb__suggestions button:hover{
    border-color:var(--ts-shb-accent);
    color:var(--ts-shb-accent);

    transform:translateY(-1px);
}


/* ========================================
   QUESTION INPUT
======================================== */

.ts-shb__form{
    display:flex;
    gap:9px;

    padding:13px;

    background:#fff;

    border-top:1px solid #e7eaed;
}

.ts-shb__form input{
    min-width:0;
    flex:1;

    padding:12px 14px !important;

    border:1px solid #d9dee3 !important;
    border-radius:999px !important;

    background:#fff !important;

    font:inherit !important;
    font-size:14px !important;

    box-shadow:none !important;
    outline:none;
}

.ts-shb__form input:focus{
    border-color:var(--ts-shb-accent) !important;
}

.ts-shb__form button{
    width:44px;
    height:44px;
    flex:0 0 44px;

    display:grid;
    place-items:center;

    border:0;
    border-radius:50%;

    background:#111;
    color:#fff;

    cursor:pointer;

    transition:
        transform .2s ease,
        background .2s ease;
}

.ts-shb__form button:hover{
    background:#252525;
    transform:scale(1.05);
}

.ts-shb__form button:disabled{
    opacity:.55;
    cursor:wait;
}


/* ========================================
   TYPING DOTS
======================================== */

.ts-shb__typing{
    display:inline-flex;
    gap:4px;

    padding:4px;
}

.ts-shb__typing i{
    display:block;

    width:6px;
    height:6px;

    border-radius:50%;

    background:#87909a;

    animation:ts-shb-bounce 1s infinite ease-in-out;
}

.ts-shb__typing i:nth-child(2){
    animation-delay:.12s;
}

.ts-shb__typing i:nth-child(3){
    animation-delay:.24s;
}

@keyframes ts-shb-bounce{
    0%,
    60%,
    100%{
        transform:translateY(0);
    }

    30%{
        transform:translateY(-5px);
    }
}


/* ========================================
   MOBILE
======================================== */

@media(max-width:600px){

    #ts-shb{
        bottom:14px;
    }

    #ts-shb.ts-shb--right{
        right:14px;
    }

    #ts-shb.ts-shb--left{
        left:14px;
    }

    .ts-shb__launcher{
        width:58px;
        min-width:58px;
        height:58px;

        padding:0;
    }

    .ts-shb__launcher-label{
        display:none;
    }

    .ts-shb__panel{
        position:fixed;

        left:14px !important;
        right:14px !important;
        bottom:78px;

        width:auto;
        height:min(620px, calc(100vh - 100px));

        border-radius:18px;
    }

    .ts-shb__proactive{
        bottom:72px;

        width:210px;

        padding:14px 16px;

        border-radius:20px;

        font-size:13px;
    }

    .ts-shb__welcome-screen{
        padding:18px;
    }

    .ts-shb__service-cards{
        gap:8px;
    }

    .ts-shb__service-card{
        padding:10px 15px !important;

        font-size:11.5px;
    }
}


/* ========================================
   REDUCED MOTION
======================================== */

@media(prefers-reduced-motion:reduce){

    #ts-shb *{
        animation:none !important;
        transition:none !important;
    }
}

.ts-shb__launcher-icon svg{
    display:block;
    width:20px;
    height:20px;
    transform:translateY(2px);
}
/* ========================================
   SMART LINK CARDS
======================================== */

.ts-shb__link-card{
    min-width:220px;
    display:flex;
    flex-direction:column;
    gap:9px;
}

.ts-shb__link-card-title{
    display:block;
    color:#111827;
    font-size:15px;
    line-height:1.25;
    font-weight:700;
}

.ts-shb__link-card-copy{
    display:block;
    color:#596273;
    font-size:13px;
    line-height:1.5;
}

.ts-shb__link-card-button{
    width:100%;
    min-height:42px;
    margin-top:3px;
    padding:10px 13px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    border-radius:11px;
    background:var(--ts-shb-accent);
    color:#fff !important;
    text-decoration:none !important;
    font-size:13px;
    line-height:1;
    font-weight:700;
    transition:transform .2s ease,filter .2s ease;
}

.ts-shb__link-card-button:hover{
    color:#fff !important;
    filter:brightness(.94);
    transform:translateY(-1px);
}


/* ========================================
   RICH INTENT CARDS
======================================== */
.ts-shb__message--bot:has(.ts-shb__intent-card) .ts-shb__bubble{
    width:min(278px, calc(100vw - 108px));
    padding:0;
    overflow:hidden;
    border:1px solid rgba(15,23,42,.09);
    background:#fff;
    box-shadow:0 12px 30px rgba(15,23,42,.08);
}

.ts-shb__intent-card{
    display:flex;
    flex-direction:column;
    gap:9px;
    padding:17px;
}

.ts-shb__intent-eyebrow{
    color:var(--ts-shb-accent);
    font-size:10px;
    line-height:1;
    font-weight:800;
    letter-spacing:.09em;
    text-transform:uppercase;
}

.ts-shb__intent-title{
    color:#101827;
    font-size:17px;
    line-height:1.2;
    font-weight:800;
}

.ts-shb__intent-copy{
    color:#596273;
    font-size:12.5px;
    line-height:1.5;
}

.ts-shb__intent-list{
    margin:2px 0 1px;
    padding:0;
    display:grid;
    gap:6px;
    list-style:none;
}

.ts-shb__intent-list li{
    position:relative;
    padding-left:16px;
    color:#273142;
    font-size:12px;
    line-height:1.35;
}

.ts-shb__intent-list li::before{
    content:"✓";
    position:absolute;
    left:0;
    top:0;
    color:var(--ts-shb-accent);
    font-weight:900;
}

.ts-shb__intent-actions{
    margin-top:4px;
    display:grid;
    gap:7px;
}

.ts-shb__intent-action{
    min-height:40px;
    padding:10px 12px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    border:1px solid rgba(15,23,42,.12);
    border-radius:10px;
    background:#fff;
    color:#111827 !important;
    text-decoration:none !important;
    font-size:12.5px;
    line-height:1;
    font-weight:750;
    transition:transform .18s ease, border-color .18s ease, background .18s ease;
}

.ts-shb__intent-action:hover{
    transform:translateY(-1px);
    border-color:var(--ts-shb-accent);
}

.ts-shb__intent-action.is-primary{
    border-color:var(--ts-shb-accent);
    background:var(--ts-shb-accent);
    color:#fff !important;
}

@supports not selector(:has(*)){
    .ts-shb__intent-card{
        min-width:230px;
    }
}

/* ========================================
   CALLBACK LEAD FORM
======================================== */
.ts-shb__callback-button{
    appearance:none;
    -webkit-appearance:none;
    width:auto;
    min-height:0;
    margin:0;
}
.ts-shb__lead-form{display:grid;gap:9px;min-width:235px}
.ts-shb__lead-form-title{font-size:16px;line-height:1.2;color:#111827}
.ts-shb__lead-form-copy{font-size:12px;line-height:1.45;color:#667085}
.ts-shb__lead-form input,.ts-shb__lead-form select,.ts-shb__lead-form textarea{
    width:100%;box-sizing:border-box;border:1px solid rgba(15,23,42,.14);border-radius:9px;background:#fff;
    padding:10px 11px;color:#111827;font:inherit;font-size:12px;outline:none;
}
.ts-shb__lead-form textarea{resize:vertical;min-height:68px}
.ts-shb__lead-form input:focus,.ts-shb__lead-form select:focus,.ts-shb__lead-form textarea:focus{border-color:var(--ts-shb-accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--ts-shb-accent) 16%,transparent)}
.ts-shb__lead-form-actions{display:grid;grid-template-columns:1fr auto;gap:7px}
.ts-shb__lead-submit,.ts-shb__lead-cancel{min-height:40px;padding:10px 12px;border-radius:9px;font:inherit;font-size:12px;font-weight:800;cursor:pointer}
.ts-shb__lead-submit{border:1px solid var(--ts-shb-accent);background:var(--ts-shb-accent);color:#fff}
.ts-shb__lead-cancel{border:1px solid var(--ts-shb-accent);background:#fff;color:var(--ts-shb-accent)}
.ts-shb__lead-cancel:hover{background:color-mix(in srgb,var(--ts-shb-accent) 8%,#fff)}
.ts-shb__lead-hp{position:absolute!important;left:-9999px!important;width:1px!important;height:1px!important;overflow:hidden!important}
.ts-shb__lead-success{font-weight:700;color:#166534}

/* Admin v3 additions */
.ts-shb-stat-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px;margin:18px 0}
.ts-shb-stat{padding:20px;border:1px solid #e5e7eb;border-radius:14px;background:#fff;box-shadow:0 8px 24px rgba(15,23,42,.05)}
.ts-shb-stat span{display:block;color:#667085;font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.04em}
.ts-shb-stat strong{display:block;margin-top:7px;color:#111827;font-size:30px;line-height:1}
.ts-shb-admin table textarea{width:100%;margin:6px 0}
@media(max-width:1100px){.ts-shb-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* ========================================
   CONVERSATIONAL CALLBACK FLOW — v3.2
======================================== */
.ts-shb__lead-flow{display:grid;gap:12px;min-width:235px}
.ts-shb__lead-progress{height:4px;background:#e8ebef;border-radius:999px;overflow:hidden}
.ts-shb__lead-progress span{display:block;height:100%;width:20%;border-radius:inherit;background:var(--ts-shb-accent);transition:width .25s ease}
.ts-shb__lead-question{display:block;font-size:15px;font-weight:800;line-height:1.35;color:#111827}
.ts-shb__lead-step-copy{display:block;margin-top:-7px;font-size:12px;line-height:1.45;color:#667085}
.ts-shb__lead-step-form{display:grid;gap:10px}
.ts-shb__lead-step-form input,
.ts-shb__lead-step-form textarea{width:100%;min-height:46px;padding:12px 13px;border:1px solid #d7dce3;border-radius:12px;background:#fff;color:#111827;font:inherit;outline:0;box-sizing:border-box}
.ts-shb__lead-step-form textarea{min-height:84px;resize:vertical}
.ts-shb__lead-step-form input:focus,
.ts-shb__lead-step-form textarea:focus{border-color:var(--ts-shb-accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--ts-shb-accent) 15%,transparent)}
.ts-shb__lead-step-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.ts-shb__lead-next,.ts-shb__lead-back,.ts-shb__lead-skip,.ts-shb__lead-choices button{min-height:40px;padding:10px 14px;border-radius:10px;font:inherit;font-size:12px;font-weight:800;cursor:pointer;transition:transform .18s ease,background .18s ease,color .18s ease,border-color .18s ease}
.ts-shb__lead-next{margin-left:auto;border:1px solid var(--ts-shb-accent);background:var(--ts-shb-accent);color:#fff}
.ts-shb__lead-next:hover,.ts-shb__lead-choices button:hover{transform:translateY(-1px)}
.ts-shb__lead-back,.ts-shb__lead-skip{border:0;background:transparent;color:#667085;padding-inline:4px}
.ts-shb__lead-skip{margin-left:auto}
.ts-shb__lead-choices{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.ts-shb__lead-choices button{border:1px solid #d7dce3;background:#fff;color:#1f2937;text-align:left}
.ts-shb__lead-choices button:hover{border-color:var(--ts-shb-accent);color:var(--ts-shb-accent);background:color-mix(in srgb,var(--ts-shb-accent) 5%,#fff)}
.ts-shb__lead-success-icon{width:46px;height:46px;display:grid;place-items:center;border-radius:50%;background:color-mix(in srgb,var(--ts-shb-accent) 12%,#fff);color:var(--ts-shb-accent);font-size:22px;font-weight:900}
.ts-shb__lead-success-title{font-size:16px;color:#111827}

.ts-shb__header{background:linear-gradient(135deg,var(--ts-shb-accent) 0%,color-mix(in srgb,var(--ts-shb-accent) 82%,#000) 100%)}
.ts-shb__close{border-color:rgba(255,255,255,.35)!important;color:#fff!important;border-radius:10px!important}
.ts-shb__close:hover{background:#fff!important;color:var(--ts-shb-accent)!important;border-color:#fff!important}
.ts-shb__messages{scrollbar-width:thin;scrollbar-color:var(--ts-shb-accent) transparent}
.ts-shb__messages::-webkit-scrollbar{width:7px}
.ts-shb__messages::-webkit-scrollbar-track{background:transparent}
.ts-shb__messages::-webkit-scrollbar-thumb{background:var(--ts-shb-accent);border-radius:999px}
