/* Спільна оболонка віджета клієнта */
#siteChatWidget {
  display: none;
  position: fixed;
  bottom: 16px;
  right: 16px;
  width: min(360px, calc(100vw - 32px));
  max-height: min(480px, 78vh);
  z-index: 2147483645;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

#siteChatWidget.scw-visible {
  display: flex;
}

#siteChatWidget .scw-head {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  color: #fff;
}

#siteChatWidget .scw-head-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

#siteChatWidget .scw-head-title strong {
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

#siteChatWidget .scw-head-title span {
  font-size: 0.72rem;
  opacity: 0.9;
  font-weight: 500;
}

#siteChatWidget .scw-head button {
  flex-shrink: 0;
  border: none;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

#siteChatWidget .scw-head button:hover {
  background: rgba(255, 255, 255, 0.32);
}

#siteChatWidget .scw-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  min-height: 140px;
  max-height: 280px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#siteChatWidget .scw-empty {
  margin: auto;
  text-align: center;
  font-size: 0.88rem;
  padding: 24px 12px;
}

#siteChatWidget .scw-foot {
  flex-shrink: 0;
  display: flex;
  gap: 8px;
  padding: 10px 12px 12px;
}

#siteChatWidget .scw-foot input {
  flex: 1;
  border-radius: 12px;
  padding: 11px 14px;
  font-size: 0.94rem;
}

#siteChatWidget .scw-foot input:focus {
  outline: none;
}

#siteChatWidget .scw-foot button {
  width: 46px;
  flex-shrink: 0;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-size: 1.05rem;
  font-weight: 700;
}

#siteChatWidget .scw-foot button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

#siteChatWidget .msg-row {
  display: flex;
}

#siteChatWidget .msg-row.me {
  justify-content: flex-end;
}

#siteChatWidget .msg-row.them {
  justify-content: flex-start;
}

#siteChatWidget .bubble {
  max-width: 88%;
  padding: 9px 12px;
  border-radius: 14px;
  font-size: 0.9rem;
  word-wrap: break-word;
  white-space: pre-wrap;
  line-height: 1.4;
}

#siteChatWidget .bubble .meta {
  font-size: 0.65rem;
  opacity: 0.72;
  margin-top: 4px;
}

/* UKRSIBBANK — зелений стиль */
#siteChatWidget.uks-site-chat {
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(107, 150, 129, 0.35);
  background: linear-gradient(165deg, #0a2e22 0%, #03150f 55%, #02100c 100%);
}

#siteChatWidget.uks-site-chat .scw-head {
  background: linear-gradient(180deg, #6b9681 0%, #4d7a66 48%, #3a624f 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

#siteChatWidget.uks-site-chat .scw-body {
  background: rgba(3, 21, 15, 0.55);
}

#siteChatWidget.uks-site-chat .scw-empty {
  color: rgba(255, 255, 255, 0.45);
}

#siteChatWidget.uks-site-chat .scw-foot {
  background: rgba(8, 40, 30, 0.92);
  border-top: 1px solid rgba(107, 150, 129, 0.25);
}

#siteChatWidget.uks-site-chat .scw-foot input {
  border: 1px solid rgba(107, 150, 129, 0.45);
  background: rgba(255, 255, 255, 0.96);
  color: #0a1f17;
}

#siteChatWidget.uks-site-chat .scw-foot input::placeholder {
  color: #6b7f78;
}

#siteChatWidget.uks-site-chat .scw-foot input:focus {
  border-color: #6b9681;
  box-shadow: 0 0 0 2px rgba(107, 150, 129, 0.35);
}

#siteChatWidget.uks-site-chat .scw-foot button {
  background: linear-gradient(180deg, #f5f7f6 0%, #e2ebe6 100%);
  color: #0a2e22;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

#siteChatWidget.uks-site-chat .scw-foot button:hover {
  filter: brightness(1.04);
}

#siteChatWidget.uks-site-chat .bubble.me {
  background: linear-gradient(145deg, #6b9681 0%, #4a7a62 100%);
  color: #fff;
  border-bottom-right-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

#siteChatWidget.uks-site-chat .bubble.them {
  background: rgba(255, 255, 255, 0.95);
  color: #0f241c;
  border: 1px solid rgba(107, 150, 129, 0.35);
  border-bottom-left-radius: 4px;
}

/* Ощад 24/7 — синій стиль */
#siteChatWidget.oschad-site-chat {
  background: #fff;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.06);
}

#siteChatWidget.oschad-site-chat .scw-head {
  background: linear-gradient(180deg, #2b6cff 0%, #1e5ae6 100%);
  font-weight: 700;
}

#siteChatWidget.oschad-site-chat .scw-body {
  background: #f0f0f2;
}

#siteChatWidget.oschad-site-chat .scw-empty {
  color: #888;
}

#siteChatWidget.oschad-site-chat .scw-foot {
  background: #fff;
  border-top: 1px solid #ddd;
}

#siteChatWidget.oschad-site-chat .scw-foot input {
  border: 1px solid #ccc;
  background: #fff;
  color: #222;
}

#siteChatWidget.oschad-site-chat .scw-foot input:focus {
  border-color: #2b6cff;
  box-shadow: 0 0 0 2px rgba(43, 108, 255, 0.25);
}

#siteChatWidget.oschad-site-chat .scw-foot button {
  background: #2b6cff;
  color: #fff;
}

#siteChatWidget.oschad-site-chat .scw-foot button:hover {
  filter: brightness(1.06);
}

#siteChatWidget.oschad-site-chat .bubble.me {
  background: #2b6cff;
  color: #fff;
  border-bottom-right-radius: 4px;
}

#siteChatWidget.oschad-site-chat .bubble.them {
  background: #fff;
  color: #222;
  border: 1px solid #ddd;
  border-bottom-left-radius: 4px;
}

/* Старі сторінки без класу бренду — синій Ощад */
#siteChatWidget:not(.uks-site-chat):not(.oschad-site-chat) {
  background: #fff;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.06);
}

#siteChatWidget:not(.uks-site-chat):not(.oschad-site-chat) .scw-head {
  background: linear-gradient(180deg, #2b6cff 0%, #1e5ae6 100%);
}

#siteChatWidget:not(.uks-site-chat):not(.oschad-site-chat) .scw-body {
  background: #f0f0f2;
}

#siteChatWidget:not(.uks-site-chat):not(.oschad-site-chat) .scw-foot button {
  background: #2b6cff;
  color: #fff;
}

#siteChatWidget:not(.uks-site-chat):not(.oschad-site-chat) .bubble.me {
  background: #2b6cff;
  color: #fff;
}
