.idt-chat-root,
.idt-chat-root *{
    box-sizing:border-box;
    font-family:Inter,Arial,Helvetica,sans-serif;
    letter-spacing:0;
}

.idt-chat-root{
    --idt-primary:#009f54;
    --idt-primary-dark:#006f3d;
    --idt-header:#008f4b;
    --idt-panel-width:420px;
    --idt-panel-height:560px;
    --idt-launcher-width:280px;
    --idt-launcher-height:76px;
    --idt-radius:18px;
    --idt-mint:#20d682;
    --idt-ink:#07111c;
    --idt-text:#0a0f18;
    --idt-muted:#596171;
    --idt-line:#dbe5df;
    position:fixed;
    right:28px;
    bottom:28px;
    z-index:99999;
    color:var(--idt-text);
}

.idt-chat-root svg{
    width:1em;
    height:1em;
    display:block;
}

.idt-chat-button{
    width:var(--idt-launcher-width);
    min-height:var(--idt-launcher-height);
    padding:16px 22px;
    border:0;
    border-radius:999px;
    color:#fff;
    cursor:pointer;
    background:
        linear-gradient(90deg,rgba(0,0,0,.08),rgba(0,0,0,0)),
        radial-gradient(circle at 82% 16%,rgba(45,224,137,.24),transparent 28%),
        linear-gradient(135deg,var(--idt-header) 0%,var(--idt-primary) 48%,var(--idt-primary-dark) 100%);
    box-shadow:0 20px 48px rgba(0,75,42,.35);
    display:grid;
    grid-template-columns:56px 1fr 24px;
    align-items:center;
    gap:14px;
    position:relative;
    overflow:visible;
    text-align:left;
}

.idt-chat-button:before{
    content:"";
    position:absolute;
    inset:0 0 0 auto;
    width:45%;
    opacity:.22;
    background:
        linear-gradient(to top,rgba(255,255,255,.25) 0 22%,transparent 22% 100%) 6% 84%/8px 48px no-repeat,
        linear-gradient(to top,rgba(255,255,255,.2) 0 52%,transparent 52% 100%) 20% 78%/8px 62px no-repeat,
        linear-gradient(to top,rgba(255,255,255,.26) 0 36%,transparent 36% 100%) 36% 82%/8px 52px no-repeat,
        linear-gradient(to top,rgba(255,255,255,.18) 0 70%,transparent 70% 100%) 54% 70%/8px 70px no-repeat,
        linear-gradient(to top,rgba(255,255,255,.24) 0 45%,transparent 45% 100%) 72% 78%/8px 58px no-repeat,
        linear-gradient(to top,rgba(255,255,255,.17) 0 58%,transparent 58% 100%) 88% 72%/8px 66px no-repeat;
    pointer-events:none;
}

.idt-chat-button-icon{
    width:56px;
    height:56px;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    color:var(--idt-primary);
    background:#fff;
    box-shadow:0 8px 20px rgba(0,0,0,.12);
    font-size:36px;
    position:relative;
    z-index:1;
}

.idt-chat-button-copy{
    display:grid;
    gap:6px;
    position:relative;
    z-index:1;
}

.idt-chat-button-copy strong{
    color:#fff;
    font-size:19px;
    line-height:1.1;
    font-weight:900;
}

.idt-chat-button-copy span{
    color:#eefcf5;
    font-size:14px;
    display:flex;
    align-items:center;
    gap:7px;
}

.idt-chat-button-copy i,
.idt-chat-online i{
    width:10px;
    height:10px;
    border-radius:50%;
    background:var(--idt-mint);
    box-shadow:0 0 0 4px rgba(16,205,117,.16);
    display:inline-block;
    flex:0 0 auto;
}

.idt-chat-button-chevron,
.idt-chat-close{
    width:22px;
    height:22px;
    position:relative;
    z-index:1;
}

.idt-chat-button-chevron:before,
.idt-chat-close:before{
    content:"";
    width:16px;
    height:16px;
    border-right:4px solid #fff;
    border-bottom:4px solid #fff;
    position:absolute;
    left:1px;
    top:0;
    transform:rotate(45deg);
    border-radius:2px;
}

.idt-chat-badge{
    position:absolute;
    top:-9px;
    right:10px;
    min-width:30px;
    height:30px;
    padding:0 8px;
    border-radius:999px;
    background:#ff414b;
    color:#fff;
    display:none;
    align-items:center;
    justify-content:center;
    font-size:14px;
    font-weight:900;
    box-shadow:0 8px 20px rgba(255,65,75,.35);
    z-index:2;
}

.idt-chat-badge.show{
    display:flex;
}

.idt-chat-root.is-launcher-icon .idt-chat-button{
    width:var(--idt-launcher-height);
    height:var(--idt-launcher-height);
    min-height:var(--idt-launcher-height);
    padding:0;
    display:flex;
    justify-content:center;
    border-radius:50%;
}

.idt-chat-root.is-launcher-icon .idt-chat-button-icon{
    width:var(--idt-launcher-height);
    height:var(--idt-launcher-height);
}

.idt-chat-root.is-launcher-icon .idt-chat-button-copy,
.idt-chat-root.is-launcher-icon .idt-chat-button-chevron{
    display:none;
}

.idt-chat-preview{
    width:270px;
    position:absolute;
    right:18px;
    bottom:110px;
    padding:20px;
    border-radius:14px;
    background:#fff;
    box-shadow:0 18px 46px rgba(14,25,40,.18);
    opacity:0;
    visibility:hidden;
    transform:translateY(10px);
    transition:opacity .18s ease,transform .18s ease,visibility .18s ease;
    pointer-events:none;
}

.idt-chat-preview:before{
    content:"";
    width:18px;
    height:18px;
    background:#fff;
    position:absolute;
    left:50%;
    top:-9px;
    transform:translateX(-50%) rotate(45deg);
}

.idt-chat-root:not(.open):hover .idt-chat-preview{
    opacity:1;
    visibility:visible;
    transform:translateY(0);
    pointer-events:auto;
}

.idt-chat-preview-row{
    display:grid;
    grid-template-columns:58px 1fr;
    gap:14px;
    align-items:center;
}

.idt-chat-preview strong{
    font-size:16px;
    color:#111827;
}

.idt-chat-preview p{
    margin:8px 0 0;
    color:#4b5563;
    line-height:1.45;
    font-size:14px;
}

.idt-chat-preview-cta{
    width:100%;
    border:0;
    border-radius:8px;
    margin-top:18px;
    padding:14px 16px;
    color:#fff;
    background:linear-gradient(135deg,var(--idt-primary),var(--idt-primary-dark));
    font-size:16px;
    font-weight:900;
    cursor:pointer;
    box-shadow:0 10px 20px rgba(0,143,76,.18);
}

.idt-chat-panel{
    width:min(var(--idt-panel-width),calc(100vw - 48px));
    height:min(var(--idt-panel-height),calc(100vh - 48px));
    position:absolute;
    right:0;
    bottom:0;
    display:none;
    flex-direction:column;
    overflow:hidden;
    background:#fff;
    border:1px solid rgba(5,60,38,.08);
    border-radius:var(--idt-radius);
    box-shadow:0 28px 78px rgba(18,28,42,.22);
}

.idt-chat-root.open .idt-chat-button,
.idt-chat-root.open .idt-chat-preview{
    display:none;
}

.idt-chat-root.open .idt-chat-panel{
    display:flex;
}

.idt-chat-head{
    min-height:88px;
    padding:22px 26px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    color:#fff;
    background:
        radial-gradient(circle at 86% 15%,rgba(33,219,128,.24),transparent 28%),
        linear-gradient(to top,rgba(255,255,255,.16) 0 24%,transparent 24% 100%) 78% 100%/9px 70px no-repeat,
        linear-gradient(to top,rgba(255,255,255,.14) 0 54%,transparent 54% 100%) 84% 100%/9px 80px no-repeat,
        linear-gradient(to top,rgba(255,255,255,.18) 0 36%,transparent 36% 100%) 90% 100%/9px 66px no-repeat,
        linear-gradient(to top,rgba(255,255,255,.12) 0 68%,transparent 68% 100%) 96% 100%/9px 88px no-repeat,
        linear-gradient(135deg,var(--idt-header),var(--idt-primary) 46%,var(--idt-primary-dark));
}

.idt-chat-brand{
    display:flex;
    align-items:center;
    gap:13px;
    min-width:0;
}

.idt-chat-logo{
    width:50px;
    height:50px;
    border-radius:8px;
    display:flex;
    align-items:center;
    justify-content:center;
    color:#fff;
    font-size:50px;
    flex:0 0 auto;
}

.idt-chat-brand strong{
    color:#fff;
    display:block;
    font-size:30px;
    line-height:1;
    font-weight:900;
}

.idt-chat-brand small{
    color:#fff;
    display:block;
    margin-top:6px;
    font-size:13px;
}

.idt-chat-brand b{
    color:#24f295;
}

.idt-chat-actions{
    display:flex;
    align-items:center;
    gap:15px;
}

.idt-chat-menu,
.idt-chat-close{
    border:0;
    background:transparent;
    color:#fff;
    cursor:pointer;
    font-size:26px;
    font-weight:900;
    line-height:1;
}

.idt-chat-close{
    width:30px;
    height:30px;
    display:block;
}

.idt-chat-intro{
    padding:22px 28px 12px;
    display:grid;
    grid-template-columns:88px 1fr;
    gap:22px;
    align-items:center;
    background:#fff;
}

.idt-chat-root.hide-intro .idt-chat-intro{
    display:none;
}

.idt-chat-intro h3{
    margin:0 0 8px;
    color:#060b12;
    font-size:27px;
    line-height:1.1;
    font-weight:900;
}

.idt-chat-intro p{
    margin:0 0 9px;
    color:#111827;
    font-size:18px;
    font-weight:700;
}

.idt-chat-online{
    display:flex;
    align-items:center;
    gap:9px;
    color:#1f2937;
    font-size:16px;
}

.idt-chat-avatar{
    width:82px;
    height:82px;
    border-radius:50%;
    background:linear-gradient(135deg,#f6faf8,#e6efe8);
    border:1px solid rgba(0,143,76,.18);
    display:inline-flex;
    align-items:center;
    justify-content:center;
    position:relative;
    box-shadow:0 10px 26px rgba(7,20,15,.12);
    flex:0 0 auto;
}

.idt-chat-avatar-sm{
    width:48px;
    height:48px;
}

.idt-chat-avatar-face{
    width:72%;
    height:72%;
    position:relative;
    display:block;
}

.idt-chat-avatar-hair{
    position:absolute;
    left:14%;
    right:14%;
    top:4%;
    height:54%;
    border-radius:45% 45% 35% 35%;
    background:linear-gradient(145deg,#2b170f,#5b2a17);
}

.idt-chat-avatar-head{
    position:absolute;
    left:25%;
    right:25%;
    top:16%;
    height:42%;
    border-radius:48% 48% 44% 44%;
    background:#f2b38c;
    box-shadow:inset 0 -7px 0 rgba(158,70,42,.14);
}

.idt-chat-avatar-body{
    position:absolute;
    left:17%;
    right:17%;
    bottom:5%;
    height:38%;
    border-radius:46% 46% 24% 24%;
    background:linear-gradient(135deg,#0b1421,#1f2937);
}

.idt-chat-avatar-smile{
    position:absolute;
    width:18%;
    height:9%;
    left:41%;
    top:38%;
    border-bottom:2px solid #7b2d1b;
    border-radius:0 0 999px 999px;
}

.idt-chat-avatar-dot{
    width:17px;
    height:17px;
    border-radius:50%;
    position:absolute;
    right:2px;
    bottom:4px;
    background:var(--idt-primary);
    border:3px solid #fff;
}

.idt-chat-avatar-sm .idt-chat-avatar-dot{
    width:13px;
    height:13px;
    border-width:2px;
}

.idt-chat-body{
    flex:1;
    padding:10px 28px 22px;
    overflow:auto;
    display:flex;
    flex-direction:column;
    gap:20px;
    background:#fff;
}

.idt-chat-body::-webkit-scrollbar{
    width:8px;
}

.idt-chat-body::-webkit-scrollbar-thumb{
    background:#d6e2dc;
    border-radius:999px;
}

.idt-chat-message-row{
    display:flex;
    align-items:flex-start;
    gap:12px;
    max-width:80%;
}

.idt-chat-message-row.is-support{
    align-self:flex-start;
}

.idt-chat-message-row.is-user{
    align-self:flex-end;
    justify-content:flex-end;
}

.idt-chat-message-stack{
    min-width:0;
}

.idt-chat-meta{
    display:flex;
    align-items:center;
    gap:10px;
    margin:0 0 7px;
    color:#58606f;
    font-size:13px;
    line-height:1;
}

.idt-chat-message-row.is-user .idt-chat-meta{
    justify-content:flex-end;
}

.idt-chat-meta strong{
    color:#111827;
    font-size:14px;
    font-weight:900;
}

.idt-chat-meta em{
    color:var(--idt-primary);
    font-style:normal;
    font-weight:900;
    letter-spacing:-3px;
}

.idt-chat-msg{
    padding:14px 18px;
    border-radius:12px;
    line-height:1.55;
    font-size:16px;
    white-space:pre-wrap;
    word-break:break-word;
}

.idt-chat-message-row.is-support .idt-chat-msg{
    background:#f0f1f3;
    color:#111827;
    border-top-left-radius:4px;
}

.idt-chat-message-row.is-user .idt-chat-msg{
    background:linear-gradient(135deg,var(--idt-primary),var(--idt-primary-dark));
    color:#fff;
    border-top-right-radius:4px;
    box-shadow:0 8px 20px rgba(0,143,76,.18);
}

.idt-chat-message-row.agent .idt-chat-msg{
    border-left:4px solid var(--idt-primary);
}

.idt-chat-typing .idt-chat-msg{
    display:flex;
    align-items:center;
    gap:5px;
    min-width:70px;
}

.idt-chat-dot{
    width:7px;
    height:7px;
    border-radius:50%;
    background:var(--idt-primary);
    opacity:.45;
    animation:idt-chat-blink 1s infinite ease-in-out;
}

.idt-chat-dot:nth-child(2){animation-delay:.15s}
.idt-chat-dot:nth-child(3){animation-delay:.3s}

@keyframes idt-chat-blink{
    0%,80%,100%{opacity:.35;transform:translateY(0)}
    40%{opacity:1;transform:translateY(-3px)}
}

.idt-chat-footer{
    border-top:1px solid #e5ece8;
    background:#fff;
    padding:14px 28px 18px;
}

.idt-chat-quick{
    margin-bottom:16px;
}

.idt-chat-root.hide-quick .idt-chat-quick{
    display:none;
}

.idt-chat-quick strong{
    display:block;
    margin-bottom:10px;
    color:#111827;
    font-size:16px;
    font-weight:900;
}

.idt-chat-chip-row{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(150px,1fr));
    gap:8px;
}

.idt-chat-chip-row button{
    min-height:40px;
    border:1px solid var(--idt-primary);
    border-radius:6px;
    background:#fff;
    color:var(--idt-primary-dark);
    cursor:pointer;
    padding:8px 10px;
    font-size:13px;
    font-weight:800;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    white-space:nowrap;
}

.idt-chat-chip-row button svg{
    width:17px;
    height:17px;
    flex:0 0 auto;
}

.idt-chat-form{
    min-height:60px;
    padding:8px;
    display:flex;
    align-items:center;
    gap:8px;
    border:1px solid #dce4df;
    border-radius:999px;
    background:#fff;
    box-shadow:0 8px 20px rgba(25,40,36,.05);
}

.idt-chat-form.is-hidden{
    display:none;
}

.idt-chat-input{
    flex:1;
    min-width:0;
    border:0;
    background:transparent;
    color:#1f2937;
    padding:12px 8px 12px 12px;
    outline:0;
    font-size:16px;
}

.idt-chat-input::placeholder{
    color:#8a93a1;
}

.idt-chat-tool,
.idt-chat-send{
    width:42px;
    height:42px;
    border:0;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    flex:0 0 auto;
}

.idt-chat-tool{
    color:#7b8493;
    background:transparent;
    font-size:22px;
    opacity:.8;
}

.idt-chat-send{
    color:#fff;
    background:linear-gradient(135deg,var(--idt-primary),var(--idt-primary-dark));
    cursor:pointer;
    font-size:22px;
    box-shadow:0 8px 18px rgba(0,143,76,.25);
}

.idt-chat-secure{
    margin-top:12px;
    color:#6b7280;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    font-size:13px;
}

.idt-chat-secure svg{
    width:16px;
    height:16px;
    color:var(--idt-primary);
}

.idt-chat-ticket{
    display:grid;
    gap:9px;
    margin-top:12px;
    padding:12px;
    border:1px solid #dce4df;
    border-radius:12px;
    background:#f8fbf9;
}

.idt-chat-ticket input,
.idt-chat-ticket textarea{
    width:100%;
    border:1px solid #d5e2dc;
    border-radius:8px;
    background:#fff;
    color:#111827;
    padding:11px 12px;
    outline:0;
    font-size:14px;
}

.idt-chat-ticket textarea{
    min-height:76px;
    resize:vertical;
}

.idt-chat-ticket button{
    border:0;
    border-radius:8px;
    padding:12px;
    background:linear-gradient(135deg,var(--idt-primary),var(--idt-primary-dark));
    color:#fff;
    cursor:pointer;
    font-weight:900;
}

@media(max-width:820px){
    .idt-chat-panel{
        width:calc(100vw - 28px);
        height:calc(100vh - 28px);
        right:-14px;
        bottom:-14px;
        border-radius:16px;
    }

    .idt-chat-chip-row{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}

@media(max-width:560px){
    .idt-chat-root{
        right:16px;
        bottom:16px;
    }

    .idt-chat-button{
        width:64px;
        min-height:64px;
        height:64px;
        padding:0;
        display:flex;
        justify-content:center;
        border-radius:50%;
        box-shadow:0 16px 36px rgba(0,75,42,.32);
    }

    .idt-chat-button-icon{
        width:64px;
        height:64px;
        font-size:40px;
    }

    .idt-chat-button-copy,
    .idt-chat-button-chevron{
        display:none;
    }

    .idt-chat-preview{
        right:0;
        bottom:78px;
    }

    .idt-chat-panel{
        width:100vw;
        height:100vh;
        right:-16px;
        bottom:-16px;
        border-radius:0;
    }

    .idt-chat-head{
        min-height:76px;
        padding:18px 18px;
    }

    .idt-chat-logo{
        width:42px;
        height:42px;
        font-size:42px;
    }

    .idt-chat-brand strong{
        font-size:24px;
    }

    .idt-chat-brand small{
        font-size:11px;
    }

    .idt-chat-intro{
        grid-template-columns:64px 1fr;
        gap:14px;
        padding:18px 18px 10px;
    }

    .idt-chat-avatar{
        width:64px;
        height:64px;
    }

    .idt-chat-avatar-sm{
        width:40px;
        height:40px;
    }

    .idt-chat-intro h3{
        font-size:22px;
    }

    .idt-chat-intro p,
    .idt-chat-online{
        font-size:14px;
    }

    .idt-chat-body{
        padding:8px 18px 16px;
        gap:16px;
    }

    .idt-chat-message-row{
        max-width:92%;
    }

    .idt-chat-msg{
        font-size:14px;
        padding:12px 14px;
    }

    .idt-chat-footer{
        padding:12px 14px 14px;
    }

    .idt-chat-chip-row{
        grid-template-columns:1fr;
    }

    .idt-chat-chip-row button{
        justify-content:flex-start;
    }

    .idt-chat-form{
        min-height:56px;
    }

    .idt-chat-tool{
        display:none;
    }
}
