/* Sales consultant chat widget */
#sc-widget-root { position: fixed; z-index: 99999; bottom: 20px; left: 20px; font-family: Tahoma, Vazirmatn, sans-serif; direction: rtl; }
#sc-fab {
  width: 56px; height: 56px; border-radius: 50%; border: 0; cursor: pointer;
  background: #0f766e; color: #fff; box-shadow: 0 8px 24px rgba(15,118,110,.35);
  font-size: 22px; line-height: 1;
}
#sc-panel {
  display: none; width: min(360px, calc(100vw - 24px)); height: min(520px, calc(100vh - 100px));
  background: #fff; border: 1px solid #d7e3e1; border-radius: 14px; overflow: hidden;
  box-shadow: 0 18px 50px rgba(0,0,0,.18); flex-direction: column;
  margin-bottom: 12px;
}
#sc-panel.open { display: flex; }
#sc-head {
  background: linear-gradient(135deg, #0f766e, #115e59); color: #fff;
  padding: 12px 14px; display: flex; align-items: center; justify-content: space-between;
}
#sc-head strong { font-size: 14px; }
#sc-head button { background: transparent; border: 0; color: #fff; font-size: 18px; cursor: pointer; }
#sc-messages { flex: 1; overflow-y: auto; padding: 12px; background: #f4f7f6; }
.sc-msg { margin-bottom: 10px; max-width: 90%; clear: both; }
.sc-msg.bot { float: right; }
.sc-msg.user { float: left; }
.sc-bubble {
  display: inline-block; padding: 8px 11px; border-radius: 12px; font-size: 13px; line-height: 1.7;
  white-space: pre-wrap; word-break: break-word;
}
.sc-msg.bot .sc-bubble { background: #fff; border: 1px solid #e2ecea; color: #1f2937; }
.sc-msg.user .sc-bubble { background: #0f766e; color: #fff; }
.sc-products { clear: both; margin: 6px 0 12px; }
.sc-product {
  display: flex; gap: 8px; align-items: center; background: #fff; border: 1px solid #e5eeec;
  border-radius: 10px; padding: 8px; margin-bottom: 6px; text-decoration: none; color: inherit;
}
.sc-product img { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; background: #eee; }
.sc-product .meta { flex: 1; font-size: 12px; }
.sc-product .price { color: #0f766e; font-weight: bold; }
#sc-foot { border-top: 1px solid #e5eeec; padding: 8px; background: #fff; }
#sc-foot .row-input { display: flex; gap: 6px; }
#sc-input {
  flex: 1; border: 1px solid #d5e0de; border-radius: 10px; padding: 8px 10px; font-size: 13px; outline: none;
}
#sc-send, #sc-new {
  border: 0; border-radius: 10px; padding: 8px 12px; cursor: pointer; background: #0f766e; color: #fff; font-size: 12px;
}
#sc-new { background: #64748b; }
#sc-handoff { display: none; padding: 10px; background: #fff7ed; border-top: 1px solid #fed7aa; }
#sc-handoff input, #sc-handoff textarea {
  width: 100%; margin-bottom: 6px; border: 1px solid #fdba74; border-radius: 8px; padding: 7px; font-size: 12px;
}
#sc-handoff button { width: 100%; border: 0; border-radius: 8px; padding: 8px; background: #c2410c; color: #fff; cursor: pointer; }
#sc-status { clear: both; font-size: 11px; color: #64748b; text-align: center; padding: 4px 0 8px; }
@media (max-width: 480px) {
  #sc-widget-root { left: 10px; right: 10px; bottom: 12px; }
  #sc-panel { width: 100%; }
}
