/* ویجت چت آنلاین - برای تغییر رنگ:  .lc-root { --lc-primary: #0a7c3e; } */
.lc-root {
    --lc-primary: #1e8e3e;
    --lc-primary-2: #157032;
    --lc-bg: #f4f6f8;
    --lc-text: #263238;
    --lc-muted: #78909c;
    position: fixed; bottom: var(--lc-y, 20px); z-index: 99990; direction: rtl; font-family: inherit; font-size: 14px; color: var(--lc-text);
}
.lc-root *, .lc-root *::before, .lc-root *::after { box-sizing: border-box; }
.lc-pos-left { left: var(--lc-x, 20px); }
.lc-pos-right { right: var(--lc-x, 20px); }
.lc-root.lc-wait-online { display: none; }
@media (max-width: 640px) { .lc-root { bottom: var(--lc-my, 20px); } }
.lc-root [hidden] { display: none !important; }

.lc-bubble {
    width: 60px; height: 60px; border-radius: 50%; border: 0; cursor: pointer; color: #fff;
    background: var(--lc-primary); box-shadow: 0 8px 24px rgba(0, 0, 0, .22);
    display: flex; align-items: center; justify-content: center; position: relative; transition: transform .2s;
}
.lc-bubble:hover { transform: scale(1.06); }
.lc-root.lc-online .lc-bubble::after {
    content: ""; position: absolute; bottom: 4px; right: 4px; width: 13px; height: 13px; border-radius: 50%;
    background: #4cd964; border: 2px solid #fff;
}
.lc-badge {
    position: absolute; top: -4px; left: -4px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px;
    background: #e53935; color: #fff; font-size: 12px; line-height: 22px; font-weight: 700; text-align: center;
    animation: lc-pop .3s;
}
@keyframes lc-pop { from { transform: scale(0); } to { transform: scale(1); } }

.lc-panel {
    position: absolute; bottom: 74px; width: 370px; height: 560px; max-height: calc(100vh - 110px);
    background: #fff; border-radius: 16px; box-shadow: 0 16px 48px rgba(0, 0, 0, .2);
    display: flex; flex-direction: column; overflow: hidden; animation: lc-up .2s ease-out;
}
.lc-pos-left .lc-panel { left: 0; }
.lc-pos-right .lc-panel { right: 0; }
@keyframes lc-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (max-width: 640px) {
    .lc-root.lc-is-open { left: 0 !important; right: 0 !important; bottom: 0 !important; top: 0; }
    .lc-is-open .lc-bubble { display: none; }
    .lc-panel { position: fixed; inset: 0; width: 100%; height: 100%; max-height: none; border-radius: 0; bottom: 0; }
}

.lc-head { background: var(--lc-primary); color: #fff; padding: 14px 16px; display: flex; align-items: center; gap: 10px; }
.lc-head-text { flex: 1; min-width: 0; }
.lc-title { display: block; font-size: 15px; }
.lc-sub { display: block; opacity: .85; font-size: 12px; margin-top: 2px; }
.lc-x { background: rgba(255, 255, 255, .18); border: 0; color: #fff; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 14px; }

.lc-body { flex: 1; overflow: hidden; display: flex; flex-direction: column; background: var(--lc-bg); position: relative; }
.lc-center { margin: auto; text-align: center; color: var(--lc-muted); padding: 20px; }
.lc-spin { width: 30px; height: 30px; border: 3px solid #dde3e7; border-top-color: var(--lc-primary); border-radius: 50%; animation: lc-rot .8s linear infinite; margin: auto; }
@keyframes lc-rot { to { transform: rotate(360deg); } }

/* شروع */
.lc-start { overflow-y: auto; padding: 16px; }
.lc-welcome { font-size: 15px; font-weight: 600; margin-bottom: 10px; }
.lc-offline { background: #fff8e1; color: #8d6e00; border-radius: 10px; padding: 10px 12px; font-size: 13px; margin-bottom: 12px; }
.lc-l { display: block; font-size: 12px; color: var(--lc-muted); margin: 10px 0 4px; }
.lc-field { width: 100%; border: 1px solid #d5dbe0; border-radius: 10px; padding: 9px 12px; font: inherit; background: #fff; outline: none; resize: none; }
.lc-field:focus { border-color: var(--lc-primary); }
.lc-deps { display: flex; flex-direction: column; gap: 6px; }
.lc-dep { cursor: pointer; margin: 0; }
.lc-dep input { position: absolute; opacity: 0; }
.lc-dep span { display: block; position: relative; background: #fff; border: 1px solid #d5dbe0; border-radius: 10px; padding: 8px 12px 8px 28px; }
.lc-dep small { display: block; color: var(--lc-muted); font-size: 12px; }
.lc-dep input:checked + span { border-color: var(--lc-primary); box-shadow: 0 0 0 2px rgba(30, 142, 62, .15); }
.lc-dot { position: absolute; left: 10px; top: 50%; margin-top: -4px; width: 8px; height: 8px; border-radius: 50%; background: #b0bec5; }
.lc-dot.on { background: #4cd964; }
.lc-err { color: #c62828; font-size: 13px; margin-top: 8px; }
.lc-btn {
    display: block; width: 100%; margin-top: 12px; border: 0; border-radius: 10px; padding: 11px; cursor: pointer;
    background: var(--lc-primary); color: #fff; font: inherit; font-weight: 700;
}
.lc-btn:disabled { opacity: .6; }

/* پیام‌ها */
.lc-msgs { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.lc-msg { max-width: 82%; padding: 7px 11px 4px; border-radius: 14px; word-wrap: break-word; position: relative; line-height: 1.7; }
.lc-mine { align-self: flex-start; background: var(--lc-primary); color: #fff; border-bottom-right-radius: 4px; }
.lc-theirs { align-self: flex-end; background: #fff; border-bottom-left-radius: 4px; box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }
.lc-mine a { color: #fff; }
.lc-name { font-size: 11px; color: var(--lc-primary); font-weight: 700; }
.lc-meta { font-size: 10px; opacity: .7; text-align: left; margin-top: 1px; direction: ltr; }
.lc-tick { margin-left: 4px; }
.lc-tick.seen { color: #b9f6ca; opacity: 1; }
.lc-sys { align-self: center; text-align: center; font-size: 12px; color: var(--lc-muted); }
.lc-sys span { background: rgba(0, 0, 0, .05); padding: 3px 10px; border-radius: 10px; display: inline-block; }
.lc-day { align-self: center; font-size: 11px; color: var(--lc-muted); margin: 6px 0; }
.lc-day span { background: #e3e8eb; padding: 2px 10px; border-radius: 10px; }
.lc-img img { display: block; max-width: 220px; max-height: 260px; border-radius: 10px; margin: 2px 0; }
.lc-voice { display: flex; align-items: center; gap: 6px; }
.lc-voice audio { width: 220px; max-width: 100%; height: 36px; }
.lc-dur { font-size: 11px; opacity: .8; }
.lc-file { display: inline-block; text-decoration: none; }
.lc-typing { padding: 4px 16px 8px; align-self: flex-end; }
.lc-typing span { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #90a4ae; margin: 0 1px; animation: lc-blink 1s infinite; }
.lc-typing span:nth-child(2) { animation-delay: .2s; }
.lc-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes lc-blink { 50% { opacity: .2; } }
.lc-progress { align-self: flex-start; width: 60%; height: 6px; background: #dde3e7; border-radius: 3px; overflow: hidden; }
.lc-progress span { display: block; height: 100%; width: 0; background: var(--lc-primary); transition: width .2s; }

.lc-closed { padding: 14px; text-align: center; background: #fff; border-top: 1px solid #eceff1; }
.lc-closed p { margin: 0 0 6px; }
.lc-rate { display: inline-flex; flex-direction: row-reverse; }
.lc-rate button { background: none; border: 0; font-size: 28px; color: #cfd8dc; cursor: pointer; padding: 0 2px; }
.lc-rate button:hover, .lc-rate button:hover ~ button { color: #ffb300; }

/* ارسال */
.lc-foot { border-top: 1px solid #eceff1; background: #fff; padding: 8px; }
.lc-compose { display: flex; align-items: flex-end; gap: 4px; }
.lc-input { flex: 1; border: 0; resize: none; outline: none; font: inherit; padding: 8px 10px; max-height: 120px; background: var(--lc-bg); border-radius: 18px; line-height: 1.6; }
.lc-ic, .lc-send { flex: 0 0 38px; height: 38px; border: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; background: transparent; color: var(--lc-muted); margin: 0; }
.lc-ic:hover { background: var(--lc-bg); color: var(--lc-primary); }
.lc-send { background: var(--lc-primary); color: #fff; }
.lc-rec { display: flex; align-items: center; gap: 8px; padding: 4px 6px; }
.lc-rec-dot { width: 10px; height: 10px; border-radius: 50%; background: #e53935; animation: lc-blink 1s infinite; }
.lc-rec-time { flex: 1; font-weight: 700; }
.lc-rec button { border: 0; background: var(--lc-bg); border-radius: 16px; padding: 6px 12px; cursor: pointer; font: inherit; }
.lc-rec .lc-rec-send { background: var(--lc-primary); color: #fff; }
.lc-toast { position: absolute; bottom: 70px; left: 12px; right: 12px; background: #323232; color: #fff; padding: 10px 12px; border-radius: 10px; font-size: 13px; z-index: 2; }
