/* Ask Linda — Brand Colors: #8fcdcf teal, #E8956D warm orange accent */
#alinda-fab {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 3px solid #8fcdcf;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  cursor: pointer;
  padding: 0;
  overflow: hidden;
  background: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  flex-shrink: 0;
}
#alinda-fab:hover { transform: scale(1.07); box-shadow: 0 6px 20px rgba(0,0,0,0.25); }
#alinda-fab.pulse { animation: lindaPulse 2s ease-in-out 3; }
@keyframes lindaPulse {
  0%   { box-shadow: 0 4px 16px rgba(0,0,0,0.2), 0 0 0 0 rgba(143,205,207,0.6); }
  50%  { box-shadow: 0 4px 16px rgba(0,0,0,0.2), 0 0 0 14px rgba(143,205,207,0); }
  100% { box-shadow: 0 4px 16px rgba(0,0,0,0.2), 0 0 0 0 rgba(143,205,207,0); }
}
#alinda-fab img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }

#alinda-panel {
  position: fixed;
  bottom: 140px;
  right: 24px;
  width: 380px;
  max-width: calc(100vw - 48px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  z-index: 99998;
  display: none;
  flex-direction: column;
  overflow: hidden;
  font-family: -apple-system, sans-serif;
  transition: all 0.25s ease;
}
#alinda-panel.open { display: flex; }
#alinda-panel.expanded { bottom: 16px; right: 16px; width: calc(100vw - 32px); max-width: 860px; }
#alinda-panel.expanded #alinda-messages { height: calc(100vh - 210px); }

#alinda-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #8fcdcf;
  border-bottom: none;
}
#alinda-header-photo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 2px solid rgba(255,255,255,0.8);
  flex-shrink: 0;
}
.alinda-title { font-size: 15px; font-weight: 600; color: #fff; }
.alinda-sub { font-size: 11px; color: rgba(255,255,255,0.85); }
#alinda-header-actions { margin-left: auto; display: flex; gap: 4px; }
#alinda-expand, #alinda-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  opacity: 0.85;
  line-height: 1;
}
#alinda-expand:hover, #alinda-close:hover { opacity: 1; background: rgba(255,255,255,0.2); }

#alinda-messages {
  height: 300px;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #fafafa;
}
.alinda-msg { display: flex; gap: 8px; align-items: flex-start; }
.alinda-msg.user { flex-direction: row-reverse; }
.alinda-av-img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  flex-shrink: 0;
  border: 1.5px solid #8fcdcf;
}
.alinda-av-user {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #666;
}
.alinda-wrap { display: flex; flex-direction: column; max-width: 82%; }
.alinda-bubble {
  padding: 9px 13px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.55;
}
.alinda-bubble.bot {
  background: #fff;
  color: #111;
  border: 1px solid #e8e8e8;
  border-top-left-radius: 3px;
}
.alinda-bubble.user {
  background: #8fcdcf;
  color: #fff;
  border-top-right-radius: 3px;
}
.alinda-bubble a { color: #5a9ea0; text-decoration: underline; }
.alinda-bubble.user a { color: #fff; }
.alinda-sources { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.alinda-source {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 99px;
  background: #f0f9f9;
  border: 1px solid #8fcdcf;
  color: #5a9ea0;
  text-decoration: none;
}

#alinda-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 8px 14px;
  background: #fafafa;
  border-top: 1px solid #f0f0f0;
}
.alinda-chip {
  font-size: 11px;
  padding: 4px 11px;
  border-radius: 99px;
  border: 1px solid #8fcdcf;
  color: #5a9ea0;
  cursor: pointer;
  background: #fff;
  line-height: 1.4;
}
.alinda-chip:hover { background: #8fcdcf; color: #fff; }

#alinda-input-row {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  border-top: 1px solid #eee;
  background: #fff;
  align-items: center;
}
#alinda-input {
  flex: 1 !important;
  font-size: 13px !important;
  padding: 0 11px !important;
  height: 38px !important;
  border-radius: 8px !important;
  border: 1px solid #ddd !important;
  outline: none !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  background: #fff !important;
  color: #333 !important;
}
#alinda-input:focus { border-color: #8fcdcf !important; box-shadow: none !important; }
#alinda-send {
  height: 38px !important;
  padding: 0 16px !important;
  border-radius: 8px !important;
  background: #8fcdcf !important;
  color: #fff !important;
  border: none !important;
  font-size: 13px !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  font-weight: 500 !important;
  line-height: 1 !important;
  margin: 0 !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
}
#alinda-send:hover { background: #6db8ba !important; }
#alinda-send:disabled { opacity: 0.5 !important; }

/* Lead capture modal */
#alinda-lead-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 999997;
}
#alinda-lead-modal {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 16px;
  padding: 28px 24px 24px;
  width: 340px;
  max-width: calc(100vw - 32px);
  z-index: 999998;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0,0,0,0.2);
}
#alinda-lead-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #999;
  line-height: 1;
}
#alinda-lead-photo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 3px solid #8fcdcf;
  margin-bottom: 12px;
}
#alinda-lead-title { margin: 0 0 4px; font-size: 18px; color: #111; }
#alinda-lead-subtitle { margin: 0 0 16px; font-size: 13px; color: #666; }
#alinda-lead-form { display: flex; flex-direction: column; gap: 8px; }
#alinda-lead-form input, #alinda-lead-form textarea {
  font-size: 13px;
  padding: 9px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  outline: none;
  width: 100%;
  box-sizing: border-box;
  font-family: -apple-system, sans-serif;
}
#alinda-lead-form input:focus, #alinda-lead-form textarea:focus { border-color: #8fcdcf; }
#alinda-lead-form textarea { resize: none; }
#alinda-lead-submit {
  height: 42px;
  background: #8fcdcf;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 4px;
}
#alinda-lead-submit:hover { background: #6db8ba; }

@keyframes lindanb { 0%,80%,100%{opacity:0.2} 40%{opacity:1} }
.alinda-dot { width: 5px; height: 5px; border-radius: 50%; background: #8fcdcf; animation: lindanb 1.2s infinite; display: inline-block; }

/* Contact bar */
#alinda-contact-bar {
  display: flex;
  gap: 8px;
  padding: 8px 14px 0;
  background: #fff;
}
#alinda-contact-btn {
  flex: 1;
  height: 34px !important;
  background: #8fcdcf !important;
  color: #fff !important;
  border: none !important;
  border-radius: 8px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px;
  line-height: 34px !important;
  box-sizing: border-box !important;
}
#alinda-contact-btn:hover { background: #6db8ba !important; }
#alinda-call-btn {
  flex: 1;
  height: 34px;
  background: #fff;
  color: #5a9ea0;
  border: 1.5px solid #8fcdcf;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-decoration: none;
  box-sizing: border-box;
}
#alinda-call-btn:hover { background: #f0fafa; }

/* FAB wrap + speech bubble */
#alinda-fab-wrap {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

#alinda-speech-bubble {
  background: #fff;
  border: 1.5px solid #8fcdcf;
  border-radius: 12px 12px 4px 12px;
  padding: 10px 32px 10px 14px;
  font-size: 13px;
  color: #333;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  position: relative;
  max-width: 220px;
  line-height: 1.4;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
}
#alinda-speech-bubble.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}
#alinda-speech-bubble::after {
  content: '';
  position: absolute;
  bottom: -8px;
  right: 18px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 0px solid transparent;
  border-top: 8px solid #8fcdcf;
}
#alinda-bubble-dismiss {
  position: absolute;
  top: 6px;
  right: 8px;
  background: none;
  border: none;
  font-size: 11px;
  cursor: pointer;
  color: #aaa;
  padding: 0;
  line-height: 1;
}
#alinda-bubble-dismiss:hover { color: #666; }

/* Pulse animation */
@keyframes lindaFabPulse {
  0%   { box-shadow: 0 4px 16px rgba(0,0,0,0.2), 0 0 0 0 rgba(143,205,207,0.7); }
  70%  { box-shadow: 0 4px 16px rgba(0,0,0,0.2), 0 0 0 12px rgba(143,205,207,0); }
  100% { box-shadow: 0 4px 16px rgba(0,0,0,0.2), 0 0 0 0 rgba(143,205,207,0); }
}
#alinda-fab.pulsing {
  animation: lindaFabPulse 1.8s ease-out infinite;
}
