/**
 * @description Multi-step client onboarding wizard — tokens, layout, field components
 * @lastUpdated 2026-08-17
 * @dependencies None — paired with index.html + script.js in /onboarding. Phone flags styled via vendor/intl-tel-input CSS variables overridden here.
 * @warning Field components are rendered generically by script.js from a config array; classnames here must match STEP field renderers exactly
 */

:root {
  /* Foundation */
  --px-space-base: 1rem;
  --px-font-base: 1rem;
  --px-radius-base: 0.75rem;

  /* Scale */
  --px-space-1: calc(var(--px-space-base) * 0.25);
  --px-space-2: calc(var(--px-space-base) * 0.5);
  --px-space-3: calc(var(--px-space-base) * 0.75);
  --px-space-4: var(--px-space-base);
  --px-space-5: calc(var(--px-space-base) * 1.25);
  --px-space-6: calc(var(--px-space-base) * 1.5);
  --px-space-8: calc(var(--px-space-base) * 2);
  --px-space-10: calc(var(--px-space-base) * 2.5);
  --px-space-12: calc(var(--px-space-base) * 3);

  --px-text-sm: calc(var(--px-font-base) * 0.875);
  --px-text-base: var(--px-font-base);
  --px-text-lg: calc(var(--px-font-base) * 1.125);
  --px-heading-sm: calc(var(--px-font-base) * 1.375);
  --px-heading-md: calc(var(--px-font-base) * 1.75);
  --px-heading-lg: calc(var(--px-font-base) * 2.25);

  --px-radius-sm: calc(var(--px-radius-base) * 0.5);
  --px-radius-md: var(--px-radius-base);
  --px-radius-lg: calc(var(--px-radius-base) * 1.5);
  --px-radius-pill: 999px;

  --px-duration-fast: 0.15s;
  --px-duration-normal: 0.25s;
  --px-ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  /* Color roles — neutral black/white/grey, light + dark aware */
  --px-hue: 260;
  --px-color-accent: oklch(0.16 0 var(--px-hue));
  --px-color-accent-hover: oklch(0.28 0 var(--px-hue));
  --px-color-accent-soft: oklch(0.16 0 var(--px-hue) / 6%);
  --px-color-accent-ring: oklch(0.16 0 var(--px-hue) / 15%);
  --px-color-bg-page: oklch(0.97 0 var(--px-hue));
  --px-color-surface: oklch(1 0 0);
  --px-color-surface-raised: oklch(0.98 0 var(--px-hue));
  --px-color-border: oklch(0.88 0 var(--px-hue));
  --px-color-border-strong: oklch(0.78 0 var(--px-hue));
  --px-color-text: oklch(0.13 0 var(--px-hue));
  --px-color-text-muted: oklch(0.48 0 var(--px-hue));
  --px-color-text-inverse: oklch(1 0 0);
  --px-color-danger: oklch(0.87 0.09 17.17);
  --px-color-success: oklch(0.6 0.17 150);
  --px-color-warning: oklch(0.72 0.16 75);
  --px-color-facebook: oklch(0.52 0.19 261); /* Facebook brand blue — used only for the FB icon mark */
  --px-glass-blur: 20px;
  --px-shadow-sm: 0 1.5rem 4.375rem oklch(0.13 0 var(--px-hue) / 8%);
  --px-shadow-md: 0 1.5rem 4.375rem oklch(0.13 0 var(--px-hue) / 14%);
  --px-shadow-lg: 0 1.5rem 4.375rem oklch(0.13 0 var(--px-hue) / 22%);
  --px-focus-ring: 0 0 0 4px var(--px-color-accent-ring);
  --px-color-scrim: oklch(0.13 0 var(--px-hue) / 25%);

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --px-color-accent: oklch(0.93 0 var(--px-hue));
    --px-color-accent-hover: oklch(0.82 0 var(--px-hue));
    --px-color-accent-soft: oklch(0.93 0 var(--px-hue) / 14%);
    --px-color-accent-ring: oklch(0.93 0 var(--px-hue) / 22%);
    --px-color-bg-page: oklch(0.16 0 0);
    --px-color-surface: oklch(0.23 0 0);
    --px-color-surface-raised: oklch(0.31 0 var(--px-hue));
    --px-color-border: oklch(0.4 0 var(--px-hue));
    --px-color-border-strong: oklch(0.48 0 var(--px-hue));
    --px-color-text: oklch(0.93 0 var(--px-hue));
    --px-color-text-muted: oklch(0.85 0 var(--px-hue));
    --px-color-text-inverse: oklch(0.16 0 var(--px-hue));
    --px-color-scrim: oklch(0.1 0 var(--px-hue) / 45%);
    --px-shadow-sm: 0 1.5rem 4.375rem oklch(0.1 0 var(--px-hue) / 22%);
    --px-shadow-md: 0 1.5rem 4.375rem oklch(0.1 0 var(--px-hue) / 32%);
    --px-shadow-lg: 0 1.5rem 4.375rem oklch(0.1 0 var(--px-hue) / 44%);
  }
}

* {
  box-sizing: border-box;
}

html {
  scrollbar-width: thin;
  scrollbar-color: var(--px-color-border-strong) transparent;
}

::-webkit-scrollbar {
  inline-size: 0.375rem;
  block-size: 0.375rem;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--px-color-border-strong);
  border-radius: var(--px-radius-pill);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--px-color-text-muted);
}

body {
  margin: 0;
}

.px-onboarding {
  min-block-size: 100dvh;
  background:
    radial-gradient(70rem 40rem at 50% -18%, var(--px-color-accent-soft), transparent),
    var(--px-color-bg-page);
  font-family: "Outfit", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--px-color-text);
  line-height: 1.5;
}

/* ===== Wizard shell — single centered column, card owns the chrome ===== */

.px-wizard {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--px-space-6);
  min-block-size: 100dvh;
  padding-block: var(--px-space-10);
  padding-inline: var(--px-space-6);
  container: px-wizard / inline-size;
}

.px-wizard__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--px-space-4);
  inline-size: 100%;
  max-inline-size: var(--px-form-max);
}

.px-wizard__brand {
  font-family: "Outfit", sans-serif;
  font-weight: 800;
  font-size: var(--px-text-lg);
}

.px-wizard__save-status {
  color: var(--px-color-text-muted);
  font-size: var(--px-text-sm);
}

.px-wizard__stage {
  flex: 1;
  display: flex;
  justify-content: center;
  inline-size: 100%;
}

.px-form {
  --px-form-max: 62.5rem; /* 1000px */

  inline-size: 100%;
  max-inline-size: var(--px-form-max);
  display: flex;
  flex-direction: column;
  gap: var(--px-space-8);
  padding: clamp(1.5rem, 4vw, 3.25rem);
  border-radius: var(--px-radius-lg);
  background: var(--px-color-surface);
  box-shadow: var(--px-shadow-md);
}

.px-wizard__progress {
  display: flex;
  flex-direction: column;
  gap: var(--px-space-3);
}

.px-progress__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--px-space-3);
}

.px-progress__step-label {
  color: var(--px-color-text-muted);
  font-size: var(--px-text-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.px-progress__step-title {
  font-family: "Outfit", sans-serif;
  font-size: var(--px-text-lg);
  font-weight: 900;
  text-transform: uppercase;
}

.px-progress {
  inline-size: 100%;
  block-size: 0.1875rem;
  border-radius: var(--px-radius-pill);
  background: var(--px-color-border-strong);
  overflow: hidden;
}

.px-progress__bar {
  block-size: 100%;
  background: var(--px-color-accent);
  border-radius: var(--px-radius-pill);
  transition: inline-size var(--px-duration-normal) var(--px-ease-out);
}

.px-form__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--px-space-4);
  padding-block-start: var(--px-space-6);
  border-block-start: 1px solid var(--px-color-border);
}

.px-form__actions-end {
  display: flex;
  align-items: center;
  gap: var(--px-space-4);
}

@container px-wizard (inline-size < 32rem) {
  .px-wizard__save-status {
    display: none;
  }

  .px-form__actions-end {
    gap: var(--px-space-2);
  }

  .px-btn--text {
    display: none;
  }

  .px-form {
    padding: var(--px-space-5);
    border-radius: var(--px-radius-md);
  }
}

/* ===== Step content ===== */

.px-step {
  display: flex;
  flex-direction: column;
  gap: var(--px-space-6);
  animation: px-step-in var(--px-duration-normal) var(--px-ease-out);
}

@keyframes px-step-in {
  from {
    opacity: 0;
    translate: 0 0.5rem;
  }
}

.px-step__header {
  display: flex;
  flex-direction: column;
  gap: var(--px-space-2);
}

.px-step__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--px-space-2);
  inline-size: fit-content;
  padding-inline: var(--px-space-3);
  padding-block: var(--px-space-1);
  border-radius: var(--px-radius-pill);
  background: var(--px-color-accent-soft);
  color: var(--px-color-accent);
  font-size: var(--px-text-sm);
  font-weight: 500;
}

.px-step__title {
  margin: 0;
  font-size: var(--px-heading-md);
  font-weight: 800;
  line-height: 1.15;
}

.px-step__subtitle {
  margin: 0;
  color: var(--px-color-text-muted);
  font-size: var(--px-text-base);
  max-inline-size: 40rem;
}

.px-step__intro-list {
  display: flex;
  flex-direction: column;
  gap: var(--px-space-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.px-step__intro-item {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: var(--px-space-3);
  padding: var(--px-space-4);
  border: 1px solid var(--px-color-border);
  border-radius: var(--px-radius-md);
  background: var(--px-color-surface);
}

.px-step__intro-icon {
  inline-size: 1.5rem;
  block-size: 1.5rem;
  flex-shrink: 0;
  color: var(--px-color-accent);
}

.px-step__intro-text strong {
  display: block;
  font-size: var(--px-text-base);
}

.px-step__intro-text span {
  color: var(--px-color-text-muted);
  font-size: var(--px-text-sm);
}

.px-step__body {
  display: flex;
  flex-direction: column;
  gap: var(--px-space-5);
}

.px-fieldset {
  display: flex;
  flex-direction: column;
  gap: var(--px-space-5);
  margin: 0;
  padding: 0;
  border: 0;
}

.px-fieldset__legend {
  padding: 0;
  font-size: var(--px-text-lg);
  font-weight: 800;
}

.px-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--px-space-4);
}

.px-row--three {
  grid-template-columns: 1fr 1fr 1fr;
}

@container px-wizard (inline-size < 36rem) {
  .px-row,
  .px-row--three {
    grid-template-columns: 1fr;
  }
}

/* ===== Fields ===== */

.px-field {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--px-space-2);
}

.px-field__label {
  display: flex;
  align-items: center;
  gap: var(--px-space-2);
  font-size: var(--px-text-sm);
  font-weight: 700;
}

.px-field__optional {
  font-weight: 500;
  color: var(--px-color-text-muted);
}

.px-field__help {
  color: var(--px-color-text-muted);
  font-size: var(--px-text-sm);
}

.px-field__input,
.px-field__textarea {
  inline-size: 100%;
  min-block-size: 3rem;
  padding-inline: var(--px-space-4);
  border: 1px solid var(--px-color-border-strong);
  border-radius: var(--px-radius-md);
  background: color-mix(in oklch, var(--px-color-surface) 70%, transparent);
  color: var(--px-color-text);
  font: inherit;
  font-size: var(--px-text-base);
  outline: 0;
  transition: border-color var(--px-duration-fast) var(--px-ease-out),
              box-shadow var(--px-duration-fast) var(--px-ease-out);
}

.px-field__textarea {
  min-block-size: 6.5rem;
  padding-block: var(--px-space-3);
  resize: vertical;
}

.px-field__input::placeholder,
.px-field__textarea::placeholder {
  color: var(--px-color-text-muted);
}

.px-field__input:focus-visible,
.px-field__textarea:focus-visible {
  border-color: var(--px-color-accent);
  box-shadow: var(--px-focus-ring);
}

.px-field--error .px-field__input,
.px-field--error .px-field__textarea,
.px-field--error .px-select__trigger,
.px-field--error .iti input,
.px-content-row.px-field--error .px-field__input {
  border-color: var(--px-color-danger);
}

.px-field .iti {
  display: block;
  inline-size: 100%;
  --iti-border-color: var(--px-color-border);
  --iti-hover-color: var(--px-color-accent-soft);
  --iti-icon-color: var(--px-color-text-muted);
  --iti-country-selector-bg: var(--px-color-surface-raised);
}

.iti__country-selector,
.iti--detached-country-selector {
  --iti-country-selector-bg: var(--px-color-surface-raised);
  --iti-border-color: var(--px-color-border);
  --iti-hover-color: var(--px-color-accent-soft);
  --iti-icon-color: var(--px-color-text-muted);
}

.iti__country {
  margin: 0.5rem;
  border-radius: var(--px-radius-sm);
}

html .iti__country-selector {
  background-color: var(--px-color-surface-raised);
  color: var(--px-color-text);
  border: 1px solid var(--px-color-border);
  border-radius: var(--px-radius-md);
  overflow: hidden;
  box-shadow: var(--px-shadow-lg);
}

html .iti__selected-country {
  border-radius: var(--px-radius-md) !important;
  overflow: hidden;
}

.iti__search-input {
  background: var(--px-color-surface);
  color: var(--px-color-text);
}

html .iti__search-input:focus,
html .iti__search-input:focus-visible {
  outline: none;
}

.px-content-row__error {
  display: none;
  color: var(--px-color-danger);
  font-size: var(--px-text-sm);
}

.px-content-row.px-field--error .px-content-row__error {
  display: block;
}

/* ===== Custom select (dropdown) ===== */

.px-select {
  position: relative;
}

.px-select__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--px-space-3);
  inline-size: 100%;
  min-block-size: 3rem;
  padding-inline: var(--px-space-4);
  border: 1px solid var(--px-color-border-strong);
  border-radius: var(--px-radius-md);
  background: color-mix(in oklch, var(--px-color-surface) 70%, transparent);
  color: var(--px-color-text-muted);
  font: inherit;
  font-size: var(--px-text-base);
  text-align: start;
  cursor: pointer;
  transition: border-color var(--px-duration-fast) var(--px-ease-out),
              box-shadow var(--px-duration-fast) var(--px-ease-out);
}

.px-select__trigger[data-filled="true"] {
  color: var(--px-color-text);
}

.px-select__trigger:focus-visible,
.px-select__trigger[aria-expanded="true"] {
  border-color: var(--px-color-accent);
  box-shadow: var(--px-focus-ring);
}

.px-select__value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.px-select__caret {
  inline-size: 1.125rem;
  block-size: 1.125rem;
  flex-shrink: 0;
  color: var(--px-color-text-muted);
  transition: rotate var(--px-duration-fast) var(--px-ease-out);
}

.px-select__trigger[aria-expanded="true"] .px-select__caret {
  rotate: 180deg;
}

.px-select__list {
  position: absolute;
  inset-inline: 0;
  inset-block-start: calc(100% + var(--px-space-2));
  z-index: 10;
  display: flex;
  flex-direction: column;
  max-block-size: 15rem;
  overflow-y: auto;
  margin: 0;
  padding: var(--px-space-2);
  list-style: none;
  border: 1px solid var(--px-color-border);
  border-radius: var(--px-radius-md);
  background: var(--px-color-surface-raised);
  box-shadow: var(--px-shadow-lg);
  animation: px-select-in 0.16s ease both;
}

.px-select__list[data-placement="top"] {
  inset-block-start: auto;
  inset-block-end: calc(100% + var(--px-space-2));
  animation: px-select-in-top 0.16s ease both;
}

.px-select__list[hidden] {
  display: none;
}

@keyframes px-select-in {
  from {
    opacity: 0;
    translate: 0 -0.375rem;
  }
}

@keyframes px-select-in-top {
  from {
    opacity: 0;
    translate: 0 0.375rem;
  }
}

.px-select__option {
  display: flex;
  align-items: center;
  min-block-size: 2.75rem;
  padding-inline: var(--px-space-3);
  border-radius: var(--px-radius-sm);
  cursor: pointer;
  font-size: var(--px-text-base);
  color: var(--px-color-text);
}

.px-select__option:hover {
  background: var(--px-color-accent-soft);
}

.px-select__option[aria-selected="true"] {
  color: var(--px-color-accent);
  font-weight: 700;
  background: var(--px-color-accent-soft);
}

.px-field__error {
  display: none;
  color: var(--px-color-danger);
  font-size: var(--px-text-sm);
}

.px-field--error .px-field__error {
  display: block;
}

.px-field__required-mark {
  color: var(--px-color-danger);
}

/* ===== Choice cards (single/multi select) ===== */

.px-choices {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: var(--px-space-3);
}

.px-choices--list {
  grid-template-columns: 1fr;
}

.px-choice {
  display: flex;
  align-items: center;
  gap: var(--px-space-3);
  min-block-size: 3.25rem;
  padding-inline: var(--px-space-4);
  border: 1px solid var(--px-color-border);
  border-radius: var(--px-radius-md);
  background: var(--px-color-surface);
  cursor: pointer;
  font-size: var(--px-text-base);
  text-align: start;
  transition: border-color var(--px-duration-fast) var(--px-ease-out),
              box-shadow var(--px-duration-fast) var(--px-ease-out);
}

.px-choice:hover {
  border-color: var(--px-color-border-strong);
}

.px-choice input {
  inline-size: 1.125rem;
  block-size: 1.125rem;
  flex-shrink: 0;
  accent-color: var(--px-color-accent);
}

.px-choice__label {
  flex: 1;
}

.px-choice:has(input:checked) {
  border-color: var(--px-color-accent);
  box-shadow: 0 0 0 3px var(--px-color-accent-soft);
  background: var(--px-color-surface-raised);
}

/* ===== Not-sure / recommend-for-me toggle ===== */

.px-unsure {
  display: flex;
  align-items: center;
  gap: var(--px-space-3);
  padding: var(--px-space-4);
  border: 1px dashed var(--px-color-border-strong);
  border-radius: var(--px-radius-md);
  background: color-mix(in oklch, var(--px-color-accent-soft) 60%, transparent);
}

.px-unsure input {
  inline-size: 1.125rem;
  block-size: 1.125rem;
  flex-shrink: 0;
  accent-color: var(--px-color-accent);
}

.px-unsure__text {
  font-size: var(--px-text-sm);
  color: var(--px-color-text);
}

/* ===== Repeatable rows (phones, team members, software list) ===== */

.px-repeat {
  display: flex;
  flex-direction: column;
  gap: var(--px-space-3);
}

.px-repeat__row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--px-space-3);
  align-items: start;
  padding: var(--px-space-4);
  border: 1px solid var(--px-color-border);
  border-radius: var(--px-radius-md);
  background: var(--px-color-surface);
}

.px-repeat__row-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--px-space-3);
}

@container px-wizard (inline-size < 36rem) {
  .px-repeat__row-fields {
    grid-template-columns: 1fr;
  }
}

.px-repeat__remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 2.25rem;
  block-size: 2.25rem;
  border: 1px solid var(--px-color-border);
  border-radius: var(--px-radius-sm);
  background: transparent;
  color: var(--px-color-text-muted);
  cursor: pointer;
}

.px-repeat__remove:hover {
  border-color: var(--px-color-danger);
  color: var(--px-color-danger);
}

.px-repeat__add {
  display: inline-flex;
  align-items: center;
  gap: var(--px-space-2);
  inline-size: fit-content;
  padding-inline: var(--px-space-4);
  padding-block: var(--px-space-2);
  border: 1px dashed var(--px-color-border-strong);
  border-radius: var(--px-radius-md);
  background: transparent;
  color: var(--px-color-accent);
  font-weight: 700;
  font-size: var(--px-text-sm);
  cursor: pointer;
}

.px-repeat__add:hover {
  background: var(--px-color-accent-soft);
}

/* ===== Software/integration category card ===== */

.px-tool-card {
  display: flex;
  flex-direction: column;
  gap: var(--px-space-4);
  padding: var(--px-space-4);
  border: 1px solid var(--px-color-border);
  border-radius: var(--px-radius-md);
  background: var(--px-color-surface);
}

.px-tool-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--px-space-3);
}

.px-tool-card__name {
  font-weight: 700;
}

.px-tool-card__fields {
  display: flex;
  flex-direction: column;
  gap: var(--px-space-3);
}

.px-tool-card__flags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--px-space-4);
}

.px-check-inline {
  display: inline-flex;
  align-items: center;
  gap: var(--px-space-2);
  font-size: var(--px-text-sm);
}

.px-check-inline input {
  inline-size: 1.125rem;
  block-size: 1.125rem;
  accent-color: var(--px-color-accent);
}

/* ===== File upload / content-ready ===== */

.px-upload {
  display: flex;
  flex-direction: column;
  gap: var(--px-space-3);
  padding: var(--px-space-5);
  border: 1px dashed var(--px-color-border-strong);
  border-radius: var(--px-radius-md);
  background: color-mix(in oklch, var(--px-color-surface) 60%, transparent);
  text-align: center;
  align-items: center;
}

.px-upload__icon {
  inline-size: 2rem;
  block-size: 2rem;
  color: var(--px-color-accent);
}

.px-upload__input {
  inline-size: 0.1px;
  block-size: 0.1px;
  opacity: 0;
  position: absolute;
  overflow: hidden;
}

.px-upload__trigger {
  display: inline-flex;
  align-items: center;
  gap: var(--px-space-2);
  padding-inline: var(--px-space-5);
  padding-block: var(--px-space-2);
  border: 1px solid var(--px-color-accent);
  border-radius: var(--px-radius-pill);
  background: transparent;
  color: var(--px-color-accent);
  font-weight: 700;
  font-size: var(--px-text-sm);
  cursor: pointer;
}

.px-upload__trigger:hover {
  background: var(--px-color-accent-soft);
}

.px-upload__list {
  display: flex;
  flex-direction: column;
  gap: var(--px-space-2);
  inline-size: 100%;
  text-align: start;
}

.px-upload__file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--px-space-2);
  padding: var(--px-space-2) var(--px-space-3);
  border-radius: var(--px-radius-sm);
  background: var(--px-color-surface-raised);
  font-size: var(--px-text-sm);
}

.px-upload__file-remove {
  border: 0;
  background: transparent;
  color: var(--px-color-text-muted);
  cursor: pointer;
  font-size: var(--px-text-sm);
}

.px-upload__file-remove:hover {
  color: var(--px-color-danger);
}

.px-content-row {
  display: flex;
  flex-direction: column;
  gap: var(--px-space-3);
  padding: var(--px-space-4);
  border: 1px solid var(--px-color-border);
  border-radius: var(--px-radius-md);
  background: var(--px-color-surface);
}

.px-content-row__main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--px-space-4);
  flex-wrap: wrap;
}

.px-content-row__name {
  font-weight: 700;
}

.px-content-status {
  display: flex;
  flex-wrap: wrap;
  gap: var(--px-space-2);
}

.px-content-status__option {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-inline: var(--px-space-4);
  padding-block: var(--px-space-2);
  border: 1px solid var(--px-color-border);
  border-radius: var(--px-radius-pill);
  font-size: var(--px-text-sm);
  white-space: nowrap;
  cursor: pointer;
  text-align: center;
}

.px-content-status__option:has(input:checked) {
  border-color: var(--px-color-accent);
  background: var(--px-color-accent-soft);
  color: var(--px-color-accent);
  font-weight: 700;
}

.px-content-status__option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.px-content-status__url {
  display: flex;
  flex-direction: column;
  gap: var(--px-space-2);
}


/* ===== Drive folder callout ===== */

.px-drive-callout {
  display: flex;
  align-items: center;
  gap: var(--px-space-4);
  padding: var(--px-space-5);
  border-radius: var(--px-radius-md);
  background: var(--px-color-accent-soft);
  border: 1px solid color-mix(in oklch, var(--px-color-accent) 30%, transparent);
}

.px-drive-callout__icon {
  inline-size: 2.5rem;
  block-size: 2.5rem;
  flex-shrink: 0;
  color: var(--px-color-accent);
}

.px-drive-callout__body strong {
  display: block;
  margin-block-end: var(--px-space-1);
}

.px-drive-callout__body span {
  color: var(--px-color-text-muted);
  font-size: var(--px-text-sm);
}

.px-drive-callout__link {
  margin-inline-start: auto;
  flex-shrink: 0;
}

/* ===== Credential warning ===== */

.px-notice {
  display: flex;
  align-items: flex-start;
  gap: var(--px-space-3);
  padding: var(--px-space-4);
  border-radius: var(--px-radius-md);
  border: 1px solid color-mix(in oklch, var(--px-color-warning) 40%, transparent);
  background: color-mix(in oklch, var(--px-color-warning) 12%, transparent);
}

.px-notice--danger {
  border-color: color-mix(in oklch, var(--px-color-danger) 40%, transparent);
  background: color-mix(in oklch, var(--px-color-danger) 10%, transparent);
}

.px-notice__icon {
  inline-size: 1.25rem;
  block-size: 1.25rem;
  flex-shrink: 0;
  color: var(--px-color-warning);
  margin-block-start: 0.1em;
}

.px-notice--danger .px-notice__icon {
  color: var(--px-color-danger);
}

.px-notice__text {
  font-size: var(--px-text-sm);
  color: var(--px-color-text);
}

/* ===== Access checklist ===== */

.px-access-grid {
  display: flex;
  flex-direction: column;
  gap: var(--px-space-2);
}

.px-access-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--px-space-3);
  padding: var(--px-space-3) var(--px-space-4);
  border: 1px solid var(--px-color-border);
  border-radius: var(--px-radius-md);
  background: var(--px-color-surface);
}

@container px-wizard (inline-size < 40rem) {
  .px-access-row {
    grid-template-columns: 1fr;
  }
}

.px-access-row__name {
  font-weight: 700;
  font-size: var(--px-text-sm);
}

.px-access-row__status {
  display: flex;
  flex-wrap: wrap;
  gap: var(--px-space-2);
}

.px-access-row__status button {
  padding-inline: var(--px-space-3);
  padding-block: var(--px-space-2);
  border: 1px solid var(--px-color-border);
  border-radius: var(--px-radius-pill);
  background: transparent;
  font-size: var(--px-text-sm);
  white-space: nowrap;
  cursor: pointer;
  color: var(--px-color-text-muted);
}

.px-access-row__status button.is-active {
  border-color: var(--px-color-accent);
  background: var(--px-color-accent);
  color: var(--px-color-text-inverse);
}

/* ===== Buttons ===== */

.px-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--px-space-2);
  min-block-size: 2.75rem;
  padding-inline: var(--px-space-5);
  border-radius: var(--px-radius-pill);
  border: 1px solid transparent;
  font: inherit;
  font-size: var(--px-text-base);
  font-weight: 700;
  cursor: pointer;
  transition: background var(--px-duration-fast) var(--px-ease-out),
              transform var(--px-duration-fast) var(--px-ease-out),
              border-color var(--px-duration-fast) var(--px-ease-out);
}

.px-btn--primary {
  justify-content: space-between;
  padding: 0.25rem 0.35rem 0.25rem 1.35rem;
  background: var(--px-color-accent);
  color: var(--px-color-text-inverse);
  font-weight: 500;
  min-block-size: 3rem;
}

.px-btn--primary:hover {
  background: var(--px-color-accent-hover);
}

.px-btn--primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.px-btn--ghost {
  background: transparent;
  border-color: var(--px-color-border-strong);
  color: var(--px-color-text);
}

.px-btn--ghost:hover {
  border-color: var(--px-color-accent);
  color: var(--px-color-accent);
}

.px-btn--ghost[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}

.px-btn--text {
  background: transparent;
  color: var(--px-color-text-muted);
  font-weight: 500;
  padding-inline: var(--px-space-2);
}

.px-btn--text:hover {
  color: var(--px-color-accent);
}

.px-btn:focus-visible {
  box-shadow: var(--px-focus-ring);
}

.px-btn__icon {
  inline-size: 1.125rem;
  block-size: 1.125rem;
}

.px-btn__arrow {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  inline-size: 2.5rem;
  block-size: 2.5rem;
  border-radius: 50%;
  background: oklch(0.16 0 var(--px-hue));
  overflow: hidden;
}

.px-btn__arrow svg {
  inline-size: 0.9375rem;
  block-size: 0.9375rem;
  grid-area: 1 / 1;
  color: oklch(1 0 0);
  transform: rotate(-45deg);
  transition: translate 0.22s ease;
}

.px-btn__arrow svg:last-child {
  translate: -200% 200%;
}

.px-btn--primary:hover .px-btn__arrow svg:first-child {
  translate: 200% -200%;
}

.px-btn--primary:hover .px-btn__arrow svg:last-child {
  translate: 0 0;
}

/* ===== Review page ===== */

.px-review {
  display: flex;
  flex-direction: column;
  gap: var(--px-space-4);
}

.px-review__section {
  display: flex;
  flex-direction: column;
  gap: var(--px-space-3);
  padding: var(--px-space-5);
  border: 1px solid var(--px-color-border);
  border-radius: var(--px-radius-md);
  background: var(--px-color-surface);
}

.px-review__section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--px-space-3);
}

.px-review__section-title {
  font-weight: 800;
}

.px-review__edit {
  border: 0;
  background: transparent;
  color: var(--px-color-accent);
  font-weight: 700;
  font-size: var(--px-text-sm);
  cursor: pointer;
}

.px-review__edit:hover {
  text-decoration: underline;
}

.px-review__list {
  display: flex;
  flex-direction: column;
  gap: var(--px-space-2);
  margin: 0;
  padding: 0;
}

.px-review__row {
  display: grid;
  grid-template-columns: 12rem minmax(0, 1fr);
  gap: var(--px-space-3);
  font-size: var(--px-text-sm);
  padding-block: var(--px-space-1);
  border-block-end: 1px solid var(--px-color-border);
}

.px-review__row dd {
  overflow-wrap: anywhere;
}

.px-review__kv-list {
  display: flex;
  flex-flow: row wrap;
  gap: var(--px-space-1) var(--px-space-4);
  margin: 0;
  padding: 0;
  list-style: none;
  min-inline-size: 0;
}

.px-review__kv-list li {
  min-inline-size: 0;
  max-inline-size: 24rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.px-review__kv-list strong {
  font-weight: 700;
}

.px-review__other {
  display: block;
  color: var(--px-color-text-muted);
}

.px-review__row:last-child {
  border-block-end: 0;
}

.px-review__row dt {
  color: var(--px-color-text-muted);
}

.px-review__row dd {
  margin: 0;
  font-weight: 600;
}

.px-review__row dd:empty::after {
  content: "Not provided";
  color: var(--px-color-text-muted);
  font-weight: 400;
  font-style: italic;
}

@container px-wizard (inline-size < 36rem) {
  .px-review__row {
    grid-template-columns: 1fr;
    gap: var(--px-space-1);
  }
}

.px-review__flags {
  display: flex;
  flex-direction: column;
  gap: var(--px-space-2);
}

.px-review__flag {
  display: flex;
  align-items: center;
  gap: var(--px-space-2);
  font-size: var(--px-text-sm);
  color: var(--px-color-danger);
}

.px-review__flag-icon {
  inline-size: 1rem;
  block-size: 1rem;
  flex-shrink: 0;
}

/* ===== Final / confirmation ===== */

.px-confirmation {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--px-space-5);
  text-align: center;
  padding-block: var(--px-space-6);
}

.px-confirmation__icon {
  inline-size: 3.5rem;
  block-size: 3.5rem;
  color: oklch(1 0 0);
}

.px-confirmation__title {
  margin: 0;
  font-size: var(--px-heading-md);
  font-weight: 800;
}

.px-confirmation__lead {
  margin: 0;
  max-inline-size: 32rem;
  color: var(--px-color-text-muted);
}

.px-confirmation__next {
  inline-size: 100%;
  max-inline-size: 34rem;
  padding: var(--px-space-5);
  border: 1px solid var(--px-color-border);
  border-radius: var(--px-radius-md);
  background: var(--px-color-surface-raised);
  text-align: start;
}

.px-confirmation__next-title {
  margin: 0 0 var(--px-space-3);
  font-size: var(--px-text-base);
  font-weight: 800;
}

.px-confirmation__next-list {
  display: flex;
  flex-direction: column;
  gap: var(--px-space-3);
  margin: 0;
  padding-inline-start: 1.25rem;
  font-size: var(--px-text-sm);
  color: var(--px-color-text-muted);
}

.px-confirmation__next-list li::marker {
  font-weight: 700;
  color: var(--px-color-accent);
}

.px-confirmation__note {
  max-inline-size: 34rem;
  margin: 0;
  color: var(--px-color-text-muted);
  font-size: var(--px-text-sm);
}

.px-confirmation__fb {
  display: flex;
  align-items: center;
  gap: var(--px-space-4);
  inline-size: 100%;
  max-inline-size: 34rem;
  padding: var(--px-space-4) var(--px-space-5);
  border: 1px solid var(--px-color-border);
  border-radius: var(--px-radius-md);
  background: var(--px-color-surface-raised);
  text-align: start;
  text-decoration: none;
  transition: border-color var(--px-duration-fast) var(--px-ease-out);
}

.px-confirmation__fb:hover {
  border-color: var(--px-color-accent);
}

.px-confirmation__fb-badge {
  display: grid;
  place-items: center;
  inline-size: 2.5rem;
  block-size: 2.5rem;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--px-color-facebook);
}

.px-confirmation__fb-icon {
  inline-size: 1.375rem;
  block-size: 1.375rem;
  color: oklch(1 0 0);
}

.px-confirmation__fb-text {
  display: flex;
  flex-direction: column;
  gap: var(--px-space-1);
}

.px-confirmation__fb-text strong {
  font-size: var(--px-text-base);
  color: var(--px-color-text);
  text-decoration: none;
}

.px-confirmation__fb-text span {
  font-size: var(--px-text-sm);
  color: var(--px-color-text-muted);
  text-decoration: none;
}

/* TEMPORARY — QA-only reset button on the confirmation step. Remove alongside the
   #px-btn-reset-form markup in script.js's renderConfirmation() once QA is signed off. */
.px-confirmation__reset {
  border-style: dashed;
  color: var(--px-color-text-muted);
}

/* ===== Toast ===== */

.px-toast {
  position: fixed;
  inset-block-end: var(--px-space-6);
  inset-inline-start: 50%;
  translate: -50% 0;
  padding-inline: var(--px-space-5);
  padding-block: var(--px-space-3);
  border-radius: var(--px-radius-pill);
  background: var(--px-color-text);
  color: var(--px-color-bg-page);
  font-size: var(--px-text-sm);
  font-weight: 700;
  box-shadow: var(--px-shadow-lg);
  z-index: 100;
  animation: px-toast-in var(--px-duration-normal) var(--px-ease-out);
}

@keyframes px-toast-in {
  from {
    opacity: 0;
    translate: -50% 0.5rem;
  }
}

.px-toast[hidden] {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
