/* All selectors are scoped under #tg-lc-root so other modules' CSS cannot override the widget. */



#tg-lc-root {
    --tg-lc-color: #0088cc;
    --tg-lc-icon-color: #FFFFFF;
}



#tg-lc-root {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    box-sizing: border-box;
    
    opacity: 0;
    transition: opacity .25s ease;
}

#tg-lc-root.tg-lc-ready { opacity: 1; }

#tg-lc-root[data-position="left"] {
    right: auto;
    left: 24px;
}

#tg-lc-root *,
#tg-lc-root *::before,
#tg-lc-root *::after {
    box-sizing: inherit;
}



#tg-lc-root .tg-lc-hidden { display: none !important; }



#tg-lc-root[data-show-bubble="0"] #tg-lc-bubble { display: none !important; }



#tg-lc-root .tg-lc-tooltip {
    position: absolute;
    bottom: 12px;
    right: 72px;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    
    flex-direction: row-reverse;
    gap: 10px;
    background: #ffffff;
    border-radius: 999px;
    padding: 8px 16px 8px 10px;
    box-shadow: 0 6px 20px rgba(0,0,0,.12);
    font-size: 14px;
    color: #1f2937;
    white-space: nowrap;
    max-width: 280px;
    pointer-events: auto;
    animation: tg-lc-tooltip-in .25s ease-out;
}

#tg-lc-root[data-position="left"] .tg-lc-tooltip {
    right: auto;
    left: 72px;
    
    flex-direction: row;
    padding: 8px 10px 8px 16px;
}

#tg-lc-root .tg-lc-tooltip-text {
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}


#tg-lc-root .tg-lc-tooltip-dots {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    height: 18px;
    vertical-align: middle;
}

#tg-lc-root .tg-lc-tooltip-dots i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #9ca3af;
    display: inline-block;
    animation: tg-lc-tooltip-dot 1.1s ease-in-out infinite;
}

#tg-lc-root .tg-lc-tooltip-dots i:nth-child(2) { animation-delay: .18s; }

#tg-lc-root .tg-lc-tooltip-dots i:nth-child(3) { animation-delay: .36s; }

@keyframes tg-lc-tooltip-dot {
    0%, 70%, 100% { opacity: .35; transform: translateY(0); }
    35%           { opacity: 1;   transform: translateY(-3px); }
}

#tg-lc-root .tg-lc-tooltip-close {
    width: 22px;
    height: 22px;
    border: 0;
    background: #f3f4f6;
    color: #6b7280;
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .12s, color .12s;
}

#tg-lc-root .tg-lc-tooltip-close:hover { background: #e5e7eb; color: #111827; }


#tg-lc-root .tg-lc-tooltip-close svg { width: 10px; height: 10px; display: block; }

#tg-lc-root .tg-lc-tooltip.tg-lc-tooltip-dismissed { display: none !important; }


#tg-lc-root #tg-lc-bubble[aria-expanded="true"] ~ .tg-lc-tooltip { display: none; }

@keyframes tg-lc-tooltip-in {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}



#tg-lc-root #tg-lc-bubble {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--tg-lc-color);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,.28);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .18s ease, box-shadow .18s ease;
    outline: none;
}

#tg-lc-root #tg-lc-bubble:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 24px rgba(0,0,0,.32);
}


#tg-lc-root #tg-lc-bubble:active {
    transform: scale(0.92);
    transition: transform .08s ease;
}


#tg-lc-root #tg-lc-bubble::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--tg-lc-color);
    pointer-events: none;
    opacity: 0;
    transform: scale(1);
    z-index: -1;
}

#tg-lc-root #tg-lc-bubble:active::after {
    animation: tg-lc-bubble-ripple .55s ease-out;
}

@keyframes tg-lc-bubble-ripple {
    0%   { opacity: .55; transform: scale(1);   }
    100% { opacity: 0;   transform: scale(1.8); }
}

#tg-lc-root #tg-lc-bubble svg {
    width: 28px;
    height: 28px;
    fill: var(--tg-lc-icon-color);
    color: var(--tg-lc-icon-color);  
    pointer-events: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(0deg) scale(1);
    transition: opacity .25s ease, transform .3s cubic-bezier(.2, .8, .35, 1);
}

#tg-lc-root .tg-lc-bubble-path--back { fill: var(--tg-lc-icon-color); opacity: 0.4; }

#tg-lc-root .tg-lc-bubble-path--front { fill: var(--tg-lc-icon-color); }


#tg-lc-root #tg-lc-bubble svg[fill="none"],
#tg-lc-root #tg-lc-bubble svg[fill="none"] * { fill: none; }

#tg-lc-root #tg-lc-bubble svg[fill="none"] { stroke: var(--tg-lc-icon-color); }

#tg-lc-root .tg-lc-bubble-icon--close { width: 22px !important; height: 22px !important; }


#tg-lc-root .tg-lc-bubble-icon--img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(0deg) scale(1);
    transition: opacity .25s ease, transform .3s cubic-bezier(.2, .8, .35, 1);
    pointer-events: none;
}



#tg-lc-root .tg-lc-bubble-icon--plane { opacity: 1; }

#tg-lc-root .tg-lc-bubble-icon--close {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(-90deg) scale(.6);
}


#tg-lc-root #tg-lc-bubble[aria-expanded="true"] .tg-lc-bubble-icon--plane {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(90deg) scale(.6);
}

#tg-lc-root #tg-lc-bubble[aria-expanded="true"] .tg-lc-bubble-icon--close {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0deg) scale(1);
}


#tg-lc-root.tg-lc-mb-open #tg-lc-bubble .tg-lc-bubble-icon--plane,
#tg-lc-root.tg-lc-mb-open #tg-lc-bubble .tg-lc-bubble-icon--img {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(90deg) scale(.6);
}

#tg-lc-root.tg-lc-mb-open #tg-lc-bubble .tg-lc-bubble-icon--close {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0deg) scale(1);
}



#tg-lc-root .tg-lc-mb-stack {
    position: absolute;
    right: 4px;              
    bottom: 68px;            
    display: flex;
    flex-direction: column-reverse; 
    align-items: center;
    gap: 12px;
    z-index: 2;
}

#tg-lc-root[data-position="left"] .tg-lc-mb-stack { right: auto; left: 4px; }

#tg-lc-root .tg-lc-mb-item {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 4px 14px rgba(0,0,0,.25);
    text-decoration: none;
    
    opacity: 0;
    transform: scale(.4) translateY(12px);
    pointer-events: none;
    transition: opacity .18s ease, transform .18s cubic-bezier(.2,.8,.35,1);
}

#tg-lc-root .tg-lc-mb-item svg { width: 24px; height: 24px; display: block; }

#tg-lc-root .tg-lc-mb-img { width: 26px; height: 26px; object-fit: contain; display: block; pointer-events: none; }

#tg-lc-root .tg-lc-mb-item:hover { filter: brightness(1.08); }

#tg-lc-root.tg-lc-mb-open .tg-lc-mb-item {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: auto;
}


#tg-lc-root.tg-lc-mb-open .tg-lc-mb-item:nth-child(1) { transition-delay: .03s; }

#tg-lc-root.tg-lc-mb-open .tg-lc-mb-item:nth-child(2) { transition-delay: .06s; }

#tg-lc-root.tg-lc-mb-open .tg-lc-mb-item:nth-child(3) { transition-delay: .09s; }

#tg-lc-root.tg-lc-mb-open .tg-lc-mb-item:nth-child(4) { transition-delay: .12s; }

#tg-lc-root.tg-lc-mb-open .tg-lc-mb-item:nth-child(5) { transition-delay: .15s; }

#tg-lc-root.tg-lc-mb-open .tg-lc-mb-item:nth-child(6) { transition-delay: .18s; }

#tg-lc-root.tg-lc-mb-open .tg-lc-mb-item:nth-child(n+7) { transition-delay: .21s; }


#tg-lc-root .tg-lc-mb-tip {
    position: absolute;
    right: 58px;
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    background: #fff;
    color: #1f2937;
    font-size: 13px;
    line-height: 1;
    padding: 7px 11px;
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(0,0,0,.14);
    opacity: 0;
    pointer-events: none;
    transition: opacity .12s ease;
}

#tg-lc-root[data-position="left"] .tg-lc-mb-tip { right: auto; left: 58px; }

#tg-lc-root .tg-lc-mb-item:hover .tg-lc-mb-tip { opacity: 1; }


#tg-lc-root.tg-lc-mb-open .tg-lc-tooltip { display: none; }



#tg-lc-root #tg-lc-unread-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    background: #e74c3c;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    padding: 0 4px;
    
    animation: tg-lc-badge-pulse 1.8s ease-out infinite;
    will-change: transform, box-shadow;
}



#tg-lc-root #tg-lc-unread-badge.tg-lc-badge--bump {
    animation: tg-lc-badge-pulse 1.8s ease-out infinite,
               tg-lc-badge-bump  .55s cubic-bezier(.34, 1.56, .64, 1);
}


@keyframes tg-lc-badge-pulse {
    0%   { box-shadow: 0 0 0 0    rgba(231, 76, 60, .70); }
    70%  { box-shadow: 0 0 0 10px rgba(231, 76, 60, 0);   }
    100% { box-shadow: 0 0 0 0    rgba(231, 76, 60, 0);   }
}


@keyframes tg-lc-badge-bump {
    0%   { transform: scale(1);    }
    40%  { transform: scale(1.40); }
    70%  { transform: scale(0.92); }
    100% { transform: scale(1);    }
}



#tg-lc-root #tg-lc-window {
    position: absolute;
    z-index: 2;
    bottom: 68px;
    right: 0;
    width: 340px;
    height: 490px;
    padding-top: 3px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 40px rgba(0,0,0,.18);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: tg-lc-slideup .2s ease;
    
    transition: width .25s cubic-bezier(.2, .8, .35, 1),
                height .25s cubic-bezier(.2, .8, .35, 1),
                left .25s cubic-bezier(.2, .8, .35, 1),
                top .25s cubic-bezier(.2, .8, .35, 1),
                transform .2s ease,
                box-shadow .2s ease;
}

#tg-lc-root[data-position="left"] #tg-lc-window {
    right: auto;
    left: 0;
}

@keyframes tg-lc-slideup {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}


#tg-lc-root #tg-lc-window.tg-lc-window--closing {
    animation: tg-lc-slidedown .2s ease forwards;
    pointer-events: none;
}

@keyframes tg-lc-slidedown {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(12px); }
}



#tg-lc-root .tg-lc-header {
    
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    
    background: var(--tg-lc-header-bg, #ffffff);
    color: var(--tg-lc-header-text, #111827);
    box-shadow: 2px 2px 4px rgba(0, 0, 0, .06);
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {

    #tg-lc-root .tg-lc-header {
        background: rgba(var(--tg-lc-header-bg-rgb, 255, 255, 255), 0.72);
        backdrop-filter: saturate(180%) blur(20px);
        -webkit-backdrop-filter: saturate(180%) blur(20px);
    }
}

#tg-lc-root .tg-lc-header:active { cursor: grabbing; }

#tg-lc-root .tg-lc-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    pointer-events: none; 
}

#tg-lc-root .tg-lc-header-img {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

#tg-lc-root .tg-lc-title {
    font-weight: 400;
    font-size: 15px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    pointer-events: none; 
}

#tg-lc-root .tg-lc-header-btns {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}


#tg-lc-root #tg-lc-close-btn,
#tg-lc-root #tg-lc-expand-btn,
#tg-lc-root .tg-lc-header-call {
    background: transparent;
    border: none;
    color: inherit; 
    cursor: pointer;
    padding: 0;
    width: 26px;
    height: 26px;
    opacity: .75;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity .15s;
    text-decoration: none;
    
    line-height: 1;
    box-sizing: border-box;
    vertical-align: middle;
}

#tg-lc-root #tg-lc-close-btn:hover,
#tg-lc-root #tg-lc-expand-btn:hover,
#tg-lc-root .tg-lc-header-call:hover { opacity: 1; }

#tg-lc-root #tg-lc-close-btn svg,
#tg-lc-root #tg-lc-expand-btn svg,
#tg-lc-root .tg-lc-header-call svg { width: 16px; height: 16px; display: block; }



#tg-lc-root .tg-lc-window--dragging {
    
    transform: scale(1.01);
    box-shadow: 0 14px 50px rgba(0, 0, 0, .25);
    transition: transform .2s ease, box-shadow .2s ease !important;
    user-select: none;
}

#tg-lc-root .tg-lc-window--dragging * { user-select: none !important; }



#tg-lc-root .tg-lc-window--dragover { position: relative; }

#tg-lc-root .tg-lc-window--dragover::after {
    content: attr(data-drop-text);
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
    background: rgba(255, 255, 255, .92);
    color: var(--tg-lc-color, #0088cc);
    font-size: 15px;
    font-weight: 600;
    border: 2px dashed var(--tg-lc-color, #0088cc);
    border-radius: 14px;
    pointer-events: none;
    animation: tg-lc-dropzone-in .15s ease-out;
}

@keyframes tg-lc-dropzone-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

#tg-lc-root .tg-lc-window--expanded {
    width: 600px !important;
    height: 720px !important;
    
    max-width: calc(100vw - 20px) !important;
    max-height: calc(100vh - 78px) !important;
}



#tg-lc-root #tg-lc-prechat {
    display: flex;
    flex-direction: column;
    gap: 10px;
    
    padding: 72px 16px 20px;
    flex: 1;
    overflow-y: auto;
}

#tg-lc-root .tg-lc-welcome {
    font-size: 13px;
    color: #555;
    margin-bottom: 6px;
    text-align: center;
}



#tg-lc-root .tg-lc-popup-teaser {
    background: var(--tg-lc-operator-bg, #F2F2F2);
    color: var(--tg-lc-operator-text, #000);
    padding: 10px 14px;
    border-radius: 14px;
    border-top-left-radius: 4px;
    font-size: 14px;
    line-height: 1.4;
    margin: 0 0 8px;
    align-self: flex-start;
    max-width: 90%;
    white-space: pre-wrap;
    word-break: break-word;
}



#tg-lc-root .tg-lc-consent {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 4px 4px 0;
    padding: 6px 8px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    line-height: 1.4;
    color: #666;
    font-weight: normal;
}

#tg-lc-root .tg-lc-consent input[type="checkbox"] {
    margin: 2px 0 0;
    flex-shrink: 0;
    cursor: pointer;
}

#tg-lc-root .tg-lc-consent .tg-lc-consent-text a {
    color: var(--tg-lc-color);
    text-decoration: underline;
}


#tg-lc-root .tg-lc-consent.tg-lc-invalid { background: #fef2f2; }


#tg-lc-root #tg-lc-prechat input:not([type="checkbox"]) {
    width: 100%;
    padding: 11px 14px 11px 40px;
    border: none;
    border-radius: 14px;
    font-size: 14px;
    outline: none;
    background-color: #F5F5F5;
    background-repeat: no-repeat;
    background-position: 14px center;
    background-size: 16px 16px;
    color: #1f1f1f;
    transition: background-color .15s;
    font-family: inherit;
    box-sizing: border-box;
}

#tg-lc-root #tg-lc-prechat input:not([type="checkbox"])::placeholder { color: #9ca3af; }



#tg-lc-root #tg-lc-prechat #tg-lc-name {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2'/><circle cx='12' cy='7' r='4'/></svg>");
}

#tg-lc-root #tg-lc-prechat #tg-lc-email {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z'/><polyline points='22,6 12,13 2,6'/></svg>");
}

#tg-lc-root #tg-lc-prechat #tg-lc-phone {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'/></svg>");
}


#tg-lc-root #tg-lc-prechat input:not([type="checkbox"]).tg-lc-invalid {
    background-color: #fef2f2;
}

#tg-lc-root #tg-lc-start-btn {
    
    margin-top: auto;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: var(--tg-lc-color);
    color: #fff;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: opacity .15s;
}

#tg-lc-root #tg-lc-start-btn:hover:not(:disabled) { opacity: .88; }

#tg-lc-root #tg-lc-start-btn:disabled { opacity: .6; cursor: default; }



#tg-lc-root #tg-lc-messages {
    flex: 1;
    overflow-y: auto;
    
    padding: 64px 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    scroll-behavior: smooth;
    background-color: #fff;
    
    overscroll-behavior: contain;
    overscroll-behavior-y: contain;
    
    scrollbar-width: thin;                     
    scrollbar-color: transparent transparent;  
    transition: scrollbar-color .2s ease;
}

#tg-lc-root #tg-lc-messages::-webkit-scrollbar { width: 6px; height: 6px; }

#tg-lc-root #tg-lc-messages::-webkit-scrollbar-track { background: transparent; }

#tg-lc-root #tg-lc-messages::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 3px;
    transition: background .2s ease;
}


#tg-lc-root #tg-lc-window:hover #tg-lc-messages { scrollbar-color: rgba(0,0,0,.22) transparent; }

#tg-lc-root #tg-lc-window:hover #tg-lc-messages::-webkit-scrollbar-thumb { background: rgba(0,0,0,.22); }

#tg-lc-root #tg-lc-messages::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,.4); }




#tg-lc-root .tg-lc-skeleton {
    display: flex;
    flex-direction: column;
    padding: 16px;
    gap: 10px;
}

#tg-lc-root .tg-lc-skel-row {
    display: flex;
    max-width: 75%;
}

#tg-lc-root .tg-lc-skel-row--visitor { align-self: flex-end;   justify-content: flex-end;   }

#tg-lc-root .tg-lc-skel-row--operator { align-self: flex-start; justify-content: flex-start; }

#tg-lc-root .tg-lc-skel-bubble {
    height: 18px;
    border-radius: 12px;
    background: linear-gradient(90deg, #e7e9ec 0%, #f3f4f6 50%, #e7e9ec 100%);
    background-size: 200% 100%;
    animation: tg-lc-skel-shimmer 1.4s linear infinite;
}

#tg-lc-root .tg-lc-skel-bubble--w-short { width: 80px;  }

#tg-lc-root .tg-lc-skel-bubble--w-medium { width: 140px; }

#tg-lc-root .tg-lc-skel-bubble--w-long { width: 200px; }

@keyframes tg-lc-skel-shimmer {
    from { background-position: 200% 0; }
    to   { background-position: -200% 0; }
}

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

    #tg-lc-root .tg-lc-skel-bubble { animation: none; background: #e7e9ec; }
}



#tg-lc-root .tg-lc-msg {
    max-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 2px;
    
    animation: tg-lc-msg-in .22s cubic-bezier(.2, .8, .35, 1) both;
}

#tg-lc-root .tg-lc-msg--visitor { align-self: flex-end;   align-items: flex-end;
    animation-name: tg-lc-msg-in-right;
}

#tg-lc-root .tg-lc-msg--operator { align-self: flex-start; align-items: flex-start;
    animation-name: tg-lc-msg-in-left;
}


@keyframes tg-lc-msg-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes tg-lc-msg-in-left {
    from { opacity: 0; transform: translate(-6px, 6px); }
    to   { opacity: 1; transform: translate(0, 0); }
}

@keyframes tg-lc-msg-in-right {
    from { opacity: 0; transform: translate(6px, 6px); }
    to   { opacity: 1; transform: translate(0, 0); }
}

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

    #tg-lc-root .tg-lc-msg,
#tg-lc-root .tg-lc-msg--visitor,
#tg-lc-root .tg-lc-msg--operator { animation: none; }
}



#tg-lc-root .tg-lc-msg-row {
    display: flex;
    align-items: center;
    gap: 4px;
    max-width: 100%;
}

#tg-lc-root .tg-lc-msg--visitor .tg-lc-msg-row { flex-direction: row-reverse; }



#tg-lc-root .tg-lc-msg-reply {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #aaa;
    cursor: pointer;
    opacity: 0;
    transition: opacity .15s, background .15s, color .15s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

#tg-lc-root .tg-lc-msg:hover .tg-lc-msg-reply { opacity: 1; }

#tg-lc-root .tg-lc-msg-reply:hover {
    background: #f2f2f2;
    color: var(--tg-lc-color);
}

#tg-lc-root .tg-lc-msg-reply svg { width: 13px; height: 13px; pointer-events: none; display: block; }



#tg-lc-root .tg-lc-msg-quote {
    border-left: 3px solid rgba(255,255,255,.55);
    padding: 8px 12px;
    margin-bottom: 8px;
    font-size: 12px;
    line-height: 1.35;
    opacity: .85;
    white-space: pre-wrap;
    word-break: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    
    max-height: calc(1.6em * 3);
}

#tg-lc-root .tg-lc-msg--operator .tg-lc-msg-quote {
    border-left-color: var(--tg-lc-color);
    opacity: .75;
}



#tg-lc-root .tg-lc-msg-meta {
    font-size: 11px;
    line-height: 1.2;
    padding: 3px 0 0 0;
    display: flex;
    align-items: baseline;
    gap: 6px;
}

#tg-lc-root .tg-lc-msg--visitor .tg-lc-msg-meta { justify-content: flex-end; }

#tg-lc-root .tg-lc-msg-name { color: #666; font-weight: 500; }

#tg-lc-root .tg-lc-msg-time { color: #b8b8b8; font-variant-numeric: tabular-nums; }


#tg-lc-root .tg-lc-msg-body {
    padding: 7px 11px;
    border-radius: 14px;
    word-break: break-word;
    white-space: pre-wrap;
    font-size: 14px;
    line-height: 1.42;
}

#tg-lc-root .tg-lc-msg--visitor .tg-lc-msg-body {
    background: var(--tg-lc-visitor-bg, #F9E4CD);
    color: var(--tg-lc-visitor-text, #000);
    border-top-right-radius: 4px;
}

#tg-lc-root .tg-lc-msg--operator .tg-lc-msg-body {
    background: var(--tg-lc-operator-bg, #F2F2F2);
    color: var(--tg-lc-operator-text, #000);
    border-top-left-radius: 4px;
}




#tg-lc-root .tg-lc-msg--group-cont { margin-top: -4px; }



#tg-lc-root .tg-lc-msg--visitor.tg-lc-msg--group-prev .tg-lc-msg-body,
#tg-lc-root .tg-lc-msg--visitor.tg-lc-msg--group-prev .tg-lc-msg-bubble {
    border-bottom-right-radius: 4px;
}

#tg-lc-root .tg-lc-msg--visitor.tg-lc-msg--group-cont .tg-lc-msg-body,
#tg-lc-root .tg-lc-msg--visitor.tg-lc-msg--group-cont .tg-lc-msg-bubble {
    border-top-right-radius: 4px;
}

#tg-lc-root .tg-lc-msg--operator.tg-lc-msg--group-prev .tg-lc-msg-body,
#tg-lc-root .tg-lc-msg--operator.tg-lc-msg--group-prev .tg-lc-msg-bubble {
    border-bottom-left-radius: 4px;
}

#tg-lc-root .tg-lc-msg--operator.tg-lc-msg--group-cont .tg-lc-msg-body,
#tg-lc-root .tg-lc-msg--operator.tg-lc-msg--group-cont .tg-lc-msg-bubble {
    border-top-left-radius: 4px;
}



#tg-lc-root .tg-lc-cards {
    align-self: flex-start;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 6px;
    max-width: 100%;
    width: 100%;
}


#tg-lc-root .tg-lc-cards--in-bubble { margin-top: 8px; }


#tg-lc-root .tg-lc-msg-body { display: block; }


#tg-lc-root .tg-lc-msg-after-cards { display: block; margin-top: 8px; }

#tg-lc-root .tg-lc-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: #fff;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow .15s ease;
}

#tg-lc-root .tg-lc-card:hover {
    box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
    text-decoration: none;
    color: inherit;
}

#tg-lc-root .tg-lc-card-thumb {
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    object-fit: cover;
    border-radius: 8px;
    background: #f3f4f6;
}

#tg-lc-root .tg-lc-card-thumb--empty { background: #f3f4f6; }

#tg-lc-root .tg-lc-card-info {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

#tg-lc-root .tg-lc-card-name {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

#tg-lc-root .tg-lc-card-price {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
}

#tg-lc-root .tg-lc-card-stock {
    font-size: 11.5px;
    line-height: 1;
}

#tg-lc-root .tg-lc-card-stock--in { color: #16a34a; }

#tg-lc-root .tg-lc-card-stock--out { color: #b91c1c; }



#tg-lc-root .tg-lc-typing {
    align-self: flex-start;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    margin-top: 2px;
    background: var(--tg-lc-operator-bg, #F2F2F2);
    color: var(--tg-lc-operator-text, #6b7280);
    border-radius: 14px;
    border-top-left-radius: 4px;
    font-size: 12.5px;
    line-height: 1;
    max-width: 70%;
    animation: tg-lc-typing-in .18s ease-out;
}

#tg-lc-root .tg-lc-typing-name {
    font-weight: 600;
    opacity: .75;
}

#tg-lc-root .tg-lc-typing-text {
    opacity: .65;
    font-style: italic;
}

#tg-lc-root .tg-lc-typing-dots {
    display: inline-flex;
    gap: 3px;
    align-items: center;
}

#tg-lc-root .tg-lc-typing-dots > span {
    width: 5px;
    height: 5px;
    background: currentColor;
    border-radius: 50%;
    opacity: .35;
    animation: tg-lc-typing-pulse 1.2s infinite ease-in-out;
}

#tg-lc-root .tg-lc-typing-dots > span:nth-child(2) { animation-delay: .15s; }

#tg-lc-root .tg-lc-typing-dots > span:nth-child(3) { animation-delay: .30s; }

@keyframes tg-lc-typing-pulse {
    0%, 60%, 100% { opacity: .35; transform: translateY(0); }
    30%           { opacity: 1;   transform: translateY(-2px); }
}

@keyframes tg-lc-typing-in {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}




#tg-lc-root .tg-lc-day-divider {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0 4px;
    align-self: stretch;
}

#tg-lc-root .tg-lc-day-divider::before,
#tg-lc-root .tg-lc-day-divider::after {
    content: '';
    flex: 1;
    height: 1px;
}

#tg-lc-root .tg-lc-day-divider::before { background: linear-gradient(to right, transparent, rgba(0, 0, 0, .1)); }

#tg-lc-root .tg-lc-day-divider::after { background: linear-gradient(to right, rgba(0, 0, 0, .1), transparent); }

#tg-lc-root .tg-lc-day-label {
    color: #999;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: 0 4px;
}




#tg-lc-root .tg-lc-closed-note {
    text-align: center;
    font-size: 12px;
    color: #999;
    padding: 8px;
    border-top: 1px solid #eee;
}



#tg-lc-root #tg-lc-emoji-picker {
    flex-shrink: 0;
    background: #fafafa;
    padding: 8px;
    overflow: hidden;
    
    box-shadow: 0 -2px 4px rgba(0, 0, 0, .06);
    position: relative;
    z-index: 2;
}

#tg-lc-root .tg-lc-emoji-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 2px;
}

#tg-lc-root .tg-lc-emoji {
    background: transparent;
    border: none;
    border-radius: 6px;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 5px 2px;
    text-align: center;
    transition: background .12s;
    display: flex;
    align-items: center;
    justify-content: center;
}

#tg-lc-root .tg-lc-emoji:hover { background: #f2f2f2; }



#tg-lc-root #tg-lc-quote-preview {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-top: 1px solid #eee;
    background: #fafafa;
    flex-shrink: 0;
    font-size: 12px;
    position: relative;
}

#tg-lc-root #tg-lc-quote-preview::before {
    content: '';
    position: absolute;
    left: 12px; top: 8px; bottom: 8px;
    width: 3px;
    border-radius: 2px;
    background: var(--tg-lc-color);
}

#tg-lc-root .tg-lc-quote-content {
    flex: 1;
    min-width: 0;
    line-height: 1.3;
    overflow: hidden;
    padding-left: 10px;
}

#tg-lc-root .tg-lc-quote-author {
    display: block;
    color: var(--tg-lc-color);
    font-weight: 600;
    font-size: 11px;
    line-height: 1.2;
    margin-bottom: 2px;
}

#tg-lc-root .tg-lc-quote-text {
    display: block;
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#tg-lc-root #tg-lc-quote-cancel {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #888;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background .15s, color .15s;
}

#tg-lc-root #tg-lc-quote-cancel:hover { background: #ececec; color: #333; }




#tg-lc-root .tg-lc-powered {
    text-align: center;
    font-size: 11px;
    line-height: 1;
    padding: 6px 8px 7px;
    color: #9ca3af;
    background: #F5F5F5;
    flex-shrink: 0;
    user-select: none;
}

#tg-lc-root .tg-lc-powered a {
    color: inherit;
    text-decoration: none;
    transition: color .15s ease;
}

#tg-lc-root .tg-lc-powered a:hover { color: #4b5563; }


#tg-lc-root #tg-lc-input-area {
    display: block;
    padding: 10px 12px 12px;
    flex-shrink: 0;
    background: #fff;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, .06);
    position: relative;
    z-index: 1;
}



#tg-lc-root .tg-lc-input-box {
    border: none;
    border-radius: 14px;
    padding: 8px 10px 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: #F5F5F5;
}



#tg-lc-root .tg-lc-input-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
}



#tg-lc-root .tg-lc-input-btns {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}



#tg-lc-root .tg-lc-input-btns button {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #888;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, color .15s;
    padding: 0;
}

#tg-lc-root .tg-lc-input-btns button svg { width: 18px; height: 18px; }

#tg-lc-root .tg-lc-input-btns button:hover {
    background: #f0f0f0;
    color: var(--tg-lc-color);
}

#tg-lc-root .tg-lc-input-btns button:disabled { opacity: .4; cursor: default; }



#tg-lc-root #tg-lc-emoji-btn.tg-lc-active {
    background: #f0f0f0;
    color: var(--tg-lc-color);
}


#tg-lc-root #tg-lc-mic-btn.tg-lc-recording {
    background: #fee2e2;
    color: #e74c3c;
    animation: tg-lc-pulse 1s ease infinite;
}

@keyframes tg-lc-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .65; }
}



#tg-lc-root #tg-lc-input {
    width: 100%;
    padding: 4px 4px 0;
    border: none;
    background: transparent;
    font-size: 14px;
    resize: none;
    outline: none;
    max-height: 140px;
    overflow-y: hidden; 
    font-family: inherit;
    line-height: 1.45;
    min-height: 44px;
    box-sizing: border-box;
    color: inherit;
}



#tg-lc-root #tg-lc-send-btn {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: var(--tg-lc-color);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity .15s, transform .12s;
    font-size: 16px;
    
    padding: 0;
    line-height: 0;
}

#tg-lc-root #tg-lc-send-btn:active { transform: scale(.94); }



#tg-lc-root #tg-lc-send-btn:hover:not(:disabled) { opacity: .85; }

#tg-lc-root #tg-lc-send-btn:disabled { opacity: .5; cursor: default; }

#tg-lc-root .tg-lc-send-label {
    line-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}



#tg-lc-root #tg-lc-recording-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-top: 1px solid #eee;
    flex-shrink: 0;
    background: #fff8f8;
}

#tg-lc-root .tg-lc-rec-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #e74c3c;
    flex-shrink: 0;
    animation: tg-lc-blink .8s ease infinite;
}

@keyframes tg-lc-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: .2; }
}

#tg-lc-root #tg-lc-rec-time {
    font-size: 13px;
    font-weight: 600;
    color: #e74c3c;
    min-width: 30px;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

#tg-lc-root .tg-lc-rec-label {
    flex: 1;
    font-size: 12px;
    color: #888;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#tg-lc-root #tg-lc-rec-cancel {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: #f0f0f0;
    color: #555;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .15s;
}

#tg-lc-root #tg-lc-rec-cancel:hover { background: #e0e0e0; }

#tg-lc-root #tg-lc-rec-send {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: var(--tg-lc-color);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: opacity .15s;
}

#tg-lc-root #tg-lc-rec-send:hover { opacity: .85; }



#tg-lc-root .tg-lc-msg-bubble {
    display: flex;
    flex-direction: column;
    border-radius: 14px;
    overflow: hidden;
    max-width: 100%;
}

#tg-lc-root .tg-lc-msg--visitor .tg-lc-msg-bubble {
    background: var(--tg-lc-visitor-bg, #F9E4CD);
    color: var(--tg-lc-visitor-text, #000);
    border-top-right-radius: 4px;
}

#tg-lc-root .tg-lc-msg--operator .tg-lc-msg-bubble {
    background: var(--tg-lc-operator-bg, #F2F2F2);
    color: var(--tg-lc-operator-text, #000);
    border-top-left-radius: 4px;
}


#tg-lc-root .tg-lc-msg-bubble .tg-lc-attach,
#tg-lc-root .tg-lc-attach--in-bubble {
    margin: 0;
    display: block;
}


#tg-lc-root .tg-lc-msg-bubble .tg-lc-attach.tg-lc-attach--in-bubble {
    display: block;
    width: 100%;
    text-align: right;
}


#tg-lc-root .tg-lc-msg-bubble .tg-lc-attach.tg-lc-attach--in-bubble:has(> .tg-lc-attach-img) {
    padding: 10px;
}

#tg-lc-root .tg-lc-msg-bubble .tg-lc-attach-img {
    display: block;
    width: 100%;
    max-width: 100%;
    max-height: 280px;
    object-fit: cover;
}


#tg-lc-root .tg-lc-msg-body--in-bubble,
#tg-lc-root .tg-lc-msg--visitor .tg-lc-msg-bubble .tg-lc-msg-body,
#tg-lc-root .tg-lc-msg--operator .tg-lc-msg-bubble .tg-lc-msg-body {
    background: transparent;
    border-radius: 0;
    padding: 6px 11px 8px;
}

#tg-lc-root .tg-lc-msg--visitor .tg-lc-msg-bubble .tg-lc-msg-body { color: var(--tg-lc-visitor-text, #000); }

#tg-lc-root .tg-lc-msg--operator .tg-lc-msg-bubble .tg-lc-msg-body { color: var(--tg-lc-operator-text, #000); }



#tg-lc-root .tg-lc-msg-bubble .tg-lc-audio {
    background: transparent;
    border-radius: 0;
    margin: 0;
    padding: 6px 11px;
    
    max-width: 100%;
}

#tg-lc-root .tg-lc-msg-bubble .tg-lc-audio-bars {
    min-width: 0;
}

#tg-lc-root .tg-lc-msg-bubble .tg-lc-attach-doc {
    background: transparent;
    border-radius: 0;
    padding: 8px 11px;
    max-width: 100%;
}

#tg-lc-root .tg-lc-msg-bubble .tg-lc-attach-doc:hover { opacity: 1; }


#tg-lc-root .tg-lc-msg-bubble .tg-lc-attach-name {
    max-width: none;
}



#tg-lc-root .tg-lc-msg-bubble > .tg-lc-msg-quote {
    margin: 8px 11px 0;
}



#tg-lc-root .tg-lc-attach {
    display: block;
    margin-top: 4px;
}

#tg-lc-root .tg-lc-attach-img {
    display: block;
    max-width: 220px;
    max-height: 220px;
    border-radius: 8px;
    cursor: zoom-in;
}


#tg-lc-root .tg-lc-attach-doc {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 11px;
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
    max-width: 100%;
    transition: opacity .15s;
}

#tg-lc-root .tg-lc-msg--visitor .tg-lc-attach-doc {
    background: var(--tg-lc-visitor-bg, #F9E4CD);
    color: var(--tg-lc-visitor-text, #000);
    border-top-right-radius: 4px;
}

#tg-lc-root .tg-lc-msg--operator .tg-lc-attach-doc {
    background: var(--tg-lc-operator-bg, #F2F2F2);
    color: var(--tg-lc-operator-text, #000);
    border-top-left-radius: 4px;
}

#tg-lc-root .tg-lc-attach-doc:hover { opacity: .92; }

#tg-lc-root .tg-lc-attach-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.25;
}

#tg-lc-root .tg-lc-attach-name {
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
}

#tg-lc-root .tg-lc-attach-size { font-size: 11px; opacity: .7; }

#tg-lc-root .tg-lc-attach--pending { opacity: .6; position: relative; }

#tg-lc-root .tg-lc-attach-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 6px;
    border: 2px solid rgba(0,0,0,.2);
    border-top-color: var(--tg-lc-color);
    border-radius: 50%;
    animation: tg-lc-spin .7s linear infinite;
    vertical-align: middle;
}



#tg-lc-root .tg-lc-audio {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    
    border-radius: 14px;
    background: var(--tg-lc-operator-bg);
    color: var(--tg-lc-operator-text, #1f1f1f);
    max-width: 280px;
    margin-top: 2px;
}

#tg-lc-root .tg-lc-msg--operator .tg-lc-audio { border-top-left-radius:  4px; }

#tg-lc-root .tg-lc-msg--visitor  .tg-lc-audio {
    background: var(--tg-lc-visitor-bg);
    color: var(--tg-lc-visitor-text, #1f1f1f);
    border-top-right-radius: 4px;
}

#tg-lc-root .tg-lc-audio audio { display: none; }



#tg-lc-root .tg-lc-audio-play {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--tg-lc-color);
    color: #fff;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: opacity .15s, transform .12s;
}

#tg-lc-root .tg-lc-audio-play:hover { opacity: .85; }

#tg-lc-root .tg-lc-audio-play:active { transform: scale(.94); }

#tg-lc-root .tg-lc-audio-play svg { width: 14px; height: 14px; pointer-events: none; display: block; }

#tg-lc-root .tg-lc-audio-bars {
    display: flex;
    align-items: center;
    gap: 1.8px;
    flex: 1 1 auto;
    height: 24px;
    min-width: 80px;
    cursor: pointer;
}

#tg-lc-root .tg-lc-audio-bar {
    
    pointer-events: none;
    flex: 0 0 3px;
    border-radius: 2px;
    background: rgba(0, 0, 0, 0.22);
    transition: background .12s ease;
}

#tg-lc-root .tg-lc-audio-bar--played { background: var(--tg-lc-color); }

#tg-lc-root .tg-lc-audio-time {
    flex: 0 0 auto;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    color: inherit;
    opacity: .65;
    min-width: 32px;
    text-align: right;
    
    margin-left: -6px;
}



#tg-lc-root .tg-lc-audio-download {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: inherit;
    opacity: .55;
    transition: opacity .15s;
    text-decoration: none;
}

#tg-lc-root .tg-lc-audio-download:hover { opacity: 1; }

#tg-lc-root .tg-lc-audio-download svg {
    width: 14px;
    height: 14px;
    display: block;
    pointer-events: none;
}



#tg-lc-root .tg-lc-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: tg-lc-spin .7s linear infinite;
    display: block;
}

@keyframes tg-lc-spin {
    to { transform: rotate(360deg); }
}



#tg-lc-root #tg-lc-error {
    background: #fef2f2;
    color: #b91c1c;
    font-size: 12px;
    padding: 6px 12px;
    border-top: 1px solid #fca5a5;
    display: none;
    flex-shrink: 0;
}



@media (max-width: 480px) {

    #tg-lc-root {
        bottom: 16px;
        right: 16px;
    }

    #tg-lc-root[data-position="left"] {
        left: 16px;
    }

    #tg-lc-root #tg-lc-window {
        position: fixed;
        bottom: 0;
        right: 0;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
    }

    #tg-lc-root[data-position="left"] #tg-lc-window {
        left: 0;
    }

    
    #tg-lc-root .tg-lc-header { cursor: default; }

    #tg-lc-root #tg-lc-expand-btn { display: none; }

    #tg-lc-root .tg-lc-window--expanded {
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        max-height: 100% !important;
    }
}



#tg-lc-root #tg-lc-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .85);
    z-index: 1000000; 
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    cursor: zoom-out;
    animation: tg-lc-lb-fade .15s ease;
}

@keyframes tg-lc-lb-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

#tg-lc-root #tg-lc-lb-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    cursor: default;
    user-select: none;
    border-radius: 4px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, .55);
}

#tg-lc-root .tg-lc-lb-close {
    position: absolute;
    top: 14px;
    right: 18px;
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, .12);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
}

#tg-lc-root .tg-lc-lb-close:hover { background: rgba(255, 255, 255, .22); }



#tg-lc-root .tg-lc-msg--visitor .tg-lc-link {
    color: #fff;
    text-decoration: underline;
    word-break: break-all;
}

#tg-lc-root .tg-lc-msg--operator .tg-lc-link {
    color: #0066aa;
    text-decoration: underline;
    word-break: break-all;
}
