/* DataMembership support chat widget */
#dm-chat-root, #dm-chat-root * { box-sizing: border-box; }

#dm-chat-launcher {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 2147483000;
  width: 60px;
  height: 60px;
  border-radius: 999px;
  border: none;
  background: var(--mint, #03B59C);
  color: var(--navy, #0D2333);
  box-shadow: var(--shadow-lg, 0 20px 40px rgba(0,0,0,.2));
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .15s ease;
  font-family: var(--font-sans, sans-serif);
}
#dm-chat-launcher:hover { transform: scale(1.06); }
#dm-chat-launcher svg { width: 26px; height: 26px; }
#dm-chat-launcher .dm-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--amber, #F2A93B);
  border: 2px solid #fff;
  display: none;
}
#dm-chat-launcher.dm-has-new .dm-dot { display: block; }

#dm-chat-panel {
  position: fixed;
  right: 22px;
  bottom: 94px;
  z-index: 2147483000;
  width: 366px;
  max-width: calc(100vw - 32px);
  height: 520px;
  max-height: calc(100vh - 140px);
  background: var(--card, #fff);
  border-radius: var(--r-lg, 20px);
  box-shadow: var(--shadow-lg, 0 20px 60px rgba(0,0,0,.25));
  display: none;
  flex-direction: column;
  overflow: hidden;
  font-family: var(--font-sans, sans-serif);
  color: var(--text, #0B1411);
  border: 1px solid var(--line, #E2DED3);
}
#dm-chat-panel.dm-open { display: flex; }

#dm-chat-head {
  background: var(--navy, #0D2333);
  color: #fff;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
}
#dm-chat-head strong { font-size: 15px; font-weight: 600; }
#dm-chat-head span { display: block; font-size: 12.5px; opacity: .85; margin-top: 2px; }
#dm-chat-close {
  background: rgba(255,255,255,.15);
  border: none;
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
#dm-chat-close:hover { background: rgba(255,255,255,.28); }

#dm-chat-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 16px;
  background: var(--paper, #F4F2ED);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dm-msg {
  max-width: 84%;
  padding: 9px 13px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.dm-msg-assistant {
  align-self: flex-start;
  background: #fff;
  border: 1px solid var(--line, #E2DED3);
  border-bottom-left-radius: 4px;
}
.dm-msg-user {
  align-self: flex-end;
  background: var(--teal, #0E6B58);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.dm-msg-system {
  align-self: center;
  background: var(--amber-soft, #FBF0DC);
  color: var(--amber-ink, #8A5A0E);
  font-size: 12px;
  border-radius: 10px;
  text-align: center;
}
.dm-typing { align-self: flex-start; display: flex; gap: 4px; padding: 10px 13px; }
.dm-typing span {
  width: 6px; height: 6px; border-radius: 999px; background: var(--text-3, #7D8680);
  animation: cmdTypingBounce 1.1s infinite ease-in-out;
}
.dm-typing span:nth-child(2) { animation-delay: .15s; }
.dm-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes cmdTypingBounce { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }

#dm-chat-form {
  padding: 18px;
  overflow-y: auto;
  background: #fff;
}
#dm-chat-form h3 { margin: 0 0 4px; font-size: 16px; }
#dm-chat-form p { margin: 0 0 16px; font-size: 13px; color: var(--text-2, #4C5751); }
#dm-chat-form label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 4px; }
#dm-chat-form .dm-field { margin-bottom: 12px; }
#dm-chat-form input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line-2, #D5D0C3);
  font-size: 13.5px;
  font-family: inherit;
  background: var(--paper, #F4F2ED);
}
#dm-chat-form input:focus { outline: 2px solid var(--mint, #5CE1B5); outline-offset: 1px; }
#dm-chat-form button {
  width: 100%;
  padding: 11px;
  border-radius: 10px;
  border: none;
  background: var(--teal, #0E6B58);
  color: #fff;
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  margin-top: 4px;
}
#dm-chat-form button:hover { background: var(--teal-2, #0A5244); }
#dm-chat-form .dm-error { color: var(--red-ink, #9E3520); font-size: 12.5px; margin: 0 0 10px; display: none; }
#dm-chat-form .dm-error.dm-show { display: block; }

#dm-chat-inputrow {
  flex: 0 0 auto;
  border-top: 1px solid var(--line, #E2DED3);
  padding: 10px;
  display: flex;
  gap: 8px;
  background: #fff;
}
#dm-chat-input {
  flex: 1;
  resize: none;
  border: 1px solid var(--line-2, #D5D0C3);
  border-radius: 12px;
  padding: 9px 12px;
  font-size: 13.5px;
  font-family: inherit;
  max-height: 90px;
  min-height: 38px;
}
#dm-chat-input:focus { outline: 2px solid var(--mint, #5CE1B5); outline-offset: 1px; }
#dm-chat-send {
  border: none;
  background: var(--teal, #0E6B58);
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  cursor: pointer;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
#dm-chat-send:hover { background: var(--teal-2, #0A5244); }
#dm-chat-send:disabled { opacity: .5; cursor: default; }

@media (max-width: 480px) {
  #dm-chat-panel { right: 16px; left: 16px; width: auto; bottom: 86px; }
  #dm-chat-launcher { right: 16px; bottom: 16px; }
}
