/* ADS Wind lead form */
.adsw-lead {
  --adsw-blue: #324ac7;
  --adsw-sky: #59aef6;
  --adsw-ink: #2b3136;
  --adsw-muted: #6b7680;
  --adsw-line: #dde3ec;
  --adsw-field: #f5f8fc;
  --adsw-error: #d93a3a;
  --adsw-grad: linear-gradient(125deg, var(--adsw-blue) 55%, var(--adsw-sky) 100%);
  font-family: Mulish, system-ui, sans-serif;
  color: var(--adsw-ink);
  position: relative;
  margin-bottom: 32px;
  text-align: left;
  container-type: inline-size;
}
.adsw-lead *, .adsw-lead *::before, .adsw-lead *::after { box-sizing: border-box; }

.adsw-lead__lead {
  margin: 0 0 22px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--adsw-muted);
}

.adsw-lead__form { display: grid; gap: 14px; margin: 0; }
.adsw-lead__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .adsw-lead__row { grid-template-columns: 1fr; } }
/* Blog and case pages put the form on a blue band, so it gets its own card. */
.adsw-lead[data-compact] {
  margin-bottom: 0;
  padding: 24px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 50px -24px rgba(15, 25, 80, .55);
}
@container (max-width: 380px) {
  .adsw-lead[data-compact] .adsw-chip span { padding: 7px 11px; font-size: 13px; }
  .adsw-lead[data-compact] .adsw-lead__submit { padding: 16px 14px; font-size: 16px; }
}
/* Blog and case pages put the form in a narrow side column. */
@container (max-width: 420px) { .adsw-lead__row { grid-template-columns: 1fr; } }

/* Floating-label fields */
.adsw-field { position: relative; }
.adsw-field input,
.adsw-field textarea {
  width: 100%;
  margin: 0;
  padding: 24px 16px 8px;
  font: inherit;
  font-size: 16px;
  color: var(--adsw-ink);
  background: var(--adsw-field);
  border: 1.5px solid transparent;
  border-radius: 10px;
  outline: none;
  transition: border-color .2s, background-color .2s, box-shadow .2s;
  -webkit-appearance: none;
}
.adsw-field textarea { min-height: 96px; resize: vertical; }
.adsw-field label {
  position: absolute;
  left: 17px;
  top: 17px;
  font-size: 16px;
  color: var(--adsw-muted);
  pointer-events: none;
  transform-origin: left top;
  transition: transform .18s ease, color .18s ease;
}
.adsw-field input:focus,
.adsw-field textarea:focus {
  background: #fff;
  border-color: var(--adsw-blue);
  box-shadow: 0 0 0 4px rgba(50, 74, 199, .12);
}
.adsw-field input:focus + label,
.adsw-field input:not(:placeholder-shown) + label,
.adsw-field textarea:focus + label,
.adsw-field textarea:not(:placeholder-shown) + label {
  transform: translateY(-10px) scale(.75);
}
.adsw-field input:focus + label,
.adsw-field textarea:focus + label { color: var(--adsw-blue); }
.adsw-field.is-invalid input { border-color: var(--adsw-error); background: #fff; }
.adsw-field.is-invalid label { color: var(--adsw-error); }
.adsw-field__error {
  display: none;
  margin: 6px 2px 0;
  font-size: 13px;
  color: var(--adsw-error);
}
.adsw-field.is-invalid .adsw-field__error { display: block; }

/* Service chips */
.adsw-chips { border: 0; margin: 4px 0 0; padding: 0; min-width: 0; }
.adsw-chips legend {
  padding: 0;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--adsw-ink);
}
.adsw-chips__list { display: flex; flex-wrap: wrap; gap: 8px; }
.adsw-chip { position: relative; }
.adsw-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.adsw-chip span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--adsw-ink);
  background: #fff;
  border: 1.5px solid var(--adsw-line);
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
  transition: border-color .15s, background-color .15s, color .15s, transform .1s;
}
.adsw-chip span:hover { border-color: var(--adsw-sky); }
.adsw-chip input:focus-visible + span { box-shadow: 0 0 0 4px rgba(50, 74, 199, .18); }
.adsw-chip input:checked + span {
  color: #fff;
  background: var(--adsw-grad);
  border-color: transparent;
}
.adsw-chip input:checked + span::before { content: "✓"; font-size: 12px; }
.adsw-chip span:active { transform: scale(.97); }

/* Submit */
.adsw-lead__submit {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 6px;
  padding: 17px 28px;
  font: inherit;
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  background: var(--adsw-grad);
  border: 0;
  border-radius: 10px;
  box-shadow: 0 10px 24px -8px rgba(50, 74, 199, .55);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, filter .2s;
}
.adsw-lead__submit:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -8px rgba(50, 74, 199, .6); }
.adsw-lead__submit:active { transform: translateY(0); }
.adsw-lead__submit:disabled { cursor: progress; filter: saturate(.7); transform: none; }
.adsw-lead__submit svg { transition: transform .2s; }
.adsw-lead__submit:hover svg { transform: translateX(3px); }
.adsw-lead__spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, .4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: adsw-spin .7s linear infinite;
}
.adsw-lead.is-sending .adsw-lead__spinner { display: block; }
.adsw-lead.is-sending .adsw-lead__submit svg { display: none; }
@keyframes adsw-spin { to { transform: rotate(360deg); } }

.adsw-lead__note {
  margin: 4px 0 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--adsw-muted);
}
.adsw-lead__note svg { flex: none; color: var(--adsw-blue); }
.adsw-lead__fail {
  display: none;
  margin: 0;
  padding: 12px 14px;
  font-size: 14px;
  color: var(--adsw-error);
  background: #fdf0f0;
  border-radius: 10px;
}
.adsw-lead.is-failed .adsw-lead__fail { display: block; }
.adsw-lead__fail a { color: inherit; font-weight: 700; }

/* Success state */
.adsw-lead__done {
  display: none;
  padding: 36px 8px 20px;
  text-align: center;
}
.adsw-lead.is-done .adsw-lead__form,
.adsw-lead.is-done .adsw-lead__lead { display: none; }
.adsw-lead.is-done .adsw-lead__done { display: block; animation: adsw-in .4s ease both; }
.adsw-lead__check {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin: 0 auto 20px;
  color: #fff;
  background: var(--adsw-grad);
  border-radius: 50%;
  box-shadow: 0 12px 30px -10px rgba(50, 74, 199, .6);
}
.adsw-lead__check path {
  stroke-dasharray: 30;
  stroke-dashoffset: 30;
  animation: adsw-draw .45s .2s ease forwards;
}
.adsw-lead__done h3 { margin: 0 0 8px; font-size: 24px; font-weight: 800; color: var(--adsw-ink); }
.adsw-lead__done p { margin: 0 auto; max-width: 340px; color: var(--adsw-muted); line-height: 1.5; }
@keyframes adsw-draw { to { stroke-dashoffset: 0; } }
@keyframes adsw-in { from { opacity: 0; transform: translateY(8px); } }

@media (prefers-reduced-motion: reduce) {
  .adsw-lead *, .adsw-lead *::before { animation: none !important; transition: none !important; }
  .adsw-lead__check path { stroke-dashoffset: 0; }
}
