/* Active conversation floating chat (bos-chat-v2) */

.chat-widget.bos-chat-v2 {
  width: 380px;
  height: 560px;
  bottom: 16px;
}

.chat-widget.bos-chat-v2:not(.fresh) {
  transition: width .18s ease, height .18s ease, opacity .18s ease, transform .18s ease;
}

.chat-widget.bos-chat-v2 .chat-head-label {
  position: absolute;
  top: -8px;
  right: 8px;
  z-index: 12;
}

.chat-widget.bos-chat-v2.minimized {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  overflow: visible;
}

.chat-widget.bos-chat-v2.minimized .chat-widget-head,
.chat-widget.bos-chat-v2.minimized .chat-widget-content,
.chat-widget.bos-chat-v2.minimized .chat-head-label {
  display: none !important;
}

.chat-mini {
  display: none;
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.chat-widget.bos-chat-v2.minimized .chat-mini {
  display: block;
}

.chat-mini-avatar {
  width: 58px;
  height: 58px;
  padding: 3px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 35px rgba(20, 25, 35, .2);
}

.chat-mini-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 15px;
}

.chat-mini-status {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 13px;
  height: 13px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #18a66f;
}

.chat-mini-status.offline {
  background: #b6bbc3;
}

.chat-mini-count {
  position: absolute;
  right: -5px;
  top: -6px;
  min-width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  padding: 0 5px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--chat-primary, #df1118);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}

.chat-widget.bos-chat-v2 .chat-widget-head {
  min-height: 64px;
  padding: 10px 11px;
  cursor: default;
}

.chat-widget.bos-chat-v2 .avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
}

.chat-widget.bos-chat-v2 .avatar img {
  border: 1px solid var(--chat-border, #e7e9ed);
  border-radius: 13px;
}

.chat-widget.bos-chat-v2 .online-status {
  width: 11px;
  height: 11px;
  font-size: 0 !important;
}

.chat-widget.bos-chat-v2 .chat-user-meta .name {
  font-size: 13px;
}

.chat-widget.bos-chat-v2 .chat-subtitle {
  font-size: 11px;
}

.chat-widget.bos-chat-v2 .chat-head-btn {
  width: 32px;
  height: 32px;
  border: 0;
  box-shadow: none;
  outline: none;
  color: #8a919c;
  background: transparent;
}

.chat-widget.bos-chat-v2 .chat-head-btn:hover,
.chat-widget.bos-chat-v2 .chat-head-btn:focus {
  background: #f3f4f6;
  color: #3a404a;
  box-shadow: none;
  outline: none;
}

.chat-widget.bos-chat-v2 .chat-head-btn svg,
.chat-widget.bos-chat-v2 .chat-head-btn .svg-container,
.chat-widget.bos-chat-v2 .chat-head-btn .svg-container svg,
.chat-widget.bos-chat-v2 .chat-head-btn .main-icon,
.chat-widget.bos-chat-v2 .chat-head-btn .main-icon * {
  width: 16px !important;
  height: 16px !important;
  color: inherit !important;
  fill: none !important;
  stroke: currentColor !important;
}

.chat-widget.bos-chat-v2 .chat-head-btn .main-icon path {
  fill: none !important;
  stroke: currentColor !important;
}

.chat-widget.bos-chat-v2 .chat-widget-content {
  position: relative;
}

.chat-search {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 15;
  display: none;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  background: #fff;
  border-bottom: 1px solid #eff1f3;
}

.chat-search.open {
  display: flex;
}

.chat-widget.bos-chat-v2 .search-box {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  height: 36px;
  padding: 0 10px;
  border: 1px solid #e7e9ed;
  border-radius: 10px;
  background: #f6f7f9;
}

.chat-widget.bos-chat-v2 .search-box svg {
  width: 14px;
  height: 14px;
  color: #8e959f;
  flex: 0 0 14px;
}

.chat-widget.bos-chat-v2 .search-box input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 12px;
  color: #181a1f;
}

.search-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex: 0 0 auto;
  padding: 0 2px;
}

.search-nav-btn {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #7c8490;
  cursor: pointer;
  transition: .15s;
}

.search-nav-btn:hover:not(:disabled) {
  background: #f1f2f4;
  color: #2d333c;
}

.search-nav-btn:disabled {
  opacity: .35;
  cursor: default;
}

.search-nav-btn svg {
  width: 12px;
  height: 12px;
}

.search-result-count {
  min-width: 34px;
  text-align: center;
  color: #8b929c;
  font-size: 10px;
  font-weight: 650;
  white-space: nowrap;
}

.search-close {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #777e88;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.search-close:hover {
  background: #f1f2f4;
}

.chat-widget.bos-chat-v2 .chat-conversations {
  padding: 15px 13px 10px;
}

.chat-widget.bos-chat-v2 .chat-conversations ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.chat-widget.bos-chat-v2 .conversation {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  margin: 0 0 11px;
  max-width: 100%;
}

.chat-widget.bos-chat-v2 .conversation.right {
  justify-content: flex-end;
}

.chat-widget.bos-chat-v2 .conversation-user {
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  margin: 0;
  float: none;
  border-radius: 8px;
  overflow: hidden;
}

.chat-widget.bos-chat-v2 .conversation-user img {
  width: 100%;
  height: 100%;
  border-radius: 8px;
}

.chat-widget.bos-chat-v2 .conversation-body {
  float: none;
  max-width: 74%;
  position: relative;
}

.chat-widget.bos-chat-v2 .conversation-body .text {
  float: none;
  display: inline-block;
  padding: 9px 11px;
  border: 1px solid #eceef1;
  border-radius: 5px 13px 13px 13px;
  background: #f5f6f8;
  color: #414750;
  font-size: 13px;
  line-height: 1.55;
}

.chat-widget.bos-chat-v2 .conversation.right .conversation-body .text {
  border-color: transparent;
  border-radius: 13px 5px 13px 13px;
  background: var(--chat-color, var(--chat-primary, #df1118));
  color: #fff;
}

.chat-widget.bos-chat-v2.is-searching .conversation:not(.bos-chat-search-hit) .conversation-body .text {
  opacity: .28;
  filter: grayscale(.15);
}

.chat-widget.bos-chat-v2.is-searching .conversation.bos-chat-search-hit .conversation-body .text {
  opacity: 1;
  box-shadow: 0 0 0 2px rgba(17, 17, 17, .12);
}

.chat-widget.bos-chat-v2.is-searching .conversation.bos-chat-search-active .conversation-body .text,
.chat-widget.bos-chat-v2.is-searching .conversation.right.bos-chat-search-active .conversation-body .text,
.chat-widget.bos-chat-v2.is-searching .conversation.bos-chat-search-active .conversation-body .text.js_chat-color-me {
  background: #111 !important;
  color: #fff !important;
  border-color: #111 !important;
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 4px #111,
    0 10px 28px rgba(0, 0, 0, .22) !important;
  opacity: 1 !important;
  filter: none !important;
}

.chat-widget.bos-chat-v2.is-searching .conversation.bos-chat-search-active .bos-chat-search-mark {
  background: #fff;
  color: #111;
  border-radius: 3px;
  padding: 0 2px;
  font-weight: 700;
}

.bos-chat-search-mark {
  background: rgba(17, 17, 17, .12);
  color: inherit;
  border-radius: 3px;
  padding: 0 2px;
}

/* —— Message reply / react (beside bubble; no layout jump) —— */
.chat-widget .conversation,
.panel-messages .conversation,
.chat-widget .conversation-body,
.panel-messages .conversation-body {
  position: relative;
  overflow: visible;
}

.bos-chat-msg-actions {
  position: absolute;
  top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  clear: none;
  float: none !important;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 6;
  transition: opacity .12s ease, visibility .12s ease;
}

/* Incoming: actions to the right of the bubble */
.conversation:not(.right) .bos-chat-msg-actions {
  left: calc(100% + 6px);
  right: auto;
  justify-content: flex-start;
}

/* Outgoing: actions to the left of the bubble */
.conversation.right .bos-chat-msg-actions {
  right: calc(100% + 6px);
  left: auto;
  justify-content: flex-end;
}

.conversation:hover .bos-chat-msg-actions,
.conversation:focus-within .bos-chat-msg-actions,
.conversation:has(.bos-chat-react-wrap.open) .bos-chat-msg-actions {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.bos-chat-msg-btn {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #eceef2;
  border-radius: 999px;
  background: #fff;
  color: #6b7280;
  box-shadow: 0 4px 12px rgba(20, 25, 35, .08);
  cursor: pointer;
  transition: .15s ease;
}

.bos-chat-msg-btn:hover {
  color: var(--chat-primary, #df1118);
  border-color: rgba(223, 17, 24, .25);
  background: var(--chat-primary-soft, #fff1f2);
}

.bos-chat-msg-btn svg {
  width: 13px;
  height: 13px;
}

.bos-chat-react-wrap {
  position: relative;
}

.bos-chat-react-picker {
  position: absolute;
  bottom: calc(100% + 6px);
  top: auto;
  left: 0;
  display: none;
  align-items: center;
  flex-wrap: nowrap;
  gap: 2px;
  padding: 5px 6px;
  border: 1px solid #eceef2;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(20, 25, 35, .14);
  white-space: nowrap;
  z-index: 20;
}

.bos-chat-react-wrap.open .bos-chat-react-picker {
  display: inline-flex;
}

.conversation.right .bos-chat-react-picker {
  left: auto;
  right: 0;
}

.conversation:not(.right) .bos-chat-react-picker {
  left: 0;
  right: auto;
}

.bos-chat-react-item {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: transform .12s ease, background .12s ease;
  overflow: hidden;
}

.bos-chat-react-item:hover {
  transform: scale(1.14);
  background: #f5f6f8;
}

.bos-chat-react-item .emoji {
  width: 20px !important;
  height: 20px !important;
  margin: 0 !important;
  line-height: 0 !important;
  font-size: 0 !important;
}

.bos-chat-react-item .emoji img {
  width: 20px !important;
  height: 20px !important;
  max-width: 20px !important;
  display: block;
  object-fit: contain;
}

.bos-chat-msg-reactions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  padding: 2px 4px;
  border: 1px solid #eceef2;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(20, 25, 35, .06);
}

.conversation.right .bos-chat-msg-reactions {
  float: right;
}

.bos-chat-msg-reaction {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 1px 3px;
  border-radius: 999px;
}

.bos-chat-msg-reaction.active {
  background: var(--chat-primary-soft, #fff1f2);
}

.bos-chat-msg-reaction .emoji,
.bos-chat-msg-reaction .emoji img {
  width: 16px;
  height: 16px;
}

.bos-chat-msg-reaction em {
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  color: #6b7280;
}

.bos-chat-reply-quote {
  display: block;
  width: 100%;
  max-width: 240px;
  margin: 0 0 6px;
  padding: 7px 10px;
  border: 0;
  border-left: 3px solid var(--chat-primary, #df1118);
  border-radius: 10px;
  background: rgba(15, 18, 24, .05);
  text-align: left;
  cursor: pointer;
}

.conversation.right .bos-chat-reply-quote {
  margin-left: auto;
  border-left: 0;
  border-right: 3px solid rgba(255, 255, 255, .75);
  background: rgba(255, 255, 255, .18);
  color: inherit;
}

.bos-chat-reply-quote strong {
  display: block;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.bos-chat-reply-quote span {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  opacity: .8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bos-chat-reply-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
  padding: 8px 10px;
  border: 1px solid #eceef2;
  border-radius: 12px;
  background: #f7f8fa;
}

.bos-chat-reply-bar.x-hidden {
  display: none !important;
}

.bos-chat-reply-bar-body {
  min-width: 0;
  flex: 1;
  border-left: 3px solid var(--chat-primary, #df1118);
  padding-left: 9px;
}

.bos-chat-reply-bar-body strong {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #181a1f;
}

.bos-chat-reply-bar-body span {
  display: block;
  margin-top: 1px;
  font-size: 11px;
  color: #8b929c;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bos-chat-reply-bar-close {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #8b929c;
  cursor: pointer;
}

.bos-chat-reply-bar-close:hover {
  background: #eceef1;
  color: #4b5563;
}

.bos-chat-reply-bar-close svg {
  width: 14px;
  height: 14px;
}

.conversation.bos-chat-jump-flash .conversation-body .text {
  animation: bosChatJump 0.9s ease;
}

@keyframes bosChatJump {
  0%, 100% { box-shadow: none; }
  35% { box-shadow: 0 0 0 3px rgba(17, 17, 17, .35); }
}

body.night-mode .bos-chat-msg-btn,
body.night-mode .bos-chat-react-picker,
body.night-mode .bos-chat-msg-reactions,
body.night-mode .bos-chat-reply-bar,
html[data-bs-theme="dark"] .bos-chat-msg-btn,
html[data-bs-theme="dark"] .bos-chat-react-picker,
html[data-bs-theme="dark"] .bos-chat-msg-reactions,
html[data-bs-theme="dark"] .bos-chat-reply-bar {
  background: var(--card-dark-color);
  border-color: var(--card-dark-divider);
  color: var(--body-color-dark);
}

body.night-mode .bos-chat-reply-bar-body strong,
html[data-bs-theme="dark"] .bos-chat-reply-bar-body strong {
  color: var(--body-color-dark);
}

.chat-subpanel {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  background: #fff;
  transform: translateX(100%);
  transition: transform .22s ease;
}

.chat-subpanel.open {
  transform: translateX(0);
}

html[dir="RTL"] .chat-subpanel {
  transform: translateX(-100%);
}

html[dir="RTL"] .chat-subpanel.open {
  transform: translateX(0);
}

.media-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 12px;
}

.media-tab {
  height: 34px;
  border: 1px solid #eceef2;
  border-radius: 9px;
  background: #fff;
  color: #6b7280;
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
}

.media-tab.is-active {
  border-color: #f0d9db;
  background: #fff1f2;
  color: #df1118;
}

.media-pane {
  display: none;
}

.media-pane.is-active {
  display: block;
}

.js_chat-media-grid {
  display: none;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.js_chat-media-grid.is-active {
  display: grid;
}

.media-thumb {
  aspect-ratio: 1;
  padding: 0;
  overflow: hidden;
  border: 1px solid #eceef2;
  border-radius: 10px;
  background: #f6f7f9;
  cursor: pointer;
}

.media-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media-empty {
  padding: 28px 12px;
  text-align: center;
  color: #8b929c;
  font-size: 12px;
}

.media-link-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 10px;
  margin-bottom: 6px;
  border: 1px solid #eceef2;
  border-radius: 10px;
  background: #fff;
  color: #2d333c;
  text-decoration: none;
  font-size: 12px;
  word-break: break-all;
}

.media-link-row span:last-child {
  margin-left: auto;
  color: #a0a6af;
  flex: 0 0 auto;
}

.privacy-card {
  margin-bottom: 12px;
  padding: 12px 13px;
  border: 1px solid #eceef2;
  border-radius: 12px;
  background: #fafbfc;
  text-align: left;
}

.privacy-card strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  color: #181a1f;
}

.privacy-card p {
  margin: 0;
  color: #747c89;
  font-size: 12px;
  line-height: 1.5;
}

.chat-widget.bos-chat-v2 .conversation-body .time {
  float: none;
  display: block;
  margin-top: 4px;
  padding: 0;
  font-size: 10px;
  color: #a0a6af;
}

.chat-widget.bos-chat-v2 .conversation.right .conversation-body .time {
  text-align: right;
  color: rgba(255, 255, 255, .7);
}

.chat-widget.bos-chat-v2 .conversation-body .img-wrapper {
  border-radius: 10px;
  max-width: 190px;
}

.chat-widget.bos-chat-v2 .chat-typing {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 3px 14px 7px;
  color: var(--chat-muted, #969da7);
  font-size: 11px;
}

.chat-widget.bos-chat-v2 .chat-typing.is-visible {
  display: flex !important;
}

.typing-dots {
  display: flex;
  gap: 3px;
  padding: 7px 9px;
  border-radius: 10px;
  background: var(--chat-surface, #f6f7f9);
}

.typing-dots i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #8f96a0;
  font-style: normal;
  animation: bosChatTyping 1.2s infinite;
}

.typing-dots i:nth-child(2) { animation-delay: .15s; }
.typing-dots i:nth-child(3) { animation-delay: .3s; }

@keyframes bosChatTyping {
  30% { transform: translateY(-3px); opacity: 1; }
  0%, 60%, 100% { transform: none; opacity: .4; }
}

.chat-widget.bos-chat-v2 .chat-drop-zone {
  position: absolute;
  inset: 8px;
  z-index: 40;
  display: none;
  place-items: center;
  border: 2px dashed rgba(223, 17, 24, .35);
  border-radius: 16px;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(8px);
  pointer-events: none;
}

.chat-widget.bos-chat-v2.dragging .chat-drop-zone {
  display: grid;
}

.drop-content {
  text-align: center;
  padding: 12px;
}

.drop-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin: 0 auto 9px;
  border-radius: 14px;
  background: var(--chat-primary-soft, #fff1f2);
  color: var(--chat-primary, #df1118);
}

.drop-icon svg {
  width: 20px;
  height: 20px;
}

.drop-content strong {
  display: block;
  font-size: 13px;
}

.drop-content span {
  display: block;
  margin-top: 4px;
  color: var(--chat-muted, #969da7);
  font-size: 11px;
}

.chat-info-panel {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  background: #fff;
  transform: translateX(100%);
  transition: transform .22s ease;
}

.chat-info-panel.open {
  transform: translateX(0);
}

html[dir="RTL"] .chat-info-panel {
  transform: translateX(-100%);
}

html[dir="RTL"] .chat-info-panel.open {
  transform: translateX(0);
}

.info-header {
  min-height: 56px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border-bottom: 1px solid #eff1f3;
  background: #fff;
}

.info-back {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 9px;
  background: #f4f5f7;
  color: #6b7280;
  cursor: pointer;
  transition: .15s;
}

.info-back:hover {
  background: #ebecef;
  color: #111;
}

.info-back svg {
  width: 16px;
  height: 16px;
}

.info-header strong {
  font-size: 14px;
  font-weight: 700;
  color: #181a1f;
}

.info-body {
  overflow: auto;
  padding: 18px 14px 22px;
  background: linear-gradient(180deg, #fafbfc 0%, #fff 48px);
}

.info-profile {
  text-align: center;
  padding: 6px 8px 4px;
}

.info-profile-avatar {
  position: relative;
  display: inline-block;
  width: 72px;
  height: 72px;
}

.info-profile-avatar img,
.info-profile img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 20px;
  border: 1px solid #e8eaee;
}

.info-profile-avatar .online-status {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 12px;
  height: 12px;
  font-size: 0 !important;
  border: 2px solid #fff;
  border-radius: 50%;
  color: #18a66f;
  background: #18a66f;
}

.info-profile-avatar .online-status.offline {
  color: #b6bbc3;
  background: #b6bbc3;
}

.info-profile h3 {
  margin: 10px 0 3px;
  font-size: 16px;
  font-weight: 750;
  color: #181a1f;
  letter-spacing: -.2px;
}

.info-profile p {
  margin: 0;
  color: #8b929c;
  font-size: 12px;
}

.info-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
}

.info-action {
  min-height: 72px;
  padding: 10px 6px;
  border: 1px solid #eceef2;
  border-radius: 14px;
  background: #fff;
  text-align: center;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: .15s;
  box-shadow: 0 1px 2px rgba(20, 25, 35, .03);
}

.info-action:hover {
  border-color: #e2e5ea;
  background: #fafbfc;
  transform: translateY(-1px);
}

.info-action.is-muted {
  border-color: #f0d9db;
  background: #fff8f8;
}

.info-action-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  margin: auto;
  border-radius: 10px;
  background: #f4f5f7;
  color: #6f7681;
}

.info-action-icon svg {
  width: 16px;
  height: 16px;
}

.info-action.is-muted .info-action-icon {
  background: #fff1f2;
  color: #df1118;
}

.info-action span {
  display: block;
  margin-top: 7px;
  color: #5c6470;
  font-size: 11px;
  font-weight: 650;
}

.info-section {
  margin-top: 18px;
  padding-top: 4px;
}

.info-section-label {
  margin: 0 4px 8px;
  color: #9aa1ab;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .5px;
  text-transform: uppercase;
}

.info-row {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  margin-bottom: 6px;
  border: 1px solid #eceef2;
  border-radius: 12px;
  background: #fff;
  font-size: 13px;
  font-weight: 550;
  text-decoration: none;
  text-align: left;
  color: #2d333c;
  cursor: pointer;
  transition: .15s;
}

.info-row:hover {
  border-color: #e3e6eb;
  background: #fafbfc;
  color: #181a1f;
}

.info-row-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.info-row-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #f4f5f7;
  color: #6f7681;
}

.info-row-icon svg {
  width: 14px;
  height: 14px;
}

.info-row > span:last-child {
  margin-left: auto;
  color: #a0a6af;
  font-size: 12px;
  font-weight: 500;
}

html[dir="RTL"] .info-row {
  text-align: right;
}

html[dir="RTL"] .info-row > span:last-child {
  margin-left: 0;
  margin-right: auto;
}

body.night-mode .chat-info-panel,
body.night-mode .info-header,
body.night-mode .info-body,
body.night-mode .info-action,
body.night-mode .info-row {
  background: var(--card-dark-color);
  border-color: var(--card-dark-divider);
  color: var(--body-color-dark);
}

body.night-mode .info-body {
  background: var(--card-dark-color);
}

body.night-mode .info-action-icon,
body.night-mode .info-row-icon,
body.night-mode .info-back {
  background: var(--card-dark-divider);
  color: #9aa6b2;
}

body.night-mode .info-profile h3,
body.night-mode .info-header strong {
  color: var(--body-color-dark);
}

.bos-restriction-ok {
  display: block;
  min-width: 120px;
  margin: 22px auto 0;
  padding: 10px 18px;
}

/* —— Paid chat publisher modal —— */
#modal .modal-content:has(#publisher-wapper-modal),
#modal .modal-content:has(.bos-chat-publisher) {
  max-width: 520px;
  margin: auto;
  overflow: hidden;
  border: 1px solid rgba(20, 25, 35, .08) !important;
  border-radius: 22px !important;
  background: #fff !important;
  box-shadow:
    0 4px 12px rgba(20, 25, 35, .04),
    0 30px 80px rgba(20, 25, 35, .16) !important;
}

#publisher-wapper-modal.bos-chat-publisher-wrap {
  position: relative;
}

#publisher-wapper-modal .publisher-overlay {
  display: none !important;
}

.bos-chat-publisher {
  position: relative;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: #fff;
}

.bos-chat-publisher-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid #eff1f3;
}

.bos-chat-publisher-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.bos-chat-publisher-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--chat-primary-soft, #fff1f2);
  color: var(--chat-primary, #df1118);
}

.bos-chat-publisher-icon svg {
  width: 20px;
  height: 20px;
}

.bos-chat-publisher-brand strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #181a1f;
  letter-spacing: -.2px;
  line-height: 1.2;
}

.bos-chat-publisher-brand span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--chat-muted, #969da7);
  line-height: 1.3;
}

.bos-chat-publisher .publisher-close {
  position: static;
  top: auto;
  right: auto;
}

.bos-chat-publisher-close {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: #f5f6f8;
  color: #727986;
  cursor: pointer;
  transition: .16s ease;
}

.bos-chat-publisher-close:hover {
  background: #eceef1;
  color: #4b5563;
}

.bos-chat-publisher-close svg {
  width: 16px;
  height: 16px;
}

.bos-chat-publisher .publisher-loader {
  top: 18px;
  right: 56px;
}

.bos-chat-publisher-body {
  max-height: min(72vh, 640px);
  overflow: auto;
  overscroll-behavior: contain;
}

.bos-chat-publisher-message {
  position: relative;
  padding: 16px 18px 12px 72px !important;
}

.bos-chat-publisher-message .publisher-avatar {
  width: 42px;
  height: 42px;
  top: 16px;
  left: 18px;
  border: 1px solid var(--chat-border, #e7e9ed);
  border-radius: 13px;
  object-fit: cover;
}

.bos-chat-publisher-input {
  width: 100%;
}

.bos-chat-publisher .bos-chat-publisher-message textarea:not(.form-control) {
  min-height: 76px;
  height: auto;
  margin-top: 0;
  padding: 12px 14px;
  border: 1px solid #eceef2;
  border-radius: 14px;
  background: var(--chat-surface, #f6f7f9);
  font-size: 14px;
  line-height: 1.45;
  resize: none;
  box-shadow: none;
  transition: border-color .15s ease, background .15s ease;
}

.bos-chat-publisher .bos-chat-publisher-message textarea:not(.form-control):focus {
  border-color: rgba(223, 17, 24, .28);
  background: #fff;
  outline: none;
  box-shadow: 0 0 0 3px rgba(223, 17, 24, .08);
}

.bos-chat-publisher .publisher-slider {
  padding: 0 18px 18px;
}

.bos-chat-publisher-meta {
  display: none;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px !important;
  padding: 10px 12px !important;
  border: 1px solid rgba(34, 197, 94, .18) !important;
  border-radius: 12px;
  background: #f3faf5;
  font-size: 13px;
  color: #166534;
}

.bos-chat-publisher-meta[style*="display: block"],
.bos-chat-publisher-meta[style*="display:block"] {
  display: flex !important;
}

.bos-chat-publisher-meta-ico {
  flex: 0 0 auto;
  color: #16a34a;
  font-size: 14px;
  line-height: 1;
}

.bos-chat-publisher-meta-text {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 600;
}

.bos-chat-publisher-meta .btn-close {
  flex: 0 0 auto;
  margin: 0;
  opacity: .55;
}

.bos-chat-publisher-tools {
  margin: 4px 0 16px;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.bos-chat-publisher-tools-label {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--chat-muted, #969da7);
}

.bos-chat-publisher-tools-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bos-chat-publisher-tools-grid > li {
  width: auto !important;
  float: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.bos-chat-publisher-tools .publisher-tools-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 78px;
  padding: 12px 6px;
  margin: 0;
  border: 1px solid #eceef2;
  border-radius: 14px;
  background: #fff;
  color: #4b5563;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: .15s ease;
}

.bos-chat-publisher-tools .publisher-tools-tab:hover,
.bos-chat-publisher-tools .publisher-tools-tab.active,
.bos-chat-publisher-tools .publisher-tools-tab.activated {
  border-color: rgba(223, 17, 24, .22);
  background: var(--chat-primary-soft, #fff1f2);
  color: var(--chat-primary, #df1118);
}

.bos-chat-publisher-tool-icon {
  width: 38px;
  height: 38px;
  display: grid !important;
  place-items: center;
  border-radius: 12px;
  background: #f4f5f7;
  color: #6b7280;
  font-size: 15px;
  line-height: 1;
  transition: .15s ease;
}

.bos-chat-publisher-tools .publisher-tools-tab:hover .bos-chat-publisher-tool-icon,
.bos-chat-publisher-tools .publisher-tools-tab.active .bos-chat-publisher-tool-icon,
.bos-chat-publisher-tools .publisher-tools-tab.activated .bos-chat-publisher-tool-icon {
  background: #fff;
  color: var(--chat-primary, #df1118);
}

.bos-chat-publisher-tool-icon .svg-container,
.bos-chat-publisher-tool-icon .main-icon,
.bos-chat-publisher-tool-icon svg {
  width: 18px !important;
  height: 18px !important;
  fill: currentColor !important;
}

.bos-chat-publisher-tool-icon .x-uploader,
.bos-chat-publisher-tools .x-uploader {
  display: contents;
}

.bos-chat-publisher-tool-text {
  line-height: 1.2;
}

.bos-chat-publisher-footer {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.bos-chat-publisher-footer-options {
  margin: 0;
}

.bos-chat-publisher-adult {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px !important;
  padding: 12px !important;
  border: 1px solid #eceef2;
  border-radius: 14px;
  background: #fafbfc;
}

.bos-chat-publisher-adult .avatar {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  margin: 0;
  border-radius: 10px;
  background: #f4f5f7;
  color: #6b7280;
  font-size: 15px;
}

.bos-chat-publisher-adult .avatar .svg-container,
.bos-chat-publisher-adult .avatar svg {
  width: 18px !important;
  height: 18px !important;
}

.bos-chat-publisher-adult-copy {
  flex: 1 1 auto;
  min-width: 0;
}

.bos-chat-publisher-adult .form-label {
  font-size: 13px;
  font-weight: 650;
  color: #181a1f;
}

.bos-chat-publisher-adult .form-text {
  font-size: 11px;
  color: var(--chat-muted, #969da7);
}

.bos-chat-publisher-paid {
  margin-bottom: 14px;
}

.bos-chat-publisher-field-label {
  display: block;
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 650;
  color: #3f4650;
}

.bos-chat-publisher-paid .form-group {
  margin-bottom: 12px;
}

.bos-chat-publisher-paid .form-control {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #eceef2;
  border-radius: 12px;
  background: #fff;
  font-size: 13px;
  box-shadow: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.bos-chat-publisher-paid .form-control:focus {
  border-color: rgba(223, 17, 24, .28);
  box-shadow: 0 0 0 3px rgba(223, 17, 24, .08);
}

.bos-chat-publisher-paid textarea.form-control {
  min-height: 88px;
  resize: vertical;
}

.bos-chat-publisher-preview,
.bos-chat-publisher-paid .x-image {
  width: 100%;
  height: 128px;
  display: grid;
  place-items: center;
  border: 1px dashed #d7dbe2;
  border-radius: 14px;
  background: var(--chat-surface, #f6f7f9);
  color: #8b93a0;
  overflow: hidden;
}

.bos-chat-publisher-preview .js_x-uploader,
.bos-chat-publisher-paid .x-image .js_x-uploader {
  color: inherit;
  cursor: pointer;
}

.bos-chat-publisher-preview .fa-camera,
.bos-chat-publisher-paid .x-image .fa-camera {
  color: inherit !important;
}

.bos-chat-publisher-preview:hover,
.bos-chat-publisher-paid .x-image:hover {
  border-color: rgba(223, 17, 24, .28);
  color: var(--chat-primary, #df1118);
  background: var(--chat-primary-soft, #fff1f2);
}

.bos-chat-publisher-paid .form-text {
  margin-top: 8px;
  font-size: 11px;
  color: var(--chat-muted, #969da7);
}

.bos-chat-publisher .alert.alert-danger {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid rgba(223, 17, 24, .18);
  border-radius: 12px;
  background: var(--chat-primary-soft, #fff1f2);
  color: var(--chat-primary, #df1118);
  font-size: 12px;
}

.bos-chat-publisher-footer .publisher-footer-buttons {
  display: block;
  margin: 0;
  padding: 0;
}

.bos-chat-publisher-send {
  width: 100%;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border: 0;
  border-radius: 14px;
  background: var(--chat-primary, #df1118);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -.1px;
  cursor: pointer;
  transition: .16s ease;
  box-shadow: 0 10px 24px rgba(223, 17, 24, .22);
}

.bos-chat-publisher-send:hover {
  filter: brightness(.96);
  transform: translateY(-1px);
}

.bos-chat-publisher-send:active {
  transform: none;
}

.bos-chat-publisher-send i,
.bos-chat-publisher-send svg {
  width: 15px;
  height: 15px;
  font-size: 14px;
  line-height: 1;
}

body.night-mode #modal .modal-content:has(#publisher-wapper-modal),
body.night-mode #modal .modal-content:has(.bos-chat-publisher),
html[data-bs-theme="dark"] #modal .modal-content:has(#publisher-wapper-modal),
html[data-bs-theme="dark"] #modal .modal-content:has(.bos-chat-publisher) {
  background: var(--card-dark-color);
  border-color: var(--card-dark-divider);
}

body.night-mode .bos-chat-publisher,
html[data-bs-theme="dark"] .bos-chat-publisher {
  background: var(--card-dark-color);
}

body.night-mode .bos-chat-publisher-head,
html[data-bs-theme="dark"] .bos-chat-publisher-head {
  border-color: var(--card-dark-divider);
}

body.night-mode .bos-chat-publisher-brand strong,
html[data-bs-theme="dark"] .bos-chat-publisher-brand strong {
  color: var(--body-color-dark);
}

body.night-mode .bos-chat-publisher-close,
html[data-bs-theme="dark"] .bos-chat-publisher-close {
  background: var(--card-dark-divider);
  color: #9aa6b2;
}

body.night-mode .bos-chat-publisher .bos-chat-publisher-message textarea:not(.form-control),
html[data-bs-theme="dark"] .bos-chat-publisher .bos-chat-publisher-message textarea:not(.form-control) {
  background: var(--card-dark-input, #1e252b);
  border-color: var(--card-dark-divider);
  color: var(--body-color-dark);
}

body.night-mode .bos-chat-publisher-tools .publisher-tools-tab,
body.night-mode .bos-chat-publisher-adult,
body.night-mode .bos-chat-publisher-paid .form-control,
body.night-mode .bos-chat-publisher-preview,
body.night-mode .bos-chat-publisher-paid .x-image,
html[data-bs-theme="dark"] .bos-chat-publisher-tools .publisher-tools-tab,
html[data-bs-theme="dark"] .bos-chat-publisher-adult,
html[data-bs-theme="dark"] .bos-chat-publisher-paid .form-control,
html[data-bs-theme="dark"] .bos-chat-publisher-preview,
html[data-bs-theme="dark"] .bos-chat-publisher-paid .x-image {
  background: var(--card-dark-color);
  border-color: var(--card-dark-divider);
  color: var(--body-color-dark);
}

body.night-mode .bos-chat-publisher-meta,
html[data-bs-theme="dark"] .bos-chat-publisher-meta {
  background: rgba(22, 163, 74, .12);
  border-color: rgba(22, 163, 74, .28) !important;
  color: #86efac;
}

body.night-mode .bos-chat-publisher-field-label,
body.night-mode .bos-chat-publisher-adult .form-label,
html[data-bs-theme="dark"] .bos-chat-publisher-field-label,
html[data-bs-theme="dark"] .bos-chat-publisher-adult .form-label {
  color: var(--body-color-dark);
}

body.night-mode .bos-chat-publisher-tool-icon,
body.night-mode .bos-chat-publisher-adult .avatar,
html[data-bs-theme="dark"] .bos-chat-publisher-tool-icon,
html[data-bs-theme="dark"] .bos-chat-publisher-adult .avatar {
  background: var(--card-dark-divider);
  color: #9aa6b2;
}

@media (max-width: 575px) {
  .bos-chat-publisher-tools-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bos-chat-publisher-body {
    max-height: min(78vh, 680px);
  }

  .bos-chat-publisher-head,
  .bos-chat-publisher-message,
  .bos-chat-publisher .publisher-slider {
    padding-left: 14px;
    padding-right: 14px;
  }

  .bos-chat-publisher-message {
    padding-left: 66px !important;
  }

  .bos-chat-publisher-message .publisher-avatar {
    left: 14px;
  }
}

@media (max-width: 500px) {
  .chat-widget.bos-chat-v2.opened {
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
  }

  .chat-widget.bos-chat-v2.minimized {
    inset: auto 15px 15px auto;
    width: 58px;
    height: 58px;
  }
}
