/* chat-widget.css V1.0 2026-05-29 */
#chat-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #7B5B3A;
  color: white;
  border: none;
  font-size: 26px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(44,32,22,0.25);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s, transform 0.18s;
}
#chat-fab:hover { background: #5a3f22; transform: scale(1.07); }

#chat-panel {
  position: fixed;
  bottom: 96px;
  right: 28px;
  width: 360px;
  max-width: calc(100vw - 40px);
  height: 480px;
  max-height: calc(100vh - 120px);
  background: #FAF6F0;
  border: 1.5px solid #F2EAE0;
  border-radius: 20px;
  box-shadow: 0 8px 32px rgba(44,32,22,0.18);
  z-index: 998;
  display: none;
  flex-direction: column;
  overflow: hidden;
  font-family: 'Source Sans 3', sans-serif;
}
#chat-panel.open { display: flex; }

#chat-header {
  background: #7B5B3A;
  color: #FAF6F0;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
#chat-header-title {
  font-family: 'Caveat', cursive;
  font-size: 22px;
  font-weight: 600;
}
#chat-header-close {
  background: none;
  border: none;
  color: #FAF6F0;
  font-size: 20px;
  cursor: pointer;
  opacity: 0.8;
  padding: 0 4px;
  line-height: 1;
}
#chat-header-close:hover { opacity: 1; }

#chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-msg {
  max-width: 88%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.6;
  word-break: break-word;
}
.chat-msg a {
  color: #7B5B3A;
  font-weight: 500;
}
.chat-msg.bot {
  background: white;
  border: 1.5px solid #F2EAE0;
  color: #2C2016;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  font-family: 'Lora', serif;
  font-style: italic;
}
.chat-msg.user {
  background: #7B5B3A;
  color: #FAF6F0;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  font-style: normal;
}
.chat-msg.typing {
  background: white;
  border: 1.5px solid #F2EAE0;
  color: #7A6652;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  font-style: italic;
  font-family: 'Lora', serif;
}

#chat-input-row {
  display: flex;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1.5px solid #F2EAE0;
  flex-shrink: 0;
  background: #FAF6F0;
}
#chat-input {
  flex: 1;
  border: 1.5px solid #F2EAE0;
  border-radius: 20px;
  padding: 9px 14px;
  font-size: 14px;
  font-family: 'Source Sans 3', sans-serif;
  background: white;
  color: #2C2016;
  outline: none;
  resize: none;
  transition: border-color 0.18s;
}
#chat-input:focus { border-color: #C4A882; }
#chat-send {
  background: #7B5B3A;
  border: none;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  color: white;
  font-size: 17px;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s;
  align-self: flex-end;
}
#chat-send:hover { background: #5a3f22; }
#chat-send:disabled { background: #C4A882; cursor: default; }
