/* مشاورهٔ آنلاین — مشتری. موبایل: تمام‌صفحه مثل اپ؛ دسکتاپ: پنجرهٔ کنار صفحه (روی هر صفحه) یا کارت وسط (/consult/). */
.scc{--scc-bg:#FAF8F5;--scc-pr:#0F5C5A;--scc-ac:#E8916E;--scc-line:#e7e2da;--scc-ink:#1f2b2a;--scc-mute:#6b7472;
	display:flex;flex-direction:column;background:var(--scc-bg);color:var(--scc-ink);direction:rtl;font-size:15px;line-height:1.8;font-family:inherit;
	border:1px solid var(--scc-line);border-radius:18px;overflow:hidden;box-shadow:0 10px 40px rgba(15,92,90,.14);text-align:right}
.scc *{box-sizing:border-box}
.scc--page{max-width:760px;margin:24px auto;height:min(78vh,780px)}
.scc-ov[hidden]{display:none}
.scc-ov .scc{position:fixed;z-index:100000;left:24px;bottom:24px;width:400px;height:min(660px,calc(100vh - 48px))}
html.scc-lock{overflow:hidden}

/* header with the brand mark: smile logo, a chat bubble that "types", a ring that breathes when online */
.scc__bar{display:flex;align-items:center;gap:10px;padding:10px 12px;background:var(--scc-pr);color:#fff;flex:none}
.scc__back,.scc__close{display:inline-grid;place-items:center;color:#fff;background:rgba(255,255,255,.12);border:0;width:38px;height:38px;border-radius:12px;cursor:pointer;padding:0;flex:none}
.scc__back:hover,.scc__close:hover{background:rgba(255,255,255,.22);color:#fff}
.scc__back{display:none}
.scc__logo{position:relative;width:46px;height:46px;flex:none}
.scc__logo img{width:46px;height:46px;border-radius:50%;background:#fff;display:block;border:2px solid #fff;object-fit:cover}
.scc__logo::before{content:"";position:absolute;inset:-4px;border-radius:50%;border:2px solid rgba(255,255,255,.25)}
.scc.is-online .scc__logo::before{border-color:#7fe0b3;animation:scc-breathe 2.4s ease-in-out infinite}
.scc__typing{position:absolute;bottom:-4px;left:-8px;display:flex;gap:2px;align-items:center;background:var(--scc-ac);border:2px solid var(--scc-pr);border-radius:10px 10px 10px 3px;padding:3px 5px}
.scc__typing b{width:4px;height:4px;border-radius:50%;background:#fff;display:block;animation:scc-dot 1.2s infinite}
.scc__typing b:nth-child(2){animation-delay:.15s}.scc__typing b:nth-child(3){animation-delay:.3s}
@keyframes scc-dot{0%,60%,100%{transform:translateY(0);opacity:.6}30%{transform:translateY(-2px);opacity:1}}
@keyframes scc-breathe{0%,100%{transform:scale(1);opacity:1}50%{transform:scale(1.08);opacity:.55}}
@media (prefers-reduced-motion:reduce){.scc__typing b,.scc.is-online .scc__logo::before{animation:none}}
.scc__who{display:flex;flex-direction:column;min-width:0;flex:1;line-height:1.5}
.scc__title{font-size:15.5px;font-weight:700;color:#fff}
.scc__status{font-size:12px;color:#d5e7e5}
.scc.is-online .scc__status{color:#a9f0cf}

.scc__log{flex:1;overflow-y:auto;padding:14px 12px 8px;display:flex;flex-direction:column;gap:6px;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.scc__msg{display:flex;flex-direction:column;max-width:84%;align-self:flex-start}
.scc__msg--me{align-self:flex-end;align-items:flex-end}
.scc__name{font-size:12px;color:var(--scc-pr);margin:4px 8px 0;font-weight:600}
.scc__bubble{background:#fff;border:1px solid var(--scc-line);border-radius:16px 16px 16px 4px;padding:8px 12px 4px;overflow-wrap:anywhere}
.scc__msg--me .scc__bubble{background:var(--scc-pr);color:#fff;border-color:var(--scc-pr);border-radius:16px 16px 4px 16px}
.scc__msg--bot .scc__bubble{background:#eef4f3;border-color:#dbe8e6}
.scc__msg--auto .scc__bubble{background:#f4f8f7;border-style:dashed;border-color:#b9d3cf}
.scc__msg--err .scc__bubble{background:#fff4ef;border-color:#f3cdbd;color:#8a3b1c}
.scc__msg--wait .scc__bubble{opacity:.8}
.scc__bubble p{margin:0 0 4px;white-space:pre-wrap}
.scc__bubble a{color:inherit;text-decoration:underline}
.scc__msg--bot .scc__bubble a:not(.scc__chip),.scc__msg--them .scc__bubble a:not(.scc__chip){color:var(--scc-pr)}
.scc__off{color:#7a4b2c}
.scc__meta{display:block;font-size:11px;opacity:.7;text-align:left;margin-top:-2px}
.scc__tick{display:inline-block;direction:ltr;font-size:11px;font-weight:700;letter-spacing:-.32em;margin-inline-start:4px;opacity:.85}
.scc__tick.is-seen{color:#5ec8ff;opacity:1}
.scc__img{display:block;margin:2px -6px 6px;border-radius:12px;overflow:hidden;max-width:260px}
.scc__img img{display:block;width:100%;height:auto;background:#eee;min-height:80px}
.scc__audio{display:block;width:240px;max-width:100%;height:40px;margin:4px 0}
.scc__chips{display:flex;flex-wrap:wrap;gap:8px;margin:6px 0}
.scc__chip{display:inline-flex;align-items:center;min-height:40px;padding:6px 14px;border-radius:999px;border:1px solid var(--scc-pr);background:#fff;color:var(--scc-pr)!important;font:inherit;font-size:14px;cursor:pointer;text-decoration:none!important;line-height:1.4}
.scc__chip:hover{background:#e6f0ef}
.scc__chip--primary,.scc__chip.is-picked{background:var(--scc-pr);color:#fff!important}
.scc__chip--primary:hover,.scc__chip.is-picked:hover{background:#0b4a48}
.scc__phone{display:flex;flex-direction:column;gap:8px;min-width:min(280px,70vw)}
.scc__phone input{font:inherit;font-size:16px;padding:10px 12px;border:1px solid var(--scc-line);border-radius:12px;background:#fff;width:100%}
.scc__phone input:focus{outline:2px solid var(--scc-pr);outline-offset:0}
.scc__phone .scc__chip{justify-content:center}
.scc__err{color:#a3401b;font-size:13px;margin:0!important}

.scc__emoji{display:grid;grid-template-columns:repeat(8,1fr);gap:2px;padding:8px;background:#fff;border-top:1px solid var(--scc-line);max-height:168px;overflow-y:auto;flex:none}
.scc__emoji[hidden]{display:none}
.scc__emoji button{font-size:22px;line-height:1;height:40px;border:0;background:transparent;border-radius:10px;cursor:pointer;padding:0}
.scc__emoji button:hover{background:#eef4f3}
.scc__composer{display:flex;align-items:flex-end;gap:4px;padding:8px 8px calc(8px + env(safe-area-inset-bottom));background:#fff;border-top:1px solid var(--scc-line);flex:none}
.scc__composer[hidden]{display:none}
.scc__composer textarea{flex:1;min-width:0;resize:none;font:inherit;font-size:16px;line-height:1.6;padding:9px 14px;border:1px solid var(--scc-line);border-radius:22px;background:var(--scc-bg);max-height:140px;min-height:44px;color:var(--scc-ink)}
.scc__composer textarea:focus{outline:none;border-color:var(--scc-pr);background:#fff}
.scc__icon,.scc__send{flex:none;width:44px;height:44px;border-radius:50%;border:0;display:grid;place-items:center;cursor:pointer;padding:0}
.scc__icon{background:transparent;color:var(--scc-pr)}
.scc__icon:hover,.scc__icon.is-on{background:#e6f0ef}
.scc__send{background:var(--scc-pr);color:#fff}
.scc__rec{flex:1;display:flex;align-items:center;gap:8px;min-height:44px;padding:0 6px;color:#a3401b;font-size:14px;min-width:0}
.scc__rec[hidden]{display:none}
.scc__rec-dot{width:10px;height:10px;border-radius:50%;background:#d9534f;animation:scc-breathe 1s infinite;flex:none}
.scc__rec-time{font-weight:700;min-width:38px}
.scc__rec-hint{color:var(--scc-mute);font-size:12px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.scc.is-rec .scc__composer textarea,.scc.is-rec .scc__attach,.scc.is-rec .scc__composer>.scc__icon:not(.scc__rec-del){display:none}
.scc.is-rec .scc__send{background:#2e9d6a}
.scc.is-busy .scc__send,.scc.is-busy .scc__icon{opacity:.5;pointer-events:none}
.scc[data-state=loading] .scc__composer{opacity:.6;pointer-events:none}

.scc-pill{position:fixed;z-index:99990;left:16px;bottom:calc(84px + env(safe-area-inset-bottom));display:flex;align-items:center;gap:8px;padding:6px 14px 6px 6px;border-radius:999px;border:0;background:var(--scc-pr,#0F5C5A);color:#fff;font:inherit;font-size:14px;box-shadow:0 6px 20px rgba(0,0,0,.18);cursor:pointer;direction:rtl}
.scc-pill[hidden]{display:none}
.scc-pill img{width:32px;height:32px;border-radius:50%;background:#fff}

@media (max-width:1023px){
	body.sc-chat-page{overflow:hidden}
	body.sc-chat-page .sc-bottombar{display:none!important}
	.scc--page,.scc-ov .scc{position:fixed;z-index:100000;left:0;right:0;width:auto;top:var(--scc-top,0);bottom:auto;height:var(--scc-h,100dvh);margin:0;max-width:none;border:0;border-radius:0;box-shadow:none}
	.scc--page .scc__back{display:inline-grid}
	.scc__msg{max-width:88%}
}

/* topic picker: tidy 2-column grid, every option stays active, the picked one gets a check */
.scc__topics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:1fr;gap:8px;margin:8px 0 4px}
.scc__topic{display:flex;align-items:center;gap:8px;min-height:46px;padding:8px 12px;border-radius:14px;border:1px solid #d9e6e4;background:#fff;color:var(--scc-ink);font:inherit;font-size:14px;line-height:1.4;text-align:right;cursor:pointer;transition:background .15s,border-color .15s,box-shadow .15s}
.scc__topic:hover{border-color:var(--scc-pr);background:#f3f8f7}
.scc__topic:focus-visible{outline:2px solid var(--scc-pr);outline-offset:2px}
.scc__topic-dot{flex:none;width:22px;height:22px;border-radius:50%;background:#e6f0ef;position:relative}
.scc__topic--skin .scc__topic-dot{background:#e6f0ef}
.scc__topic--hair .scc__topic-dot{background:#fdeee6}
.scc__topic--other .scc__topic-dot{background:#efece6}
.scc__topic-dot::after{content:"";position:absolute;inset:7px;border-radius:50%;background:var(--scc-pr);opacity:.55}
.scc__topic--hair .scc__topic-dot::after{background:var(--scc-ac)}
.scc__topic--other .scc__topic-dot::after{background:#9a8f7e}
.scc__topic-l{flex:1;min-width:0}
.scc__topic.is-picked{background:var(--scc-pr);border-color:var(--scc-pr);color:#fff;box-shadow:0 4px 12px rgba(15,92,90,.22)}
.scc__topic.is-picked .scc__topic-dot{background:#fff}
.scc__topic.is-picked .scc__topic-dot::after{inset:0;opacity:1;background:transparent;border-radius:0;
	background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%230F5C5A' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-size:16px;background-position:center;background-repeat:no-repeat}
.scc__msg--bot:has(.scc__topics){max-width:100%;align-self:stretch}
@media (max-width:340px){.scc__topics{grid-template-columns:1fr}}

/* install button in the header + numbered steps */
.scc__install{flex:none;border:1px solid rgba(255,255,255,.45);background:rgba(255,255,255,.12);color:#fff;border-radius:999px;padding:5px 12px;font:inherit;font-size:12.5px;cursor:pointer;min-height:34px}
.scc__install[hidden]{display:none}
.scc__install:hover{background:rgba(255,255,255,.22)}
.scc__steps{margin:4px 0 6px;padding-inline-start:20px}
.scc__steps li{margin:3px 0}

/* hold a message: copy / edit / delete */
.scc--page{position:relative}
.scc__bubble{-webkit-touch-callout:none;-webkit-user-select:none;user-select:none;transition:transform .15s,box-shadow .15s}
.scc__bubble.is-held{transform:scale(.98);box-shadow:0 0 0 3px rgba(232,145,110,.45)}
.scc__bubble.is-deleted{background:#f4f2ee!important;border:1px dashed #d6d0c6!important;color:var(--scc-mute)!important}
.scc__deleted{font-style:italic;font-size:13.5px}
.scc__menu{position:absolute;z-index:5;display:flex;align-items:center;gap:2px;padding:4px;background:#1f2b2a;border-radius:14px;box-shadow:0 8px 24px rgba(0,0,0,.25);direction:rtl}
.scc__menu-i{border:0;background:transparent;color:#fff;font:inherit;font-size:14px;padding:8px 14px;border-radius:10px;cursor:pointer;min-height:40px}
.scc__menu-i:hover,.scc__menu-i:focus-visible{background:rgba(255,255,255,.12)}
.scc__menu-i.is-danger{color:#ffb4a1}
.scc__menu-q{color:#fff;font-size:13px;padding:0 8px}
.scc__editbar{display:flex;align-items:center;gap:8px;padding:6px 12px;background:#eef4f3;border-top:1px solid var(--scc-line);flex:none}
.scc__editbar[hidden]{display:none}
.scc__editbar-t{flex:1;min-width:0;display:flex;flex-direction:column;border-inline-start:3px solid var(--scc-pr);padding-inline-start:8px;line-height:1.5}
.scc__editbar-t strong{font-size:12.5px;color:var(--scc-pr)}
.scc__editbar-t span{font-size:13px;color:var(--scc-mute);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.scc__editbar-x{border:0;background:transparent;color:var(--scc-mute);width:34px;height:34px;border-radius:50%;display:grid;place-items:center;cursor:pointer;padding:0}
.scc__toast{position:absolute;left:50%;bottom:84px;transform:translateX(-50%);background:#1f2b2a;color:#fff;font-size:13px;padding:6px 14px;border-radius:999px;z-index:6;pointer-events:none}
.scc__topic-dot--ic{width:30px;height:30px;display:inline-flex;align-items:center;justify-content:center;color:var(--scc-pr)}
.scc__topic-dot--ic::after{display:none}
.scc__topic--hair .scc__topic-dot--ic{color:#b8613d}
.scc__topic--other .scc__topic-dot--ic{color:#7d725f}
.scc__topic.is-picked .scc__topic-dot--ic{background:#fff}

/* v10: theme button hover/focus must not repaint the topic cards (text went white on white) */
.scc .scc__topic:hover,.scc .scc__topic:focus{color:var(--scc-ink);background:#f3f8f7;border-color:var(--scc-pr)}
.scc .scc__topic.is-picked,.scc .scc__topic.is-picked:hover,.scc .scc__topic.is-picked:focus{color:#fff;background:var(--scc-pr);border-color:var(--scc-pr)}
/* v12: ticks next to the time, typing indicator */
.scc__meta{display:flex;align-items:center;justify-content:flex-start;gap:3px;direction:ltr;line-height:1.2;margin-top:2px;white-space:nowrap}
.scc__tick{display:inline-flex;align-items:center;letter-spacing:0;margin:0;font-weight:400}
.scc__tick svg{display:block}
.scc__typing-row .scc__bubble{display:flex;gap:4px;align-items:center;padding:11px 14px}
.scc__typing-row b{width:7px;height:7px;border-radius:50%;background:#9aa6a4;display:block;animation:scc-dot 1.2s infinite}
.scc__typing-row b:nth-child(2){animation-delay:.15s}.scc__typing-row b:nth-child(3){animation-delay:.3s}
@keyframes scc-dot{0%,60%,100%{transform:translateY(0);opacity:.45}30%{transform:translateY(-4px);opacity:1}}
.scc.is-typing .scc__status{color:#ffd9c7}
@media (prefers-reduced-motion:reduce){.scc__typing-row b{animation:none}}
