/* Shared extras selector: transparent swatches, a centered plus and one caption.
   Keep legacy classes/data attributes so stock and purchase controllers agree. */
.atomic-site .kit-picker.kit-picker {
  --kit-tile: 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0 4px;
  height: auto;
  min-height: 0;
  margin: 0 0 20px;
  max-width: 100%;
}
.atomic-site .model-copy .kit-picker {
  --kit-tile: 22px;
  margin: -4px 0 0;
}
.atomic-site .kit-picker.kit-picker button[type="button"] {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--a-ink);
  cursor: pointer;
  --stock-strike: var(--a-ink);
}
.kit-swatch {
  display: grid;
  place-items: center;
  width: var(--kit-tile);
  height: var(--kit-tile);
  border: 1px solid var(--a-border-strong);
  background: transparent;
}
.kit-swatch--extras::before {
  content: '';
  width: 10px;
  height: 10px;
  background: linear-gradient(currentColor,currentColor) center/10px 1px no-repeat,
              linear-gradient(currentColor,currentColor) center/1px 10px no-repeat;
}
.kit-picker button[aria-pressed="true"] .kit-swatch {
  outline: 1px solid var(--a-ink);
  outline-offset: 2px;
}
@media (hover: hover) {
  .kit-picker button:hover .kit-swatch { border-color: var(--a-ink); }
}
.atomic-site .kit-picker button:focus-visible { outline: 2px solid var(--a-ink); outline-offset: -1px; }
.atomic-site .kit-picker .stock-option-missing::after { inset: calc((44px - var(--kit-tile)) / 2); }
.kit-option-name {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.atomic-site .kit-picker .kit-caption {
  flex: 0 0 100%;
  min-width: 0;
  color: var(--a-muted);
  font: 400 11px/16px var(--a-sans);
  letter-spacing: 0;
  text-transform: none;
  overflow-wrap: anywhere;
}
.atomic-site .atc-bar .kit-picker { justify-content: center; margin: 0; }
.atomic-site .atc-bar .kit-caption { text-align: center; }

/* Card rhythm matches colour swatches: 22px tiles, 8px between them,
   10px from the photograph and 10px to the title. */
.atomic-site .model-card.has-kit-picker .model-media { margin-bottom: 0; }
.atomic-site .model-card.has-kit-picker .model-copy { padding-top: 0; }
.atomic-site .model-copy .kit-picker.kit-picker {
  height: 22px;
  gap: 0;
  margin: 10px 0 0;
  overflow: visible;
}
.atomic-site .model-copy .kit-picker button[type="button"] {
  flex-basis: 30px;
  width: 30px;
  min-width: 30px;
  height: 22px;
  min-height: 22px;
  justify-items: start;
}
/* Extend the clickable height without adding space to the card layout. */
.atomic-site .model-copy .kit-picker button::before {
  content: '';
  position: absolute;
  inset: -11px 0;
}
.atomic-site .model-copy .kit-picker .stock-option-missing::after {
  inset: 0 auto 0 0;
  width: 22px;
}

/* PDP uses the same compact variant row immediately above the title. */
.atomic-site .pdp-copy > .pdp-variant-picker.pdp-variant-picker {
  --kit-tile: 22px;
  order: 0;
  gap: 0;
  height: 22px;
  min-height: 22px;
  margin: 0 0 10px;
  overflow: visible;
}
.atomic-site .pdp-copy > .pdp-variant-picker::before { content: none; }
.atomic-site .pdp-copy .pdp-variant-picker button[type="button"] {
  position: relative;
  display: grid;
  place-items: center start;
  flex: 0 0 30px;
  width: 30px;
  min-width: 30px;
  height: 22px;
  min-height: 22px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--a-ink);
}
.atomic-site .pdp-copy .pdp-variant-picker.color-picker button::before {
  box-sizing: border-box;
  width: 22px;
  height: 22px;
  outline-offset: 2px;
}
.atomic-site .pdp-copy .pdp-variant-picker.color-picker button:not(.stock-option-missing)::after,
.atomic-site .pdp-copy .pdp-variant-picker.kit-picker button::before {
  content: '';
  position: absolute;
  inset: -11px 0;
}
.atomic-site .pdp-copy .pdp-variant-picker .stock-option-missing::after {
  inset: 0 auto 0 0;
  width: 22px;
}
.atomic-site .pdp-copy:has(> [data-kit-picker]) > .atomic-option-heading { display: none; }
