/* Prime Acre Capital — website chat assistant. Black and gold, from the site's tokens in style.css. */
.pac-chat {
  --pac-dark: var(--brand-dark, #0E0C09);
  --pac-accent: var(--brand, #7A5C14);
  --pac-gold: var(--gold, #C9A55C);
  --pac-gold-light: var(--gold-light, #E9D08F);
  --pac-gold-grad: var(--gold-grad, linear-gradient(135deg, #F0D995 0%, #D2AE5F 40%, #B38A3B 72%, #D9B96C 100%));
  --pac-ink: var(--ink, #16130E);
  --pac-ink-2: var(--ink-2, #5A5246);
  --pac-line: var(--line, #E6DCC8);
  --pac-soft: var(--brand-soft, #F3EAD3);
  --pac-bg: var(--surface, #FFFDF9);
  --pac-cta-ink: var(--cta-ink, #15110A);
  --pac-ok: var(--ok, #2F7D4F);
  --pac-focus: var(--focus, #7A5C14);
  --pac-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
  --pac-bottom: 20px;
  font-family: var(--font-body, "Figtree", system-ui, sans-serif);
  color: var(--pac-ink);
}
@media (max-width: 860px) {
  .pac-chat { --pac-bottom: calc(4.6rem + 10px + env(safe-area-inset-bottom, 0px)); }
}

/* launcher */
.pac-launcher {
  position: fixed; right: 20px; bottom: var(--pac-bottom); z-index: 60;
  display: inline-flex; align-items: center; gap: 0.6rem;
  height: 60px; padding: 0 1.2rem 0 0.55rem;
  border: 0; border-radius: 999px; cursor: pointer;
  background: var(--pac-dark); color: var(--on-dark, #F6F0E2);
  font: 700 0.98rem var(--font-body, system-ui, sans-serif);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35), inset 0 0 0 1.5px rgba(201, 165, 92, 0.6);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.pac-launcher:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(0, 0, 0, 0.42), inset 0 0 0 1.5px var(--pac-gold); }
.pac-launcher:focus-visible { outline: 3px solid var(--pac-focus); outline-offset: 3px; }
.pac-launcher .pac-ico {
  position: relative; display: grid; place-items: center;
  width: 46px; height: 46px; border-radius: 50%; background: var(--pac-gold-grad); color: var(--pac-cta-ink);
}
.pac-launcher .pac-ico svg { width: 24px; height: 24px; }
.pac-launcher .pac-dot {
  position: absolute; right: 2px; top: 2px; width: 12px; height: 12px; border-radius: 50%;
  background: #22C55E; border: 2px solid var(--pac-dark);
}
.pac-chat[data-open="true"] .pac-launcher { display: none; }
@media (max-width: 560px), (max-height: 500px) {
  .pac-launcher { right: 14px; padding: 0 0.45rem; height: 56px; }
  .pac-launcher .pac-label { display: none; }
}

/* teaser bubble */
.pac-teaser {
  position: fixed; right: 20px; bottom: calc(var(--pac-bottom) + 72px); z-index: 60;
  max-width: 280px; padding: 0.9rem 2.2rem 0.9rem 1rem;
  background: var(--pac-bg); border: 1px solid var(--pac-line); border-radius: 16px 16px 4px 16px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
  font-size: 0.95rem; line-height: 1.45; cursor: pointer;
  animation: pac-pop 0.25s ease-out both;
}
.pac-teaser b { display: block; font-family: var(--font-label, inherit); margin-bottom: 0.15rem; }
.pac-teaser-close {
  position: absolute; top: 6px; right: 6px; width: 28px; height: 28px;
  border: 0; border-radius: 50%; background: transparent; color: var(--pac-ink-2);
  font-size: 1.1rem; line-height: 1; cursor: pointer;
}
.pac-teaser-close:hover { background: var(--pac-soft); }
@media (max-width: 560px) { .pac-teaser { right: 14px; max-width: calc(100vw - 28px - 40px); } }

/* panel (the full-screen breakpoint below must match SMALL_SCREEN in chat.js) */
.pac-panel {
  position: fixed; right: 20px; bottom: var(--pac-bottom); z-index: 61;
  width: 390px; max-width: calc(100vw - 40px);
  height: min(640px, calc(100dvh - var(--pac-bottom) - 24px));
  display: flex; flex-direction: column;
  background: var(--pac-bg); border-radius: 18px; overflow: hidden;
  box-shadow: var(--pac-shadow); border: 1px solid var(--pac-line);
  animation: pac-pop 0.2s ease-out both;
}
@media (max-width: 560px), (max-height: 500px) {
  .pac-panel {
    inset: 0; right: 0; bottom: 0; width: 100%; max-width: none; height: 100dvh;
    border-radius: 0; border: 0;
    padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px);
  }
}
@keyframes pac-pop { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: none; } }

.pac-head {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.85rem 0.9rem 0.85rem 1rem;
  background: var(--pac-dark); color: var(--on-dark, #F6F0E2);
  border-bottom: 1px solid rgba(201, 165, 92, 0.5);
}
.pac-avatar {
  flex: 0 0 42px; width: 42px; height: 42px; border-radius: 12px;
  background: #060606 url("img/pac-monogram.png") center / auto 76% no-repeat;
  box-shadow: inset 0 0 0 1px rgba(201, 165, 92, 0.45);
}
.pac-title { flex: 1; min-width: 0; line-height: 1.2; }
.pac-title h2 { margin: 0; font: 600 0.98rem var(--font-brand, Georgia, serif); color: var(--pac-gold-light); letter-spacing: 0.08em; }
.pac-title p { margin: 0.15rem 0 0; font-size: 0.8rem; opacity: 0.88; display: flex; align-items: center; gap: 0.35rem; }
.pac-title p::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #22C55E; }
.pac-close {
  flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(233, 208, 143, 0.12); color: var(--on-dark, #F6F0E2); font-size: 1.3rem; line-height: 1;
}
.pac-close:hover { background: rgba(233, 208, 143, 0.22); }
.pac-close:focus-visible { outline: 3px solid var(--pac-gold-light); outline-offset: 2px; }
.pac-send:focus-visible, .pac-chip:focus-visible, .pac-action:focus-visible { outline: 3px solid var(--pac-focus); outline-offset: 2px; }

.pac-log {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: 1rem 0.9rem 0.5rem; display: flex; flex-direction: column; gap: 0.6rem;
  background: var(--bg-soft, #F4EEE2);
}
.pac-msg {
  max-width: 86%; padding: 0.65rem 0.85rem; border-radius: 16px;
  font-size: 0.96rem; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere;
}
.pac-msg.bot { align-self: flex-start; background: var(--pac-bg); border: 1px solid var(--pac-line); border-bottom-left-radius: 4px; }
.pac-msg.me { align-self: flex-end; background: #1C1813; color: var(--on-dark, #F6F0E2); border-bottom-right-radius: 4px; }
.pac-msg a { color: inherit; font-weight: 700; }
.pac-msg.me a { color: var(--pac-gold-light); }
.pac-msg.bot a { color: var(--pac-accent); }
.pac-typing { align-self: flex-start; display: inline-flex; gap: 4px; padding: 0.8rem 0.9rem; background: var(--pac-bg); border: 1px solid var(--pac-line); border-radius: 16px; border-bottom-left-radius: 4px; }
.pac-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--pac-ink-2); opacity: 0.4; animation: pac-blink 1.2s infinite; }
.pac-typing span:nth-child(2) { animation-delay: 0.2s; }
.pac-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes pac-blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }

.pac-card {
  align-self: stretch; padding: 0.9rem 1rem; border-radius: 14px;
  background: var(--pac-bg); border: 1px solid var(--pac-line); border-top: 4px solid var(--pac-ok);
  font-size: 0.93rem;
}
.pac-card b { display: block; font-family: var(--font-label, inherit); font-size: 1.02rem; }
.pac-card .pac-when { margin: 0.2rem 0 0.6rem; color: var(--pac-ink); font-weight: 600; }
.pac-card pre { margin: 0.5rem 0; white-space: pre-wrap; font: 0.85rem/1.4 ui-monospace, Menlo, Consolas, monospace; background: var(--bg-soft, #F4EEE2); padding: 0.6rem; border-radius: 8px; overflow-wrap: anywhere; }
.pac-actions { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.pac-action {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.5rem 0.85rem; border-radius: 999px; border: 1.5px solid var(--pac-dark);
  background: var(--pac-bg); color: var(--pac-ink); font: 700 0.86rem var(--font-body, inherit);
  text-decoration: none; cursor: pointer;
}
.pac-action:hover { background: var(--pac-soft); }

.pac-chips { display: flex; flex-wrap: wrap; gap: 0.45rem; padding: 0.5rem 0.9rem 0.6rem; background: var(--bg-soft, #F4EEE2); }
.pac-chips:empty { display: none; }
.pac-chip {
  padding: 0.5rem 0.85rem; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--pac-dark); background: var(--pac-bg); color: var(--pac-ink);
  font: 700 0.88rem var(--font-body, inherit); text-align: left;
}
.pac-chip:hover { background: var(--pac-dark); color: var(--pac-gold-light); }
.pac-chip.slot { border-color: var(--pac-gold); color: var(--pac-ink); }
.pac-chip.slot:hover { background: var(--pac-gold-grad); border-color: transparent; color: var(--pac-cta-ink); }

.pac-compose { display: flex; align-items: flex-end; gap: 0.5rem; padding: 0.65rem 0.75rem; border-top: 1px solid var(--pac-line); background: var(--pac-bg); }
.pac-compose textarea {
  flex: 1; min-width: 0; resize: none; max-height: 7.5rem;
  padding: 0.65rem 0.8rem; border: 1.5px solid var(--pac-line); border-radius: 12px;
  font: 500 16px/1.4 var(--font-body, inherit); color: var(--pac-ink); background: var(--pac-bg);
}
.pac-compose textarea::placeholder { color: #6B6358; opacity: 1; }
.pac-compose textarea:focus { outline: none; border-color: var(--pac-accent); box-shadow: 0 0 0 3px var(--pac-soft); }
.pac-send {
  flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--pac-gold-grad); color: var(--pac-cta-ink); display: grid; place-items: center;
}
.pac-send svg { width: 20px; height: 20px; }
.pac-send[disabled] { opacity: 0.5; cursor: default; }

.pac-foot { padding: 0.45rem 0.9rem 0.6rem; font-size: 0.75rem; line-height: 1.4; color: var(--pac-ink-2); background: var(--pac-bg); }
.pac-foot a { color: var(--pac-accent); font-weight: 700; text-decoration: none; white-space: nowrap; }
.pac-foot a:hover { text-decoration: underline; }
.pac-foot-short { display: none; }
/* Phones in landscape: the short notice, and the conversation always keeps some room. */
@media (max-height: 500px) {
  .pac-foot-long { display: none; }
  .pac-foot-short { display: inline; }
  .pac-log { min-height: 4.5rem; }
  .pac-chips { flex-wrap: nowrap; overflow-x: auto; }
  .pac-chip { flex: 0 0 auto; }
}
.pac-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

html.pac-lock, html.pac-lock body { overflow: hidden; }
@media (min-width: 561px) and (min-height: 501px) { html.pac-lock, html.pac-lock body { overflow: auto; } }
@media (prefers-reduced-motion: reduce) {
  .pac-panel, .pac-teaser { animation: none; }
  .pac-typing span { animation: none; opacity: 0.6; }
}
