/* ==========================================================================
   Webshape smart form ([wsai_form]) — v2 design system
   Uses the theme's --ws-* tokens (with fallbacks so it also works outside the
   theme). Inside the theme's .form-panel the theme's input styles apply; the
   rules below add step behaviour, option cards, the price guide and states.
   ========================================================================== */

.wsaif {
  --f-accent: var(--ws-accent, #e8425e);
  --f-accent-dark: var(--ws-accent-dark, #c82d44);
  --f-accent-soft: var(--ws-accent-soft, rgba(232, 66, 94, 0.12));
  --f-ink: var(--ws-ink, #17142a);
  --f-text: var(--ws-text, #211e30);
  --f-text-2: var(--ws-text-2, #5b566f);
  --f-muted: var(--ws-muted, #7a7590);
  --f-line: var(--ws-line, rgba(23, 20, 42, 0.1));
  --f-card: rgba(255, 255, 255, 0.6);
  --f-input: #fff;
  --f-input-line: #dcd9e6;
  --f-font: var(--ws-font, 'Poppins', sans-serif);
  --f-mono: var(--ws-mono, 'IBM Plex Mono', monospace);
  font-family: var(--f-font);
  color: var(--f-text);
  position: relative;
}
html.ws-dark .wsaif {
  --f-text: #fff;
  --f-text-2: rgba(255, 255, 255, 0.78);
  --f-muted: rgba(255, 255, 255, 0.6);
  --f-line: rgba(255, 255, 255, 0.16);
  --f-card: rgba(255, 255, 255, 0.06);
  --f-input: rgba(255, 255, 255, 0.08);
  --f-input-line: rgba(255, 255, 255, 0.16);
}

.wsaif *, .wsaif *::before, .wsaif *::after { box-sizing: border-box; }
.wsaif [hidden] { display: none !important; }

.wsaif-sr {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ─── Progress ─── */
.wsaif-progress { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.wsaif-progress-track { flex: 1; height: 6px; border-radius: 999px; background: var(--f-line); overflow: hidden; }
.wsaif-progress-fill {
  height: 100%; width: 0; border-radius: 999px;
  background: linear-gradient(135deg, var(--f-accent), var(--f-accent-dark));
  transition: width .45s ease;
}
.wsaif-progress-text {
  font-family: var(--f-mono); font-size: 12px; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--f-muted); white-space: nowrap;
}

/* ─── Steps ─── */
.wsaif-form { margin: 0; }
.wsaif-step { border: 0; padding: 0; margin: 0; min-width: 0; }
.wsaif-step.is-active { animation: wsaif-in .45s ease both; }
@keyframes wsaif-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.wsaif-title {
  display: block; width: 100%; padding: 0; margin: 0 0 10px;
  font-size: 21px; font-weight: 600; line-height: 1.3; color: var(--f-text);
  outline: none;
}
.wsaif-hint { font-size: 13.5px; line-height: 1.55; color: var(--f-muted); margin: 0 0 14px; }
.wsaif-guidance {
  margin: 0 0 18px; padding: 12px 16px;
  border-left: 3px solid var(--f-accent);
  border-radius: 0 12px 12px 0;
  background: var(--f-accent-soft);
  font-size: 14.5px; line-height: 1.55; color: var(--f-text);
}

/* ─── Fields ─── */
.wsaif-fields { display: grid; gap: 18px; }
.wsaif-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.wsaif-field { min-width: 0; }
.wsaif-field--full { grid-column: 1 / -1; }
.wsaif-field > label, .wsaif-label {
  display: block; margin-bottom: 7px;
  font-size: 13.5px; font-weight: 600; color: var(--f-text);
}
.wsaif-field .wsaif-hint { margin: -3px 0 10px; font-size: 12.5px; }

/* Base inputs (the theme's .form-panel rules take over inside a panel) */
.wsaif input[type="text"], .wsaif input[type="email"], .wsaif input[type="tel"],
.wsaif input[type="url"], .wsaif textarea {
  width: 100%;
  border: 1.5px solid var(--f-input-line);
  border-radius: 12px;
  padding: 12px 14px;
  font-family: var(--f-font);
  font-size: 15px;
  color: var(--f-text);
  background: var(--f-input);
  outline: none;
  transition: border-color .3s ease, box-shadow .3s ease;
}
.wsaif textarea { resize: vertical; min-height: 92px; line-height: 1.55; }
.wsaif [data-step="project"] textarea { min-height: 128px; }
.wsaif input:focus, .wsaif textarea:focus { border-color: var(--f-accent); box-shadow: 0 0 0 4px var(--f-accent-soft); }

/* Option cards (radio + checkbox) */
.wsaif-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.wsaif-option { position: relative; display: block; cursor: pointer; margin: 0; }
.wsaif .wsaif-option { font-weight: 400; margin-bottom: 0; }
.wsaif-option input { position: absolute; opacity: 0; pointer-events: none; }
.wsaif-option-inner {
  display: flex; align-items: center; gap: 12px; height: 100%;
  padding: 13px 15px;
  border-radius: 14px;
  border: 1.5px solid var(--f-line);
  background: var(--f-card);
  font-size: 14px; line-height: 1.4; color: var(--f-text);
  transition: border-color .25s ease, background .25s ease, box-shadow .25s ease;
}
.wsaif-option:hover .wsaif-option-inner { border-color: rgba(232, 66, 94, 0.5); }
.wsaif-option-mark {
  position: relative; flex: none; width: 20px; height: 20px;
  border: 1.5px solid var(--f-input-line); background: var(--f-input);
  transition: background .25s ease, border-color .25s ease;
}
.wsaif-options--radio .wsaif-option-mark { border-radius: 50%; }
.wsaif-options--checkbox .wsaif-option-mark { border-radius: 6px; }
.wsaif-option input:checked + .wsaif-option-inner {
  border-color: var(--f-accent);
  background: var(--f-accent-soft);
  box-shadow: 0 8px 22px rgba(200, 45, 68, 0.1);
}
.wsaif-option input:checked + .wsaif-option-inner .wsaif-option-mark { background: var(--f-accent); border-color: var(--f-accent); }
.wsaif-options--radio .wsaif-option input:checked + .wsaif-option-inner .wsaif-option-mark::after {
  content: ""; position: absolute; inset: 5px; border-radius: 50%; background: #fff;
}
.wsaif-options--checkbox .wsaif-option input:checked + .wsaif-option-inner .wsaif-option-mark::after {
  content: ""; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.wsaif-option input:focus-visible + .wsaif-option-inner { outline: 2px solid var(--f-accent); outline-offset: 2px; }

/* Errors */
.wsaif-error { display: none; font-size: 12px; color: var(--f-accent-dark); margin-top: 6px; }
.wsaif-error.is-on { display: block; }
html.ws-dark .wsaif-error { color: #ff8fa1; }
.wsaif .has-error input, .wsaif .has-error textarea, .wsaif [aria-invalid="true"] { border-color: var(--f-accent-dark); }
.wsaif .has-error .wsaif-option-inner { border-color: rgba(200, 45, 68, 0.5); }

/* Honeypot */
.wsaif-hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* ─── Price guide ─── */
.wsaif-prices { margin-bottom: 22px; }
.wsaif-tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.wsaif-tier {
  padding: 16px 16px 14px;
  border-radius: 16px;
  border: 1px solid var(--f-line);
  background: var(--f-card);
}
.wsaif-tier--feature { background: var(--f-ink); border-color: var(--f-ink); color: #fff; }
html.ws-dark .wsaif-tier--feature { background: #fff; border-color: #fff; color: var(--ws-ink, #17142a); }
.wsaif-tier-name { font-size: 13px; font-weight: 500; opacity: .85; }
.wsaif-tier-price { font-size: 20px; font-weight: 600; letter-spacing: -0.3px; margin: 4px 0 6px; }
.wsaif-tier-text { font-size: 12.5px; line-height: 1.45; margin: 0; color: inherit; opacity: .75; }
.wsaif-monthly { list-style: none; margin: 0 0 12px; padding: 0; border: 1px solid var(--f-line); border-radius: 14px; overflow: hidden; }
.wsaif-monthly li {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 10px 14px; font-size: 13.5px; color: var(--f-text-2);
  border-bottom: 1px solid var(--f-line);
}
.wsaif-monthly li:last-child { border-bottom: 0; }
.wsaif-monthly strong { color: var(--f-text); font-weight: 600; text-align: right; }
.wsaif-larger, .wsaif-process { font-size: 12.5px; line-height: 1.55; color: var(--f-muted); margin: 0 0 6px; }
.wsaif-process { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .2px; }

/* The frank pricing note */
.wsaif-warning {
  margin-top: 18px; padding: 16px 18px;
  border-radius: 16px;
  border: 1.5px solid rgba(232, 66, 94, 0.35);
  background: var(--f-accent-soft);
}
.wsaif-warning > p { margin: 0 0 14px; font-size: 14px; line-height: 1.6; color: var(--f-text); }
.wsaif-warning.is-pulse { animation: wsaif-pulse .8s ease; }
@keyframes wsaif-pulse { 0% { box-shadow: 0 0 0 0 rgba(232, 66, 94, 0.35); } 100% { box-shadow: 0 0 0 14px rgba(232, 66, 94, 0); } }

/* ─── Review ─── */
.wsaif-summary { margin: 0 0 16px; border: 1px solid var(--f-line); border-radius: 16px; overflow: hidden; background: var(--f-card); }
.wsaif-summary-row { display: flex; gap: 14px; padding: 11px 16px; border-bottom: 1px solid var(--f-line); font-size: 13.5px; }
.wsaif-summary-row:last-child { border-bottom: 0; }
.wsaif-summary dt { flex: none; width: 150px; font-weight: 600; color: var(--f-muted); }
.wsaif-summary dd { flex: 1; margin: 0; color: var(--f-text-2); word-break: break-word; white-space: pre-line; }
.wsaif-privacy { font-size: 12px; line-height: 1.6; color: var(--f-muted); margin: 0; }
.wsaif-privacy a { color: var(--f-accent-dark); text-decoration: underline; text-underline-offset: 2px; }

/* ─── Status + navigation ─── */
.wsaif-status { min-height: 0; font-size: 13.5px; color: var(--f-text-2); }
.wsaif-status:not(:empty) { margin-top: 14px; }
.wsaif-status.is-error { color: var(--f-accent-dark); }

.wsaif-nav { display: flex; align-items: center; gap: 12px; margin-top: 24px; }
.wsaif .wsaif-back {
  flex: none;
  border: 1px solid rgba(23, 20, 42, 0.16);
  border-radius: 999px;
  padding: 14px 24px;
  background: transparent;
  font-family: var(--f-font); font-size: 14px; font-weight: 500;
  color: var(--f-text);
  cursor: pointer;
  transition: border-color .3s ease;
}
html.ws-dark .wsaif .wsaif-back { border-color: rgba(255, 255, 255, 0.25); }
.wsaif .wsaif-back:hover { border-color: rgba(232, 66, 94, 0.6); }
.wsaif .wsaif-back:disabled { opacity: .5; cursor: default; }

/* The primary button keeps the theme's gradient pill, sized for the nav row */
.wsaif .wsaif-next,
.form-panel .wsaif button[type="submit"].wsaif-next {
  flex: 1;
  width: auto;
  margin-top: 0;
  padding: 15px 22px;
  border: 0; border-radius: 999px;
  background: linear-gradient(135deg, var(--f-accent), var(--f-accent-dark));
  color: #fff;
  font-family: var(--f-font); font-weight: 600; font-size: 16px; text-align: center;
  cursor: pointer;
  box-shadow: var(--ws-shadow-pink, 0 14px 34px rgba(200, 45, 68, 0.3));
  transition: transform .35s ease, box-shadow .35s ease, opacity .3s ease;
}
.wsaif .wsaif-next:hover { transform: translateY(-2px); box-shadow: 0 0 0 4px rgba(232, 66, 94, 0.18), 0 18px 40px rgba(200, 45, 68, 0.4); }
.wsaif .wsaif-next:disabled { opacity: .7; cursor: progress; transform: none; }
.wsaif .is-loading::after {
  content: ""; display: inline-block; width: 14px; height: 14px; margin-left: 10px; vertical-align: -2px;
  border: 2px solid rgba(255, 255, 255, 0.45); border-top-color: #fff; border-radius: 50%;
  animation: wsaif-spin .8s linear infinite;
}
.wsaif .wsaif-more.is-loading::after { border-color: rgba(232, 66, 94, 0.3); border-top-color: var(--f-accent); }

/* Step 2: "Add more details" sits beside "Request a call" */
.wsaif .wsaif-more {
  flex: 1;
  border: 1.5px solid var(--f-accent);
  border-radius: 999px;
  padding: 14px 20px;
  background: transparent;
  font-family: var(--f-font); font-size: 15px; font-weight: 600;
  color: var(--f-accent-dark);
  cursor: pointer;
  transition: background .3s ease, color .3s ease, box-shadow .3s ease;
}
html.ws-dark .wsaif .wsaif-more { color: #fff; }
.wsaif .wsaif-more:hover { background: var(--f-accent-soft); box-shadow: 0 0 0 4px rgba(232, 66, 94, 0.12); }
.wsaif .wsaif-more:disabled { opacity: .7; cursor: progress; }
.wsaif-startup { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--f-line); }
.wsaif-privacy:not([hidden]) { margin-top: 16px; }
.wsaif-turnstile:not(:empty) { margin-top: 14px; }
@keyframes wsaif-spin { to { transform: rotate(360deg); } }
.wsaif.is-busy .wsaif-step.is-active { opacity: .6; transition: opacity .3s ease; }

/* ─── End states ─── */
.wsaif-end { text-align: center; padding: 30px 8px 10px; outline: none; animation: wsaif-in .45s ease both; }
.wsaif-end-icon { color: var(--f-accent); margin-bottom: 8px; }
.wsaif-end-title { margin: 4px 0 8px; font-size: 22px; color: var(--f-text); }
.wsaif-end-text { margin: 0 auto; max-width: 480px; font-size: 15px; line-height: 1.6; color: var(--f-text-2); }
.wsaif-end-ref { margin: 12px 0 0; font-family: var(--f-mono); font-size: 12px; letter-spacing: 1px; color: var(--f-muted); }

/* ─── Small screens ─── */
@media (max-width: 767px) {
  .wsaif-grid { grid-template-columns: 1fr; }
  .wsaif-tiers { grid-template-columns: 1fr; }
  .wsaif-monthly li { flex-direction: column; gap: 2px; }
  .wsaif-monthly strong { text-align: left; }
  .wsaif-title { font-size: 19px; }
  .wsaif-summary-row { flex-direction: column; gap: 2px; }
  .wsaif-summary dt { width: auto; }
}
@media (max-width: 600px) {
  .wsaif.is-choice .wsaif-nav { flex-wrap: wrap; }
  .wsaif.is-choice .wsaif-nav .wsaif-next { order: 1; flex-basis: 100%; }
  .wsaif.is-choice .wsaif-nav .wsaif-more { order: 2; flex-basis: 100%; }
  .wsaif.is-choice .wsaif-nav .wsaif-back { order: 3; }
}
@media (max-width: 479px) {
  .wsaif-options { grid-template-columns: 1fr; }
  .wsaif .wsaif-back { padding: 14px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .wsaif-step.is-active, .wsaif-end, .wsaif-warning.is-pulse { animation: none; }
  .wsaif-progress-fill { transition: none; }
}
