:root {
  --chat-primary: #9f1e5c;
  --chat-primary-dark: #d33c85;
  /* Stack above site WhatsApp .float (bottom: 65px, height: 50px, right: 12px) */
  --neesac-wa-bottom: 65px;
  --neesac-wa-size: 50px;
  --neesac-fab-gap: 12px;
  --neesac-launcher-size: 56px;
  --neesac-fab-right: 12px;
}
.neesac-chat-root { }
.neesac-chat-launcher {
  position: fixed;
  right: var(--neesac-fab-right);
  bottom: calc(var(--neesac-wa-bottom) + var(--neesac-wa-size) + var(--neesac-fab-gap));
  width: var(--neesac-launcher-size);
  height: var(--neesac-launcher-size);
  border-radius: 50%;
  border: none; cursor: pointer; z-index: 2147483000;
  background: var(--chat-primary); color: #fff;
  box-shadow: 0 10px 28px rgba(0,0,0,0.18), 0 0 0 1px rgba(255,255,255,0.06) inset;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.neesac-chat-launcher:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(0,0,0,0.22); }
.neesac-chat-panel {
  position: fixed;
  right: var(--neesac-fab-right);
  bottom: calc(var(--neesac-wa-bottom) + var(--neesac-wa-size) + var(--neesac-fab-gap) + var(--neesac-launcher-size) + var(--neesac-fab-gap));
  width: 360px;
  max-width: calc(100vw - 40px);
  max-height: min(520px, calc(100vh - 140px)); z-index: 2147483001;
  background: #fff; border-radius: 20px; overflow: hidden;
  box-shadow: 0 16px 48px rgba(0,0,0,0.18);
  display: none; flex-direction: column;
  color: #1a1a1a;
}
.neesac-chat-panel[data-neesac-open="true"] { display: flex; }
.neesac-chat-close {
  position: absolute; top: 10px; right: 12px; width: 32px; height: 32px; border: none; background: transparent;
  color: var(--chat-primary); font-size: 22px; line-height: 1; cursor: pointer; border-radius: 50%;
}
.neesac-chat-close:hover { background: rgba(0,0,0,0.04); }
.neesac-chat-lead { padding: 22px 20px 18px; display: flex; flex-direction: column; gap: 12px; }
.neesac-chat-lead h2 {
  margin: 0 0 4px 0; text-align: center;
  font-size: 1.15rem; font-weight: 700; color: var(--chat-primary);
}
.neesac-chat-lead label { font-weight: 700; font-size: 13px; color: #111; }
.neesac-chat-lead input {
  width: 100%; box-sizing: border-box; padding: 10px 12px; border-radius: 10px;
  border: 1px solid #ddd; font-size: 14px;
  color: #1a1a1a !important;
  -webkit-text-fill-color: #1a1a1a;
}
.neesac-chat-lead input::placeholder {
  color: #888;
  opacity: 1;
}
.neesac-chat-lead input:focus { outline: none; border-color: var(--chat-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--chat-primary) 18%, transparent); }
.neesac-chat-start {
  margin-top: 4px; width: 100%; border: none; border-radius: 999px; padding: 12px 16px;
  background: linear-gradient(135deg, var(--chat-primary), var(--chat-primary-dark));
  color: #fff; font-weight: 700; font-size: 15px; cursor: pointer;
  box-shadow: 0 4px 14px color-mix(in srgb, var(--chat-primary) 35%, transparent);
}
.neesac-chat-start:hover { filter: brightness(1.03); }
.neesac-chat-main { display: none; flex-direction: column; flex: 1; min-height: 0; }
.neesac-chat-main.visible { display: flex; }
.neesac-chat-messages {
  flex: 1; overflow-y: auto; padding: 14px 16px; background: #fafafa; display: flex; flex-direction: column; gap: 8px;
}
.neesac-msg { margin: 0; padding: 10px 14px; border-radius: 14px; max-width: 88%; line-height: 1.5; font-size: 14px; white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere; color: #1a1a1a; }
.neesac-msg.user { background: var(--chat-primary); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.neesac-msg.bot { background: #fff; border: 1px solid #e5e5e5; align-self: flex-start; border-bottom-left-radius: 4px; color: #1a1a1a; }
.neesac-msg.bot a { color: var(--chat-primary); text-decoration: underline; }
.neesac-chat-footer { display: flex; gap: 8px; padding: 12px; border-top: 1px solid #eee; background: #fff; }
.neesac-chat-footer input {
  flex: 1; border: 1px solid #ddd; border-radius: 999px; padding: 10px 14px; font-size: 14px; outline: none;
  color: #1a1a1a !important;
  -webkit-text-fill-color: #1a1a1a;
}
.neesac-chat-footer input::placeholder {
  color: #888;
  opacity: 1;
}
.neesac-chat-footer input:focus { border-color: var(--chat-primary); }
.neesac-chat-send {
  border: none; border-radius: 999px; padding: 10px 18px; font-weight: 700; font-size: 13px; cursor: pointer;
  background: var(--chat-primary); color: #fff;
}
.neesac-chat-send:hover { background: var(--chat-primary-dark); }
@media (max-width: 480px) {
  .neesac-chat-panel { left: 12px; width: auto; }
  .neesac-chat-launcher { right: var(--neesac-fab-right); }
}
