@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:wght@400;600&family=DM+Sans:wght@400;500&display=swap');

#garcia-chat-wrap * { box-sizing: border-box; font-family: 'DM Sans', sans-serif; }

/* ── Attention callout bubble ── */
#gc-callout {
  position: fixed !important;
  bottom: 100px !important;
  right: 28px !important;
  background: #ffffff !important;
  border: 1px solid #e0e4ee !important;
  border-radius: 12px 12px 4px 12px !important;
  padding: 10px 30px 10px 14px !important;
  font-size: 13px !important;
  color: #1e2a4a !important;
  font-family: 'DM Sans', sans-serif !important;
  font-weight: 500 !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12) !important;
  z-index: 99998 !important;
  width: 200px !important;
  line-height: 1.5 !important;
  transition: opacity 0.3s, transform 0.3s !important;
}
#gc-callout.gc-hidden {
  opacity: 0 !important;
  transform: translateY(6px) !important;
  pointer-events: none !important;
}
#gc-callout-close {
  position: absolute !important;
  top: 6px !important;
  right: 8px !important;
  background: none !important;
  border: none !important;
  cursor: pointer !important;
  font-size: 15px !important;
  color: #9ba3b8 !important;
  line-height: 1 !important;
  padding: 0 !important;
}
#gc-callout-close:hover { color: #1e2a4a !important; }

/* ── Launch button ── */
#garcia-chat-btn {
  position: fixed !important;
  bottom: 28px !important;
  right: 28px !important;
  width: 60px !important;
  height: 60px !important;
  min-width: 60px !important;
  min-height: 60px !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 50% !important;
  background: #b89c6e !important;
  border: none !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 99999 !important;
  transition: transform 0.2s, background 0.2s !important;
  box-shadow: 0 4px 20px rgba(184,156,110,0.45) !important;
  line-height: 1 !important;
  text-indent: 0 !important;
  overflow: visible !important;
}
#garcia-chat-btn:hover { background: #a08050 !important; transform: scale(1.05) !important; }
#garcia-chat-btn svg { display: block !important; flex-shrink: 0 !important; pointer-events: none !important; }

/* Icon swap via class */
#garcia-chat-btn #gc-ico-close { display: none !important; }
#garcia-chat-btn #gc-ico-open  { display: block !important; }
#garcia-chat-btn.gc-is-open #gc-ico-open  { display: none !important; }
#garcia-chat-btn.gc-is-open #gc-ico-close { display: block !important; }

/* ── Chat window ── */
#garcia-chat-win {
  position: fixed;
  bottom: 100px;
  right: 28px;
  width: 360px;
  height: 560px;
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e0e4ee;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 99998;
  transition: opacity 0.22s, transform 0.22s;
  box-shadow: 0 8px 40px rgba(0,0,0,0.18);
}
#garcia-chat-win.gc-hidden {
  opacity: 0;
  transform: translateY(14px) scale(0.97);
  pointer-events: none;
}

/* ── Header ── */
.gc-header {
  background: #1e2a4a;
  padding: 13px 16px;
  display: flex;
  align-items: center;
  gap: 11px;
  flex-shrink: 0;
}
.gc-logo {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: 1.5px solid rgba(184,156,110,0.5);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.gc-logo svg { width: 20px; height: 20px; }
.gc-header-info { flex: 1; }
.gc-name { color: #ffffff; font-size: 14px; font-weight: 600; margin: 0; line-height: 1.3; font-family: 'DM Sans', sans-serif; }
.gc-status { color: rgba(255,255,255,0.7); font-size: 12px; margin: 2px 0 0; display: flex; align-items: center; gap: 5px; }
.gc-dot { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; flex-shrink: 0; }
.gc-close-x {
  background: none; border: none; cursor: pointer; padding: 4px;
  color: rgba(255,255,255,0.6); font-size: 20px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.gc-close-x:hover { color: #fff; }

/* ── Messages ── */
.gc-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 14px 13px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
  background: #f7f8fb;
}
.gc-msgs::-webkit-scrollbar { width: 3px; }
.gc-msgs::-webkit-scrollbar-thumb { background: #d0d5e3; border-radius: 3px; }

.gc-msg { display: flex; align-items: flex-end; gap: 7px; }
.gc-msg.gc-bot { align-self: flex-start; max-width: 88%; }
.gc-msg.gc-user { align-self: flex-end; flex-direction: row-reverse; max-width: 82%; }

.gc-av {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: #1e2a4a;
  display: flex; align-items: center; justify-content: center;
}
.gc-av svg { width: 14px; height: 14px; }

.gc-bbl {
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 13.5px;
  line-height: 1.55;
}
.gc-msg.gc-bot .gc-bbl {
  background: #ffffff;
  color: #1a1f36;
  border-bottom-left-radius: 4px;
  border: 1px solid #e0e4ee;
}
.gc-msg.gc-user .gc-bbl {
  background: #1e2a4a;
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

/* ── Typing indicator ── */
.gc-typing { display: flex; align-items: center; gap: 4px; padding: 11px 14px; }
.gc-typing span {
  width: 7px; height: 7px; border-radius: 50%;
  background: #c0c8d8;
  animation: gc-bounce 1.1s infinite;
}
.gc-typing span:nth-child(2) { animation-delay: .18s; }
.gc-typing span:nth-child(3) { animation-delay: .36s; }
@keyframes gc-bounce {
  0%,60%,100% { transform: translateY(0); }
  30% { transform: translateY(-5px); }
}

/* ── Quick reply buttons ── */
#gc-qr {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 13px 10px;
  background: #f7f8fb;
}
.gc-qb {
  padding: 6px 13px;
  font-size: 12.5px;
  border-radius: 20px;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  border: 1px solid #b89c6e;
  background: #ffffff;
  color: #b89c6e;
  transition: background 0.14s, color 0.14s;
  line-height: 1.4;
}
.gc-qb:hover { background: #b89c6e; color: #ffffff; }

/* ── Input area ── */
.gc-input-area {
  padding: 10px 12px;
  border-top: 1px solid #e0e4ee;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
  background: #ffffff;
}
#gc-input {
  flex: 1;
  border: 1px solid #dde1ec;
  border-radius: 20px;
  padding: 9px 14px;
  font-size: 13.5px;
  font-family: 'DM Sans', sans-serif;
  background: #f7f8fb;
  color: #1a1f36;
  outline: none;
}
#gc-input:focus { border-color: #1e2a4a; background: #fff; }
#gc-input::placeholder { color: #9ba3b8; }

#gc-send {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 50% !important;
  background: #b89c6e !important;
  border: none !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  transition: background 0.14s !important;
  line-height: 1 !important;
  overflow: visible !important;
}
#gc-send:hover { background: #a08050 !important; }
#gc-send svg {
  display: block !important;
  width: 15px !important;
  height: 15px !important;
  flex-shrink: 0 !important;
  pointer-events: none !important;
}

/* ── Phone footer ── */
.gc-phone-bar {
  padding: 7px 14px 9px;
  text-align: center;
  font-size: 12px;
  color: #b89c6e;
  background: #ffffff;
  border-top: 1px solid #f0f2f8;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.gc-phone-bar a { color: #b89c6e; text-decoration: none; font-weight: 500; }
.gc-phone-bar a:hover { text-decoration: underline; }

/* ── Disclaimer ── */
.gc-disclaimer {
  font-size: 9.5px;
  color: #9ba3b8;
  text-align: center;
  padding: 3px 14px 7px;
  line-height: 1.4;
  margin: 0;
  background: #ffffff;
}

/* ── Lead card ── */
.gc-lead-card {
  background: #f0f4ff;
  border: 1px solid #c7d0e8;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 12px;
  color: #4a5278;
  margin: 4px 0;
}
.gc-lead-title {
  font-weight: 600;
  color: #1e2a4a;
  margin: 0 0 8px;
  font-size: 12.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.gc-lead-title::before {
  content: '';
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #4ade80;
}
.gc-lead-grid { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; }
.gc-lead-grid .gc-label { color: #8a93b2; }
.gc-lead-grid .gc-val { color: #1e2a4a; font-weight: 500; }
.gc-urgent { color: #ef4444 !important; }

@media (max-width: 480px) {
  #garcia-chat-win { width: calc(100vw - 20px); right: 10px; bottom: 90px; }
  #garcia-chat-btn { right: 16px; bottom: 16px; }
}
