/* V7: comment threads and quoted chat replies — stays inside the current V6 theme */
.app .social-community .kf-thread-reply {
  margin-inline-start: clamp(22px, 5vw, 50px) !important;
  position: relative;
}
.app .social-community .kf-thread-reply::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 13px;
  inset-inline-start: -16px;
  width: 3px;
  border-radius: 4px;
  background: #b7c9ec;
}
.app .social-community .kf-thread-depth-2,
.app .social-community .kf-thread-depth-3 {margin-inline-start: clamp(34px, 8vw, 75px) !important;}
.app .social-community .kf-comment-tools {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 28px;
  margin-top: 6px;
}
.app .social-community .kf-reply-action {
  background: transparent !important;
  border: 0 !important;
  border-radius: 8px !important;
  color: #5144a3 !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  line-height: 1.4;
  padding: 6px 9px !important;
  cursor: pointer;
  width: auto !important;
  box-shadow: none !important;
  min-height: 0 !important;
}
.app .social-community .kf-reply-action:hover,
.app .social-community .kf-reply-action:focus-visible {
  background: #eceafd !important;
  color: #342a87 !important;
}
.app .social-community .kf-reply-quote {
  display: grid;
  gap: 4px;
  max-width: 100%;
  background: #f2f3fe;
  border: 1px solid #c9ceef;
  border-inline-start: 4px solid #7868dd;
  border-radius: 11px;
  padding: 9px 12px;
  margin: 8px 0 10px;
  color: #4c486a;
  direction: rtl;
  text-align: right;
}
.app .social-community .kf-reply-quote strong {
  display: block;
  font-size: 12px !important;
  color: #4539a0;
  margin: 0 !important;
}
.app .social-community .kf-reply-quote span {
  display: block;
  font-size: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
  overflow: hidden;
  white-space: normal;
}
.app .social-community .kf-reply-selected {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  width: 100%;
  grid-column: 1 / -1;
  background: #f1efff;
  border-radius: 12px;
  border-inline-start: 4px solid #6950ce;
  padding: 9px 12px;
  margin: 0 0 10px;
  color: #393055;
}
.app .social-community .kf-reply-selected > span {min-width: 0;display: grid;gap:3px;}
.app .social-community .kf-reply-selected b {font-size: 12px !important;color: #4e3bb9;}
.app .social-community .kf-reply-selected small {
  font-size: 12px !important;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #625e79;
}
.app .social-community .kf-reply-selected > button {
  width: 30px !important;
  height: 30px;
  min-width: 30px;
  min-height: 0 !important;
  font-size: 22px;
  border: 0;
  box-shadow: none !important;
  border-radius: 8px;
  color: #6d638a;
  background: #fff;
  cursor: pointer;
}
.app .social-community .social-message footer {display:flex;align-items:center;gap:9px;}
.app .social-community .social-message .kf-reply-action {font-size: 11px !important;}
.app .social-community .social-comment-form:has(.kf-reply-selected) {flex-wrap:wrap;}
.app .social-community .social-comment-form .kf-reply-selected {flex: 0 0 100%;}
.app .social-community .social-chat-compose .kf-reply-selected {align-self:stretch;}
@media(max-width:620px){
  .app .social-community .kf-thread-reply {margin-inline-start: 20px !important;}
  .app .social-community .kf-thread-depth-2,.app .social-community .kf-thread-depth-3 {margin-inline-start: 26px !important;}
  .app .social-community .kf-thread-reply::before {inset-inline-start:-11px;}
}
/* Ensure quoted sender stays readable inside purple outgoing bubbles. */
.app .social-community .social-message.mine .kf-reply-quote {
  background: #f2f0ff !important;
  border-color: #d2caff !important;
  border-inline-start-color: #6d58d8 !important;
}
.app .social-community .social-message.mine .kf-reply-quote strong,
.app .social-community .social-message.mine .kf-reply-quote span {
  color: #352975 !important;
  opacity: 1 !important;
}
.app .social-community .social-message.mine .kf-reply-action {
  color: #ffffff !important;
  background: rgba(255,255,255,.13) !important;
}
.app .social-community .social-message.mine .kf-reply-action:hover,
.app .social-community .social-message.mine .kf-reply-action:focus-visible {
  background: rgba(255,255,255,.24) !important;
}
