/* References are to konfetki/prototip (demo index.html or the exported ds/Components.bundle.js).
   Native control resets preserve those layouts. Focus rings come from base.css. */

/* Button kit :119–156; demo :606, :794, :1641 and ProductTile.dc.html:49–52. */
.k-btn {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: var(--k-btn-height);
  padding: 0 var(--k-btn-padding);
  border: 0;
  border-radius: calc(var(--rounded-full) * 1px);
  background: var(--k-btn-bg, transparent);
  color: var(--k-btn-ink, var(--typo-primary));
  font-size: var(--k-btn-font, 14px);
  line-height: 1.25;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

/* Demo :794, :606, :1118, :1589 and :1641; Button kit :119–146. */
.k-btn--56 { --k-btn-height: 56px; --k-btn-padding: 28px; --k-btn-font: 16px; }
.k-btn--48 { --k-btn-height: 48px; --k-btn-padding: 24px; --k-btn-font: 16px; }
.k-btn--40 { --k-btn-height: 40px; --k-btn-padding: 18px; }
.k-btn--36 { --k-btn-height: 36px; --k-btn-padding: 14px; }

/* Demo :794 (primary and dark CTA), :1127 and :1641 (outline), :203 (white), :657 (ghost), :21 and :45 (link).
   Brand uses the Button kit variant; the demo uses this pair for its brand links. */
.k-btn--primary, .k-btn--cta-dark, .k-tile-add {
  --k-btn-bg: var(--control-primary-bg);
  --k-btn-hover: var(--control-primary-bg-hover);
  --k-btn-ink: var(--control-primary-typo);
}
.k-btn--secondary {
  --k-btn-bg: var(--bg-default);
  --k-btn-hover: var(--bg-surface);
  box-shadow: inset 0 0 0 1.5px var(--control-outline-border);
}
.k-btn--white, .k-btn--cta {
  --k-btn-bg: var(--control-white-bg);
  --k-btn-hover: var(--control-white-bg-hover);
}
.k-btn--brand {
  --k-btn-bg: var(--control-brand-bg);
  --k-btn-hover: var(--control-brand-bg-hover);
  --k-btn-ink: var(--typo-inverted);
}
.k-btn--ghost {
  --k-btn-bg: var(--control-ghost-bg);
  --k-btn-hover: #EDE4D8;
}
.k-btn--link {
  --k-btn-ink: var(--typo-brand);
  --k-btn-hover-ink: var(--control-brand-bg-hover);
  --k-btn-padding: 6px;
}
.k-btn:hover {
  background: var(--k-btn-hover, var(--k-btn-bg, transparent));
  color: var(--k-btn-hover-ink, var(--k-btn-ink, var(--typo-primary)));
}

/* Demo :203 (hero CTA), :327 and :2371 (gradient CTA). */
.k-btn--cta, .k-btn--gradient {
  justify-content: space-between;
  padding: 0 6px 0 28px;
  text-align: start;
}
.k-btn__arrow {
  display: grid;
  flex: none;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: calc(var(--rounded-full) * 1px);
  background: var(--k-gradient-accent);
  color: var(--typo-inverted);
}

/* Demo :327 (gradient CTA), Button kit :3052–3058 and :8217 (hover). */
.k-btn--gradient {
  --k-btn-bg: var(--k-gradient-accent);
  --k-btn-hover: var(--control-brand-bg-hover);
  --k-btn-ink: var(--typo-inverted);
}
.k-btn--gradient .k-btn__arrow {
  background: var(--bg-default);
  color: var(--typo-primary);
}
/* Demo :327, :2083 and :2371 (tablet gradient CTA). */
@media (768px <= width < 1200px) {
  .k-btn--gradient {
    --k-btn-height: 48px;
    padding-left: 22px;
  }
  .k-btn--gradient .k-btn__arrow { width: 36px; height: 36px; }
}

/* Demo :698 and :794 (dark CTA with a centered label and overlaid arrow). */
.k-btn--cta-dark {
  position: relative;
  padding: 0 64px;
}
.k-btn--cta-dark .k-btn__arrow {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 48px;
  height: 48px;
}

/* Demo :698 and :2542 (disabled checkout keeps the dark CTA arrow gradient). */
.k-btn:is(:disabled, [aria-disabled="true"]),
.k-btn:not(.k-btn--cta-dark):is(:disabled, [aria-disabled="true"]) .k-btn__arrow {
  background: var(--control-disabled-bg);
  color: var(--control-disabled-typo);
  box-shadow: none;
  cursor: default;
}

/* Demo :122, :361–363, :2433; Chip kit :16186–16233.
   Demo hover #EDE4D8 ≠ the exported --bg-tertiary-hover (#F1EBE1). */
.k-chip {
  display: inline-flex;
  width: fit-content;
  height: var(--k-chip-height);
  align-items: center;
  gap: var(--k-chip-gap);
  padding: 0 16px;
  border: 0;
  border-radius: calc(var(--rounded-full) * 1px);
  background: var(--control-chip-bg);
  color: var(--typo-primary);
  white-space: nowrap;
  cursor: pointer;
}
.k-chip--40 { --k-chip-height: 40px; --k-chip-gap: 8px; --k-chip-thumb: 28px; }
.k-chip--48 { --k-chip-height: 48px; --k-chip-gap: 10px; --k-chip-thumb: 36px; }
.k-chip:hover { background: #EDE4D8; color: var(--typo-primary); }
.k-chip--active, .k-chip--active:hover {
  background: var(--control-chip-bg-active);
  color: var(--control-chip-typo-active);
}
.k-chip__count { color: var(--typo-secondary); }
.k-chip--thumb { padding-inline-start: 6px; }
.k-chip__thumb {
  flex: none;
  width: var(--k-chip-thumb);
  height: var(--k-chip-thumb);
  padding: 2px;
  border-radius: calc(var(--rounded-full) * 1px);
  background: var(--bg-default);
  object-fit: contain;
}

/* Badge kit :8580–8625, tile demo :1730, :2057, :2062–2063 and ProductTile.dc.html:14.
   Order badges are 28px in demo :1125; neutral falls back to the kit palette. */
.k-badge, .k-stock {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: calc(var(--rounded-full) * 1px);
  white-space: nowrap;
}
.k-badge--sm { height: 24px; padding: 0 10px; }
.k-badge--md { height: 28px; padding: 0 10px; }
.k-badge--status { padding: 0 12px; }
/* index.html:1730 defines BADGE as [text, background, text color], used in ProductTile.dc.html:14. */
.k-badge--hit, .k-badge--sale { background: var(--bg-default); color: var(--typo-brand); }
.k-badge--new { background: var(--bg-default); color: var(--orange-600); }
.k-badge--preorder { background: var(--bg-tertiary); color: var(--typo-secondary); }
.k-badge--neutral { background: var(--bg-tertiary); color: var(--typo-primary); } /* Badge kit :8956, :8991. */
.k-badge--info { background: var(--bg-info-surface); color: var(--typo-info); }
.k-badge--success { background: var(--bg-success-surface); color: var(--typo-success); }
.k-badge--critical { background: var(--bg-critical-surface); color: var(--typo-critical); }
.k-badge--light { background: var(--white-a80); color: var(--typo-primary); } /* Badge kit :8866, :8901. */
.k-badge--blue { background: var(--status-bg-blue); color: var(--status-typo-blue); } /* Demo :1769. */
.k-badge--green { background: var(--status-bg-green); color: var(--status-typo-green); } /* Demo :1769. */
.k-badge--red { background: var(--status-bg-red); color: var(--status-typo-red); } /* Demo :1769. */

/* Demo :495, :2483. */
.k-stock { height: 24px; padding: 0 10px 0 8px; gap: 6px; }
.k-stock--in { background: var(--bg-success-surface); color: var(--typo-success); }
.k-stock--preorder { background: var(--bg-warning-surface); color: var(--typo-warning); }

/* Demo :1584–1591. Error uses the AlertTriangle from the Toast kit :37543. */
.k-toast {
  position: absolute;
  bottom: 0;
  width: min(420px, calc(100% - 32px));
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px 12px 16px;
  border-radius: calc(var(--rounded-xl) * 1px);
  background: var(--bg-inverted);
  color: var(--typo-inverted);
  box-shadow: var(--k-shadow-toast);
}
.k-toast__icon, .k-toast__close {
  display: grid;
  flex: none;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: calc(var(--rounded-full) * 1px);
}
.k-toast--success .k-toast__icon, .k-toast--confirm .k-toast__icon,
.k-toast--info .k-toast__icon { background: var(--typo-success); }
.k-toast--error .k-toast__icon { background: var(--typo-critical); }
.k-toast__copy { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.k-toast__title { overflow-wrap: anywhere; }
.k-toast__text {
  overflow: hidden;
  color: var(--typo-secondary-inverted);
  font-size: 12px;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.k-toast__text--wrap { white-space: pre-line; overflow-wrap: anywhere; }
.k-toast__action { flex: none; white-space: nowrap; }
.k-toast--confirm .k-toast__action {
  --k-btn-ink: var(--typo-brand-inverted);
  --k-btn-hover-ink: var(--typo-inverted);
}
.k-toast__close {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--typo-secondary-inverted);
  cursor: pointer;
}
.k-toast :focus-visible { outline-color: var(--typo-inverted); }
/* Keep the base button ring on the dark surface and add a contrasting halo. */
.k-toast button:focus-visible { box-shadow: 0 0 0 4px var(--typo-inverted); }

/* Demo :240–244, :549–550, :1100–1104, :2373, :2525, :2843 and TabGroup kit :42613–42644. */
.k-tabs-group { min-width: 0; }
.k-tabs {
  display: flex;
  align-items: center;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
}
.k-tabs--segment {
  width: fit-content;
  gap: 4px;
  padding: 4px;
  border-radius: calc(var(--rounded-full) * 1px);
  background: var(--control-tab-group);
}
.k-tab {
  flex: none;
  height: 44px;
  padding: 0 20px;
  border: 0;
  background: transparent;
  color: var(--typo-secondary);
  white-space: nowrap;
  cursor: pointer;
}
.k-tabs--segment .k-tab { border-radius: calc(var(--rounded-full) * 1px); }
.k-tabs--segment .k-tab:hover { background: var(--control-ghost-bg-hover); } /* Tab kit :36014–36020. */
.k-tabs--segment .k-tab[aria-selected="true"] {
  background: var(--control-tab-bg-active);
  color: var(--control-tab-typo-active);
}
.k-tabs--underline { gap: 8px; border-bottom: 1px solid var(--bg-border); scrollbar-width: none; }
.k-tabs--underline .k-tab { height: 48px; margin-inline-end: 16px; padding: 0 4px; }
.k-tabs--underline .k-tab:hover { color: var(--typo-primary); }
.k-tabs--underline .k-tab[aria-selected="true"] {
  box-shadow: inset 0 -2px 0 0 var(--typo-primary);
  color: var(--typo-primary);
}
.k-tab:focus-visible { outline-offset: -2px; } /* Inset the base focus ring inside the demo's scrolling tablist (:549). */
@media (max-width: 767.98px) {
  .k-tabs--compact .k-tab { height: 36px; padding-inline: 12px; font-size: 13px; } /* Demo :2843. */
}

/* Demo :453–455, :2423, :2480–2481 (overrides Pagination kit :42404 ff.). */
.k-pagination {
  --k-page-item-size: 44px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}
.k-pagination__item {
  display: grid;
  flex: none;
  width: var(--k-page-item-size);
  height: var(--k-page-item-size);
  place-items: center;
  border-radius: calc(var(--rounded-full) * 1px);
  background: var(--control-ghost-bg);
  color: var(--typo-primary);
}
.k-pagination__item[href]:not([aria-current]):hover {
  background: var(--control-ghost-bg-hover);
  color: var(--typo-primary);
} /* PageItem kit :31621. */
.k-pagination__item--active {
  background: var(--control-chip-bg-active);
  color: var(--typo-brand);
}
.k-pagination__item--dots { cursor: default; } /* The ellipsis in demo :2481 is not a destination. */
.k-pagination__item[aria-disabled="true"] { color: var(--control-disabled-typo); } /* IconButton kit :9479 ff. */
@media (768px <= width < 1200px) {
  .k-pagination { --k-page-item-size: 40px; }
}
@media (width < 768px) {
  .k-pagination { justify-content: center; }
}

/* Quantity kit :14609 ff. (sm/md), demo :511–514 (product) and :651–654 (cart). */
.k-stepper {
  display: inline-flex;
  width: fit-content;
  height: var(--k-stepper-height);
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: calc(var(--rounded-full) * 1px);
  background: var(--bg-tertiary);
}
.k-stepper--sm { --k-stepper-height: 40px; --k-stepper-value: 24px; }
.k-stepper--md { --k-stepper-height: 48px; --k-stepper-value: 32px; }
.k-stepper--cart {
  --k-stepper-height: 44px;
  --k-stepper-value: 24px;
  background: var(--bg-default);
  box-shadow: inset 0 0 0 1.5px var(--control-outline-border);
}
.k-stepper__button {
  display: grid;
  width: calc(var(--k-stepper-height) - 8px);
  height: 100%;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: calc(var(--rounded-full) * 1px);
  background: var(--bg-default);
  color: var(--typo-primary);
  cursor: pointer;
}
.k-stepper__button:hover:not(:disabled) { background: var(--control-ghost-bg-hover); }
.k-stepper--cart .k-stepper__button:hover:not(:disabled) { background: var(--bg-tertiary); }
.k-stepper__button:disabled { color: var(--warm-400); cursor: default; } /* Demo :2490. */
.k-stepper__value {
  width: var(--k-stepper-value);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--typo-primary);
  text-align: center;
  appearance: textfield;
}
.k-stepper__value::-webkit-inner-spin-button,
.k-stepper__value::-webkit-outer-spin-button { appearance: none; margin: 0; }

/* ProductTile.dc.html:44–52: only the buttons, not the tile's B.7 layout or cart state. */
.k-tile-add { white-space: nowrap; }
.k-tile-add--added {
  --k-btn-bg: var(--bg-brand-surface);
  --k-btn-hover: var(--control-chip-bg-active);
  --k-btn-ink: var(--typo-primary);
  --k-btn-padding: 16px;
  gap: 8px;
}

/* Demo :460–464, :602–606, :1188 (overrides EmptyState kit :40035 ff.). */
.k-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 64px 24px;
  border-radius: calc(var(--rounded-2xl) * 1px);
  background: var(--bg-tertiary);
  text-align: center;
}
.k-empty__icon {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border-radius: calc(var(--rounded-full) * 1px);
  background: var(--bg-default);
}
.k-empty__text { max-width: 360px; margin: 0; color: var(--typo-secondary); }
.k-empty__action { margin-top: 8px; }

/* Callout kit :13799 ff. (surface, spacing, icon and text); title is optional. */
.k-callout {
  display: flex;
  max-width: 560px;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-radius: calc(var(--rounded-xl) * 1px);
  background: var(--k-callout-bg);
  color: var(--typo-primary);
}
.k-callout--info { --k-callout-bg: var(--bg-info-surface); --k-callout-ink: var(--typo-info); }
.k-callout--warning { --k-callout-bg: var(--bg-warning-surface); --k-callout-ink: var(--typo-warning); }
.k-callout--success { --k-callout-bg: var(--bg-success-surface); --k-callout-ink: var(--typo-success); }
.k-callout--critical { --k-callout-bg: var(--bg-critical-surface); --k-callout-ink: var(--typo-critical); }
.k-callout__icon { color: var(--k-callout-ink); }
.k-callout__text { margin: 0; }

/* Demo :954–962, :1866 (StepTicket kit :35739 ff. is shorter). */
.k-ticket {
  position: relative;
  min-height: 264px;
  overflow: hidden;
  border-radius: calc(var(--rounded-3xl) * 1px);
}
.k-ticket--default {
  --k-gradient-ticket: linear-gradient(140deg, var(--raspberry-100), var(--orange-100));
  --k-ticket-step: var(--typo-brand);
  --k-ticket-line: color-mix(in srgb, var(--typo-brand) 50%, transparent);
  --k-ticket-meta: var(--white-a80);
  --k-ticket-copy: var(--typo-secondary);
  background: var(--k-gradient-ticket);
  color: var(--typo-primary);
}
.k-ticket--accent {
  --k-ticket-step: var(--typo-inverted);
  --k-ticket-line: color-mix(in srgb, var(--white) 50%, transparent);
  --k-ticket-ring: inset 0 0 0 1px var(--white-a55);
  --k-ticket-copy: var(--typo-inverted);
  background: var(--k-gradient-accent);
  color: var(--typo-inverted);
}
.k-ticket__header {
  display: flex;
  height: 100px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 20px 24px 0;
}
.k-ticket__step { color: var(--k-ticket-step); font-size: 40px; line-height: 48px; }
.k-ticket__meta {
  margin-top: 12px;
  background: var(--k-ticket-meta, transparent);
  color: inherit;
  box-shadow: var(--k-ticket-ring, none);
}
.k-ticket__line {
  position: relative;
  height: 2px;
  background: repeating-linear-gradient(to right, var(--k-ticket-line) 0 6px, transparent 6px 14px);
}
.k-ticket__line::before, .k-ticket__line::after {
  position: absolute;
  top: -18px;
  width: 36px;
  height: 36px;
  border-radius: calc(var(--rounded-full) * 1px);
  background: var(--page-bg);
  content: "";
}
.k-ticket__line::before { left: -18px; }
.k-ticket__line::after { right: -18px; }
.k-ticket__body { display: grid; gap: 8px; padding: 22px 24px 24px; }
.k-ticket__text { margin: 0; color: var(--k-ticket-copy); }
