/* MarketPersian — Support floating widget (پشتیبانی آنلاین و تیکت) */
#stRoot{font-family:inherit}
#stRoot *{box-sizing:border-box}
.st-bubble{position:fixed;bottom:22px;z-index:9995;width:62px;height:62px;border-radius:50%;border:none;cursor:pointer;
  display:flex;align-items:center;justify-content:center;color:#fff;
  background:linear-gradient(135deg,var(--st-c1,#6366f1),var(--st-c2,#22d3ee));
  box-shadow:0 14px 34px rgba(0,0,0,.4),0 4px 12px rgba(99,102,241,.35);
  transition:transform .25s cubic-bezier(.2,.9,.3,1.4)}
.st-bubble:hover{transform:scale(1.08) translateY(-2px)}
.st-bubble svg{width:27px;height:27px}
.st-bubble::after{content:"";position:absolute;inset:-6px;border-radius:50%;border:2px solid rgba(99,102,241,.45);animation:stPulse 2.6s ease-out infinite}
@keyframes stPulse{0%{transform:scale(.85);opacity:.9}70%{transform:scale(1.25);opacity:0}100%{opacity:0}}
.st-bubble .st-tag{position:absolute;inset-inline-end:66px;white-space:nowrap;background:var(--st-panel,#101827);color:#e2e8f0;border:1px solid rgba(148,163,184,.25);
  font-size:12px;font-weight:700;padding:7px 13px;border-radius:999px;opacity:0;pointer-events:none;transition:.25s;box-shadow:0 8px 22px rgba(0,0,0,.35)}
.st-bubble:hover .st-tag{opacity:1;transform:translateX(0)}
#stRoot[dir] .st-pos-right{inset-inline-end:22px}
#stRoot[dir] .st-pos-left{inset-inline-start:22px}

/* ---------- panel ---------- */
.st-panel{position:fixed;bottom:98px;z-index:9996;width:min(392px,calc(100vw - 24px));height:min(588px,76vh);display:flex;flex-direction:column;
  border-radius:26px;padding:1.5px;direction:rtl;
  background:linear-gradient(135deg,rgba(99,102,241,.85),rgba(34,211,238,.55) 45%,rgba(236,72,153,.6));
  box-shadow:0 34px 80px rgba(0,0,0,.55);opacity:0;pointer-events:none;transform:translateY(24px) scale(.97);
  transition:.32s cubic-bezier(.2,.9,.3,1.15)}
.st-panel.open{opacity:1;pointer-events:auto;transform:none}
.st-pos-right + .st-panel,.st-panel.st-right{inset-inline-end:22px}
.st-pos-left + .st-panel,.st-panel.st-left{inset-inline-start:22px}
.st-panel .st-in{flex:1;display:flex;flex-direction:column;min-height:0;border-radius:24.5px;background:linear-gradient(180deg,#0e1424f5,#0a0f1cf5);backdrop-filter:blur(16px);overflow:hidden}

.st-head{display:flex;align-items:center;gap:11px;padding:15px 17px 13px;border-bottom:1px solid rgba(148,163,184,.14);background:linear-gradient(135deg,rgba(99,102,241,.16),transparent 60%)}
.st-ava{width:42px;height:42px;border-radius:14px;flex:none;display:flex;align-items:center;justify-content:center;color:#fff;font-size:19px;
  background:linear-gradient(135deg,var(--st-c1,#6366f1),var(--st-c2,#22d3ee));box-shadow:0 6px 16px rgba(99,102,241,.4)}
.st-ava svg{width:22px;height:22px}
.st-head b{display:block;font-size:14.2px;color:#f8fafc}
.st-head .st-on{display:flex;align-items:center;gap:5px;font-size:11px;color:#4ade80}
.st-head .st-on::before{content:"";width:7px;height:7px;border-radius:50%;background:#22c55e;box-shadow:0 0 0 3px rgba(34,197,94,.2)}
.st-close{margin-inline-start:auto;width:30px;height:30px;border-radius:50%;border:none;background:rgba(148,163,184,.13);color:#94a3b8;font-size:13px;cursor:pointer;transition:.2s;flex:none}
.st-close:hover{background:rgba(148,163,184,.3);color:#e2e8f0}

.st-tabs{display:flex;gap:4px;padding:9px 12px;border-bottom:1px solid rgba(148,163,184,.12)}
.st-tab{flex:1;border:none;background:transparent;color:#8ea0bd;font-family:inherit;font-size:11.6px;font-weight:700;padding:8px 4px;border-radius:11px;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:5px;transition:.2s}
.st-tab svg{width:14px;height:14px}
.st-tab:hover{color:#c7d2fe;background:rgba(99,102,241,.08)}
.st-tab.on{color:#fff;background:linear-gradient(135deg,rgba(99,102,241,.75),rgba(34,211,238,.5))}
.st-pane{display:none;flex:1;min-height:0;flex-direction:column}
.st-pane.on{display:flex}

/* ---------- chat ---------- */
.st-msgs{flex:1;overflow-y:auto;padding:15px 15px 8px;display:flex;flex-direction:column;gap:10px;scrollbar-width:thin;scrollbar-color:rgba(148,163,184,.3) transparent}
.st-msgs::-webkit-scrollbar{width:5px}
.st-msgs::-webkit-scrollbar-thumb{background:rgba(148,163,184,.3);border-radius:99px}
.st-m{max-width:82%;padding:10px 14px;border-radius:16px;font-size:13px;line-height:1.95;color:#e2e8f0;white-space:pre-wrap;word-break:break-word;animation:stIn .25s ease}
@keyframes stIn{from{opacity:0;transform:translateY(8px)}to{opacity:1}}
.st-m.ai{align-self:flex-start;background:rgba(99,102,241,.13);border:1px solid rgba(99,102,241,.22);border-bottom-right-radius:6px}
.st-m.me{align-self:flex-end;background:linear-gradient(135deg,rgba(99,102,241,.85),rgba(34,211,238,.65));border-bottom-left-radius:6px;color:#fff}
.st-m .st-who{display:block;font-size:10.5px;font-weight:700;opacity:.75;margin-bottom:3px}
.st-typing{align-self:flex-start;display:flex;gap:4px;padding:12px 16px;background:rgba(99,102,241,.13);border:1px solid rgba(99,102,241,.22);border-radius:16px;border-bottom-right-radius:6px}
.st-typing i{width:7px;height:7px;border-radius:50%;background:#818cf8;animation:stDot 1.2s infinite}
.st-typing i:nth-child(2){animation-delay:.15s}
.st-typing i:nth-child(3){animation-delay:.3s}
@keyframes stDot{0%,60%,100%{transform:translateY(0);opacity:.5}30%{transform:translateY(-5px);opacity:1}}
.st-quick{display:flex;gap:6px;flex-wrap:wrap;padding:0 15px 10px}
.st-quick button{border:1px solid rgba(99,102,241,.35);background:rgba(99,102,241,.1);color:#c7d2fe;font-family:inherit;font-size:11.3px;font-weight:600;padding:6px 12px;border-radius:999px;cursor:pointer;transition:.2s}
.st-quick button:hover{background:rgba(99,102,241,.25);color:#fff}
.st-inrow{display:flex;gap:8px;padding:11px 13px;border-top:1px solid rgba(148,163,184,.12);background:rgba(10,15,28,.6)}
.st-inrow textarea{flex:1;resize:none;border:1px solid rgba(148,163,184,.22);background:rgba(13,18,31,.9);color:#e2e8f0;border-radius:13px;padding:10px 14px;font-family:inherit;font-size:13px;line-height:1.8;outline:none;max-height:84px;min-height:42px}
.st-inrow textarea:focus{border-color:var(--st-c1,#6366f1)}
.st-send{width:44px;height:44px;flex:none;border:none;border-radius:13px;cursor:pointer;color:#fff;display:flex;align-items:center;justify-content:center;
  background:linear-gradient(135deg,var(--st-c1,#6366f1),var(--st-c2,#22d3ee));box-shadow:0 6px 16px rgba(99,102,241,.35);transition:.2s}
.st-send:hover{transform:translateY(-1px)}
.st-send svg{width:19px;height:19px}
.st-send:disabled{opacity:.5;cursor:default}

/* ---------- forms inside widget ---------- */
.st-body{flex:1;overflow-y:auto;padding:16px 17px;scrollbar-width:thin;scrollbar-color:rgba(148,163,184,.3) transparent}
.st-body::-webkit-scrollbar{width:5px}
.st-body::-webkit-scrollbar-thumb{background:rgba(148,163,184,.3);border-radius:99px}
.st-f{display:flex;flex-direction:column;gap:11px}
.st-f label{font-size:11.5px;font-weight:700;color:#8ea0bd;display:block;margin-bottom:5px}
.st-f label .req{color:#f87171}
.st-f input,.st-f select,.st-f textarea{width:100%;background:rgba(13,18,31,.9);border:1px solid rgba(148,163,184,.22);border-radius:12px;padding:10px 13px;color:#e2e8f0;font-family:inherit;font-size:12.8px;outline:none;transition:.2s}
.st-f input:focus,.st-f select:focus,.st-f textarea:focus{border-color:var(--st-c1,#6366f1)}
.st-f textarea{resize:none;min-height:88px;line-height:1.9}
.st-btn{width:100%;border:none;border-radius:13px;padding:12px;font-family:inherit;font-size:13.5px;font-weight:800;cursor:pointer;color:#fff;
  background:linear-gradient(135deg,var(--st-c1,#6366f1),var(--st-c2,#22d3ee));box-shadow:0 8px 20px rgba(99,102,241,.35);transition:.2s}
.st-btn:hover{transform:translateY(-1px)}
.st-btn:disabled{opacity:.55;cursor:default}
.st-ghost{width:100%;border:1px solid rgba(148,163,184,.3);border-radius:12px;padding:10px;font-family:inherit;font-size:12.5px;font-weight:700;cursor:pointer;color:#cbd5e1;background:transparent;transition:.2s}
.st-ghost:hover{border-color:var(--st-c1,#6366f1);color:#fff}
.st-ok{background:rgba(34,197,94,.1);border:1px solid rgba(34,197,94,.35);border-radius:14px;padding:15px 16px;color:#86efac;font-size:12.8px;line-height:2.1;text-align:center}
.st-ok code{display:inline-block;background:rgba(0,0,0,.3);padding:3px 14px;border-radius:8px;font-size:15px;font-weight:800;direction:ltr;margin-top:4px;color:#fff}
.st-err{background:rgba(248,113,113,.09);border:1px solid rgba(248,113,113,.3);border-radius:12px;padding:10px 14px;color:#fca5a5;font-size:12.3px;line-height:1.9}
.st-note{font-size:10.8px;color:#64748b;line-height:1.9}

/* ---------- track thread ---------- */
.st-thread{display:flex;flex-direction:column;gap:9px;margin:12px 0}
.st-tk-head{background:rgba(99,102,241,.1);border:1px solid rgba(99,102,241,.25);border-radius:13px;padding:11px 14px;font-size:12px;color:#c7d2fe;line-height:2}
.st-tk-head b{color:#fff;font-size:13px}

/* ---------- channels ---------- */
.st-chans{display:flex;flex-direction:column;gap:9px}
.st-chan{display:flex;align-items:center;gap:12px;padding:13px 15px;border-radius:16px;text-decoration:none;
  background:rgba(13,18,31,.85);border:1px solid rgba(148,163,184,.18);transition:.2s}
.st-chan:hover{border-color:var(--st-c1,#6366f1);transform:translateY(-1px)}
.st-chan .st-ic{width:40px;height:40px;border-radius:12px;flex:none;display:flex;align-items:center;justify-content:center;color:#fff}
.st-chan .st-ic svg{width:20px;height:20px}
.st-chan b{display:block;font-size:13px;color:#f1f5f9}
.st-chan span{display:block;font-size:11.5px;color:#8ea0bd;direction:ltr;text-align:right;word-break:break-all}
.st-chan .st-go{margin-inline-start:auto;color:#64748b;flex:none}
.st-welcome{margin:0 0 4px}

@media(max-width:480px){
  .st-panel{bottom:92px;height:min(600px,78vh)}
}
