/* LWN Pro — branding and language, on the product page.

   Three screenshots showed one colour, two styles and one language. A reader
   deciding whether the plugin will suit their store wants their colour, and
   there is no screenshot of that. So both sections are pickers. */

/* --- Branding ------------------------------------------------------------ */

.br {
  margin-top: 32px;
  --br-accent: #1E5EB8;
  --br-on: #FFFFFF;
  --br-line: #1E5EB8;
  --br-tint: #E8EFF8;
  --br-tint-strong: #C9DAF0;
}
.br__controls { display: flex; flex-direction: column; gap: 14px; margin-bottom: 22px; }
.br__row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.br__rl {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-ink-400);
  min-width: 52px;
}
.br__any { font-size: var(--text-xs); color: var(--color-ink-400); white-space: nowrap; }

.br__sw { display: flex; gap: 8px; }
.br__c {
  width: 30px; height: 30px;
  padding: 0;
  border-radius: 50%;
  border: 2px solid transparent;
  background: var(--c);
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(23, 24, 26, 0.12);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}
.br__c:hover { transform: scale(1.08); }
/* Ring outside the swatch, so it reads on the near-black one as well as the
   pale one; a border would vanish into the dark. */
.br__c.is-on {
  box-shadow: inset 0 0 0 1px rgba(23, 24, 26, 0.12),
              0 0 0 2px #FFFFFF, 0 0 0 4px var(--color-contrast);
}
.br__c:focus-visible { outline: 2px solid var(--color-blue-700); outline-offset: 4px; }

.br__styles { display: flex; gap: 6px; flex-wrap: wrap; }
.br__st {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--color-line-200);
  background: #FFFFFF;
  font-family: inherit;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--color-ink-500);
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}
.br__st:hover { color: var(--color-contrast); }
.br__st.is-on { background: var(--color-contrast); border-color: var(--color-contrast); color: #FFFFFF; }
.br__st:focus-visible { outline: 2px solid var(--color-blue-700); outline-offset: 2px; }

.br__stage {
  background: #FFFFFF;
  border: 1px solid var(--color-line-200);
  border-radius: 12px;
  padding: 26px 22px;
}
.br__flow { display: flex; margin: 0; padding: 0; list-style: none; }
.br__s {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.br__m {
  display: flex; align-items: center; justify-content: center;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.br__m svg { width: 18px; height: 18px; }
.br__lb { font-size: var(--text-2xs); line-height: 1.3; text-align: center; color: var(--color-ink-400); }
.br__s.is-done .br__lb,
.br__s.is-current .br__lb { font-weight: var(--weight-semibold); color: var(--color-contrast); }

/* Numbered and icon share a shape: a circle on a connector. */
.br__flow.is-default .br__m,
.br__flow.is-icon .br__m {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #F1F4F7;
  border: 2px solid transparent;
  color: var(--color-ink-400);
}
.br__flow.is-default .br__s.is-done .br__m,
.br__flow.is-icon .br__s.is-done .br__m,
.br__flow.is-default .br__s.is-current .br__m,
.br__flow.is-icon .br__s.is-current .br__m {
  background: var(--br-accent);
  border-color: var(--br-accent);
  color: var(--br-on);
}
.br__flow.is-default .br__s::after,
.br__flow.is-icon .br__s::after {
  content: "";
  position: absolute;
  top: 17px;
  left: calc(50% + 22px);
  right: calc(-50% + 22px);
  height: 2px;
  border-radius: 2px;
  background: #E1E6EC;
}
.br__flow.is-default .br__s:last-child::after,
.br__flow.is-icon .br__s:last-child::after { display: none; }
.br__flow.is-default .br__s.is-done::after,
.br__flow.is-icon .br__s.is-done::after { background: var(--br-line); }

/* Breadcrumb is the block header's own: chevrons in a bordered strip, the
   current one filled, a finished one tinted, numbers kept. */
.br__flow.is-breadcrumb {
  gap: 0;
  border: 1px solid var(--color-line-200);
  border-radius: 10px;
  overflow: hidden;
}
.br__flow.is-breadcrumb .br__s {
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  padding: 14px 14px 14px 20px;
  background: #FFFFFF;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%);
}
.br__flow.is-breadcrumb .br__s:first-child { padding-inline-start: 14px; }
.br__flow.is-breadcrumb .br__s:last-child { clip-path: none; }
.br__flow.is-breadcrumb .br__s::after { display: none; }
.br__flow.is-breadcrumb .br__s.is-done { background: var(--br-tint); }
.br__flow.is-breadcrumb .br__s.is-current { background: var(--br-accent); }
.br__flow.is-breadcrumb .br__m {
  width: 22px; height: 22px;
  flex: none;
  border-radius: 50%;
  background: var(--color-line-200);
  color: var(--color-ink-500);
  font-size: 12px;
  font-weight: var(--weight-bold);
}
.br__flow.is-breadcrumb .br__s.is-done .br__m { background: var(--br-tint-strong); color: var(--br-line); }
.br__flow.is-breadcrumb .br__s.is-current .br__m { background: rgba(255,255,255,0.25); color: var(--br-on); }
.br__flow.is-breadcrumb .br__lb {
  font-size: 14px;
  text-align: start;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--color-contrast);
  font-weight: var(--weight-semibold);
}
.br__flow.is-breadcrumb .br__s.is-done .br__lb { color: var(--br-line); }
.br__flow.is-breadcrumb .br__s.is-current .br__lb { color: var(--br-on); }

.br__note {
  margin: 14px 0 0;
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  line-height: 1.5;
  color: var(--color-ink-400);
}
.br__note b { font-weight: var(--weight-semibold); color: var(--color-ink-600); }

/* --- Language ------------------------------------------------------------ */

.lg { margin-top: 32px; }
.lg__tabs { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.lg__tab {
  min-height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--color-line-200);
  background: #FFFFFF;
  font-family: inherit;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--color-ink-500);
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}
.lg__tab.is-on { background: var(--color-primary); border-color: var(--color-primary); color: #FFFFFF; }
.lg__tab:focus-visible { outline: 2px solid var(--color-blue-700); outline-offset: 2px; }

/* dir on the stage rather than the page: the mirroring is the thing being
   demonstrated, and it should not drag the rest of the page around with it. */
.lg__stage {
  background: #FFFFFF;
  border: 1px solid var(--color-line-200);
  border-radius: 12px;
  padding: 24px 22px 20px;
}
.lg__flow { display: flex; margin: 0 0 20px; padding: 0; list-style: none; }
.lg__s {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
}
.lg__s::after {
  content: "";
  position: absolute;
  top: 15px;
  inset-inline-start: calc(50% + 20px);
  inset-inline-end: calc(-50% + 20px);
  height: 2px;
  border-radius: 2px;
  background: #E1E6EC;
}
.lg__s:last-child::after { display: none; }
.lg__s.is-done::after { background: var(--color-primary); }
.lg__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);
}
.lg__s.is-done .lg__d { background: var(--color-primary); border-color: var(--color-primary); color: #FFFFFF; }
.lg__s.is-current .lg__d {
  background: #FFFFFF;
  border-color: var(--color-primary);
  color: var(--color-primary);
  box-shadow: 0 0 0 4px var(--color-accent-tint);
}
.lg__l { font-size: var(--text-2xs); line-height: 1.3; text-align: center; color: var(--color-ink-400); }
.lg__s.is-done .lg__l,
.lg__s.is-current .lg__l { font-weight: var(--weight-semibold); color: var(--color-contrast); }

.lg__nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lg__b {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 18px;
  border-radius: 7px;
  border: 1px solid var(--color-line-300);
  background: #FFFFFF;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--color-ink-600);
}
.lg__b.is-accent { background: var(--color-primary); border-color: var(--color-primary); color: #FFFFFF; }

.lg__note {
  margin: 14px 0 0;
  font-size: var(--text-xs);
  line-height: 1.5;
  color: var(--color-ink-500);
}

@media (prefers-reduced-motion: reduce) {
  .br__c, .br__st, .br__m, .lg__tab { transition: none; }
  .br__c:hover { transform: none; }
}

@media (max-width: 620px) {
  .br__stage, .lg__stage { padding: 20px 14px; }
  .br__rl { min-width: 0; }
  .br__flow.is-default .br__m,
  .br__flow.is-icon .br__m { width: 30px; height: 30px; }
  .br__flow.is-default .br__s::after,
  .br__flow.is-icon .br__s::after { top: 14px; left: calc(50% + 19px); right: calc(-50% + 19px); }
  .br__lb, .lg__l { font-size: 10px; }
  .lg__d { width: 28px; height: 28px; box-shadow: none !important; }
  .lg__s::after { top: 13px; inset-inline-start: calc(50% + 18px); inset-inline-end: calc(-50% + 18px); }
}
