/* Talk (site-kit#5): the campfire bubble, fixed bottom-right, and the chat panel it opens above itself, so the panel never covers
   the bubble (which also closes it). A site restyles it by setting these on :root (or any ancestor); each has a fallback here.
   No fonts or images from anywhere: the panel uses the page's own font, the campfire is inline SVG. */
.talk-bubble, .talk-panel {
  --talk-gap: var(--talk-edge, 16px);
  --talk-size: 56px;
  font-family: var(--talk-font, inherit);
  box-sizing: border-box;
}
.talk-bubble {
  position: fixed;
  right: calc(var(--talk-gap) + env(safe-area-inset-right, 0px));
  bottom: calc(var(--talk-gap) + env(safe-area-inset-bottom, 0px));
  z-index: var(--talk-z, 50);
  width: var(--talk-size);
  height: var(--talk-size);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  cursor: pointer;
  border: 2px solid var(--talk-line, #24140d);
  border-radius: 50%;
  background: var(--talk-bubble-bg, #f9dcc4);
  box-shadow: 0 4px 14px rgba(36, 20, 13, 0.3);
}
.talk-bubble[hidden] { display: none; }
.talk-bubble:hover { background: var(--talk-bubble-hover, #fbe8d8); }
.talk-bubble:focus-visible, .talk-panel button:focus-visible, .talk-input:focus-visible {
  outline: 3px solid var(--talk-focus, #24140d);
  outline-offset: 2px;
}
.talk-fire { width: 34px; height: 34px; display: block; }
.talk-icon { width: 100%; height: 100%; display: block; border-radius: 50%; object-fit: cover; }
.talk-f1, .talk-f2 { transform-box: fill-box; transform-origin: 50% 100%; }
.talk-f2 { opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .talk-f1 { animation: talk-flick-a 0.9s steps(1, end) infinite; }
  .talk-f2 { animation: talk-flick-b 0.9s steps(1, end) infinite; }
}
@keyframes talk-flick-a { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 1; } }
@keyframes talk-flick-b { 0% { opacity: 0; } 50% { opacity: 1; } 100% { opacity: 0; } }

.talk-panel {
  position: fixed;
  right: calc(var(--talk-gap) + env(safe-area-inset-right, 0px));
  bottom: calc(var(--talk-gap) + var(--talk-size) + 12px + env(safe-area-inset-bottom, 0px));
  z-index: var(--talk-z, 50);
  width: min(380px, calc(100vw - 2 * var(--talk-gap) - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)));
  /* Never taller than --talk-max-height, so a long answer scrolls in the log instead of covering the site's header. */
  max-height: min(var(--talk-max-height, 560px), calc(100vh - 2 * var(--talk-gap) - var(--talk-size) - 12px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)));
  max-height: min(var(--talk-max-height, 560px), calc(100dvh - 2 * var(--talk-gap) - var(--talk-size) - 12px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)));
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  background: var(--talk-bg, #fffaf4);
  color: var(--talk-ink, #24140d);
  border: 2px solid var(--talk-line, #24140d);
  border-radius: var(--talk-radius, 14px);
  box-shadow: 0 6px 22px rgba(36, 20, 13, 0.25);
  font-size: 16px;
  line-height: 1.4;
  text-align: left;
}
.talk-panel [hidden] { display: none; }
.talk-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.talk-log { flex: 1 1 auto; min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: 6px; }
.talk-log:empty { display: none; }
.talk-line { margin: 0; padding: 6px 10px; border-radius: 10px; overflow-wrap: anywhere; white-space: pre-wrap; max-width: 90%; }
.talk-host { align-self: flex-start; background: var(--talk-host-bg, #f9dcc4); }
.talk-link { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.talk-link:focus-visible { outline: 2px solid var(--talk-focus, #24140d); outline-offset: 2px; }
.talk-you { align-self: flex-end; background: var(--talk-you-bg, #ffffff); border: 1px solid var(--talk-line, #24140d); }
.talk-status { margin: 0; font-size: 14px; color: var(--talk-muted, #5a3a28); }
.talk-form { display: flex; gap: 8px; }
.talk-input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  box-sizing: border-box;
  font: inherit;
  padding: 6px 12px;
  border: 1px solid var(--talk-line, #24140d);
  border-radius: 10px;
  background: var(--talk-input-bg, #ffffff);
  color: inherit;
}
.talk-input:disabled { opacity: 0.7; }
.talk-panel button {
  min-height: 44px;
  min-width: 44px;
  font: inherit;
  cursor: pointer;
  border-radius: 999px;
  padding: 6px 16px;
}
.talk-send, .talk-voice {
  font-weight: 700;
  border: 2px solid var(--talk-accent, #e2823a);
  background: var(--talk-accent, #e2823a);
  color: var(--talk-on-accent, #24140d);
}
.talk-x, .talk-retry { border: 1px solid var(--talk-line, #24140d); background: none; color: inherit; }
.talk-retry { align-self: flex-start; }
.talk-reach { align-self: flex-start; font-weight: 600; color: inherit; text-decoration: underline; }
.talk-reach[hidden] { display: none; }
.talk-panel button:disabled { opacity: 0.55; cursor: default; }
