/* LWN Pro — the flow settings, operable.

   Four paragraphs described three checkboxes and four screenshots showed the
   results. This is the checkboxes. What a merchant wants to know is what
   happens when they combine — sequential on with validation off, shipping
   folded away — and that is a combination prose has to enumerate and a demo
   just answers. */

.fl {
  display: grid;
  grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  gap: 28px;
  margin-top: 36px;
  align-items: start;
}

/* --- The settings panel -------------------------------------------------- */

.fl__panel {
  background: #FFFFFF;
  border: 1px solid var(--color-line-200);
  border-radius: 12px;
  padding: 20px 20px 8px;
}
.fl__panelh {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-ink-400);
}

.fl__opt {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--color-line-200);
  cursor: pointer;
}
.fl__opt:first-of-type { border-top: 0; padding-top: 0; }
.fl__opt input {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}
.fl__box {
  flex: none;
  width: 20px; height: 20px;
  margin-top: 2px;
  border-radius: 5px;
  border: 2px solid var(--color-line-300);
  background: #FFFFFF;
  position: relative;
  transition: background 0.16s ease, border-color 0.16s ease;
}
.fl__box::after {
  content: "";
  position: absolute;
  left: 5px; top: 1px;
  width: 5px; height: 9px;
  border-right: 2px solid #FFFFFF;
  border-bottom: 2px solid #FFFFFF;
  transform: rotate(45deg) scale(0);
  transition: transform 0.16s ease;
}
.fl__opt input:checked ~ .fl__box {
  background: var(--color-primary);
  border-color: var(--color-primary);
}
.fl__opt input:checked ~ .fl__box::after { transform: rotate(45deg) scale(1); }
.fl__opt input:focus-visible ~ .fl__box { outline: 2px solid var(--color-blue-700); outline-offset: 2px; }

.fl__t { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.fl__t b {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-contrast);
}
.fl__t i {
  font-style: normal;
  font-size: var(--text-xs);
  line-height: 1.5;
  color: var(--color-ink-500);
}

/* --- The checkout it produces -------------------------------------------- */

.fl__stage {
  background: #FFFFFF;
  border: 1px solid var(--color-line-200);
  border-radius: 12px;
  padding: 20px 22px 22px;
}
.fl__stageh {
  margin: 0 0 20px;
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-ink-400);
}
/* Instruction text, not a rule: line-300 is a border grey and unreadable
   as words. */
.fl__stageh span { color: var(--color-ink-400); }

.fl__flow { display: flex; margin: 0 0 20px; padding: 0; list-style: none; }
.fl__s { flex: 1; min-width: 0; position: relative; }

/* Each step is a button, because in the real checkout each step is clickable
   and the whole point of the demo is what happens when you click one. */
.fl__s button {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  font-family: inherit;
}
.fl__s button:focus-visible { outline: 2px solid var(--color-blue-700); outline-offset: 4px; border-radius: 8px; }

.fl__s::after {
  content: "";
  position: absolute;
  top: 15px;
  left: calc(50% + 20px);
  right: calc(-50% + 20px);
  height: 2px;
  border-radius: 2px;
  background: #E1E6EC;
}
.fl__s:last-child::after { display: none; }
.fl__s.is-done::after { background: var(--color-primary); }

.fl__d {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  background: #F1F4F7;
  border: 2px solid transparent;
  color: var(--color-ink-400);
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.fl__d svg { width: 14px; height: 14px; }
.fl__s.is-done .fl__d {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #FFFFFF;
}
.fl__s.is-current .fl__d {
  background: #FFFFFF;
  border-color: var(--color-primary);
  color: var(--color-primary);
  box-shadow: 0 0 0 4px var(--color-accent-tint);
}
.fl__l {
  font-size: var(--text-2xs);
  line-height: 1.3;
  text-align: center;
  color: var(--color-ink-400);
}
.fl__s.is-done .fl__l,
.fl__s.is-current .fl__l { font-weight: var(--weight-semibold); color: var(--color-contrast); }

/* The line that answers what just happened. It holds its height so the panel
   does not jump every time the message changes. */
.fl__say {
  min-height: 40px;
  margin: 0;
  padding: 11px 13px;
  border-radius: 8px;
  border: 1px solid var(--color-line-200);
  background: var(--color-gray-50);
  font-size: var(--text-xs);
  line-height: 1.5;
  color: var(--color-ink-500);
}
.fl__say.is-ok {
  background: var(--color-accent-tint);
  border-color: var(--color-accent-tint-border);
  color: var(--color-primary);
}
.fl__say.is-stop {
  background: #FBF3E4;
  border-color: #EBDCC0;
  color: var(--color-warning);
}
.fl__say.is-warn {
  background: #FBF3E4;
  border-color: #EBDCC0;
  color: var(--color-warning);
}

@media (prefers-reduced-motion: reduce) {
  .fl__box, .fl__box::after, .fl__d { transition: none; }
}

@media (max-width: 860px) {
  .fl { grid-template-columns: 1fr; gap: 18px; }
}
@media (max-width: 480px) {
  .fl__stage { padding: 18px 14px 18px; }
  .fl__d { width: 28px; height: 28px; box-shadow: none !important; }
  .fl__s::after { top: 13px; left: calc(50% + 17px); right: calc(-50% + 17px); }
  .fl__l { font-size: 10px; }
}
