/* Chat widget J&F — cores/fonte da identidade visual do site (verde/dourado/creme) */
#jef-chat-root {
  --jef-green: #1a4a3c;
  --jef-green-deep: #0f2b22;
  --jef-gold: #c9a84c;
  --jef-gold-2: #b6903a;
  --jef-cream: #faf8f3;
  --jef-ink: #16241d;
  --jef-ink-soft: #435049;
  --jef-line: #e2dccb;
  font-family: "Source Sans 3", ui-sans-serif, system-ui, -apple-system, sans-serif;
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 999999;
}

#jef-chat-root * { box-sizing: border-box; }

.jef-chat-bubble {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--jef-green);
  border: 1px solid var(--jef-gold);
  color: var(--jef-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 24px -8px rgba(15, 43, 34, 0.45);
  font-weight: 800;
  font-size: 0.62rem;
  line-height: 1.15;
  letter-spacing: 0.01em;
  text-align: center;
  padding: 4px;
}
.jef-chat-bubble:hover { transform: translateY(-1px); }
.jef-chat-bubble:active,
.jef-chat-bubble:focus-visible {
  background: var(--jef-gold);
  color: var(--jef-green-deep);
  outline: none;
}

.jef-chat-panel {
  display: none;
  flex-direction: column;
  width: min(360px, calc(100vw - 32px));
  height: min(520px, calc(100vh - 120px));
  background: var(--jef-cream);
  border: 1px solid var(--jef-line);
  border-radius: 10px;
  box-shadow: 0 20px 50px -15px rgba(15, 43, 34, 0.4);
  position: absolute;
  right: 0;
  bottom: 72px;
  overflow: hidden;
}
.jef-chat-panel.open { display: flex; }

.jef-chat-header {
  background: var(--jef-green);
  color: var(--jef-cream);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.jef-chat-header strong { font-size: 0.95rem; }
.jef-chat-header span { display: block; font-size: 0.74rem; color: rgba(250, 248, 243, 0.75); }
.jef-chat-close {
  background: transparent;
  border: none;
  color: var(--jef-cream);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 4px;
}

.jef-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.jef-msg {
  max-width: 85%;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 0.88rem;
  line-height: 1.42;
  white-space: pre-wrap;
}
.jef-msg.assistant {
  background: #fff;
  border: 1px solid var(--jef-line);
  color: var(--jef-ink);
  align-self: flex-start;
  border-bottom-left-radius: 2px;
}
.jef-msg.user {
  background: var(--jef-green);
  color: var(--jef-cream);
  align-self: flex-end;
  border-bottom-right-radius: 2px;
}
.jef-msg.typing {
  background: #fff;
  border: 1px solid var(--jef-line);
  align-self: flex-start;
  color: var(--jef-ink-soft);
  font-style: italic;
}

.jef-quick-replies {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-self: flex-start;
  max-width: 92%;
}
.jef-quick-reply {
  background: #fff;
  border: 1px solid var(--jef-gold);
  color: var(--jef-green);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}
.jef-quick-reply:hover { background: #fbf3de; }

.jef-chat-inputrow {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid var(--jef-line);
  background: #fff;
}
.jef-chat-inputrow input {
  flex: 1;
  border: 1px solid var(--jef-line);
  border-radius: 8px;
  padding: 9px 11px;
  font-size: 0.88rem;
  font-family: inherit;
}
.jef-chat-inputrow input:focus { outline: 2px solid var(--jef-gold); }
.jef-chat-send {
  background: var(--jef-gold);
  color: var(--jef-green-deep);
  border: none;
  border-radius: 8px;
  padding: 0 14px;
  font-weight: 700;
  cursor: pointer;
}
.jef-chat-send:disabled { opacity: 0.5; cursor: default; }
