.reception-widget [hidden] { display: none; }
.reception-widget {
  position: fixed;
  right: 24px;
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.reception-launch {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 54px;
  padding: 6px 16px 6px 8px;
  border: 1px solid var(--zbwd-rule);
  border-radius: 8px;
  background: var(--zbwd-white);
  color: var(--zbwd-ink);
  box-shadow: 0 6px 28px rgb(23 52 61 / 13%);
  font-weight: 700;
}
.reception-launch:hover { background: var(--zbwd-mist); }
.reception-greeting {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  width: min(276px, calc(100vw - 32px));
  padding: 12px 6px 8px 14px;
  border: 1px solid var(--zbwd-rule);
  border-radius: 8px;
  background: var(--zbwd-white);
  color: var(--zbwd-text);
  box-shadow: 0 6px 28px rgb(23 52 61 / 13%);
  font-size: 14px;
  line-height: 1.5;
}
.reception-greeting p + p { margin-top: 4px; }
.reception-greeting :is(.reception-greeting-open, .reception-greeting-dismiss) {
  min-width: 44px;
  min-height: 44px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--zbwd-ink);
}
.reception-greeting :is(.reception-greeting-open, .reception-greeting-dismiss):hover { background: var(--zbwd-mist); }
.reception-greeting-open { padding: 0 8px; margin-left: -8px; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.reception-greeting-dismiss { flex-shrink: 0; font-size: 22px; }
.reception-dialog {
  position: fixed;
  inset: auto 24px 20px auto;
  margin: 0;
  padding: 0;
  width: min(430px, calc(100% - 32px));
  max-width: none;
  max-height: none;
  border: 1px solid var(--zbwd-rule);
  border-radius: 8px;
  background: var(--zbwd-white);
  color: var(--zbwd-text);
  box-shadow: 0 18px 60px rgb(23 52 61 / 22%);
}
.reception-dialog::backdrop { background: rgb(23 52 61 / 28%); }
.reception-shell {
  display: flex;
  flex-direction: column;
  height: min(660px, calc(100dvh - 40px));
  line-height: 1.55;
}
.reception-header {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--zbwd-mist);
  border-bottom: 1px solid var(--zbwd-rule);
}
.reception-header h2 { font-size: 19px; }
.reception-header p, .reception-note { font-size: 12px; color: var(--zbwd-muted); }
.reception-close {
  margin-left: auto;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: var(--zbwd-ink);
  font-size: 25px;
}
.reception-body { flex: 1; min-height: 64px; overflow: auto; padding: 16px; overscroll-behavior: contain; }
.reception-intro { display: flex; align-items: center; gap: 10px; padding: 4px 8px; border-radius: 8px; background: var(--zbwd-paper); }
.reception-intro img { flex: none; object-fit: contain; }
.reception-intro p + p { margin-top: 4px; font-size: 14px; color: var(--zbwd-muted); }
.reception-topics { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.reception-topics button {
  min-height: 40px;
  padding: 6px 10px;
  border: 1px solid var(--zbwd-rule);
  border-radius: 4px;
  background: var(--zbwd-white);
  color: var(--zbwd-ink);
  font-size: 13px;
}
.reception-topics button:hover { background: var(--zbwd-mist); }
.reception-messages { list-style: none; display: grid; gap: 12px; margin: 16px 0 0; padding: 0; }
.reception-message {
  max-width: 95%;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--zbwd-mist);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 15px;
}
.reception-message--visitor { justify-self: end; background: var(--zbwd-ink); color: var(--zbwd-white); }
.reception-footer {
  flex: 0 1 auto;
  max-height: 62%;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 12px 16px;
  border-top: 1px solid var(--zbwd-rule);
}
.reception-chat-form { display: flex; align-items: stretch; gap: 8px; margin-top: 8px; }
.reception-dialog :is(textarea, input:not([type=checkbox])) {
  padding: 8px;
  border: 1px solid var(--zbwd-jade);
  border-radius: 4px;
  background: var(--zbwd-white);
  color: var(--zbwd-text);
  font: inherit;
  font-size: 16px;
  min-width: 0;
}
.reception-chat-form textarea { flex: 1; resize: none; }
.reception-primary {
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: var(--zbwd-ink);
  color: var(--zbwd-white);
  font-weight: 700;
}
.reception-dialog button:disabled { opacity: .55; cursor: default; }
.reception-dialog :is(textarea, input, summary):focus-visible { outline: 2px solid var(--zbwd-jade); outline-offset: 2px; }
.reception-lead { margin-top: 8px; padding: 8px 0 0; border-top: 1px solid var(--zbwd-rule); }
.reception-lead summary { width: fit-content; padding: 4px 0; cursor: pointer; font-weight: 700; color: var(--zbwd-ink); }
.reception-lead-form { display: grid; gap: 8px; margin-top: 8px; }
.reception-lead-form[hidden] { display: none; }
.reception-lead-form > button { justify-self: start; }
.reception-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.reception-lead-form label { display: grid; gap: 4px; font-size: 13px; }
.reception-lead-form .reception-consent { display: flex; align-items: flex-start; }
.reception-consent input { margin-top: 3px; flex: none; accent-color: var(--zbwd-ink); }
.reception-status, .reception-lead-status { font-size: 13px; color: var(--zbwd-muted); }
.reception-status:not(:empty) { margin-top: 8px; }
.reception-sr { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 650px) {
  .reception-widget { right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); }
  .reception-launch { padding-right: 12px; }
  .reception-dialog { inset: auto 8px max(8px, env(safe-area-inset-bottom)) 8px; width: auto; }
  .reception-shell { height: min(680px, calc(100dvh - 24px)); }
}
