/*
 * HeySender forms, version 1. Shared by the hosted form page and the embed script, so a form looks the
 * same everywhere. Every rule is scoped to .hs-form-root and prefixed hs- so it never touches the host
 * page. Theme values arrive as custom properties on the root element.
 */
.hs-form-root {
  --hs-primary: #1c5cf5;
  --hs-button-text: #ffffff;
  --hs-bg: #ffffff;
  --hs-text: #1f2937;
  --hs-muted: color-mix(in srgb, var(--hs-text) 65%, transparent);
  --hs-border: color-mix(in srgb, var(--hs-text) 22%, transparent);
  --hs-error: #b42318;
  --hs-radius: 6px;
  --hs-font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  box-sizing: border-box;
  color: var(--hs-text);
  font-family: var(--hs-font);
  font-size: 16px;
  line-height: 1.5;
  text-align: left;
}
.hs-form-root *, .hs-form-root *::before, .hs-form-root *::after { box-sizing: inherit; }
.hs-form-root[data-font="serif"] { --hs-font: Georgia, "Times New Roman", serif; }
.hs-form-root[data-font="inherit"] { --hs-font: inherit; }

.hs-card { background: var(--hs-bg); border-radius: calc(var(--hs-radius) + 4px); padding: 24px; max-width: 480px; }
.hs-inline .hs-card { margin: 0; }
.hs-title { margin: 0 0 6px; font-size: 1.375rem; line-height: 1.25; font-weight: 700; color: var(--hs-text); }
.hs-intro { margin: 0 0 16px; color: var(--hs-muted); }
.hs-form { display: grid; gap: 14px; margin: 0; }
.hs-field { display: grid; gap: 4px; }
.hs-label { font-weight: 600; font-size: 0.9375rem; }
.hs-optional { font-weight: 400; color: var(--hs-muted); font-size: 0.8125rem; }
.hs-input, .hs-select, .hs-textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; font: inherit; color: var(--hs-text);
  background: #fff; border: 1px solid var(--hs-border); border-radius: var(--hs-radius);
}
.hs-textarea { min-height: 96px; resize: vertical; }
.hs-input:focus, .hs-select:focus, .hs-textarea:focus, .hs-check input:focus-visible, .hs-button:focus-visible, .hs-close:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--hs-primary) 45%, transparent); outline-offset: 1px;
}
.hs-input[aria-invalid="true"], .hs-select[aria-invalid="true"], .hs-textarea[aria-invalid="true"] { border-color: var(--hs-error); }
.hs-help { margin: 0; font-size: 0.8125rem; color: var(--hs-muted); }
.hs-error { margin: 0; font-size: 0.8125rem; color: var(--hs-error); font-weight: 600; }
.hs-error:empty { display: none; }
.hs-fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
.hs-legend { padding: 0; margin-bottom: 4px; font-weight: 600; font-size: 0.9375rem; }
.hs-check { display: flex; align-items: flex-start; gap: 10px; font-size: 0.9375rem; cursor: pointer; }
.hs-check input { width: 18px; height: 18px; margin: 3px 0 0; flex: none; accent-color: var(--hs-primary); }
.hs-check small { display: block; color: var(--hs-muted); }
.hs-consent a { color: var(--hs-primary); }
.hs-button {
  min-height: 46px; padding: 11px 18px; border: 0; border-radius: var(--hs-radius); cursor: pointer;
  background: var(--hs-primary); color: var(--hs-button-text); font: inherit; font-weight: 700;
}
.hs-button[disabled] { opacity: 0.65; cursor: progress; }
.hs-alert { margin: 0; padding: 10px 12px; border-radius: var(--hs-radius); background: color-mix(in srgb, var(--hs-error) 10%, #fff); color: var(--hs-error); font-weight: 600; font-size: 0.9375rem; }
.hs-alert:empty { display: none; }
.hs-footer { margin: 4px 0 0; font-size: 0.8125rem; color: var(--hs-muted); }
.hs-done { display: grid; gap: 6px; }
.hs-done .hs-title { margin: 0; }
.hs-done p { margin: 0; }
.hs-hp { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.hs-visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Popups: modal and exit intent share the dialog; the banner sits at the top or bottom edge. */
.hs-overlay { position: fixed; inset: 0; z-index: 2147483000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(15, 23, 42, 0.55); }
.hs-dialog { position: relative; width: 100%; max-width: 480px; max-height: calc(100vh - 32px); overflow: auto; border-radius: calc(var(--hs-radius) + 4px); box-shadow: 0 20px 50px rgba(15, 23, 42, 0.3); }
.hs-dialog .hs-card { max-width: none; }
.hs-close {
  position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; border: 0; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--hs-text); font-size: 24px; line-height: 1;
}
.hs-banner { position: fixed; left: 0; right: 0; z-index: 2147483000; box-shadow: 0 -8px 30px rgba(15, 23, 42, 0.18); background: var(--hs-bg); }
.hs-banner[data-position="bottom"] { bottom: 0; }
.hs-banner[data-position="top"] { top: 0; box-shadow: 0 8px 30px rgba(15, 23, 42, 0.18); }
.hs-banner .hs-card { max-width: 960px; margin: 0 auto; padding: 16px 56px 16px 16px; }
.hs-banner .hs-form { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); align-items: end; }
.hs-banner .hs-form > .hs-fieldset, .hs-banner .hs-form > .hs-alert, .hs-banner .hs-form > .hs-footer, .hs-banner .hs-form > .hs-check-field { grid-column: 1 / -1; }

/* Hosted page frame */
.hs-page { min-height: 100vh; margin: 0; display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; background: #f3f4f6; }
.hs-page .hs-card { width: 100%; box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08); }
.hs-powered { margin: 16px 0 0; text-align: center; font-size: 0.75rem; color: #6b7280; }

@media (prefers-reduced-motion: no-preference) {
  .hs-overlay, .hs-banner { animation: hs-fade 160ms ease-out; }
  @keyframes hs-fade { from { opacity: 0; } to { opacity: 1; } }
}
