/* ============================================================
   JGrasmick Marketing and AI Automations — Chat Box styles
   All class names are prefixed .jg- so nothing on your page
   collides with them.
   ============================================================ */

.jg-chat-launcher {
  position: fixed;
  bottom: 22px;
  right: 22px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: #1f6feb;
  color: #fff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  font-size: 26px;
  line-height: 60px;
  text-align: center;
  z-index: 2147483000;
  transition: transform 0.15s ease, background 0.15s ease;
}
.jg-chat-launcher:hover { transform: scale(1.06); background: #1a5fd0; }

.jg-chat-panel {
  position: fixed;
  bottom: 94px;
  right: 22px;
  width: 370px;
  max-width: calc(100vw - 32px);
  height: 540px;
  max-height: calc(100vh - 120px);
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 2147483000;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.jg-chat-panel.jg-open { display: flex; }

.jg-chat-header {
  background: #1f6feb;
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.jg-chat-header h3 { margin: 0; font-size: 15px; font-weight: 600; }
.jg-chat-header p { margin: 2px 0 0; font-size: 12px; opacity: 0.85; }
.jg-chat-close {
  background: none; border: none; color: #fff;
  font-size: 22px; cursor: pointer; line-height: 1;
}

.jg-chat-log {
  flex: 1;
  padding: 14px;
  overflow-y: auto;
  background: #f5f7fa;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.jg-msg {
  max-width: 85%;
  padding: 10px 13px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-wrap: break-word;
}
.jg-msg.jg-user { align-self: flex-end; background: #1f6feb; color: #fff; border-bottom-right-radius: 4px; }
.jg-msg.jg-bot  { align-self: flex-start; background: #fff; color: #1a1a1a; border: 1px solid #e3e8ef; border-bottom-left-radius: 4px; }
.jg-msg a { color: inherit; text-decoration: underline; }

.jg-call-btn {
  display: inline-block;
  margin-top: 8px;
  background: #16a34a;
  color: #fff !important;
  text-decoration: none !important;
  padding: 9px 14px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
}

.jg-typing { font-style: italic; opacity: 0.7; }

.jg-chat-input {
  display: flex;
  border-top: 1px solid #e3e8ef;
  padding: 10px;
  gap: 8px;
  background: #fff;
}
.jg-chat-input textarea {
  flex: 1;
  resize: none;
  border: 1px solid #cdd5df;
  border-radius: 10px;
  padding: 10px;
  font-size: 14px;
  font-family: inherit;
  max-height: 90px;
  outline: none;
  color: #1a1a1a !important;            /* force dark text so it's visible on white */
  background: #ffffff !important;        /* force white field regardless of page theme */
  -webkit-text-fill-color: #1a1a1a !important;
  caret-color: #1a1a1a !important;
}
.jg-chat-input textarea::placeholder { color: #8a94a6 !important; opacity: 1 !important; }
.jg-chat-input textarea:focus { border-color: #1f6feb; }
.jg-chat-send {
  background: #1f6feb;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.jg-chat-send:disabled { opacity: 0.5; cursor: default; }

.jg-footer-note {
  font-size: 11px;
  text-align: center;
  color: #8a94a6;
  padding: 6px;
  background: #fff;
}
