/*! Advanceworx Forms 0.2.0 — base styles. Every colour, radius and size is a custom property on .awxf so a
    site can retheme without overriding selectors. Glass variant: awxforms-glass.css. */

.awxf {
  --awxf-font: inherit;
  --awxf-text: #1a1a1a;
  --awxf-muted: #5c5a66;
  --awxf-panel-bg: #ffffff;
  --awxf-panel-text: var(--awxf-text);
  --awxf-line: #e3e1ea;
  --awxf-field-bg: #ffffff;
  --awxf-field-text: var(--awxf-text);
  --awxf-field-border: #b9b7c3;
  --awxf-field-border-hover: #8b8896;
  --awxf-field-placeholder: #777483;
  --awxf-focus: #4a25aa;
  --awxf-focus-ring: rgba(74, 37, 170, 0.25);
  --awxf-accent: #981e97;
  --awxf-accent-2: #c6007e;
  --awxf-on-accent: #ffffff;
  --awxf-grad: linear-gradient(90deg, var(--awxf-accent), var(--awxf-accent-2));
  --awxf-ready-ring: rgba(152, 30, 151, 0.45);
  --awxf-ready-ring-0: rgba(152, 30, 151, 0);
  --awxf-error: #b3261e;
  --awxf-error-bg: #fdecea;
  --awxf-success: #1b7f4b;
  --awxf-chip-bg: #f5f4f8;
  --awxf-chip-border: #cfcdd9;
  --awxf-chip-text: #211747;
  --awxf-radius: 10px;
  --awxf-radius-lg: 22px;
  --awxf-gap: 22px;
  --awxf-field-height: 48px;
  --awxf-panel-width: 540px;
  --awxf-panel-inset: 14px;
  --awxf-launcher-bg: rgba(28, 28, 31, 0.74);
  --awxf-launcher-text: #ffffff;
  --awxf-backdrop: rgba(18, 14, 34, 0.3);
  --awxf-ease: cubic-bezier(0.22, 0.8, 0.2, 1);
  --awxf-duration: 0.7s;
  font-family: var(--awxf-font);
  color: var(--awxf-text);
  line-height: 1.5;
  box-sizing: border-box;
}

.awxf *,
.awxf *::before,
.awxf *::after {
  box-sizing: inherit;
}

.awxf button,
.awxf input,
.awxf select,
.awxf textarea {
  font: inherit;
  color: inherit;
}

.awxf-visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.awxf [hidden] {
  display: none !important;
}

/* Honeypot: off-canvas, not display:none (some bots skip those). */
.awxf-hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- Head ---------- */
.awxf-head {
  padding: 0 0 18px;
  border-bottom: 1px solid var(--awxf-line);
  margin-bottom: 22px;
}

.awxf-head-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.awxf-title {
  margin: 0;
  font-size: 1.75rem;
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--awxf-panel-text);
  text-wrap: balance;
}

.awxf-intro {
  margin: 10px 0 0;
  font-size: 0.95rem;
  color: var(--awxf-muted);
  max-width: 44ch;
}

.awxf-intro > :last-child {
  margin-bottom: 0;
}

.awxf-close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: -6px -8px 0 0;
  border: 1px solid var(--awxf-line);
  border-radius: 50%;
  background: transparent;
  color: var(--awxf-panel-text);
  cursor: pointer;
  flex: none;
  transition: background 0.2s, border-color 0.2s;
}

.awxf-close svg {
  width: 16px;
  height: 16px;
}

.awxf-close:hover {
  background: var(--awxf-chip-bg);
  border-color: var(--awxf-field-border-hover);
}

.awxf-steps {
  display: flex;
  gap: 10px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.awxf-steps li {
  flex: 1;
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--awxf-muted);
  letter-spacing: 0.02em;
}

.awxf-steps li::before {
  content: "";
  display: block;
  margin-bottom: 8px;
  height: 3px;
  border-radius: 3px;
  background: var(--awxf-line);
}

.awxf-steps li.is-done::before,
.awxf-steps li[aria-current="step"]::before {
  background: var(--awxf-grad);
}

.awxf-steps li[aria-current="step"],
.awxf-steps li.is-done {
  color: var(--awxf-panel-text);
}

.awxf-step-num::after {
  content: " ·";
}

/* ---------- Form body ---------- */
.awxf-form {
  margin: 0;
}

.awxf-required-note {
  margin: 0 0 16px;
  font-size: 0.85rem;
  color: var(--awxf-muted);
}

.awxf-step-title {
  margin: 0 0 16px;
  font-size: 1.1rem;
  font-weight: 600;
}

.awxf-js .awxf-form .awxf-step:not(.is-active) {
  display: none;
}

.awxf-step-desc {
  margin: -8px 0 16px;
  color: var(--awxf-muted);
}

.awxf-fields {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--awxf-gap) 16px;
}

.awxf-field,
.awxf-group,
.awxf-layout {
  grid-column: span 6;
  min-width: 0;
}

.awxf-w-half {
  grid-column: span 3;
}

.awxf-w-third {
  grid-column: span 2;
}

@media (max-width: 560px) {
  .awxf-w-half,
  .awxf-w-third {
    grid-column: span 6;
  }
}

.awxf-field {
  display: grid;
  gap: 8px;
  align-content: start;
}

.awxf-fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
  display: grid;
  gap: 10px;
}

.awxf-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--awxf-panel-text);
  padding: 0;
}

legend.awxf-label {
  float: left;
  width: 100%;
}

legend.awxf-label + * {
  clear: both;
}

.awxf-req {
  color: var(--awxf-error);
  margin-left: 3px;
}

.awxf-optional {
  color: var(--awxf-muted);
  font-weight: 500;
}

.awxf-hint {
  margin: -2px 0 0;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--awxf-muted);
}

.awxf-input {
  width: 100%;
  min-height: var(--awxf-field-height);
  padding: 12px 14px;
  border: 1px solid var(--awxf-field-border);
  border-radius: var(--awxf-radius);
  background: var(--awxf-field-bg);
  color: var(--awxf-field-text);
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.awxf-input::placeholder {
  color: var(--awxf-field-placeholder);
  opacity: 1;
}

.awxf-input:hover {
  border-color: var(--awxf-field-border-hover);
}

.awxf-input:focus {
  outline: none;
  border-color: var(--awxf-focus);
  box-shadow: 0 0 0 4px var(--awxf-focus-ring);
}

textarea.awxf-input {
  min-height: 104px;
  resize: vertical;
}

select.awxf-input {
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23211747' stroke-width='1.8'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}

select.awxf-input[multiple] {
  background-image: none;
  padding-right: 14px;
  min-height: 120px;
}

/* A field with a problem: a bold bar down its left edge (shape, not only colour), a 2px border on the control
   and a bold message with an icon under it. */
.awxf-field.has-error {
  border-left: 4px solid var(--awxf-error);
  padding-left: 14px;
}

.awxf-field.has-error .awxf-input {
  border: 2px solid var(--awxf-error);
  padding: 11px 13px;
  box-shadow: 0 0 0 3px var(--awxf-error-bg);
}

.awxf-field.has-error .awxf-input:focus {
  border-color: var(--awxf-error);
  box-shadow: 0 0 0 4px var(--awxf-error-bg);
}

.awxf-error {
  display: none;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--awxf-error);
}

.awxf-error svg {
  width: 16px;
  height: 16px;
  flex: none;
  margin-top: 2px;
}

.awxf-error:not([hidden]) {
  display: flex;
}

.awxf-errors {
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 2px solid var(--awxf-error);
  border-left-width: 6px;
  border-radius: var(--awxf-radius);
  background: var(--awxf-error-bg);
  color: var(--awxf-text);
}

.awxf-errors:focus {
  outline: 3px solid var(--awxf-focus);
  outline-offset: 2px;
}

.awxf-errors-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 700;
}

.awxf-errors-title svg {
  width: 18px;
  height: 18px;
  flex: none;
}

.awxf-errors ul {
  margin: 0;
  padding-left: 18px;
}

.awxf-errors a {
  color: inherit;
}

/* ---------- Choices ---------- */
.awxf-choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.awxf-style-chips .awxf-choices,
.awxf-style-inline .awxf-choices {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
}

.awxf-choice {
  position: relative;
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--awxf-panel-text);
}

.awxf-choice input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--awxf-accent);
  cursor: pointer;
}

.awxf-choice input:focus-visible {
  outline: 3px solid var(--awxf-focus);
  outline-offset: 2px;
}

/* Chip style: the native control is visually hidden but stays focusable. */
.awxf-style-chips .awxf-choice input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
}

.awxf-style-chips .awxf-choice-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--awxf-chip-border);
  border-radius: 999px;
  background: var(--awxf-chip-bg);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--awxf-chip-text);
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.awxf-style-chips .awxf-choice:hover .awxf-choice-label {
  border-color: var(--awxf-field-border-hover);
}

.awxf-style-chips .awxf-choice input:checked + .awxf-choice-label {
  background: var(--awxf-grad);
  border-color: transparent;
  color: var(--awxf-on-accent);
  font-weight: 600;
}

.awxf-style-chips .awxf-choice input:checked + .awxf-choice-label::before {
  content: "";
  width: 12px;
  height: 7px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(-45deg);
}

.awxf-style-chips .awxf-choice input:focus-visible + .awxf-choice-label {
  outline: 3px solid var(--awxf-focus);
  outline-offset: 2px;
}

.awxf-field.has-error .awxf-style-chips .awxf-choice-label,
.awxf-field.has-error.awxf-style-chips .awxf-choice-label {
  border: 2px solid var(--awxf-error);
  padding: 7px 13px;
}

.awxf-field.has-error .awxf-choice input,
.awxf-field.has-error .awxf-check input {
  outline: 2px solid var(--awxf-error);
  outline-offset: 2px;
}

.awxf-field.has-error .awxf-drop {
  border: 2px solid var(--awxf-error);
}

.awxf-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--awxf-panel-text);
  cursor: pointer;
}

.awxf-check input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--awxf-accent);
}

.awxf-check input:focus-visible {
  outline: 3px solid var(--awxf-focus);
  outline-offset: 2px;
}

.awxf-check-text a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.awxf-check-text > p {
  margin: 0;
}

/* ---------- Files ----------
   The dashed box holds the clickable/droppable target and, once files are chosen, the file list, so the
   feedback appears where the visitor dropped the file instead of below the box. */
.awxf-drop {
  position: relative;
  border: 1.5px dashed var(--awxf-field-border);
  border-radius: 12px;
  background: var(--awxf-chip-bg);
  transition: border-color 0.2s, background 0.2s;
}

.awxf-drop-target {
  display: grid;
  place-items: center;
  gap: 4px;
  min-height: 92px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
}

.awxf-drop.has-files {
  border-style: solid;
}

.awxf-drop.has-files .awxf-drop-target {
  min-height: 0;
  padding: 10px 16px;
}

.awxf-drop.has-files .awxf-drop-text small {
  display: none;
}

.awxf-drop:hover,
.awxf-drop.is-dragover {
  border-color: var(--awxf-focus);
}

.awxf-drop input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.awxf-drop:focus-within {
  outline: 3px solid var(--awxf-focus);
  outline-offset: 2px;
}

.awxf-style-plain .awxf-drop {
  border: 0;
  background: none;
}

.awxf-style-plain .awxf-drop-target {
  display: block;
  min-height: 0;
  padding: 0;
  text-align: left;
}

.awxf-style-plain .awxf-drop input {
  position: static;
  opacity: 1;
  width: auto;
  height: auto;
}

.awxf-style-plain .awxf-drop-text {
  display: none;
}

.awxf-drop-text b {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
}

.awxf-drop-text small {
  display: block;
  font-size: 0.8rem;
  color: var(--awxf-muted);
}

.awxf-files {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0 12px 12px;
  list-style: none;
}

.awxf-files:empty {
  display: none;
}

.awxf-file {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 6px 10px;
  border-radius: 8px;
  background: var(--awxf-field-bg);
  border: 1px solid var(--awxf-field-border);
  font-size: 0.85rem;
  font-weight: 500;
}

.awxf-file::before {
  content: "";
  width: 10px;
  height: 6px;
  border-left: 2px solid var(--awxf-success);
  border-bottom: 2px solid var(--awxf-success);
  transform: translateY(-2px) rotate(-45deg);
  flex: none;
}

.awxf-file-remove {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  color: inherit;
}

.awxf-file-remove:hover {
  background: rgba(0, 0, 0, 0.08);
}

.awxf-file-remove:focus-visible {
  outline: 3px solid var(--awxf-focus);
}

/* ---------- Groups and layout ---------- */
.awxf-group {
  display: grid;
  gap: 14px;
}

.awxf-group-card {
  padding: 18px;
  border: 1px solid var(--awxf-line);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.02);
}

.awxf-group-title {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--awxf-muted);
}

.awxf-group-desc {
  margin: -6px 0 0;
  font-size: 0.9rem;
  color: var(--awxf-muted);
}

.awxf-heading {
  margin: 8px 0 0;
  font-size: 1.1rem;
}

.awxf-html > :first-child {
  margin-top: 0;
}

.awxf-html > :last-child {
  margin-bottom: 0;
}

.awxf-html {
  font-size: 0.9rem;
  color: var(--awxf-muted);
}

.awxf-html a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Footer / buttons ---------- */
.awxf-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--awxf-line);
}

.awxf-foot-note {
  font-size: 0.8rem;
  color: var(--awxf-muted);
}

.awxf-back {
  min-height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--awxf-muted);
  font-weight: 600;
  cursor: pointer;
}

.awxf-back:hover {
  color: var(--awxf-panel-text);
  background: var(--awxf-chip-bg);
}

.awxf-submit {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  margin-left: auto;
  padding: 5px 6px 5px 22px;
  border: 1px solid var(--awxf-accent);
  border-radius: 999px;
  background: var(--awxf-accent);
  color: var(--awxf-on-accent);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.25s, color 0.25s, border-color 0.25s;
}

.awxf-submit-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--awxf-grad);
  flex: none;
}

.awxf-submit-icon svg {
  width: 16px;
  height: 16px;
  transition: transform 0.3s var(--awxf-ease);
}

.awxf-submit:hover {
  background: var(--awxf-accent-2);
  border-color: var(--awxf-accent-2);
}

.awxf-submit:hover .awxf-submit-icon svg {
  transform: translateX(3px);
}

.awxf-submit:disabled,
.awxf-submit.is-busy {
  cursor: progress;
  opacity: 0.85;
}

.awxf-submit.is-busy .awxf-submit-icon svg {
  animation: awxf-spin 0.8s linear infinite;
}

@keyframes awxf-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Ready cue: once every required field passes, the button gives one small pop, then a soft ring breathes
   outwards every couple of seconds and the arrow nudges. Pauses under the pointer or keyboard focus. */
.awxf-submit.is-ready:not(.is-busy) {
  animation: awxf-ready-pop 0.5s var(--awxf-ease), awxf-ready-ring 2.4s ease-out 0.5s infinite;
}

.awxf-submit.is-ready:not(.is-busy) .awxf-submit-icon svg {
  animation: awxf-ready-nudge 2.4s ease-in-out 0.5s infinite;
}

.awxf-submit.is-ready:hover,
.awxf-submit.is-ready:focus-visible,
.awxf-submit.is-ready:hover .awxf-submit-icon svg,
.awxf-submit.is-ready:focus-visible .awxf-submit-icon svg {
  animation: none;
}

@keyframes awxf-ready-pop {
  0% {
    transform: scale(1);
  }

  45% {
    transform: scale(1.035);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes awxf-ready-ring {
  0% {
    box-shadow: 0 0 0 0 var(--awxf-ready-ring);
  }

  60% {
    box-shadow: 0 0 0 11px var(--awxf-ready-ring-0);
  }

  100% {
    box-shadow: 0 0 0 0 var(--awxf-ready-ring-0);
  }
}

@keyframes awxf-ready-nudge {
  0%,
  55%,
  100% {
    transform: translateX(0);
  }

  70% {
    transform: translateX(3px);
  }
}

.awxf button:focus-visible,
.awxf a:focus-visible,
.awxf-launcher:focus-visible {
  outline: 3px solid var(--awxf-focus);
  outline-offset: 3px;
}

/* ---------- Confirmation ---------- */
.awxf-done {
  display: grid;
  gap: 16px;
  align-content: start;
  padding-top: 8px;
}

.awxf-tick {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--awxf-grad);
  color: var(--awxf-on-accent);
}

.awxf-tick svg {
  width: 28px;
  height: 28px;
}

.awxf-done-title {
  margin: 6px 0 0;
  font-size: 1.75rem;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.awxf-done-title:focus {
  outline: none;
}

.awxf-done-message {
  color: var(--awxf-muted);
  max-width: 48ch;
}

.awxf-done-message > :first-child {
  margin-top: 0;
}

.awxf-done-links {
  display: grid;
  gap: 2px;
  margin-top: 8px;
}

.awxf-done-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 50px;
  border-bottom: 1px solid var(--awxf-line);
  color: var(--awxf-panel-text);
  text-decoration: none;
  font-weight: 500;
}

.awxf-done-links a svg {
  width: 16px;
  height: 16px;
}

.awxf-done-links a:hover {
  color: var(--awxf-accent);
}

.awxf-captcha:empty {
  display: none;
}

.awxf-captcha {
  margin-top: 18px;
}

/* ---------- Launcher ---------- */
.awxf-launcher {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 6px 22px 6px 6px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: var(--awxf-launcher-bg);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  backdrop-filter: blur(16px) saturate(1.2);
  color: var(--awxf-launcher-text);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(20, 16, 40, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: transform 0.35s var(--awxf-ease), background 0.25s, box-shadow 0.35s;
  -webkit-tap-highlight-color: transparent;
}

.awxf-launcher-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--awxf-grad);
  flex: none;
}

.awxf-launcher-icon svg {
  width: 18px;
  height: 18px;
  color: #fff;
}

.awxf-launcher-icon::before,
.awxf-launcher-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--awxf-accent-2);
  opacity: 0;
  animation: awxf-ping 2.8s var(--awxf-ease) infinite;
}

.awxf-launcher-icon::after {
  animation-delay: 1.4s;
}

@keyframes awxf-ping {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }

  100% {
    transform: scale(1.7);
    opacity: 0;
  }
}

.awxf-launcher:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(20, 16, 40, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.awxf-launcher-label-short {
  display: none;
}

.awxf-launcher[aria-expanded="true"] {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
}

.awxf-launcher-floating {
  position: fixed;
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: max(16px, env(safe-area-inset-bottom, 0px));
  z-index: 950;
}

.awxf-launcher-bottom-left {
  right: auto;
  left: max(16px, env(safe-area-inset-left, 0px));
}

@media (max-width: 700px) {
  .awxf-launcher {
    min-height: 52px;
    padding-right: 18px;
  }

  .awxf-launcher-icon {
    width: 40px;
    height: 40px;
  }

  .awxf-launcher-label-short:not(:empty) ~ .awxf-launcher-label,
  .awxf-launcher-label:has(+ .awxf-launcher-label-short) {
    display: none;
  }

  .awxf-launcher-label-short {
    display: inline;
  }
}

/* ---------- Dialog (native <dialog>) ---------- */
dialog.awxf-dialog {
  position: fixed;
  inset: 0;
  width: 100vw;
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: var(--awxf-panel-inset);
  border: 0;
  background: transparent;
  color: inherit;
  overflow: visible;
  z-index: 1000;
}

dialog.awxf-dialog:not([open]) {
  display: none;
}

dialog.awxf-dialog[open] {
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
}

dialog.awxf-dialog-modal[open] {
  align-items: center;
  justify-content: center;
}

dialog.awxf-dialog::backdrop {
  background: var(--awxf-backdrop);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.45s;
}

dialog.awxf-dialog.is-open::backdrop {
  opacity: 1;
}

.awxf-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(var(--awxf-panel-width), 100%);
  max-height: 100%;
  border-radius: var(--awxf-radius-lg);
  overflow: hidden;
  background: var(--awxf-panel-bg);
  color: var(--awxf-panel-text);
  box-shadow: 0 30px 80px rgba(10, 8, 24, 0.35);
  transform: translateX(calc(100% + 40px));
  opacity: 0.6;
  transition: transform var(--awxf-duration) var(--awxf-ease), opacity 0.5s;
}

.awxf-dialog-modal .awxf-panel {
  width: min(640px, 100%);
  max-height: calc(100dvh - 2 * var(--awxf-panel-inset));
  transform: translateY(24px) scale(0.98);
}

.awxf-dialog.is-open .awxf-panel {
  transform: none;
  opacity: 1;
}

.awxf-panel .awxf-head {
  padding: 26px 28px 18px;
  margin: 0;
  flex: none;
}

.awxf-panel .awxf-form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.awxf-panel .awxf-errors,
.awxf-panel .awxf-required-note {
  margin: 18px 28px 0;
}

.awxf-panel .awxf-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 22px 28px 28px;
  scrollbar-width: thin;
}

.awxf-panel .awxf-captcha {
  padding: 0 28px;
  margin: 0 0 12px;
}

.awxf-panel .awxf-foot {
  flex: none;
  margin: 0;
  padding: 16px 28px calc(18px + env(safe-area-inset-bottom, 0px));
  background: rgba(0, 0, 0, 0.02);
}

.awxf-panel .awxf-confirmation {
  padding: 22px 28px 28px;
  overflow: auto;
}

@media (max-width: 700px) {
  dialog.awxf-dialog {
    padding: 0;
  }

  dialog.awxf-dialog[open] {
    align-items: flex-end;
  }

  .awxf-panel,
  .awxf-dialog-modal .awxf-panel {
    width: 100%;
    max-height: calc(100dvh - 36px);
    border-radius: var(--awxf-radius-lg) var(--awxf-radius-lg) 0 0;
    transform: translateY(100%);
  }

  .awxf-panel .awxf-head {
    padding: 20px 20px 14px;
  }

  .awxf-panel .awxf-title {
    font-size: 1.4rem;
  }

  .awxf-panel .awxf-body,
  .awxf-panel .awxf-confirmation {
    padding: 18px 20px 24px;
  }

  .awxf-panel .awxf-errors,
  .awxf-panel .awxf-required-note {
    margin: 14px 20px 0;
  }

  .awxf-panel .awxf-foot {
    padding: 14px 20px calc(16px + env(safe-area-inset-bottom, 0px));
  }

  .awxf-panel .awxf-foot-note {
    display: none;
  }
}

/* ---------- Inline card ---------- */
.awxf-mode-inline {
  --awxf-inline-pad: 0px;
}

.awxf-mode-inline .awxf-head {
  padding-top: 0;
}

/* ---------- Switch ---------- */
.awxf-switch {
  position: relative;
  align-items: center;
}

.awxf-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.awxf-switch-track {
  position: relative;
  flex: none;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: var(--awxf-chip-border);
  transition: background 0.2s;
}

.awxf-switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s var(--awxf-ease);
}

.awxf-switch input:checked + .awxf-switch-track {
  background: var(--awxf-accent);
}

.awxf-switch input:checked + .awxf-switch-track .awxf-switch-thumb {
  transform: translateX(20px);
}

.awxf-switch input:focus-visible + .awxf-switch-track {
  outline: 3px solid var(--awxf-focus);
  outline-offset: 2px;
}

/* ---------- Star rating ---------- */
.awxf-rating {
  position: relative;
}

.awxf-stars {
  display: inline-flex;
  gap: 2px;
}

.awxf-star-input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.awxf-star {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  color: var(--awxf-chip-border);
  cursor: pointer;
  transition: color 0.15s, transform 0.15s;
}

.awxf-star svg {
  width: 28px;
  height: 28px;
}

.awxf-star:hover {
  transform: scale(1.12);
}

.awxf-star.is-on,
.awxf-star.is-hover,
.awxf-star-input:checked + .awxf-star {
  color: var(--awxf-star, #f0a500);
}

.awxf-star-input:focus-visible + .awxf-star {
  outline: 3px solid var(--awxf-focus);
  outline-offset: 1px;
}

/* ---------- Range slider ---------- */
.awxf-range {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: var(--awxf-field-height);
}

.awxf .awxf-range input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  min-height: 0;
  height: 6px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(to right, var(--awxf-accent) var(--awxf-range-pct, 0%), var(--awxf-chip-border) var(--awxf-range-pct, 0%));
  cursor: pointer;
}

.awxf .awxf-range input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--awxf-accent);
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.awxf .awxf-range input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--awxf-accent);
  background: #fff;
}

.awxf .awxf-range input[type="range"]:focus-visible {
  outline: 3px solid var(--awxf-focus);
  outline-offset: 4px;
}

.awxf-range-out {
  min-width: 3.5em;
  text-align: right;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ---------- Signature ---------- */
.awxf-sig-pad {
  position: relative;
  height: var(--awxf-sig-height, 160px);
  border: 1.5px dashed var(--awxf-field-border);
  border-radius: 12px;
  background: var(--awxf-field-bg);
  overflow: hidden;
}

.awxf .awxf-sig-canvas {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  color: var(--awxf-field-text);
  cursor: crosshair;
  touch-action: none;
}

.awxf-sig-line {
  position: absolute;
  right: 24px;
  bottom: 34px;
  left: 24px;
  border-top: 1px solid var(--awxf-chip-border);
  pointer-events: none;
}

.awxf-sig-pad::after {
  content: "\2715";
  position: absolute;
  bottom: 26px;
  left: 10px;
  font-size: 12px;
  color: var(--awxf-muted);
  pointer-events: none;
}

.awxf-sig.has-ink .awxf-sig-pad {
  border-style: solid;
}

.awxf-field.has-error .awxf-sig-pad {
  border-color: var(--awxf-error);
}

.awxf-sig-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.awxf-sig-btn {
  padding: 6px 14px;
  border: 1px solid var(--awxf-chip-border);
  border-radius: 999px;
  background: var(--awxf-chip-bg);
  color: var(--awxf-chip-text);
  font-size: 0.85rem;
  cursor: pointer;
}

.awxf-sig-btn:focus-visible {
  outline: 3px solid var(--awxf-focus);
  outline-offset: 2px;
}

.awxf-sig-btn[aria-pressed="true"] {
  border-color: var(--awxf-accent);
  background: var(--awxf-accent);
  color: var(--awxf-on-accent);
}

.awxf-sig-typed {
  display: none;
  margin-top: 10px;
}

.awxf-sig.is-typed .awxf-sig-typed {
  display: block;
}

.awxf-sig.is-typed .awxf-sig-pad {
  display: none;
}

html:not(.awxf-js) .awxf-sig-pad,
html:not(.awxf-js) .awxf-sig-actions {
  display: none;
}

html:not(.awxf-js) .awxf-sig-typed {
  display: block;
}

.awxf-label-sm {
  font-size: 0.85rem;
}

.awxf-submit.is-busy {
  pointer-events: none;
}

/* ---------- Living inside a template (UIkit / YOOtheme Pro and others) ----------
   Element and contextual rules such as `a:hover`, `.uk-light h2` or `* + p` outrank a single class, so the
   colours and link decoration that matter are restated here with two class levels of specificity. */
.awxf .awxf-title,
.awxf .awxf-step-title,
.awxf .awxf-done-title,
.awxf .awxf-heading,
.awxf .awxf-label,
.awxf legend.awxf-label,
.awxf .awxf-choice,
.awxf .awxf-check,
.awxf .awxf-errors {
  color: var(--awxf-panel-text);
}

.awxf .awxf-hint,
.awxf .awxf-intro,
.awxf .awxf-foot-note,
.awxf .awxf-group-title,
.awxf .awxf-group-desc,
.awxf .awxf-step-desc,
.awxf .awxf-done-message,
.awxf .awxf-html,
.awxf .awxf-optional,
.awxf .awxf-required-note,
.awxf .awxf-steps li {
  color: var(--awxf-muted);
}

.awxf .awxf-steps li[aria-current="step"],
.awxf .awxf-steps li.is-done {
  color: var(--awxf-panel-text);
}

.awxf .awxf-error,
.awxf .awxf-req {
  color: var(--awxf-error);
}

.awxf .awxf-launcher,
.awxf .awxf-launcher:hover,
.awxf .awxf-launcher:focus,
.awxf .awxf-launcher:active {
  color: var(--awxf-launcher-text);
  text-decoration: none;
}

.awxf .awxf-check-text a,
.awxf .awxf-html a,
.awxf .awxf-intro a,
.awxf .awxf-done-message a,
.awxf .awxf-errors a,
.awxf .awxf-check-text a:hover,
.awxf .awxf-html a:hover,
.awxf .awxf-intro a:hover,
.awxf .awxf-done-message a:hover,
.awxf .awxf-errors a:hover {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.awxf .awxf-done-links a,
.awxf .awxf-done-links a:hover {
  text-decoration: none;
}

.awxf .awxf-done-links a {
  color: var(--awxf-panel-text);
}

.awxf .awxf-done-links a:hover {
  color: var(--awxf-accent);
}

.awxf .awxf-input,
.awxf .awxf-choice-label,
.awxf .awxf-file {
  color: var(--awxf-field-text);
}

.awxf .awxf-choice-label {
  color: var(--awxf-chip-text);
}

.awxf .awxf-style-chips .awxf-choice input:checked + .awxf-choice-label {
  color: var(--awxf-on-accent);
}

/* Inline light form dropped into a dark UIkit section (.uk-light): go white on dark. */
.uk-light .awxf-theme-light,
.awxf-theme-light.uk-light {
  --awxf-text: #ffffff;
  --awxf-muted: rgba(255, 255, 255, 0.78);
  --awxf-line: rgba(255, 255, 255, 0.22);
  --awxf-field-bg: rgba(255, 255, 255, 0.08);
  --awxf-field-text: #ffffff;
  --awxf-field-border: rgba(255, 255, 255, 0.35);
  --awxf-field-border-hover: rgba(255, 255, 255, 0.6);
  --awxf-field-placeholder: rgba(255, 255, 255, 0.6);
  --awxf-focus: #ffffff;
  --awxf-focus-ring: rgba(255, 255, 255, 0.25);
  --awxf-chip-bg: rgba(255, 255, 255, 0.08);
  --awxf-chip-border: rgba(255, 255, 255, 0.35);
  --awxf-chip-text: #ffffff;
  --awxf-error: #ff8a80;
  --awxf-error-bg: rgba(255, 138, 128, 0.18);
}

.uk-light .awxf-theme-light select.awxf-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23ffffff' stroke-width='1.8'/%3E%3C/svg%3E");
}

.uk-light .awxf-theme-light select.awxf-input option {
  color: #111;
  background: #fff;
}

/* Page scroll is locked while a drawer or modal is open (the panel scrolls itself). */
html.awxf-lock {
  overflow: hidden;
  padding-right: var(--awxf-scrollbar, 0px);
}

/* ---------- Motion and contrast preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  .awxf *,
  .awxf *::before,
  .awxf *::after,
  dialog.awxf-dialog::backdrop {
    transition-duration: 0.01ms !important;
    animation: none !important;
  }

  .awxf-submit.is-ready {
    box-shadow: 0 0 0 4px var(--awxf-ready-ring);
  }
}

@media (forced-colors: active) {
  .awxf-input,
  .awxf-style-chips .awxf-choice-label,
  .awxf-submit,
  .awxf-launcher {
    border: 1px solid ButtonText;
  }

  .awxf-style-chips .awxf-choice input:checked + .awxf-choice-label {
    background: Highlight;
    color: HighlightText;
    forced-color-adjust: none;
  }

  .awxf-submit.is-ready {
    outline: 2px solid Highlight;
    outline-offset: 3px;
  }

  .awxf-switch-track,
  .awxf-sig-pad {
    border: 1px solid ButtonText;
  }

  .awxf-switch input:checked + .awxf-switch-track {
    background: Highlight;
  }

  .awxf-star.is-on,
  .awxf-star-input:checked + .awxf-star {
    color: Highlight;
  }
}
