.td-chat {
    position:fixed;
    bottom:20px;
    z-index:9998;
    font-family:inherit;
    color:#f4fbfc;
}

.td-chat--right {
    right:20px;
}

.td-chat--left {
    left:20px;
}

.td-chat__sr {
    position:absolute;
    width:1px;
    height:1px;
    padding:0;
    margin:-1px;
    overflow:hidden;
    clip:rect(0,0,0,0);
    white-space:nowrap;
    border:0;
}

.td-chat__hp {
    position:absolute;
    left:-9999px;
    width:1px;
    height:1px;
    opacity:0;
}

.td-chat__launcher {
    position:relative;
    display:flex;
    align-items:flex-end;
    gap:0;
    padding:0;
    border:0;
    background:transparent;
    cursor:pointer;
    text-align:left;
}

.td-chat.is-open .td-chat__launcher {
    display:none;
}

.td-chat__cta {
    position:relative;
    z-index:2;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:46px;
    padding:0 18px;
    border-radius:8px;
    background:linear-gradient(90deg,#00ffe6,#00bdff);
    color:#061018;
    font-size:14px;
    font-weight:700;
    line-height:1.2;
    box-shadow:0 10px 28px rgba(0,255,230,.28);
}

.td-chat__agent-wrap {
    position:relative;
    z-index:1;
    width:92px;
    height:124px;
    margin-left:-18px;
    pointer-events:none;
}

.td-chat--left .td-chat__agent-wrap {
    order:-1;
    margin-left:0;
    margin-right:-18px;
}

.td-chat__agent {
    position:absolute;
    right:0;
    bottom:0;
    width:92px;
    height:auto;
    max-height:124px;
    object-fit:contain;
    object-position:bottom;
    filter:drop-shadow(0 10px 18px rgba(0,0,0,.45));
    animation:td-chat-pulse 2s cubic-bezier(.4,0,.6,1) infinite;
}

@keyframes td-chat-pulse {
    50% {
        opacity:.5;
    }
}

@media (prefers-reduced-motion:reduce) {
    .td-chat__agent {
        animation:none;
    }
}

.td-chat__panel {
    width:min(340px,calc(100vw - 32px));
    margin-bottom:12px;
    overflow:hidden;
    border:1px solid rgba(0,255,230,.18);
    border-radius:12px;
    background:#0c1c27;
    box-shadow:0 22px 50px rgba(0,0,0,.45);
}

.td-chat__panel[hidden],
.td-chat__error[hidden],
.td-chat__form-error[hidden],
.td-chat__ok[hidden],
.td-chat__wa[hidden] {
    display:none !important;
}

.td-chat__head {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:12px 14px;
    background:#061018;
    border-bottom:1px solid rgba(0,255,230,.14);
}

.td-chat__title {
    margin:0;
    color:#f4fbfc;
    font-size:14px;
    font-weight:700;
    line-height:1.3;
}

.td-chat__minimize {
    display:flex;
    width:28px;
    height:28px;
    align-items:center;
    justify-content:center;
    padding:0;
    border:1px solid rgba(168,189,199,.25);
    border-radius:6px;
    background:transparent;
    color:#a8bdc7;
    cursor:pointer;
}

.td-chat__minimize svg {
    width:14px;
    height:14px;
}

.td-chat__minimize:hover {
    color:#00ffe6;
    border-color:rgba(0,255,230,.45);
}

.td-chat__form {
    display:flex;
    flex-direction:column;
    gap:10px;
    padding:14px;
}

.td-chat__intro {
    margin:0 0 4px;
    color:#a8bdc7;
    font-size:12px;
    line-height:1.45;
}

.td-chat__field {
    display:block;
}

.td-chat__field input,
.td-chat__field textarea {
    width:100%;
    box-sizing:border-box;
    border:1px solid #243746;
    border-radius:8px;
    background:#061018;
    color:#f4fbfc;
    font-family:inherit;
    font-size:14px;
    line-height:1.4;
}

.td-chat__field input {
    height:42px;
    padding:0 12px;
}

.td-chat__field textarea {
    min-height:88px;
    padding:10px 12px;
    resize:vertical;
}

.td-chat__field input:focus,
.td-chat__field textarea:focus {
    outline:none;
    border-color:#00ffe6;
    box-shadow:0 0 0 3px rgba(0,255,230,.12);
}

.td-chat__error,
.td-chat__form-error {
    display:block;
    margin-top:4px;
    color:#ff8a8a;
    font-size:12px;
}

.td-chat__submit {
    display:flex;
    align-items:center;
    justify-content:center;
    height:44px;
    margin-top:4px;
    border:0;
    border-radius:8px;
    background:linear-gradient(90deg,#00ffe6,#00bdff);
    color:#061018;
    font-family:inherit;
    font-size:14px;
    font-weight:700;
    cursor:pointer;
}

.td-chat__submit:hover {
    filter:brightness(1.05);
}

.td-chat__submit:disabled {
    opacity:.65;
    cursor:wait;
}

.td-chat__ok {
    margin:0;
    color:#00ffe6;
    font-size:13px;
    line-height:1.45;
    text-align:center;
}

.td-chat__wa {
    display:flex;
    align-items:center;
    justify-content:center;
    height:40px;
    border:1px solid rgba(0,255,230,.4);
    border-radius:8px;
    color:#00ffe6;
    font-size:13px;
    font-weight:700;
    text-decoration:none;
}

.td-chat__wa:hover {
    background:rgba(0,255,230,.08);
}

@media (max-width:767px) {
    .td-chat {
        bottom:12px;
    }
    .td-chat--right {
        right:12px;
    }
    .td-chat--left {
        left:12px;
    }
    .td-chat__cta {
        min-height:42px;
        padding:0 14px;
        font-size:13px;
    }
    .td-chat__agent-wrap {
        width:72px;
        height:100px;
    }
    .td-chat__agent {
        width:72px;
        max-height:100px;
    }
}
