/* Hide legacy UI — keep only live chat (lc-order-popup + lc-panel) */
.zj-support-fab,
#zj-support-fab,
.support-fab,
#zojin-support-fab,
.support:not(.support-float),
.support-links,
#national-net-topbar,
#custom-order-popup,
#zojin-order-popup,
.order-popup,
.site-notice,
.elementor-location-popup,
.elementor-832 {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
body:not(:has(#bm-nav)) {
  padding-bottom: 0 !important;
}
.bottom-nav {
  display: none !important;
}

body:has(#bm-nav) .lc-root{
  bottom: 78px !important;
}

.lc-root{
  position: fixed !important;
  right: 48px !important;
  bottom: 42px !important;
  left: auto !important;
  top: auto !important;
  z-index: 2147483646;
  margin: 0;
  padding: 0;
  width: auto;
  height: auto;
  pointer-events: none;
}
.lc-root > *{
  pointer-events: auto;
}
body.lc-chat-open #bm-nav{
  z-index:2147483640 !important;
}
.lc-root.lc-panel-open{
  z-index:2147483647 !important;
}
.lc-root.lc-mobile-full{
  z-index:2147483647 !important;
  position:fixed !important;
  inset:0 !important;
  right:0 !important;
  bottom:0 !important;
  left:0 !important;
  top:0 !important;
  width:100% !important;
  height:100% !important;
  pointer-events:none;
}
.lc-root.lc-panel-open > .lc-panel{
  position:fixed !important;
  z-index:2147483647 !important;
}
body:has(#bm-nav) .lc-root.lc-panel-open:not(.lc-mobile-full) > .lc-panel{
  bottom:calc(64px + env(safe-area-inset-bottom, 0px) + 10px) !important;
  right:12px !important;
  max-height:min(520px, calc(100dvh - 64px - 96px)) !important;
}
body:not(:has(#bm-nav)) .lc-root.lc-panel-open:not(.lc-mobile-full) > .lc-panel{
  bottom:16px !important;
  right:12px !important;
  max-height:min(520px, calc(100dvh - 32px)) !important;
}


.support-float{display:none!important;}

.lc-fab-stack{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:12px;
  direction:rtl;
  width:54px;
}
.lc-fab-row-chat{
  position:relative;
  display:flex;
  flex-direction:column;
  align-items:center;
  width:54px;
}

.lc-welcome-bubble,
.lc-fab-tip,
.support-label{
  position:absolute;
  right:calc(100% + 14px);
  top:22px;
  transform:translateY(-50%) translateX(16px) scale(.96);
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  z-index:3;
  background:linear-gradient(145deg,#ffffff 0%,#f8fafc 55%,#f1f5f9 100%);
  color:#0f172a;
  padding:10px 14px;
  border-radius:14px;
  font-family:Tahoma,Arial,sans-serif;
  font-size:12px;
  font-weight:600;
  line-height:1.55;
  white-space:nowrap;
  box-shadow:0 14px 38px rgba(15,23,42,.14),0 0 0 1px rgba(148,163,184,.22);
  transition:opacity .55s cubic-bezier(.22,1,.36,1),transform .55s cubic-bezier(.22,1,.36,1),visibility .55s;
}
.lc-welcome-bubble::after,
.lc-fab-tip::after,
.support-label::after{
  content:"";
  position:absolute;
  left:100%;
  top:50%;
  transform:translateY(-50%);
  border:7px solid transparent;
  border-left-color:#f8fafc;
}
.lc-welcome-bubble.lc-welcome-visible,
.lc-fab-tip.lc-fab-tip-visible,
.lc-fab-tip-visible.support-label{
  opacity:1;
  visibility:visible;
  transform:translateY(-50%) translateX(0) scale(1);
}

.lc-fab-chat{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:4px;
  width:54px;
  padding:0;
  border:none;
  background:transparent;
  cursor:pointer;
  position:relative;
  font:inherit;
}
.lc-fab-orbit{
  width:54px;
  height:54px;
  border-radius:50%;
  overflow:hidden;
  flex-shrink:0;
  background:#fff;
  box-shadow:0 8px 22px rgba(15,23,42,.2),0 0 0 2px rgba(255,255,255,.95);
  animation:lcFabBob 3.2s ease-in-out infinite;
}
.lc-fab-icon-admin{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
}
.lc-fab-label{
  display:block;
  width:54px;
  text-align:center;
  font-family:Tahoma,Arial,sans-serif;
  font-size:9px;
  font-weight:700;
  line-height:1.25;
  color:#1e293b;
  letter-spacing:0;
  padding:0;
  margin:0;
  background:transparent;
  box-shadow:none;
  white-space:nowrap;
}

.lc-fab-circle{
  width:54px;
  height:54px;
  border-radius:50%;
  display:grid;
  place-items:center;
  padding:0;
  border:none;
  text-decoration:none;
  overflow:hidden;
  flex-shrink:0;
  box-shadow:0 8px 22px rgba(15,23,42,.2);
  transition:transform .2s ease,box-shadow .2s ease;
  animation:lcFabBob 3.2s ease-in-out infinite;
}
.lc-fab-circle:hover{
  transform:translateY(-2px) scale(1.03);
  box-shadow:0 12px 28px rgba(15,23,42,.26);
}
.lc-fab-wa{animation-delay:.35s;}
.lc-fab-tg{animation-delay:.7s;}
.lc-fab-circle .lc-fab-icon{
  width:100%;
  height:100%;
  display:block;
  object-fit:contain;
  border-radius:50%;
}

@keyframes lcFabBob{
  0%,100%{transform:translateY(0);}
  50%{transform:translateY(-5px);}
}

.lc-launcher-btn{cursor:pointer;}
.lc-badge{
  position:absolute;top:0;right:0;width:12px;height:12px;
  border-radius:50%;background:#ef4444;border:2px solid #fff;
  z-index:4;box-shadow:0 0 8px rgba(239,68,68,.65);
}
#lc-tip{
  opacity:0;visibility:hidden;
}
.lc-panel{
  position: absolute;
  bottom: calc(100% + 12px);
  right: 0;
  left: auto;
  width:min(360px, calc(100vw - 36px)); max-height:min(520px, 70vh);
  background:rgba(14,14,14,.96); border:1px solid rgba(255,215,0,.45);
  border-radius:16px; box-shadow:0 16px 48px rgba(0,0,0,.55);
  display:flex; flex-direction:column; overflow:hidden;
  min-height:0;
  backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px);
  direction:rtl; text-align:right;
}
@media (max-width:400px){
  .lc-panel{
    right: 0;
    left: auto;
    width:min(360px, calc(100vw - 24px));
  }
}
.lc-panel-head{
  padding:12px 14px; font-weight:700; color:#ffd700; font-size:14px;
  border-bottom:1px solid rgba(255,215,0,.2);
  background:rgba(0,0,0,.35);
  display:flex; align-items:center; justify-content:space-between; gap:10px;
}
.lc-close{
  width:28px; height:28px; border-radius:8px; border:1px solid rgba(255,255,255,.2);
  background:#151515; color:#fff; cursor:pointer; font-size:18px; line-height:1;
}
.lc-close:active{ transform:scale(.96); }
.lc-msgs{
  flex:1; overflow-y:auto; padding:12px; min-height:160px; max-height:340px;
  font-size:13px; line-height:1.55;
}
.lc-msg{ margin-bottom:10px; display:flex; }
.lc-msg-visitor{ justify-content:flex-start; }
.lc-msg-admin{ justify-content:flex-end; }
.lc-msg-inner{
  max-width:88%; padding:8px 11px; border-radius:12px;
  word-break:break-word;
}
.lc-msg-time{display:block;margin-top:5px;font-size:11px;opacity:.75}
.lc-msg-visitor .lc-msg-inner{
  background:rgba(255,255,255,.09); color:#eee; border:1px solid rgba(255,255,255,.08);
}
.lc-msg-admin .lc-msg-inner{
  background:rgba(255,215,0,.12); color:#fff; border:1px solid rgba(255,215,0,.35);
}
.lc-msg-inner a{color:#9ad8ff;text-decoration:underline;}
.lc-msg-audio{min-width:min(220px,78vw);}
.lc-audio-title{display:block;font-weight:700;font-size:13px;margin-bottom:6px;color:#ffe58a;}
.lc-audio-play-btn{
  display:block;width:100%;margin:0 0 8px;padding:10px 12px;border-radius:10px;border:1px solid rgba(255,215,0,.45);
  background:rgba(255,215,0,.15);color:#fff;font:inherit;font-size:13px;font-weight:700;cursor:pointer;
}
.lc-audio-play-btn:active{transform:scale(.98);}
.lc-audio-el{width:100%;max-width:100%;min-height:44px;display:block;}
.lc-audio-status{display:block;font-size:11px;opacity:.75;margin:4px 0;}
.lc-audio-label{display:block;margin-top:4px;font-size:11px;opacity:.8;}
.lc-audio-fallback-link{display:inline-block;margin-top:6px;color:#9ad8ff;text-decoration:underline;font-weight:700;}
.lc-msg-audio .lc-msg-time{margin-top:6px;}
.lc-typing{font-size:12px;color:#9ca3af;padding:0 12px 8px}
.lc-panel[hidden]{
  display:none !important;
}
/* موبایل: پنل تمام‌صفحه؛ با visualViewport بالای صفحهٔ کلید قرار می‌گیرد (--lc-vv-* از JS) */
@media (max-width: 768px){
  .lc-root.lc-mobile-full .lc-panel{
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: auto !important;
    top: var(--lc-vv-offset, 0px) !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: var(--lc-vv-h, 100dvh) !important;
    max-height: var(--lc-vv-h, 100dvh) !important;
    border-radius: 0;
    z-index: 2147483647;
  }
  .lc-root.lc-mobile-full .lc-fab-stack,
  .lc-root.lc-mobile-full .support-float{
    display: none;
  }

  .lc-root.lc-mobile-full .lc-input-row{
    flex-shrink:0;
    padding-bottom:max(12px, env(safe-area-inset-bottom, 0px));
  }
  .lc-root.lc-mobile-full .lc-msgs{
    max-height: none;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}
.lc-input-row{
  display:flex; gap:8px; padding:12px; border-top:1px solid rgba(255,255,255,.08);
  align-items:flex-end;
}
.lc-input-row textarea{
  flex:1; resize:none; background:#111; border:1px solid #333; border-radius:12px;
  color:#fff; padding:10px; font-size:16px; min-height:44px; max-height:120px;
  font-family:inherit;
}
.lc-input-row button{
  background:linear-gradient(180deg,#ffe055,#ffd700); color:#000; border:none;
  border-radius:12px; padding:10px 14px; font-weight:700; cursor:pointer; font-size:13px;
}
.lc-input-row button:active{ transform:scale(.97); }
.lc-order-popup[hidden]{display:none !important;}
.lc-order-popup{
  position:fixed;
  inset:0;
  z-index:2147483647;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:16px;
  direction:rtl;
  background:transparent;
  pointer-events:none;
}
.lc-order-popup-bg{
  position:absolute;
  inset:0;
  background:transparent;
  border:0;
  padding:0;
  margin:0;
  cursor:pointer;
  pointer-events:auto;
}
.lc-order-popup-card{
  position:relative;
  pointer-events:auto;
  width:min(560px, 96vw);
  max-height:88vh;
  overflow:auto;
  background:#111;
  border:1px solid rgba(255,215,0,.45);
  border-radius:14px;
  color:#f0f0f0;
  box-shadow:0 20px 50px rgba(0,0,0,.55);
  padding:16px 14px 14px;
}
.lc-order-popup-card h3{
  margin:0 0 10px;
  color:#ffd700;
  font-size:16px;
}
.lc-order-popup-card p{
  margin:0 0 10px;
  line-height:1.7;
  font-size:14px;
}
.lc-order-popup-card ul{
  margin:0 0 12px;
  padding:0 18px 0 0;
}
.lc-order-popup-card li{
  margin:0 0 6px;
  line-height:1.6;
  font-size:14px;
}
.lc-order-popup-actions{
  display:flex;
  gap:8px;
  justify-content:flex-end;
  flex-wrap:wrap;
}
.lc-order-popup-btn{
  border:none;
  border-radius:10px;
  padding:9px 12px;
  cursor:pointer;
  font-size:13px;
  font-family:inherit;
}
.lc-order-popup-btn.primary{
  background:linear-gradient(180deg,#ffe055,#ffd700);
  color:#000;
  font-weight:700;
}
.lc-order-popup-btn.secondary{
  background:#242424;
  color:#fff;
  border:1px solid #3a3a3a;
}
