.site-live-chat {
    --lc-primary: #3e97ff;
    --lc-primary-soft: rgba(62, 151, 255, .12);
    --lc-staff: #e8f3ff;
    --lc-visitor: #fff;
    --lc-bg: #f5f8fa;
    --lc-border: #e1e3ea;
    --lc-muted: #a1a5b7;
    --lc-text: #181c32;
    --tg-out: var(--lc-staff);
    --tg-in: var(--lc-visitor);
    --tg-name: var(--lc-primary);
    --tg-text: var(--lc-text);
    --tg-muted: var(--lc-muted);
    --tg-send: var(--lc-primary);
    --tg-send-hover: #1b84ff;
    --tg-wallpaper: var(--lc-bg);
    --tg-compose: #fff;
    --tg-radius: 16px;
    position: fixed;
    left: 20px;
    right: auto;
    bottom: 20px;
    z-index: 99950;
    font-family: inherit;
    direction: rtl;
    color: var(--tg-text);
}

.site-live-chat *,
.site-live-chat *::before,
.site-live-chat *::after {
    box-sizing: border-box;
}

.site-live-chat-launcher {
    position: relative;
    width: 60px;
    height: 60px;
    border: 0;
    border-radius: 50%;
    background: #6fa430;
    color: #fff;
    box-shadow: 0 1px 6px rgba(0, 0, 0, .2), 0 1px 10px rgba(0, 0, 0, .15);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow: hidden;
    transition: transform .2s ease;
}

.site-live-chat-launcher-pulse {
    display: none;
}

.site-live-chat-launcher:hover {
    transform: scale(1.1);
}

.site-live-chat-launcher svg {
    position: absolute;
    top: 50%;
    left: 50%;
    transition: opacity .16s ease, transform .16s ease;
}

.site-live-chat-launcher-chat {
    width: 40px;
    height: 40px;
    transform: translate(-50%, -50%);
}

.site-live-chat-launcher-close {
    width: 22px;
    height: 22px;
    opacity: 0;
    transform: translate(-50%, -50%) scale(.7);
    pointer-events: none;
}

.site-live-chat.is-open .site-live-chat-launcher-chat {
    opacity: 0;
    transform: translate(-50%, -50%) scale(.7);
    pointer-events: none;
}

.site-live-chat.is-open .site-live-chat-launcher-close {
    opacity: 1;
    transform: translate(-50%, -50%);
    pointer-events: auto;
}

.site-live-chat.is-open .site-live-chat-launcher {
    background: #6fa430;
    color: #fff;
    border-radius: 50%;
}

.site-live-chat-panel {
    position: absolute;
    left: 0;
    right: auto;
    bottom: 74px;
    width: min(392px, calc(100vw - 24px));
    height: min(640px, calc(100vh - 112px));
    background: #fff;
    border: 1px solid var(--lc-border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 18px 50px rgba(24, 28, 50, .16);
    display: none;
    flex-direction: column;
}

.site-live-chat-panel.is-open {
    display: flex;
}

.site-live-chat-header {
    flex: 0 0 auto;
    background: #fff;
    color: var(--lc-text);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 64px;
    border-bottom: 1px solid var(--lc-border);
}

.site-live-chat-avatar {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--lc-primary-soft);
    color: var(--lc-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
    flex: 0 0 auto;
    position: relative;
}

.site-live-chat-online {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #50cd89;
    border: 2px solid #fff;
    bottom: -1px;
    left: -1px;
}

.site-live-chat-header-main {
    min-width: 0;
    flex: 1;
}

.site-live-chat-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.3;
    color: var(--lc-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.site-live-chat-header p {
    margin: 2px 0 0;
    font-size: 12px;
    font-weight: 600;
    color: #50cd89;
    min-height: 16px;
}

.site-live-chat-header-close {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 10px;
    background: var(--lc-bg);
    color: var(--lc-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.site-live-chat-header-close:hover {
    background: #eef3f7;
    color: var(--lc-text);
}

.site-live-chat-identify {
    flex: 1;
    background: var(--lc-bg);
    padding: 28px 22px;
    overflow: auto;
}

.site-live-chat-identify-hint {
    margin: 0 0 18px;
    font-size: 13px;
    line-height: 1.8;
    color: var(--lc-muted);
}

.site-live-chat-identify label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--lc-text);
}

.site-live-chat-identify input {
    width: 100%;
    border: 1px solid var(--lc-border);
    background: #fff;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 14px;
    outline: none;
    color: var(--lc-text);
}

.site-live-chat-identify input:focus {
    border-color: var(--lc-primary);
    box-shadow: 0 0 0 4px var(--lc-primary-soft);
}

.site-live-chat-identify input:disabled {
    background: #eef1f5;
    color: var(--lc-muted);
}

.site-live-chat-identify [data-lc-step] {
    margin-bottom: 14px;
}

.site-live-chat-identify-error {
    margin: 0 0 12px;
    font-size: 12px;
    line-height: 1.7;
    color: #f1416c;
}

.site-live-chat-identify button[data-lc-identify-submit] {
    margin-top: 4px;
    width: 100%;
    background: var(--tg-send);
    color: #fff;
    border: 0;
    border-radius: 12px;
    padding: 11px 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(62, 151, 255, .22);
}

.site-live-chat-identify button[data-lc-identify-submit]:hover {
    background: var(--tg-send-hover);
}

.site-live-chat-identify button[data-lc-identify-submit]:disabled {
    opacity: .65;
    cursor: wait;
}

.site-live-chat-identify-back {
    margin-top: 10px;
    width: 100%;
    background: transparent;
    color: var(--lc-primary);
    border: 0;
    padding: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.site-live-chat-identify-back:hover {
    text-decoration: underline;
}

.site-live-chat-thread {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: var(--lc-bg);
    position: relative;
}

.lc-older-loader {
    position: absolute;
    top: 10px;
    left: 50%;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-left: -18px;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .12);
}

.lc-older-loader[hidden] {
    display: none;
}

.lc-older-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(62, 151, 255, .18);
    border-top-color: var(--lc-primary, #3e97ff);
    border-radius: 50%;
    animation: lc-spin .7s linear infinite;
}

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

.site-live-chat-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 16px 14px 18px;
    background: var(--lc-bg);
    scrollbar-width: thin;
    scrollbar-color: rgba(161, 165, 183, .4) transparent;
}

.site-live-chat-date {
    display: flex;
    justify-content: center;
    margin: 8px 0 14px;
}

.site-live-chat-date span {
    background: #fff;
    color: #7e8299;
    border: 1px solid var(--lc-border);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 999px;
}

.site-live-chat-source {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 4px 8px 12px;
    color: var(--lc-muted);
    font-size: 12px;
    font-weight: 700;
}

.site-live-chat-source::before,
.site-live-chat-source::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--lc-border);
}

.lc-bubble-row {
    display: flex;
    margin: 0 2px 7px;
    position: relative;
}

.lc-stack {
    display: flex;
    flex-direction: column;
    max-width: min(82%, 320px);
    min-width: 0;
}

.lc-bubble-row.is-grouped {
    margin-bottom: 2px;
}

.lc-bubble-row.is-mine {
    justify-content: flex-start;
}

.lc-bubble-row.is-theirs {
    justify-content: flex-end;
}

.lc-bubble {
    max-width: 100%;
    position: relative;
    padding: 8px 12px 7px;
    box-shadow: none;
    line-height: 1.55;
}

.lc-bubble-row.is-mine .lc-bubble {
    background: var(--tg-out);
    border: 1px solid #d7e8ff;
    border-radius: 14px 14px 4px 14px;
}

.lc-bubble-row.is-theirs .lc-bubble {
    background: var(--tg-in);
    border: 1px solid var(--lc-border);
    border-radius: 14px 14px 14px 4px;
}

.lc-bubble-row.is-mine.is-grouped .lc-bubble,
.lc-bubble-row.is-theirs.is-grouped .lc-bubble {
    border-radius: 14px;
}

.lc-bubble-name {
    font-size: 12px;
    font-weight: 800;
    color: var(--tg-name);
    margin: 0 0 2px;
}

.lc-bubble-text {
    font-size: 14px;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--tg-text);
    line-height: 1.65;
}

.lc-bubble-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 2px;
    user-select: none;
}

.lc-bubble-time {
    font-size: 11px;
    color: var(--lc-muted);
    letter-spacing: .2px;
    direction: ltr;
}

.lc-bubble-row.is-mine .lc-bubble-time {
    color: #5ea8ff;
}

.lc-reply-btn {
    border: 0;
    background: transparent;
    color: var(--tg-muted);
    cursor: pointer;
    padding: 0;
    opacity: 0;
    font-size: 12px;
}

.lc-bubble:hover .lc-reply-btn {
    opacity: 1;
}

.lc-reply-preview {
    background: rgba(62, 151, 255, .08);
    border-right: 2px solid var(--lc-primary);
    border-radius: 6px;
    padding: 4px 8px;
    margin: 1px 0 6px;
    font-size: 12px;
    overflow: hidden;
}

.lc-reply-preview b {
    display: block;
    color: var(--tg-name);
    font-size: 12px;
}

.lc-bubble img.lc-photo {
    max-width: 100%;
    border-radius: 10px;
    display: block;
    margin: 0 0 4px;
}

.lc-file {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 700;
    color: #1b84ff;
    text-decoration: none;
}

.lc-voice {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 220px;
    max-width: 280px;
    padding: 2px 0 4px;
    direction: ltr;
}

.lc-voice audio {
    display: none;
}

.lc-voice audio[controls] {
    display: block;
    width: 160px;
    height: 32px;
    margin-top: 6px;
}

.lc-voice-play {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 12px;
    background: var(--lc-primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex: 0 0 auto;
    box-shadow: 0 6px 14px rgba(62, 151, 255, .24);
}

.lc-voice-play svg {
    width: 15px;
    height: 15px;
}

.lc-bubble-row.is-mine .lc-voice-play {
    background: var(--lc-primary);
    box-shadow: 0 6px 14px rgba(62, 151, 255, .24);
}

.lc-voice.is-playing .lc-voice-play {
    box-shadow: 0 0 0 4px var(--lc-primary-soft), 0 6px 14px rgba(62, 151, 255, .24);
}

.lc-bubble-row.is-mine .lc-voice.is-playing .lc-voice-play {
    box-shadow: 0 0 0 4px var(--lc-primary-soft), 0 6px 14px rgba(62, 151, 255, .24);
}

.lc-voice-body {
    min-width: 0;
    flex: 1;
}

.lc-voice-wave {
    position: relative;
    height: 26px;
    cursor: pointer;
    --p: 0%;
}

.lc-voice-wave-base,
.lc-voice-wave-played {
    display: flex;
    align-items: center;
    gap: 2px;
    height: 100%;
}

.lc-voice-wave-played {
    position: absolute;
    inset: 0;
    overflow: hidden;
    clip-path: inset(0 calc(100% - var(--p, 0%)) 0 0);
    pointer-events: none;
}

.lc-voice-wave i {
    display: block;
    width: 3px;
    border-radius: 99px;
    background: rgba(62, 151, 255, .28);
    transform-origin: center;
}

.lc-voice-wave-played i {
    background: var(--lc-primary);
}

.lc-bubble-row.is-mine .lc-voice-wave i {
    background: rgba(62, 151, 255, .28);
}

.lc-bubble-row.is-mine .lc-voice-wave-played i {
    background: #1b84ff;
}

.lc-voice.is-playing .lc-voice-wave-played {
    animation: lc-voice-pulse 1s ease-in-out infinite;
}

.lc-voice.is-playing .lc-voice-wave-played i {
    animation: lc-voice-bar .85s ease-in-out infinite;
    animation-delay: calc(var(--i, 0) * 28ms);
}

.lc-voice-time {
    display: block;
    margin-top: 3px;
    font-size: 11px;
    font-weight: 700;
    color: var(--tg-muted);
    letter-spacing: .02em;
}

.lc-voice-speed {
    min-width: 36px;
    height: 26px;
    border: 0;
    border-radius: 8px;
    background: var(--lc-primary-soft);
    color: var(--lc-primary);
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    flex: 0 0 auto;
}

.lc-voice-speed.is-fast,
.lc-bubble-row.is-mine .lc-voice-speed.is-fast {
    color: #fff;
}

.lc-voice-speed.is-fast {
    background: var(--lc-primary);
}

.lc-bubble-row.is-mine .lc-voice-speed {
    background: rgba(62, 151, 255, .16);
    color: #1b84ff;
}

.lc-bubble-row.is-mine .lc-voice-speed.is-fast {
    background: #1b84ff;
}

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

@keyframes lc-voice-bar {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(.55); }
}

@media (prefers-reduced-motion: reduce) {
    .lc-voice.is-playing .lc-voice-wave-played,
    .lc-voice.is-playing .lc-voice-wave-played i {
        animation: none;
    }
}

.site-live-chat-compose {
    background: var(--tg-compose);
    padding: 10px 12px 12px;
    border-top: 1px solid var(--lc-border);
}

.site-live-chat-typing {
    min-height: 0;
    font-size: 12px;
    font-weight: 700;
    color: var(--lc-primary);
    padding: 0 10px 6px;
}

.site-live-chat-typing:empty {
    display: none;
}

.site-live-chat-replybar {
    display: none;
    align-items: center;
    gap: 8px;
    background: var(--lc-bg);
    border-radius: 10px;
    padding: 7px 10px;
    margin: 0 4px 8px;
    border-right: 3px solid var(--lc-primary);
}

.site-live-chat-replybar.is-on {
    display: flex;
}

.site-live-chat-replybar span {
    flex: 1;
    font-size: 12px;
    color: #555;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.site-live-chat-replybar button {
    border: 0;
    background: transparent;
    color: var(--lc-muted);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.site-live-chat-record {
    display: none;
    align-items: center;
    gap: 8px;
    color: #f1416c;
    font-size: 13px;
    font-weight: 700;
    padding: 0 10px 8px;
}

.site-live-chat-record.is-on {
    display: flex;
}

.site-live-chat-record::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f1416c;
    animation: lc-pulse 1s ease-in-out infinite;
}

@keyframes lc-pulse {
    50% { opacity: .35; }
}

.site-live-chat-emoji {
    display: none;
    flex-wrap: wrap;
    gap: 2px;
    padding: 6px 4px 10px;
    max-height: 160px;
    overflow-y: auto;
}

.site-live-chat-emoji.is-open {
    display: flex;
}

.site-live-chat-emoji button {
    border: 0;
    background: transparent;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    font-size: 20px;
    cursor: pointer;
}

.site-live-chat-emoji button:hover {
    background: var(--lc-bg);
}

.site-live-chat-inputrow {
    display: flex;
    align-items: flex-end;
    gap: 4px;
}

.site-live-chat-iconbtn {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--lc-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.site-live-chat-iconbtn:hover {
    background: var(--lc-bg);
    color: #5e6278;
}

.site-live-chat-iconbtn svg {
    width: 20px;
    height: 20px;
}

.site-live-chat-inputrow textarea {
    flex: 1;
    resize: none;
    min-height: 42px;
    max-height: 120px;
    border: 0;
    background: var(--lc-bg);
    border-radius: 12px;
    padding: 11px 16px;
    font-size: 14px;
    line-height: 1.45;
    outline: none;
    font-family: inherit;
    color: var(--lc-text);
}

.site-live-chat-send {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 12px;
    background: var(--tg-send);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    box-shadow: 0 6px 16px rgba(62, 151, 255, .22);
}

.site-live-chat-send:hover {
    background: var(--tg-send-hover);
}

.site-live-chat-send svg {
    width: 20px;
    height: 20px;
}

.site-live-chat.is-recording .site-live-chat-send {
    background: #f1416c;
    box-shadow: none;
}

.site-live-chat.has-text [data-lc-voice],
.site-live-chat.is-recording [data-lc-voice] {
    display: none;
}

.site-live-chat:not(.has-text):not(.is-recording) .site-live-chat-send {
    display: none;
}

#goftino_w,
iframe[src*="goftino.com"] {
    display: none !important;
}

.lc-reactions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: -6px;
    padding: 0 4px 2px;
    position: relative;
    z-index: 1;
}

.lc-reactions[hidden] {
    display: none !important;
}

.lc-reaction {
    border: 0;
    background: #fff;
    border-radius: 999px;
    min-height: 22px;
    padding: 0 6px;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,.12);
}

.lc-reaction span {
    font-size: 10px;
    font-weight: 800;
    color: #667781;
}

.lc-reaction.is-mine {
    background: #e8f3ff;
}

.lc-msg-menu {
    position: fixed;
    z-index: 100000;
    min-width: 184px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(0,0,0,.18);
    padding: 8px;
    direction: rtl;
}

.lc-msg-menu[hidden] {
    display: none !important;
}

.lc-msg-menu-label {
    font-size: 11px;
    font-weight: 800;
    color: #8d99a3;
    padding: 4px 8px 6px;
}

.lc-msg-menu-emojis {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 0 4px 8px;
}

.lc-msg-menu-emojis button {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 10px;
    background: #f4f4f5;
    font-size: 17px;
    cursor: pointer;
}

.lc-msg-menu-emojis button.is-on,
.lc-msg-menu-emojis button:hover {
    background: #e8f3ff;
}

.lc-msg-menu-item {
    width: 100%;
    border: 0;
    border-top: 1px solid #edf0f2;
    background: transparent;
    text-align: right;
    padding: 10px 8px 6px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

html.lc-widget-open,
html.lc-widget-open body {
    overflow: hidden;
    height: 100%;
    overscroll-behavior: none;
}

@media (max-width: 767.98px) {
    .site-live-chat {
        left: 12px;
        bottom: 75px;
    }

    .site-live-chat.is-open {
        inset: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: var(--lc-vh, 100dvh);
        z-index: 100000;
    }

    .site-live-chat.is-open .site-live-chat-launcher {
        display: none;
    }

    .site-live-chat.is-open .site-live-chat-panel {
        position: fixed;
        inset: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-width: none;
        height: var(--lc-vh, 100dvh);
        max-height: none;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        padding-top: env(safe-area-inset-top, 0px);
        padding-bottom: env(safe-area-inset-bottom, 0px);
        padding-left: env(safe-area-inset-left, 0px);
        padding-right: env(safe-area-inset-right, 0px);
    }

    .site-live-chat.is-open .lc-stack {
        max-width: min(88%, 100%);
    }

    .site-live-chat.is-open .lc-voice {
        min-width: 0;
        max-width: 100%;
    }

    .site-live-chat.is-open .lc-reply-btn {
        opacity: 1;
    }
}
