/* Floating chat / feedback widget — included on every page */
.chat-fab {
  position: fixed; right: 16px; bottom: 16px; z-index: 100;
  width: 56px; height: 56px; border-radius: 50%;
  background: #0EA5E9; color: white; border: 0; cursor: pointer;
  font-size: 22px;
  box-shadow: 0 10px 24px -8px rgba(14,165,233,.6);
  transition: transform .15s ease, background .15s ease;
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
}
.chat-fab:hover { background: #0369A1; transform: translateY(-1px); }
.chat-panel {
  position: fixed; right: 16px; bottom: 84px; z-index: 100;
  width: min(360px, calc(100vw - 32px));
  max-height: min(560px, calc(100dvh - 120px));
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 25px 60px -15px rgba(0,0,0,.35);
  display: flex; flex-direction: column;
  overflow: hidden;
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  color: #222;
}
.chat-panel[hidden] { display: none; }
.chat-header {
  padding: 12px 14px;
  background: #0EA5E9;
  color: white;
  display: flex; align-items: center; justify-content: space-between;
}
.chat-header strong { font-size: 14px; letter-spacing: .3px; }
.chat-close {
  background: transparent; border: 0; color: white; cursor: pointer;
  font-size: 22px; line-height: 1; padding: 4px 8px; border-radius: 6px;
}
.chat-close:hover { background: rgba(255,255,255,.15); }
.chat-log {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex; flex-direction: column; gap: 8px;
  font-size: 14px;
  background: #f7f4ee;
}
.chat-msg { display: flex; }
.chat-msg .bubble {
  background: white;
  padding: 8px 12px;
  border-radius: 12px;
  max-width: 80%;
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
  line-height: 1.4;
}
.chat-msg.user { justify-content: flex-end; }
.chat-msg.user .bubble { background: #0EA5E9; color: white; }
.chat-msg.system .bubble { background: #efe6d4; color: #5e4d22; font-size: 13px; font-style: italic; }
.chat-quick {
  padding: 8px 12px;
  display: flex; gap: 6px; flex-wrap: wrap;
  border-top: 1px solid #eee;
  background: #fafaf6;
}
.chat-quick button {
  appearance: none; cursor: pointer; border: 1px solid #d6d2c4;
  background: white; color: #444; font-size: 12px; font-weight: 600;
  padding: 6px 10px; border-radius: 999px;
  font-family: inherit;
}
.chat-quick button:hover { border-color: #0EA5E9; color: #0EA5E9; }
.chat-form {
  display: grid; gap: 6px;
  padding: 10px 12px 12px;
  border-top: 1px solid #eee;
  background: white;
}
.chat-email { font-size: 13px; padding: 8px 10px; border: 1px solid #e1ddcd; border-radius: 8px; background: #fafaf6; font-family: inherit; }
.chat-row { display: flex; gap: 6px; }
.chat-input {
  flex: 1; font-size: 14px; padding: 10px 12px; border: 1px solid #d6d2c4; border-radius: 8px; background: white;
  font-family: inherit;
}
.chat-send {
  appearance: none; cursor: pointer; border: 0;
  background: #0EA5E9; color: white;
  padding: 0 14px; font-weight: 700; font-size: 14px;
  border-radius: 8px; min-width: 64px;
  font-family: inherit;
}
.chat-send:hover { background: #0369A1; }

.chat-msg.typing .bubble { background: white; padding: 10px 14px; }
.chat-msg.typing .dot {
  display: inline-block; font-size: 8px; color: #9aa9b6; line-height: 1; margin: 0 1px;
  animation: typingdots 1.2s infinite ease-in-out;
}
.chat-msg.typing .dot:nth-child(2) { animation-delay: .15s; }
.chat-msg.typing .dot:nth-child(3) { animation-delay: .3s; }
@keyframes typingdots {
  0%, 60%, 100% { opacity: .25; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-2px); }
}
