/**
 * wizard-step.css — just the component, rebuilt from Figma node 84:16709.
 * No page chrome, so it can be dropped into a specimen page or a case study
 * figure without dragging a page along with it. Token names in comments are
 * the ones the design file uses.
 */

:root {
  /* Straight from the design's published styles. */
  --grey-900: #191918;
  --grey-500: #8e8d8c;
  --grey-100: #f0f0f0;
  --grey-050: #fafafa;
  --white: #ffffff;
  --purple-600: #6b41e3;
  --purple-100: #f0ecfc;
  --wizard-sans: "Codec Warm", Figtree, system-ui, sans-serif;
}

/* The component sets its own type and box model rather than inheriting a
   host page's, so it looks the same wherever it is embedded. */
.modal,
.modal *::before,
.modal *::after,
.modal * {
  box-sizing: border-box;
}

/* ----------------------------------------------------------------- modal */

.modal {
  display: flex;
  color: var(--grey-900);
  font: 500 16px/1.5 var(--wizard-sans);
  -webkit-font-smoothing: antialiased;
  width: 440px;
  height: 700px;
  flex-direction: column;
  overflow: hidden;
  /* border-box keeps the frame at 440x700 while the stroke sits inside it,
     leaving a 438px inner box — which is what makes the content 390 wide and
     the progress track 302. The radio cards use an inset shadow instead,
     because there a real border would make them 70 tall rather than 68. */
  border: 1px solid var(--grey-100);
  border-radius: 30px;
  background: var(--white);
}

.modal__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 24px;
}

/* ---------------------------------------------------------------- header */

.wizard-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-button {
  display: grid;
  width: 32px;
  height: 32px;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 100px;
  place-items: center;
  /* Solid Gradients/White + White Button/Default */
  background: linear-gradient(180deg, var(--grey-050), var(--grey-100));
  box-shadow:
    inset 0 0 0 1px rgb(0 0 0 / 2%),
    inset 0 -1px 0 0 rgb(0 0 0 / 5%);
  color: var(--grey-900);
  cursor: pointer;
}

.icon-button .icon {
  width: 12px;
  height: 12px;
}

.icon {
  display: block;
  fill: currentColor;
}

/* Five segments; the completed one takes the remaining width, as in the
   design, so step 1 of 5 reads slightly wider than a fifth. */
.progress {
  display: flex;
  overflow: hidden;
  flex: 1;
  min-width: 1px;
  align-items: flex-start;
  border-radius: 100px;
  background: var(--purple-100);
}

/* The design fixes four segments at 57.2px and lets the completed one take
   the remainder, which lands at 73.2 in a 302px track. Expressed as flex
   ratios instead, that same split holds at any width — the fixed widths
   overflowed the track below about 400px and swallowed the fill entirely. */
.progress__step {
  height: 4px;
  flex: 57.2;
  background: var(--purple-100);
}

.progress__step--done {
  flex: 73.2;
  border-radius: 100px;
  background: linear-gradient(11.44deg, #6d43e4 11.96%, #5179f4 110.3%);
}

/* ----------------------------------------------------------------- badge */

.badge {
  display: grid;
  width: 44px;
  height: 44px;
  margin-top: 16px;
  margin-inline: auto;
  border-radius: 12px;
  place-items: center;
  color: var(--purple-600);
  /* Purple/600 read back through a near-white luminosity pass. */
  background-image:
    linear-gradient(180deg, rgb(255 255 255 / 90%), rgb(255 255 255 / 70%)),
    linear-gradient(var(--purple-600), var(--purple-600));
  background-blend-mode: luminosity;
  box-shadow:
    inset 0 0 0 1px rgb(0 0 0 / 10%),
    inset 0 2px 0 0 rgb(255 255 255 / 50%);
}

.badge .icon {
  width: 20px;
  height: 20px;
}

/* ----------------------------------------------------------------- title */

.modal__title {
  margin-top: 12px;
  font-size: 20px;
  font-weight: 800;
  line-height: 28px;
  text-align: center;
  text-wrap: balance;
}

/* --------------------------------------------------------------- options */

.options {
  display: flex;
  margin-top: 20px;
  flex-direction: column;
  gap: 12px;
}

.option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-radius: 12px;
  background: var(--grey-050);
  box-shadow: inset 0 0 0 1px var(--grey-100);
  cursor: pointer;
  transition: box-shadow 140ms;
}

.option:has(input:checked) {
  box-shadow: inset 0 0 0 1px var(--purple-600);
}

.option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.option__logo {
  display: grid;
  width: 44px;
  height: 44px;
  flex: none;
  overflow: hidden;
  border-radius: 8px;
  place-items: center;
  background: var(--grey-100);
}

.option__logo img {
  width: auto;
  height: 18.334px;
}

.option__name {
  flex: 1;
  min-width: 1px;
  font-size: 16px;
  font-weight: 700;
  line-height: 24px;
}

.option__mark {
  display: grid;
  width: 20px;
  height: 16px;
  flex: none;
  place-items: center;
  color: var(--grey-500);
}

.option__mark .icon {
  width: 16px;
  height: 16px;
}

.option__mark .icon--on,
.option:has(input:checked) .option__mark .icon--off {
  display: none;
}

.option:has(input:checked) .option__mark {
  color: var(--purple-600);
}

.option:has(input:checked) .option__mark .icon--on {
  display: block;
}

.option:has(input:focus-visible) {
  outline: 2px solid var(--purple-600);
  outline-offset: 2px;
}

/* ---------------------------------------------------------------- footer */

.wizard-footer {
  display: flex;
  /* The footer runs over the frame's stroke rather than sitting inside it,
     which is what keeps it a full 440 wide and its top edge at y=615. */
  margin-inline: -1px;
  margin-bottom: -1px;
  gap: 12px;
  padding: 20px 25px;
  border-top: 1px solid var(--grey-100);
  background: var(--white);
}

.button-primary {
  display: flex;
  height: 44px;
  flex: 1;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border: 0;
  border-radius: 12px;
  /* Solid Gradients/Purple + Color Button/Default */
  background: linear-gradient(180deg, #5179f4, #7424ff);
  box-shadow:
    inset 0 1px 0 0 rgb(255 255 255 / 10%),
    inset 0 -1px 0 0 rgb(0 0 0 / 30%);
  color: var(--white);
  font-size: 16px;
  font-weight: 700;
  line-height: 24px;
  cursor: pointer;
  transition: transform 140ms;
}

.button-primary:active {
  transform: scale(0.99);
}

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