
:root {
  --hfp-chat-cream: #FAF6EE;
  --hfp-chat-white: #FDF9F3;
  --hfp-chat-ochre: #C4851A;
  --hfp-chat-rust: #B04A1E;
  --hfp-chat-dark: #1E1208;
  --hfp-chat-mid: #5C3D1E;
  --hfp-chat-border: rgba(196,133,26,.30);
}

/* Consistent sizing */
#hfp-chat-launcher,
#hfp-chat-panel,
#hfp-chat-panel * {
  box-sizing: border-box;
}

/* Floating chatbot button */
#hfp-chat-launcher {
  position: fixed !important;
  right: 26px !important;
  bottom: 26px !important;
  z-index: 999990 !important;
  width: 70px !important;
  height: 70px !important;
  border: 3px solid var(--hfp-chat-cream) !important;
  border-radius: 50% !important;
  background: var(--hfp-chat-rust) !important;
  color: #fff !important;
  cursor: pointer;
  box-shadow: 0 5px 22px rgba(30,18,8,.38) !important;
  display: grid !important;
  place-items: center !important;
  transition: transform .2s, box-shadow .2s;
}

#hfp-chat-launcher:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 9px 28px rgba(30,18,8,.42) !important;
}

#hfp-chat-launcher svg {
  width: 32px !important;
  height: 32px !important;
}

/* Chat window */
#hfp-chat-panel {
  position: fixed !important;
  right: 26px !important;
  bottom: 110px !important;
  z-index: 999991 !important;
  width: min(420px, calc(100vw - 32px)) !important;
  height: min(620px, calc(100dvh - 140px)) !important;
  min-height: 400px;
  display: none;
  flex-direction: column;
  overflow: hidden !important;
  border: 1px solid var(--hfp-chat-border) !important;
  border-radius: 20px !important;
  background: var(--hfp-chat-white) !important;
  color: var(--hfp-chat-dark) !important;
  box-shadow: 0 15px 55px rgba(30,18,8,.32) !important;
  font-family: 'Jost', Arial, sans-serif !important;
  opacity: 1 !important;
}

#hfp-chat-panel.hfp-chat-open {
  display: flex !important;
  animation: hfpChatIn .2s ease-out;
}

@keyframes hfpChatIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Header */
.hfp-chat-header {
  display: flex !important;
  align-items: center !important;
  gap: 12px;
  padding: 17px 18px !important;
  background: var(--hfp-chat-dark) !important;
  color: var(--hfp-chat-cream) !important;
  flex-shrink: 0;
}

.hfp-chat-mark {
  width: 44px !important;
  height: 44px !important;
  flex: 0 0 44px;
  border-radius: 50%;
  background: var(--hfp-chat-ochre) !important;
  display: grid;
  place-items: center;
  color: white !important;
  font-family: Georgia, serif;
  font-size: 23px;
}

.hfp-chat-heading {
  min-width: 0;
  flex: 1;
}

.hfp-chat-heading strong {
  display: block;
  font-family: 'Cormorant Garamond', Georgia, serif !important;
  font-size: 23px !important;
  line-height: 1.15;
  font-weight: 600;
  color: var(--hfp-chat-cream) !important;
}

.hfp-chat-heading span {
  display: block;
  margin-top: 5px;
  color: rgba(250,246,238,.78) !important;
  font-size: 11px;
  letter-spacing: .05em;
}

#hfp-chat-close {
  border: 0;
  background: transparent !important;
  color: #fff !important;
  font-size: 27px !important;
  line-height: 1;
  cursor: pointer;
  padding: 5px 7px;
}

/* Conversation area */
.hfp-chat-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto !important;
  padding: 18px 15px 14px !important;
  display: flex;
  flex-direction: column;
  gap: 13px;
  scroll-behavior: smooth;
  background: var(--hfp-chat-white) !important;
}

.hfp-chat-message {
  max-width: 90%;
  padding: 12px 14px !important;
  border-radius: 14px;
  font-size: 14px !important;
  line-height: 1.65 !important;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.hfp-chat-message.bot {
  align-self: flex-start;
  background: #F3EBDD !important;
  color: var(--hfp-chat-dark) !important;
  border-bottom-left-radius: 4px;
}

.hfp-chat-message.user {
  align-self: flex-end;
  background: var(--hfp-chat-rust) !important;
  color: #fff !important;
  border-bottom-right-radius: 4px;
}

/* Suggested questions */
.hfp-chat-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 0 15px 12px !important;
  background: var(--hfp-chat-white) !important;
}

.hfp-chat-quick button {
  border: 1px solid var(--hfp-chat-border);
  border-radius: 20px;
  background: transparent;
  color: var(--hfp-chat-mid);
  padding: 7px 11px;
  font: 13px 'Jost', sans-serif;
  cursor: pointer;
}

.hfp-chat-quick button:hover {
  background: #F3EBDD;
}

/* Message input */
.hfp-chat-compose {
  display: flex !important;
  align-items: flex-end;
  gap: 9px;
  padding: 13px 14px !important;
  border-top: 1px solid var(--hfp-chat-border);
  background: #FFFDF9 !important;
  flex-shrink: 0;
}

#hfp-chat-input {
  flex: 1;
  min-width: 0;
  max-height: 100px;
  resize: none;
  border: 1px solid var(--hfp-chat-border) !important;
  border-radius: 13px !important;
  padding: 12px !important;
  outline: none;
  background: #fff !important;
  color: var(--hfp-chat-dark) !important;
  font: 14px 'Jost', sans-serif !important;
}

#hfp-chat-input:focus {
  border-color: var(--hfp-chat-ochre) !important;
  box-shadow: 0 0 0 3px rgba(196,133,26,.13);
}

#hfp-chat-send {
  width: 43px !important;
  height: 43px !important;
  flex: 0 0 43px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--hfp-chat-rust) !important;
  color: white !important;
  cursor: pointer;
}

#hfp-chat-send:disabled {
  opacity: .45;
  cursor: wait;
}

#hfp-chat-send svg {
  width: 20px;
  height: 20px;
}

/* Footer note */
.hfp-chat-note {
  padding: 0 12px 11px !important;
  text-align: center;
  font-size: 11px !important;
  color: #88745f !important;
  background: #FFFDF9 !important;
  flex-shrink: 0;
}

.hfp-chat-typing {
  align-self: flex-start;
  color: #806b55;
  font-size: 13px;
  padding: 2px 8px;
  font-style: italic;
}

/* Mobile layout */
@media (max-width: 520px) {
  #hfp-chat-launcher {
    right: 17px !important;
    bottom: 17px !important;
    width: 64px !important;
    height: 64px !important;
  }

  #hfp-chat-panel {
    right: 10px !important;
    bottom: 92px !important;
    width: calc(100vw - 20px) !important;
    height: min(620px, calc(100dvh - 110px)) !important;
    min-height: 350px;
  }
}
.hfp-chat-mark {
  overflow: hidden;
  padding: 0;
}

.hfp-chat-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  border-radius: 50%;
}