/* Sanmochat Minimal Chat Widget — by SanmoBd (https://www.sanmo.com.bd) */

#sanmochat-root, #sanmochat-root * {
  box-sizing: border-box;
}

/* ---------- Theme & Elementor CSS Isolation / Master Button Resets ---------- */
#sanmochat-root button,
#sanmochat-root [type="button"],
#sanmochat-root [type="submit"],
#sanmochat-root [type="reset"],
#sanmochat-root a,
#sanmochat-root input,
#sanmochat-root textarea {
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  text-shadow: none;
}

#sanmochat-root button:not(.sanmochat-launcher):not(.sanmochat-send):not(.sanmochat-intro-submit),
#sanmochat-root [type="button"]:not(.sanmochat-launcher):not(.sanmochat-send):not(.sanmochat-intro-submit),
#sanmochat-root [type="submit"]:not(.sanmochat-intro-submit),
#sanmochat-root [type="reset"] {
  border: 0;
  outline: none;
  background: transparent;
  background-color: transparent;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: normal;
  text-transform: none;
  text-align: inherit;
  padding: 0;
  margin: 0;
  cursor: pointer;
  box-shadow: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  border-radius: 0;
  transition: all 0.15s ease;
}

#sanmochat-root {
  position: fixed;
  bottom: var(--sanmochat-offset-y, 24px);
  z-index: 2147483000;
  isolation: isolate;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}

#sanmochat-root.sanmochat-right {
  right: var(--sanmochat-offset-x, 24px);
}

#sanmochat-root.sanmochat-left {
  left: var(--sanmochat-offset-x, 24px);
}

/* ---------------- Launcher ---------------- */
#sanmochat-root .sanmochat-launcher,
#sanmochat-root button.sanmochat-launcher {
  position: relative !important;
  z-index: 1 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 10px !important;
  height: 56px !important;
  padding: 0 22px !important;
  border: 0 !important;
  outline: none !important;
  cursor: pointer !important;
  border-radius: 999px !important;
  background: var(--sanmochat-gradient, linear-gradient(135deg, #1d6b41, #14472c)) !important;
  background-color: var(--sanmochat-primary, #14472c) !important;
  color: #ffffff !important;
  font-size: 14.5px !important;
  font-weight: 600 !important;
  letter-spacing: -0.01em !important;
  box-shadow: 0 12px 30px -8px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25) !important;
  transition: transform 0.2s cubic-bezier(0.3, 0.9, 0.4, 1.2), box-shadow 0.2s ease !important;
}

#sanmochat-root .sanmochat-launcher::before {
  content: "" !important;
  position: absolute !important;
  inset: -5px !important;
  border-radius: 999px !important;
  border: 2px solid var(--sanmochat-primary, #14472c) !important;
  opacity: 0.35 !important;
  animation: sanmochat-ring 2.6s ease-out infinite !important;
}

@keyframes sanmochat-ring {
  0% { transform: scale(0.95); opacity: 0.35; }
  70% { transform: scale(1.12); opacity: 0; }
  100% { opacity: 0; }
}

#sanmochat-root .sanmochat-launcher:hover,
#sanmochat-root button.sanmochat-launcher:hover {
  transform: translateY(-2px) scale(1.02) !important;
  box-shadow: 0 16px 36px -8px rgba(0, 0, 0, 0.45) !important;
  background: var(--sanmochat-gradient, linear-gradient(135deg, #1d6b41, #14472c)) !important;
  background-color: var(--sanmochat-primary, #14472c) !important;
  color: #ffffff !important;
}

#sanmochat-root .sanmochat-launcher:active,
#sanmochat-root button.sanmochat-launcher:active {
  transform: translateY(0) scale(0.99) !important;
}

#sanmochat-root .sanmochat-launcher svg {
  width: 22px !important;
  height: 22px !important;
  position: relative !important;
  stroke: #ffffff !important;
  color: #ffffff !important;
  fill: none !important;
}

#sanmochat-root .sanmochat-launcher .sanmochat-launcher-text {
  color: #ffffff !important;
  font-size: 14.5px !important;
  font-weight: 600 !important;
}

#sanmochat-root .sanmochat-launcher.sanmochat-compact {
  width: 56px !important;
  padding: 0 !important;
  justify-content: center !important;
}

/* ---------------- Panel ---------------- */
.sanmochat-panel {
  position: absolute;
  bottom: 72px;
  display: flex;
  flex-direction: column;
  width: min(92vw, 380px);
  height: min(76vh, 580px);
  overflow: hidden;
  background: var(--sanmochat-surface, #ffffff);
  color: var(--sanmochat-text, #1e293b);
  border: 1px solid var(--sanmochat-border);
  border-radius: var(--sanmochat-radius, 18px);
  box-shadow: 0 20px 50px -12px rgba(15, 23, 42, 0.22), 0 4px 16px -4px rgba(15, 23, 42, 0.08);
  opacity: 0;
  transform: translateY(16px) scale(0.97);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.26s cubic-bezier(0.3, 0.9, 0.4, 1.2);
}

.sanmochat-right .sanmochat-panel {
  right: 0;
  transform-origin: bottom right;
}

.sanmochat-left .sanmochat-panel {
  left: 0;
  transform-origin: bottom left;
}

.sanmochat-open .sanmochat-panel {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

/* ---------------- Minimal Header ---------------- */
.sanmochat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--sanmochat-gradient);
  color: var(--sanmochat-header-text, #ffffff);
  flex: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.sanmochat-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: none;
}

.sanmochat-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sanmochat-avatar svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
}

.sanmochat-avatar-letter {
  font-size: 16px;
  font-weight: 700;
  color: inherit;
  line-height: 1;
}

.sanmochat-header-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.sanmochat-header-name {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: inherit;
}

.sanmochat-header-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  opacity: 0.9;
  line-height: 1;
}

.sanmochat-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6);
  animation: sanmochat-pulse 2s infinite;
  display: inline-block;
  flex: none;
}

@keyframes sanmochat-pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6); }
  70% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

#sanmochat-root .sanmochat-close,
#sanmochat-root button.sanmochat-close {
  width: 32px !important;
  height: 32px !important;
  border-radius: 50% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: rgba(255, 255, 255, 0.14) !important;
  background-color: rgba(255, 255, 255, 0.14) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  cursor: pointer !important;
  padding: 0 !important;
  margin: 0 !important;
  flex: none !important;
  box-shadow: none !important;
  outline: none !important;
  transition: background 0.15s ease, transform 0.15s ease, border-color 0.15s ease !important;
}

#sanmochat-root .sanmochat-close:hover,
#sanmochat-root button.sanmochat-close:hover {
  background: rgba(255, 255, 255, 0.28) !important;
  background-color: rgba(255, 255, 255, 0.28) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.5) !important;
  transform: rotate(90deg) !important;
}

.sanmochat-close svg {
  width: 15px;
  height: 15px;
  display: block;
}

/* ---------------- Conversation Area ---------------- */
.sanmochat-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: var(--sanmochat-surface-2, #f8fafc);
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-width: thin;
}

.sanmochat-body::-webkit-scrollbar {
  width: 6px;
}

.sanmochat-body::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.22);
  border-radius: 999px;
}

.sanmochat-msg {
  display: flex;
  flex-direction: column;
  max-width: 82%;
  animation: sanmochat-msg-in 0.22s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes sanmochat-msg-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.sanmochat-msg.bot {
  align-self: flex-start;
}

.sanmochat-msg.user {
  align-self: flex-end;
  max-width: 78%;
}

.sanmochat-bubble {
  padding: 10px 14px;
  font-size: 14px;
  line-height: 1.52;
  border-radius: 16px;
  white-space: pre-wrap;
  word-break: break-word;
}

.sanmochat-msg.bot .sanmochat-bubble {
  background: var(--sanmochat-surface, #ffffff);
  color: var(--sanmochat-text, #1e293b);
  border: 1px solid var(--sanmochat-border);
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 4px -1px rgba(15, 23, 42, 0.05);
}

.sanmochat-msg.user .sanmochat-bubble {
  background: var(--sanmochat-user, var(--sanmochat-primary));
  color: #ffffff;
  border-bottom-right-radius: 4px;
  box-shadow: 0 3px 8px -2px rgba(0, 0, 0, 0.16);
}

#sanmochat-root .sanmochat-bubble a {
  color: #14472c !important;
  text-underline-offset: 2px;
  text-decoration: underline !important;
  font-weight: 600;
}

#sanmochat-root .sanmochat-msg.user .sanmochat-bubble a {
  color: #ffffff !important;
}

.sanmochat-bubble code {
  background: rgba(127, 127, 127, 0.14);
  padding: 1px 5px;
  border-radius: 5px;
  font-size: 13px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.sanmochat-msg.error .sanmochat-bubble {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
  font-size: 13.5px;
}

.sanmochat-msg.system-hint .sanmochat-bubble {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
  font-size: 13px;
  line-height: 1.45;
}

.sanmochat-msg.system-hint .sanmochat-bubble a {
  color: #15803d;
  font-weight: 600;
  text-decoration: underline;
}

/* ---------------- Suggested Question Chips ---------------- */
.sanmochat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 2px 0 6px 0;
  align-self: flex-start;
  max-width: 96%;
  animation: sanmochat-msg-in 0.25s cubic-bezier(0.16, 1, 0.3, 1) both;
}

#sanmochat-root .sanmochat-chip,
#sanmochat-root button.sanmochat-chip,
#sanmochat-root [type="button"].sanmochat-chip {
  display: inline-flex !important;
  align-items: center !important;
  padding: 7px 14px !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  font-family: inherit !important;
  color: var(--sanmochat-qr-text, #14472c) !important;
  background: var(--sanmochat-qr-bg, #ffffff) !important;
  background-color: var(--sanmochat-qr-bg, #ffffff) !important;
  border: 1px solid var(--sanmochat-qr-border, #d1fae5) !important;
  border-radius: var(--sanmochat-qr-radius, 999px) !important;
  cursor: pointer !important;
  text-align: left !important;
  line-height: 1.35 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
  transition: all 0.16s ease !important;
}

#sanmochat-root .sanmochat-chip:hover,
#sanmochat-root button.sanmochat-chip:hover,
#sanmochat-root [type="button"].sanmochat-chip:hover {
  background: var(--sanmochat-qr-hover-bg, #f0fdf4) !important;
  background-color: var(--sanmochat-qr-hover-bg, #f0fdf4) !important;
  color: var(--sanmochat-qr-hover-text, #0f3d23) !important;
  border-color: var(--sanmochat-primary, #86efac) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 3px 8px -2px rgba(20, 71, 44, 0.15) !important;
}

#sanmochat-root .sanmochat-chip:active,
#sanmochat-root button.sanmochat-chip:active {
  transform: translateY(0) !important;
}

/* ---------------- Typing Indicator ---------------- */
.sanmochat-typing {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 6px;
}

.sanmochat-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sanmochat-muted, #94a3b8);
  animation: sanmochat-bounce 1.2s infinite ease-in-out;
}

.sanmochat-typing span:nth-child(2) { animation-delay: 0.15s; }
.sanmochat-typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes sanmochat-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.45; }
  30% { transform: translateY(-4px); opacity: 1; }
}

/* ---------------- Composer ---------------- */
.sanmochat-composer {
  padding: 10px 14px;
  background: var(--sanmochat-surface, #ffffff);
  border-top: 1px solid var(--sanmochat-border);
  flex: none;
}

.sanmochat-input-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  background: var(--sanmochat-surface-2, #f8fafc);
  border: 1px solid var(--sanmochat-border, #e2e8f0);
  border-radius: 22px;
  padding: 4px 6px 4px 8px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#sanmochat-root .sanmochat-input-wrapper:focus-within {
  border-color: #14472c !important;
  box-shadow: 0 0 0 3px rgba(20, 71, 44, 0.15) !important;
}

#sanmochat-root .sanmochat-input,
#sanmochat-root .sanmochat-input:focus,
#sanmochat-root .sanmochat-input:focus-visible,
#sanmochat-root .sanmochat-input:active,
#sanmochat-root textarea.sanmochat-input,
#sanmochat-root textarea.sanmochat-input:focus,
#sanmochat-root textarea.sanmochat-input:focus-visible {
  flex: 1 1 auto;
  min-width: 0;
  background: transparent !important;
  border: 0 !important;
  outline: none !important;
  outline-width: 0 !important;
  outline-offset: 0 !important;
  box-shadow: none !important;
  -webkit-box-shadow: none !important;
  -webkit-appearance: none;
  padding: 7px 4px;
  font-size: 14px;
  font-family: inherit;
  color: var(--sanmochat-text);
  resize: none;
  max-height: 100px;
  min-height: 34px;
  height: 34px;
  line-height: 1.4;
}

.sanmochat-input::placeholder {
  color: var(--sanmochat-muted, #94a3b8);
}

#sanmochat-root .sanmochat-send,
#sanmochat-root button.sanmochat-send,
#sanmochat-root [type="button"].sanmochat-send {
  width: 34px !important;
  height: 34px !important;
  flex: 0 0 34px !important;
  border-radius: 50% !important;
  border: 0 !important;
  background: var(--sanmochat-btn-p-bg, #14472c) !important;
  background-color: var(--sanmochat-btn-p-bg, #14472c) !important;
  color: var(--sanmochat-btn-p-text, #ffffff) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  padding: 0 !important;
  margin: 0 0 1px 0 !important;
  outline: none !important;
  transition: transform 0.15s ease, filter 0.15s ease, opacity 0.15s ease, background 0.15s ease, color 0.15s ease !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.14) !important;
}

#sanmochat-root .sanmochat-send:hover:not(:disabled),
#sanmochat-root button.sanmochat-send:hover:not(:disabled) {
  transform: scale(1.05) !important;
  filter: brightness(1.08) !important;
  background: var(--sanmochat-btn-p-hover, #1d6b41) !important;
  background-color: var(--sanmochat-btn-p-hover, #1d6b41) !important;
  color: #ffffff !important;
  border: 0 !important;
}

#sanmochat-root .sanmochat-send:disabled {
  opacity: 0.35 !important;
  cursor: not-allowed !important;
  transform: none !important;
}

.sanmochat-send svg {
  width: 15px;
  height: 15px;
  display: block;
  margin-left: 2px;
}

/* ---------------- Subtle Branding ---------------- */
.sanmochat-branding {
  text-align: center;
  font-size: 11px;
  color: var(--sanmochat-muted);
  padding: 5px 10px 7px;
  background: var(--sanmochat-surface, #ffffff);
  border-top: 1px solid color-mix(in srgb, var(--sanmochat-border) 40%, transparent);
  flex: none;
}

.sanmochat-branding a {
  color: var(--sanmochat-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 600;
}

.sanmochat-branding a:hover {
  color: var(--sanmochat-primary);
}

#sanmochat-root.sanmochat-branding-disabled .sanmochat-branding {
  display: none !important;
}

/* ---------------- Mobile ---------------- */
@media (max-width: 640px) {
  #sanmochat-root {
    bottom: 16px;
  }
  #sanmochat-root.sanmochat-right { right: 16px; }
  #sanmochat-root.sanmochat-left { left: 16px; }

  .sanmochat-panel {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw;
    height: 100dvh;
    max-width: none;
    max-height: none;
    border-radius: 0;
    border: 0;
    transform: translateY(14px);
  }

  .sanmochat-open .sanmochat-panel {
    transform: none;
  }

  .sanmochat-header {
    padding-top: max(14px, env(safe-area-inset-top));
    border-radius: 0;
  }

  .sanmochat-composer {
    padding-bottom: max(10px, env(safe-area-inset-bottom));
  }

  .sanmochat-launcher-text {
    display: none;
  }

  .sanmochat-launcher {
    width: 56px;
    padding: 0;
    justify-content: center;
  }

  #sanmochat-root.sanmochat-open .sanmochat-launcher {
    display: none !important;
  }
}

/* ---------- Accessibility: keyboard focus states ---------- */
.sanmochat-launcher:focus-visible,
.sanmochat-panel button:focus-visible,
.sanmochat-panel a:focus-visible {
  outline: 2px solid var(--sanmochat-primary);
  outline-offset: 2px;
}

.sanmochat-header :focus-visible {
  outline-color: var(--sanmochat-header-text, #ffffff);
}

/* ---------- Stacking: panel always above launcher ---------- */
#sanmochat-root.sanmochat-open {
  z-index: 2147483600;
}

#sanmochat-root.sanmochat-open .sanmochat-panel {
  z-index: 2147483601;
}

#sanmochat-root.sanmochat-open .sanmochat-launcher,
html.sanmochat-panel-open #sanmochat-root .sanmochat-launcher,
body.sanmochat-panel-open #sanmochat-root .sanmochat-launcher {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  z-index: -1 !important;
}

@media (max-width: 640px) {
  #sanmochat-root.sanmochat-open {
    inset: 0;
    bottom: 0;
    right: 0 !important;
    left: 0 !important;
  }
  #sanmochat-root.sanmochat-open .sanmochat-panel {
    z-index: 2147483601;
    height: 100dvh;
  }
  body.sanmochat-panel-open {
    overflow: hidden;
  }
}

/* ---------- Header End Chat Button ---------- */
.sanmochat-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

#sanmochat-root .sanmochat-end-btn,
#sanmochat-root button.sanmochat-end-btn,
#sanmochat-root [type="button"].sanmochat-end-btn {
  display: inline-flex !important;
  align-items: center !important;
  padding: 5px 12px !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  font-family: inherit !important;
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.16) !important;
  background-color: rgba(255, 255, 255, 0.16) !important;
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
  border-radius: 999px !important;
  cursor: pointer !important;
  line-height: 1.2 !important;
  transition: all 0.16s ease !important;
  white-space: nowrap !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
  outline: none !important;
  margin: 0 !important;
}

#sanmochat-root .sanmochat-end-btn:hover,
#sanmochat-root button.sanmochat-end-btn:hover,
#sanmochat-root [type="button"].sanmochat-end-btn:hover {
  background: rgba(255, 255, 255, 0.28) !important;
  background-color: rgba(255, 255, 255, 0.28) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.6) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12) !important;
}

#sanmochat-root .sanmochat-end-btn:active,
#sanmochat-root button.sanmochat-end-btn:active {
  transform: translateY(0) !important;
}

/* ---------- 3-Field Visitor Welcome Card ---------- */
.sanmochat-composer.is-locked {
  display: none !important;
}

.sanmochat-intro-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin: auto;
  width: 100%;
  max-width: 320px;
  padding: 20px 14px;
  box-sizing: border-box;
  animation: sanmochat-msg-in 0.32s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.sanmochat-intro-badge {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--sanmochat-primary) 10%, var(--sanmochat-surface, #ffffff));
  border: 1.5px solid color-mix(in srgb, var(--sanmochat-primary) 28%, transparent);
  box-shadow: 0 6px 18px -4px rgba(0, 0, 0, 0.08);
  display: grid;
  place-items: center;
  margin-bottom: 12px;
}

.sanmochat-intro-wave {
  font-size: 26px;
  line-height: 1;
  display: inline-block;
  animation: sanmochat-wave 1.6s ease-in-out infinite;
  transform-origin: 70% 70%;
}

.sanmochat-intro-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--sanmochat-text, #0f172a);
  margin: 0 0 4px 0;
  letter-spacing: -0.01em;
}

.sanmochat-intro-subtitle {
  font-size: 13px;
  line-height: 1.45;
  color: var(--sanmochat-muted, #64748b);
  margin: 0 0 16px 0;
  padding: 0 4px;
}

.sanmochat-intro-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.sanmochat-intro-field-wrap {
  width: 100%;
}

.sanmochat-intro-field {
  width: 100%;
  background: var(--sanmochat-surface, #ffffff);
  border: 1px solid var(--sanmochat-border, #cbd5e1);
  border-radius: 12px;
  padding: 9px 13px;
  font-size: 13.5px;
  font-family: inherit;
  color: var(--sanmochat-text, #1e293b);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.sanmochat-intro-field:focus {
  outline: none;
  border-color: var(--sanmochat-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--sanmochat-primary) 15%, transparent);
}

.sanmochat-intro-field.is-invalid {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2) !important;
  animation: sanmochat-shake 0.35s ease;
}

#sanmochat-root .sanmochat-intro-submit,
#sanmochat-root button.sanmochat-intro-submit,
#sanmochat-root [type="submit"].sanmochat-intro-submit {
  width: 100% !important;
  padding: 10px 16px !important;
  border-radius: var(--sanmochat-btn-radius, 12px) !important;
  border: 0 !important;
  background: var(--sanmochat-btn-p-bg, #14472c) !important;
  background-color: var(--sanmochat-btn-p-bg, #14472c) !important;
  color: var(--sanmochat-btn-p-text, #ffffff) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  font-family: inherit !important;
  cursor: pointer !important;
  margin-top: 4px !important;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12) !important;
  transition: all 0.18s ease !important;
}

#sanmochat-root .sanmochat-intro-submit:hover,
#sanmochat-root button.sanmochat-intro-submit:hover,
#sanmochat-root [type="submit"].sanmochat-intro-submit:hover {
  filter: brightness(1.06) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.16) !important;
  background: var(--sanmochat-btn-p-hover, #1d6b41) !important;
  background-color: var(--sanmochat-btn-p-hover, #1d6b41) !important;
  color: var(--sanmochat-btn-p-hover-text, #ffffff) !important;
  border: 0 !important;
}

#sanmochat-root .sanmochat-intro-submit:active {
  transform: translateY(0) !important;
}

/* ---------- Composer Action Buttons: [ Attach ] [ Textarea ] [ Voice ] [ Send ] ---------- */
#sanmochat-root .sanmochat-action-btn,
#sanmochat-root button.sanmochat-action-btn,
#sanmochat-root [type="button"].sanmochat-action-btn,
#sanmochat-root .sanmochat-btn-attach,
#sanmochat-root .sanmochat-btn-voice {
  width: 32px !important;
  height: 32px !important;
  flex: 0 0 32px !important;
  border-radius: 50% !important;
  border: 0 !important;
  outline: none !important;
  background: transparent !important;
  background-color: transparent !important;
  color: #64748b !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  padding: 0 !important;
  margin: 0 0 2px 0 !important;
  box-shadow: none !important;
  transition: color 0.15s ease, background 0.15s ease, transform 0.15s ease !important;
}

#sanmochat-root .sanmochat-action-btn:hover,
#sanmochat-root button.sanmochat-action-btn:hover,
#sanmochat-root [type="button"].sanmochat-action-btn:hover {
  color: var(--sanmochat-primary, #14472c) !important;
  background: rgba(20, 71, 44, 0.08) !important;
  background-color: rgba(20, 71, 44, 0.08) !important;
  border: 0 !important;
  transform: scale(1.06) !important;
}

#sanmochat-root .sanmochat-action-btn:active {
  background: rgba(20, 71, 44, 0.15) !important;
  background-color: rgba(20, 71, 44, 0.15) !important;
  transform: scale(0.98) !important;
}

#sanmochat-root .sanmochat-action-btn svg {
  width: 18px !important;
  height: 18px !important;
  stroke: currentColor !important;
  fill: none !important;
}

/* Voice Recording Pulsing State */
.sanmochat-btn-voice.is-recording {
  color: #dc2626 !important;
  background: rgba(220, 38, 38, 0.12) !important;
  animation: sanmochat-voice-pulse 1.2s infinite;
}

@keyframes sanmochat-voice-pulse {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* ---------- Attachment Preview Chips ---------- */
.sanmochat-attachment-preview {
  display: flex;
  gap: 8px;
  padding: 0 4px 8px 4px;
  flex-wrap: wrap;
  align-items: center;
}

.sanmochat-preview-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--sanmochat-surface-2, #f1f5f9);
  border: 1px solid var(--sanmochat-border, #e2e8f0);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 12px;
  max-width: 220px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.sanmochat-preview-chip img {
  width: 28px;
  height: 28px;
  object-fit: cover;
  border-radius: 4px;
}

.sanmochat-preview-chip svg {
  width: 16px;
  height: 16px;
  color: var(--sanmochat-primary);
  flex: none;
}

.sanmochat-preview-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 130px;
  font-weight: 500;
  color: var(--sanmochat-text, #1e293b);
}

.sanmochat-preview-remove {
  background: transparent;
  border: 0;
  color: #94a3b8;
  cursor: pointer;
  padding: 0 2px;
  font-size: 13px;
  font-weight: bold;
  line-height: 1;
  transition: color 0.15s ease;
}

.sanmochat-preview-remove:hover {
  color: #ef4444;
}

/* ---------- Bubble Media & Document Display ---------- */
.sanmochat-bubble-media {
  margin-bottom: 6px;
  border-radius: 10px;
  overflow: hidden;
  max-width: 220px;
}

.sanmochat-bubble-media img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.sanmochat-bubble-file {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.06);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 6px;
}

.sanmochat-msg.user .sanmochat-bubble-file {
  background: rgba(255, 255, 255, 0.2);
}

.sanmochat-bubble-file svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
}

@keyframes sanmochat-shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-4px); }
  40%, 80% { transform: translateX(4px); }
}



