/* Native submission experience for hanly_conversation forms. Loads after the plugin stylesheet and reads the same tokens
   (--hc-conversation-*) so every surface keeps its own colour. States: idle -> sending -> receipt, plus a quieter error state. */

/* ---- Sending: the fields settle back, the button carries the motion ---------------------------------------------------- */
.hc-conversation.is-submitting .hc-conversation__fields { opacity: .42; transition: opacity .35s ease; }
.hc-conversation.is-submitting .hc-conversation__fields input,
.hc-conversation.is-submitting .hc-conversation__fields textarea,
.hc-conversation.is-submitting .hc-conversation__fields select { opacity: 1; }
.hc-conversation .hc-conversation__button { position: relative; overflow: hidden; isolation: isolate; }
.hc-conversation.is-submitting .hc-conversation__button { opacity: 1; cursor: progress; }
.hc-conversation.is-submitting .hc-conversation__button::after {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(100deg, transparent 0 28%, color-mix(in srgb, currentColor 22%, transparent) 50%, transparent 72% 100%);
  transform: translateX(-100%); animation: hc-sweep 1.15s cubic-bezier(.5, 0, .3, 1) infinite;
}
@keyframes hc-sweep { to { transform: translateX(100%); } }

/* ---- Security check: when Cloudflare asks for a click, it appears above the button (the markup keeps PHP's order; CSS moves it) ---- */
.hc-conversation .hc-conversation__actions { display: flex; flex-direction: column; flex-wrap: nowrap; align-items: flex-start; gap: 0; }
.hc-conversation .hc-conversation__actions .hc-conversation__security { order: -1; flex: none; width: auto; max-width: 100%; margin: 0; }
.hc-conversation .hc-conversation__security .cf-turnstile:not(:empty) { margin: 0 0 16px; }

/* ---- Errors: one calm line, fields flag themselves --------------------------------------------------------------------- */
.hc-conversation__notice.is-error {
  min-height: 0; line-height: 1.4; padding: 12px 16px; border-radius: 12px; border: 1px solid rgba(243, 167, 167, .38); background: rgba(243, 167, 167, .09);
  color: #f7c3c3; animation: hc-rise .45s cubic-bezier(.2, .7, .2, 1) both;
}
.hc-conversation__field.has-error input,
.hc-conversation__field.has-error textarea,
.hc-conversation__field.has-error select { border-color: #f3a7a7; box-shadow: 0 0 0 3px rgba(243, 167, 167, .14); }

/* ---- Hand-off: panel and receipt share one cell, so nothing jumps and no hole is left beside the card ------------------ */
.hc-conversation { grid-template-areas: 'stack'; }
.hc-conversation > .hc-conversation__panel,
.hc-conversation > .hc-conversation__success { grid-area: stack; }
.hc-conversation.is-success .hc-conversation__panel {
  max-height: none; transform: none; opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .4s ease, visibility 0s linear .4s;
}
/* The plugin's inline completion hides the fields the instant the form succeeds, which left a lone, stretched button behind.
   Keep the panel's own layout intact while it fades, and keep it from stretching to the cell. */
.hc-conversation.is-success.is-success .hc-conversation__fields { display: grid; }
.hc-conversation.is-success.is-success .hc-conversation__notice { display: block; }
.hc-conversation.is-success .hc-conversation__panel { align-self: start; }
/* The heading takes focus for screen readers; it is not interactive, so it never needs a ring */
.hc-conversation__success h3:focus, .hc-conversation__success h3:focus-visible { outline: none; }
@media (max-width: 899px) {
  /* stacked layouts: let the receipt take its natural height instead of holding the form's */
  .hc-conversation.is-success .hc-conversation__panel { position: absolute; inset-inline: 0; top: 0; width: 100%; }
  .hc-conversation { position: relative; }
}

/* ---- Receipt --------------------------------------------------------------------------------------------------------------- */
.hc-conversation .hc-conversation__success {
  border: 0; border-radius: 0; background: none; padding: 0; box-shadow: none; max-width: 580px; align-self: start;
  opacity: 1; transform: none; transition: none; outline: none;
}
.hc-conversation .hc-conversation__success h3 {
  margin: 0 0 14px; font-size: clamp(32px, 3.4vw, 48px); font-weight: 800; line-height: 1.02; letter-spacing: -.035em; text-wrap: balance;
}
.hc-conversation .hc-conversation__success p:not(.hc-receipt__note) {
  max-width: 44ch; font-size: clamp(16px, 1.3vw, 18px); line-height: 1.55; opacity: .78;
}
.hc-receipt__eyebrow {
  display: flex; align-items: center; gap: 14px; margin-bottom: 20px; font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--hc-conversation-button-bg, currentColor);
}
.hc-receipt__rule { display: block; width: 56px; height: 1px; background: currentColor; transform-origin: left center; }
.hc-receipt__ref { color: color-mix(in srgb, var(--hc-conversation-success-text, #fff) 58%, transparent); letter-spacing: .14em; }
.hc-conversation .hc-receipt__note { display: flex; align-items: center; gap: 10px; margin: 16px 0 0; font-size: 14px; line-height: 1.4; opacity: .72; }
.hc-receipt__check { flex: none; width: 20px; height: 20px; fill: none; stroke: var(--hc-conversation-button-bg, currentColor); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---- Choreography: rule draws, headline rises out of a blur, message and confirmation note follow ----------------------------------------- */
@keyframes hc-rise { from { opacity: 0; transform: translateY(18px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes hc-draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes hc-stroke { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.hc-conversation.is-success .hc-receipt__rule { animation: hc-draw .8s cubic-bezier(.2, .7, .2, 1) .15s both; }
.hc-conversation.is-success .hc-receipt__tag,
.hc-conversation.is-success .hc-receipt__ref { animation: hc-rise .6s cubic-bezier(.2, .7, .2, 1) .3s both; }
.hc-conversation.is-success .hc-conversation__success h3 { animation: hc-rise .85s cubic-bezier(.2, .7, .2, 1) .38s both; }
.hc-conversation.is-success .hc-conversation__success p:not(.hc-receipt__note) { animation: hc-rise .8s cubic-bezier(.2, .7, .2, 1) .55s both; }
.hc-conversation.is-success 