/* New Earth Vet — embeddable chat widget styles */
#nev-chat-root {
  --nev-teal: #0d9488;
  --nev-teal-dark: #0f766e;
  --nev-cream: #f8f5f0;
  --nev-text: #1a1a1a;
  --nev-muted: #5c5c5c;
  --nev-border: #e0d9ce;
  --nev-shadow: 0 8px 28px rgba(13, 148, 136, 0.28);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  color: var(--nev-text);
  box-sizing: border-box;
  z-index: 2147483000;
}

#nev-chat-root *,
#nev-chat-root *::before,
#nev-chat-root *::after {
  box-sizing: border-box;
}

#nev-chat-bubble {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background: var(--nev-teal);
  color: #fff;
  box-shadow: var(--nev-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, transform 0.15s ease;
}

#nev-chat-bubble:hover {
  background: var(--nev-teal-dark);
  transform: scale(1.05);
}

#nev-chat-bubble svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

#nev-chat-panel {
  position: fixed;
  right: 20px;
  bottom: 88px;
  width: min(380px, calc(100vw - 24px));
  height: min(520px, calc(100vh - 120px));
  background: #fff;
  border: 1px solid var(--nev-border);
  border-radius: 16px;
  box-shadow: var(--nev-shadow);
  display: none;
  flex-direction: column;
  overflow: hidden;
}

#nev-chat-panel.nev-open {
  display: flex;
}

#nev-chat-header {
  background: var(--nev-teal);
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

#nev-chat-header h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

#nev-chat-header p {
  margin: 2px 0 0;
  font-size: 12px;
  opacity: 0.9;
}

#nev-chat-close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}

#nev-chat-close:hover {
  background: rgba(255, 255, 255, 0.15);
}

#nev-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  background: var(--nev-cream);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nev-msg {
  max-width: 88%;
  padding: 10px 12px;
  border-radius: 12px;
  white-space: pre-wrap;
  word-break: break-word;
}

.nev-msg a {
  color: var(--nev-teal-dark);
  text-decoration: underline;
}

.nev-msg-user {
  align-self: flex-end;
  background: var(--nev-teal);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.nev-msg-assistant {
  align-self: flex-start;
  background: #fff;
  border: 1px solid var(--nev-border);
  border-bottom-left-radius: 4px;
}

.nev-msg-error {
  align-self: stretch;
  background: #fff3f3;
  border: 1px solid #f0c0c0;
  color: #8b1a1a;
  font-size: 13px;
}

.nev-typing {
  align-self: flex-start;
  color: var(--nev-muted);
  font-size: 13px;
  font-style: italic;
  padding: 4px 8px;
}

#nev-chat-form {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--nev-border);
  background: #fff;
}

#nev-chat-input {
  flex: 1;
  border: 1px solid var(--nev-border);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  resize: none;
  min-height: 44px;
  max-height: 100px;
}

#nev-chat-input:focus {
  outline: 2px solid rgba(45, 106, 79, 0.35);
  border-color: var(--nev-teal);
}

#nev-chat-send {
  border: none;
  border-radius: 10px;
  background: var(--nev-teal);
  color: #fff;
  padding: 0 16px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

#nev-chat-send:hover:not(:disabled) {
  background: var(--nev-teal-dark);
}

#nev-chat-send:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

#nev-chat-footer {
  padding: 0 12px 10px;
  font-size: 11px;
  color: var(--nev-muted);
  background: #fff;
  text-align: center;
}

#nev-chat-footer a {
  color: var(--nev-teal-dark);
}

@media (max-width: 480px) {
  #nev-chat-bubble {
    right: 14px;
    bottom: 14px;
  }
  #nev-chat-panel {
    right: 12px;
    left: 12px;
    width: auto;
    bottom: 78px;
  }
}


#nev-chat-popup {
  position: fixed;
  right: 90px;
  bottom: 90px;
  max-width: min(300px, calc(100vw - 40px));
  background: #fff;
  color: var(--nev-text);
  border: 1px solid var(--nev-border);
  border-radius: 14px;
  box-shadow: var(--nev-shadow);
  padding: 12px 36px 12px 14px;
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  font-size: 13px;
  line-height: 1.35;
}

#nev-chat-popup.nev-popup-visible {
  display: flex;
  animation: nev-pop 0.25s ease-out;
}

#nev-chat-popup strong {
  color: var(--nev-teal-dark);
  font-size: 14px;
}

#nev-chat-popup-close {
  position: absolute;
  top: 6px;
  right: 8px;
  border: none;
  background: transparent;
  color: var(--nev-muted);
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  padding: 2px 6px;
}

@keyframes nev-pop {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

#nev-chat-bubble {
  z-index: 2147483001;
}

#nev-chat-popup {
  z-index: 2147483001;
}

#nev-chat-panel {
  z-index: 2147483001;
}
