:root:has(.contact-dialog[open]) {
  overflow: hidden;
}

.contact-dialog {
  width: min(720px, calc(100% - 24px));
  max-width: none;
  max-height: calc(100dvh - 24px);
  padding: 0;
  overflow: auto;
  color: #232127;
  background: #fff;
  border: 1px solid #e8dde3;
  border-radius: 16px;
  box-shadow: 0 18px 80px #20121f40;
}

.contact-dialog::backdrop {
  background: #23152085;
}

.contact-dialog__header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 16px;
  background: #fff;
  border-bottom: 1px solid #e8dde3;
}

.contact-dialog__header h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
}

.contact-dialog__header button {
  min-height: 44px;
  padding: 0 10px;
  color: #731040;
  background: #fff;
  border: 1px solid #b88ba1;
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.contact-dialog__status {
  margin: 14px 16px 0;
}

.contact-dialog__status:empty {
  margin: 0;
}

.contact-dialog iframe {
  display: block;
  width: 100%;
  height: min(var(--contact-frame-height, 470px), max(180px, calc(100dvh - 155px)));
  border: 0;
}

.contact-dialog iframe[hidden] {
  display: none;
}

.contact-dialog__fallback {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin: 4px 16px;
  color: #731040;
  text-decoration: underline;
}

.contact-dialog :focus-visible {
  outline: 2px solid #cc0066;
  outline-offset: 3px;
}
