/* Stuff chat — drawer (header icon) and page (/messages/) */
.stc { --tc: #0e4b47; --tc2: #2c7f78; --line: #e6ebea; --mut: #6b7678; font-family: inherit; color: #1f2b2a; }
.stc * { box-sizing: border-box; }
.stc svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.stc-drawer { position: fixed; inset: 0; z-index: 9990; }
.stc-shade { position: absolute; inset: 0; background: rgba(15, 30, 28, .28); animation: stc-fade .2s ease; }
.stc-drawer .stc-box { position: absolute; top: 0; bottom: 0; left: 0; width: min(420px, 100%); background: #fff; box-shadow: 0 0 40px rgba(0, 0, 0, .18); display: flex; animation: stc-in .25s cubic-bezier(.2, .8, .2, 1); }
.stc-page .stc-box { display: grid; grid-template-columns: 320px 1fr; height: calc(100vh - 120px); min-height: 520px; background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.stc-list, .stc-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.stc-drawer .stc-list, .stc-drawer .stc-main { width: 100%; }
.stc-drawer .stc-main, .stc-drawer.on-thread .stc-list { display: none; }
.stc-drawer.on-thread .stc-main { display: flex; }
.stc-page .stc-list { border-inline-end: 1px solid var(--line); }
.stc-page .stc-back { display: none; }
.stc-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); min-height: 62px; background: #fff; }
.stc-head > b { flex: 1; font-size: 16px; }
.stc-ico { border: 0; background: none; width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: #4b5856; flex: none; }
.stc-ico:hover { background: #f1f5f4; }
.stc-items { flex: 1; overflow: auto; padding: 6px; }
.stc-item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px; border: 0; background: none; border-radius: 14px; cursor: pointer; font: inherit; text-align: right; }
.stc-item:hover, .stc-item.on { background: #f1f7f6; }
.stc-av { flex: none; width: 42px; height: 42px; border-radius: 50%; background: #e7efee; color: var(--tc); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; }
.stc-av.bot { background: linear-gradient(135deg, var(--tc), var(--tc2)); color: #fff; }
.stc-it { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.stc-it b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stc-it small { font-size: 12px; color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stc-it small.live { color: #1b7f4b; font-weight: 700; } .stc-it small.live::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #22a06b; margin-inline-end: 5px; animation: stc-pulse 1.6s infinite; }
.stc-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; } .stc-meta small { font-size: 11px; color: var(--mut); }
.stc-n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: #f26a1b; color: #fff; font-style: normal; font-size: 11px; display: inline-flex; align-items: center; justify-content: center; }
.stc-hint { margin: 10px; padding: 10px 12px; font-size: 12.5px; color: var(--mut); background: #f7f9f9; border-radius: 12px; line-height: 1.9; }
.stc-human { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font: inherit; font-size: 12px; color: var(--tc); cursor: pointer; flex: none; } .stc-human svg { width: 16px; height: 16px; }
.stc-human:hover { border-color: var(--tc); }
.stc-msgs { flex: 1; overflow: auto; padding: 16px 14px; display: flex; flex-direction: column; gap: 8px; background: #f7f9f8; background-image: radial-gradient(#e9efee 1px, transparent 1px); background-size: 18px 18px; }
.stc-m { display: flex; flex-direction: column; max-width: 84%; animation: stc-pop .2s ease; }
.stc-m.me { align-self: flex-start; align-items: flex-start; } .stc-m.them { align-self: flex-end; align-items: flex-end; }
.stc-b { padding: 9px 13px; border-radius: 18px; font-size: 14px; line-height: 1.9; word-break: break-word; }
.stc-m.me .stc-b { background: var(--tc); color: #fff; border-bottom-right-radius: 6px; }
.stc-m.them .stc-b { background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.stc-m.s-staff.them .stc-b { border-color: #bfe0d4; background: #f2fbf7; }
.stc-m.pending { opacity: .65; } .stc-m.failed .stc-b { background: #fde8e1; color: #9a3412; }
.stc-by { font-size: 11px; color: var(--mut); margin: 0 6px 2px; }
.stc-at { font-size: 10.5px; color: #93a09e; margin: 2px 6px 0; display: inline-flex; align-items: center; gap: 2px; }
.stc-seen svg { width: 15px; height: 15px; color: #22a06b; }
.stc-sys { align-self: center; max-width: 90%; font-size: 12px; color: var(--mut); background: #eef3f2; padding: 5px 12px; border-radius: 999px; text-align: center; }
.stc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; justify-content: flex-end; }
.stc-chips button { border: 1px solid #cfe3df; background: #fff; color: var(--tc); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 12.5px; cursor: pointer; transition: background .15s; }
.stc-chips button:hover { background: #eaf4f2; }
.stc-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; justify-content: flex-end; }
.stc-links a { background: var(--tc); color: #fff !important; text-decoration: none; border-radius: 10px; padding: 6px 12px; font-size: 12.5px; font-weight: 700; }
.stc-typing { display: flex; align-items: center; gap: 4px; padding: 6px 14px 8px; background: #f7f9f8; justify-content: flex-end; }
.stc-typing[hidden] { display: none; }
.stc-typing .stc-av { width: 28px; height: 28px; } .stc-typing .stc-av svg { width: 15px; height: 15px; }
.stc-typing i { width: 7px; height: 7px; border-radius: 50%; background: #9fb3b0; animation: stc-dot 1s infinite; } .stc-typing i:nth-child(3) { animation-delay: .15s; } .stc-typing i:nth-child(4) { animation-delay: .3s; }
.stc-compose { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; border-top: 1px solid var(--line); background: #fff; }
.stc-compose textarea { flex: 1; resize: none; min-height: 44px; max-height: 120px; border: 1px solid var(--line); border-radius: 22px; padding: 10px 16px; font: inherit; font-size: 14px; background: #f7f9f8; outline: 0; }
.stc-compose textarea:focus { border-color: var(--tc2); background: #fff; }
.stc-send { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--tc); color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.stc-send svg { transform: scaleX(-1); }
.stc-load { margin: auto; }
html.stc-open { overflow: hidden; }
.stc-product-btn { display: inline-flex; align-items: center; gap: 6px; margin: 10px 0; padding: 10px 16px; border: 1px solid #0e4b47; border-radius: 12px; background: #fff; color: #0e4b47; font: inherit; font-weight: 700; cursor: pointer; }
.stc-product-btn:hover { background: #eef5f4; }
@media (max-width: 860px) {
	.stc-drawer .stc-box { width: 100%; }
	.stc-page .stc-box { grid-template-columns: 1fr; height: calc(100vh - 150px); }
	.stc-page .stc-main, .stc-page.on-thread .stc-list { display: none; } .stc-page.on-thread .stc-main { display: flex; } .stc-page .stc-back { display: inline-flex; }
	.stc-m { max-width: 90%; }
}
@keyframes stc-in { from { transform: translateX(-30px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes stc-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes stc-pop { from { transform: translateY(6px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes stc-dot { 0%, 80%, 100% { transform: scale(.6); opacity: .5; } 40% { transform: scale(1); opacity: 1; } }
@keyframes stc-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .stc-m, .stc-drawer .stc-box, .stc-typing i { animation: none; } }
.sp-messages .sp-side, .sp-messages .sp-collapse, .sp-messages .sp-burger { display: none !important; } .sp-messages .sp-main { max-width: 1120px; margin: 0 auto; width: 100%; }
/* attachments */
.stc-attach { cursor: pointer; } .stc-attach input { display: none; }
.stc-img { display: block; max-width: 240px; border-radius: 14px; overflow: hidden; margin-bottom: 4px; border: 1px solid var(--line); background: #fff; }
.stc-img img { display: block; width: 100%; height: auto; max-height: 320px; object-fit: cover; }
.stc-file { display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 14px; background: #fff; border: 1px solid var(--line); color: var(--tc) !important; text-decoration: none; font-size: 13px; margin-bottom: 4px; max-width: 240px; }
.stc-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* staff seat */
.stc-tabs { display: flex; gap: 4px; padding: 8px 8px 0; overflow-x: auto; }
.stc-tabs button { flex: none; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 12.5px; cursor: pointer; color: #4b5856; }
.stc-tabs button.on { background: var(--tc); border-color: var(--tc); color: #fff; }
.stc-av.wait { background: #fff3e6; color: #c2410c; }
.stc-wait { color: #c2410c !important; font-weight: 700; }
.stc-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--line); background: #fbfcfc; }
.stc-bar[hidden] { display: none; }
.stc-bar button, .stc-bar a { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font: inherit; font-size: 12.5px; color: #1f2b2a; cursor: pointer; text-decoration: none; }
.stc-bar button:hover, .stc-bar a:hover { border-color: var(--tc); color: var(--tc); }
.stc-bar svg { width: 15px; height: 15px; }
.stc-state { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: #eef3f2; color: #4b5856; margin-inline-end: auto; }
.stc-state.s-queue { background: #fff3e6; color: #c2410c; } .stc-state.s-staff { background: #e6f6ee; color: #1b7f4b; }
.stc-m.s-note .stc-b { background: #fff8e1 !important; color: #5c4a00 !important; border: 1px dashed #e8c66a; }
.stc-m.s-user.them .stc-b { background: #fff; }
.stc-staff .stc-m.me.s-staff .stc-b { background: var(--tc); }
.stc.noting .stc-compose textarea { background: #fff8e1; border-color: #e8c66a; }
.stc.noting .stc-note-t { background: #fff3c4; color: #8a6d00; }
.stc-staff.stc-page .stc-box { grid-template-columns: 300px 1fr; }
.stc-staff.stc-page.card-on .stc-box { grid-template-columns: 300px 1fr 280px; }
.stc-card { border-inline-start: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; background: #fff; }
.stc-card[hidden] { display: none; }
.stc-card-b { overflow: auto; padding: 12px 14px; font-size: 13px; }
.stc-who { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 0 14px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.stc-who .stc-av { width: 56px; height: 56px; font-size: 20px; } .stc-who small { color: var(--mut); } .stc-who small.ok { color: #1b7f4b; font-weight: 700; }
.stc-card dl { margin: 0; display: flex; flex-direction: column; gap: 8px; } .stc-card dl div { display: flex; justify-content: space-between; gap: 10px; } .stc-card dt { color: var(--mut); flex: none; } .stc-card dd { margin: 0; text-align: left; min-width: 0; overflow-wrap: anywhere; }
.stc-card h4 { margin: 14px 0 6px; font-size: 13px; } .stc-card ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; } .stc-card li { display: flex; justify-content: space-between; gap: 8px; } .stc-card li small { color: var(--mut); }
.stc-card a { color: var(--tc); }
/* bottom sheet (pass on / make a case) */
.stc-sheet { position: absolute; inset: 0; z-index: 5; background: rgba(15, 30, 28, .3); display: flex; align-items: flex-end; justify-content: center; }
.stc-sheet-b { width: min(480px, 100%); background: #fff; border-radius: 20px 20px 0 0; padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 10px; animation: stc-up .2s ease; }
.stc-sheet-b header { display: flex; align-items: center; justify-content: space-between; } .stc-sheet-b header b { font-size: 15px; }
.stc-sheet-b label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: #4b5856; }
.stc-sheet-b select, .stc-sheet-b textarea { border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; font: inherit; background: #fff; }
.stc-sheet-b footer { display: flex; gap: 8px; justify-content: flex-end; }
.stc-btn { height: 42px; padding: 0 18px; border: 0; border-radius: 12px; background: var(--tc); color: #fff; font: inherit; font-weight: 700; cursor: pointer; } .stc-btn.ghost { background: #fff; color: #1f2b2a; border: 1px solid var(--line); }
@keyframes stc-up { from { transform: translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 860px) {
	.stc-staff.stc-page .stc-box, .stc-staff.stc-page.card-on .stc-box { grid-template-columns: 1fr; }
	.stc-card { position: absolute; inset: 0; z-index: 4; }
	.stc-page .stc-box { position: relative; }
	.stc-img { max-width: 70vw; }
}

/* the person's list: «پشتیبانی استاف» set apart from business conversations */
.stc-sec { margin-bottom: 10px; } .stc-sec h5 { margin: 6px 10px 6px; font-size: 11.5px; font-weight: 700; color: #6b7678; }
.stc-item.sup { background: #fff7ed; border: 1px solid #fde3c4; } .stc-item.sup:hover, .stc-item.sup.on { background: #ffefdb; }
.stc-item.sup .stc-av { background: #f97316; color: #fff; }

/* staff: «گفتگوی جدید» */
.stc-new { margin-inline-start: auto; border: 0; border-radius: 10px; background: var(--stf-teal, #0E4B47); color: #fff; font: inherit; font-size: 12.5px; font-weight: 700; padding: 7px 12px; cursor: pointer; }
.stc-people { display: flex; flex-direction: column; gap: 10px; max-height: min(80vh, 620px); }
.stc-people input { height: 46px; border: 1px solid #d9e2e1; border-radius: 12px; padding: 0 14px; font: inherit; font-size: 15px; }
.stc-people h6 { margin: 4px 0 0; font-size: 12px; color: #64748b; }
.stc-pl { overflow-y: auto; min-height: 120px; }
.stc-pl .stc-item { width: 100%; }
.stc-av.on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #16a34a; }
.stc-on { color: #16a34a; font-weight: 700; }.stc-items .stc-load { display: flex; justify-content: center; padding: 40px 0; }

/* the side panel's tabs: messages, then notifications */
.stc-kinds { display: flex; gap: 4px; padding: 8px 8px 0; }
.stc-kinds button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 36px; border: 1px solid var(--line); background: #fff; border-radius: 10px; font: inherit; font-size: 13px; cursor: pointer; color: #4b5856; }
.stc-kinds button.on { background: var(--tc); border-color: var(--tc); color: #fff; }
.stc-kinds i { min-width: 17px; height: 17px; padding: 0 4px; box-sizing: border-box; border-radius: 9px; background: #f97316; color: #fff; font-style: normal; font-size: 11px; line-height: 17px; text-align: center; }
.stc-list.is-ntf .stc-tabs, .stc-list.is-ntf .stc-items { display: none; }
.stc-ntf { flex: 1; min-height: 0; overflow-y: auto; padding: 8px; }
.stc-ntf[hidden] { display: none; }
.stc-ntf-r { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: 12px; color: inherit; text-decoration: none; font-size: 13px; }
a.stc-ntf-r:hover { background: #f4f7f6; } .stc-ntf-r.is-new { background: #fff4e8; }
.stc-ntf-r small { color: var(--mut); font-size: 12px; line-height: 1.7; } .stc-ntf-r em { color: var(--mut); font-style: normal; font-size: 11px; }
.stc-drawer .stc-card { position: absolute; inset: 0; z-index: 4; }

.stc-b a { color: inherit; text-decoration: underline; overflow-wrap: anywhere; }
