.clinic-chat-launcher {
  position: fixed;
  inset: auto 1rem 1rem auto;
  z-index: 15;
  box-shadow: 0 4px 16px #202a2533;
}
.clinic-chat {
  position: fixed;
  inset: auto 1rem 4.75rem auto;
  margin: 0;
  padding: 0;
  width: min(400px, calc(100% - 2rem));
  max-height: calc(100dvh - 6rem);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 10px 40px #202a2533;
}
.clinic-chat::backdrop { background: #202a253b; }
.clinic-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .65rem 1rem;
  color: #fffdf8;
  background: #202a25;
  border-bottom: 2px solid var(--gold);
}
.clinic-chat-brand { display: flex; align-items: center; gap: .65rem; min-width: 0; }
.clinic-chat-brand img {
  flex: none;
  width: 64px;
  height: 36px;
  padding: 3px;
  object-fit: contain;
  border-radius: 5px;
  background: var(--white);
}
.clinic-chat-header h2 { margin: 0; font: 700 1rem var(--sans); }
.clinic-chat-brand p { margin: .2rem 0 0; color: #f0dfbd; font-size: .72rem; }
.clinic-chat-header button {
  flex: none;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 1.5rem;
  min-width: 44px;
  min-height: 44px;
  cursor: pointer;
}
.clinic-chat-body { padding: 1rem; font-size: .83rem; }
.clinic-chat-messages {
  display: grid;
  gap: .55rem;
  max-height: min(28dvh, 230px);
  overflow: auto;
}
.clinic-chat-messages p {
  margin: 0;
  padding: .6rem .75rem;
  border-radius: 8px;
  background: var(--band);
  overflow-wrap: anywhere;
}
.clinic-chat-messages .clinic-chat-visitor { justify-self: end; background: #ecdfc7; }
.clinic-chat-messages a { display: inline-block; color: var(--gold-ink); }
.clinic-chat-followup-button { display: block; margin-top: .5rem; }
.clinic-chat-topics { display: flex; flex-wrap: wrap; gap: .35rem; margin-block: .75rem; }
.clinic-chat-topics button {
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  background: var(--white);
  padding: .45rem .55rem;
  font: inherit;
  cursor: pointer;
}
.clinic-chat-question { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .45rem; }
.clinic-chat input:not([type="checkbox"]), .clinic-chat select, .clinic-chat textarea {
  width: 100%;
  min-height: 44px;
  padding: .45rem .6rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  background: var(--white);
  font: inherit;
}
.clinic-chat-hint { margin: .55rem 0; font-size: .72rem; }
.clinic-chat-followup { border-top: 1px solid var(--line); padding-top: .65rem; }
.clinic-chat-followup summary { font-weight: 700; cursor: pointer; }
.clinic-chat-enquiry, .clinic-chat-enquiry label { display: grid; gap: .25rem; }
.clinic-chat-enquiry { gap: .55rem; margin-top: .65rem; }
.clinic-chat-enquiry .clinic-chat-consent { grid-template-columns: auto 1fr; align-items: start; }
.clinic-chat-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
@media (max-width: 700px) {
  .clinic-chat-launcher { bottom: calc(5rem + env(safe-area-inset-bottom)); }
  .clinic-chat { bottom: calc(5rem + env(safe-area-inset-bottom)); }
}
