/* Trade view of the buy box and the product card for resellers and pharmacies (inc/commerce/trade.php, trade.js).
   Its frame looks like a selected plan of the buy box (.ll-plan, pdp.css) but is not one: pdp.js makes plans
   selectable with Enter and Space, which would swallow those keys on the quantity buttons. */

.ll-trade {
  position: relative;
  margin-bottom: var(--ll-space-12);
  padding: var(--ll-space-24) var(--ll-space-16) var(--ll-space-16);
  border: var(--ll-border-w-strong) solid var(--ll-petrol);
  border-radius: var(--ll-r-md);
}
.ll-trade__price {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--ll-space-4) var(--ll-space-16);
  padding: var(--ll-space-16);
  background: var(--ll-petrol-soft);
  border-radius: var(--ll-r-md);
}
.ll-trade__label { margin: 0; font-size: var(--ll-body); line-height: var(--ll-lh-snug); font-weight: var(--ll-weight-bold); white-space: nowrap; }
.ll-trade__label small { display: block; white-space: normal; margin-top: var(--ll-space-2); font-size: var(--ll-tiny); line-height: var(--ll-lh-relaxed); font-weight: var(--ll-weight-book); color: var(--ll-ink-soft); }
.ll-trade__unit { margin: 0; font-size: var(--ll-h3); line-height: var(--ll-lh-none); font-weight: var(--ll-weight-bold); font-variant-numeric: tabular-nums; white-space: nowrap; }
/* During an additional discount (design canvas «Sale product cards», reseller): pill above, price before it struck through */
.ll-trade__now { display: flex; flex-direction: column; align-items: flex-end; gap: var(--ll-space-8); }
.ll-trade__row { display: flex; align-items: baseline; gap: var(--ll-space-8); }
.ll-buybox .ll-tier-table td .ll-was { margin-right: var(--ll-space-8); font-size: var(--ll-tiny); }
.ll-trade__shipping { margin-top: var(--ll-space-12); margin-bottom: var(--ll-space-4); }

/* Tiers: a real table; the row of the chosen quantity carries aria-current and is marked by fill, frame, weight
   and a flag with icon and words (not by colour alone). */
.ll-buybox .ll-tier-table {
  width: 100%;
  margin: var(--ll-space-16) 0 0;
  border: 0;
  border-collapse: separate;
  border-spacing: 0 var(--ll-space-4);
  font-size: var(--ll-small);
  line-height: var(--ll-lh-relaxed);
  font-variant-numeric: tabular-nums;
}
.ll-buybox .ll-tier-table caption {
  caption-side: top;
  padding: 0 0 var(--ll-space-4);
  text-align: left;
  font-size: var(--ll-tiny);
  line-height: var(--ll-lh-relaxed);
  font-weight: var(--ll-weight-bold);
  letter-spacing: var(--ll-tracking-caps);
  text-transform: uppercase;
  color: var(--ll-ink-soft);
}
.ll-buybox .ll-tier-table :is(th, td) { border: 0; padding: var(--ll-space-8) var(--ll-space-12); background: transparent; vertical-align: middle; }
.ll-buybox .ll-tier-table th { text-align: left; font-weight: var(--ll-weight-medium); color: var(--ll-ink-soft); border-radius: var(--ll-r-sm) 0 0 var(--ll-r-sm); white-space: nowrap; }
.ll-buybox .ll-tier-table td { text-align: right; font-weight: var(--ll-weight-medium); color: var(--ll-ink); border-radius: 0 var(--ll-r-sm) var(--ll-r-sm) 0; white-space: nowrap; }
.ll-tier-table__flag { display: none; }
.ll-buybox .ll-tier-table tr[aria-current="true"] :is(th, td) { background: var(--ll-petrol-soft); color: var(--ll-ink); font-weight: var(--ll-weight-bold); }
.ll-buybox .ll-tier-table tr[aria-current="true"] th { box-shadow: inset var(--ll-border-w-strong) 0 0 var(--ll-petrol), inset 0 var(--ll-border-w-strong) 0 var(--ll-petrol), inset 0 calc(-1 * var(--ll-border-w-strong)) 0 var(--ll-petrol); }
.ll-buybox .ll-tier-table tr[aria-current="true"] td { box-shadow: inset calc(-1 * var(--ll-border-w-strong)) 0 0 var(--ll-petrol), inset 0 var(--ll-border-w-strong) 0 var(--ll-petrol), inset 0 calc(-1 * var(--ll-border-w-strong)) 0 var(--ll-petrol); }
/* «Deine Stufe»: for screen readers only, on the current row (the highlight shows it on screen; Niels 2026-11-12).
   aria-current on a table row is not announced by every screen reader. */
.ll-tier-table tr[aria-current="true"] .ll-tier-table__flag { display: inline; position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Quantity (stepper with a field the customer can type into) and the line total. */
.ll-trade-order { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: var(--ll-space-16); margin-top: var(--ll-space-16); }
.ll-trade-order .ll-buybox__label { margin-bottom: var(--ll-space-4); }
.ll-trade-order__qty { display: grid; justify-items: start; }
.ll-qty-stepper {
  display: inline-flex;
  align-items: stretch;
  border: var(--ll-border-w-strong) solid var(--ll-petrol);
  border-radius: var(--ll-r-md);
  background: var(--ll-white);
}
:root .ll-qty-stepper__btn {
  display: grid;
  place-items: center;
  width: var(--ll-tap);
  min-height: var(--ll-tap);
  padding: 0;
  border: 0;
  border-radius: var(--ll-r-sm);
  background: transparent;
  color: var(--ll-ink);
  cursor: pointer;
  transition: background var(--ll-t-fast) ease;
}
:root .ll-qty-stepper__btn:hover:not(:disabled) { background: var(--ll-hover-tint); }
:root .ll-qty-stepper__btn:active:not(:disabled) { background: var(--ll-petrol-soft); }
:root .ll-qty-stepper__btn:disabled { opacity: var(--ll-disabled-opacity); cursor: not-allowed; }
/* Keyboard focus looks like hover (Niels 2026-11-23, variant A): the hover background, no ring across the stepper's frame.
   The quantity gets the same background; its frame stays as it is (rule of 2026-11-12). */
:root .ll-qty-stepper__btn:focus-visible:not(:disabled) { background: var(--ll-hover-tint); outline: none; }
:root .ll-qty-stepper .ll-qty-stepper__input:focus-visible { background: var(--ll-hover-tint); }
.ll-qty-stepper__btn svg { width: var(--ll-icon-s); height: var(--ll-icon-s); stroke: currentColor; fill: none; stroke-width: var(--ll-icon-stroke); stroke-linecap: round; }
:root .ll-qty-stepper__input {
  width: calc(4.5ch + var(--ll-space-16));
  height: auto;
  min-height: var(--ll-tap);
  padding: 0 var(--ll-space-4);
  border: 0;
  border-radius: var(--ll-r-sm);
  background: transparent;
  box-shadow: none;
  text-align: center;
  font-size: var(--ll-body);
  font-weight: var(--ll-weight-bold);
  color: var(--ll-ink);
  font-variant-numeric: tabular-nums;
  appearance: textfield;
  -moz-appearance: textfield;
}
.ll-qty-stepper__input::-webkit-outer-spin-button, .ll-qty-stepper__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
/* Focus on the quantity: the stepper keeps its own border and nothing is added (Niels 2026-11-12); the input draws no
   ring of its own, also not Blocksy's fading one on blur. The buttons keep the site's ring. */
:root .ll-qty-stepper__input, :root .ll-qty-stepper__input:is(:focus, :focus-visible) { outline: none; background: transparent; }
.ll-trade-total { flex: 1 1 auto; display: grid; justify-items: end; margin: 0; text-align: right; }
.ll-trade-total__value { font-size: var(--ll-h4); line-height: var(--ll-lh-snug); font-weight: var(--ll-weight-bold); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ll-trade-total__calc { font-size: var(--ll-tiny); line-height: var(--ll-lh-relaxed); color: var(--ll-ink-soft); font-variant-numeric: tabular-nums; }

/* Recommended retail price and margin: two values side by side, the note as visible text. */
.ll-margin-card { margin: 0 0 var(--ll-space-12); padding: var(--ll-space-16); background: var(--ll-panel); border-radius: var(--ll-r-md); }
.ll-margin-card__values { display: grid; grid-template-columns: 1fr 1fr; gap: var(--ll-space-16); margin: 0; }
.ll-margin-card__item dt { font-size: var(--ll-tiny); line-height: var(--ll-lh-relaxed); font-weight: var(--ll-weight-bold); letter-spacing: var(--ll-tracking-caps); text-transform: uppercase; color: var(--ll-ink-soft); }
.ll-margin-card__item dd { margin: 0; font-size: var(--ll-h4); line-height: var(--ll-lh-snug); font-weight: var(--ll-weight-bold); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ll-margin-card__note { margin: var(--ll-space-8) 0 0; font-size: var(--ll-tiny); line-height: var(--ll-lh-relaxed); color: var(--ll-ink-soft); }

/* Phones: the pack word of a tier is left to screen readers, so every tier stays on one line. */
@media (max-width: 689.98px) {
  .ll-tier-table__unit { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

/* Narrow phones and zoomed pages (reflow at 320 px): the flag keeps its icon and leaves the words to screen readers,
   cells get less padding, the margin card stacks, the label may wrap. Nothing is cut off. */
@media (max-width: 359.98px) {
  .ll-buybox .ll-tier-table :is(th, td) { padding: var(--ll-space-8); }
  .ll-trade { padding-left: var(--ll-space-12); padding-right: var(--ll-space-12); }
  .ll-trade__price { padding: var(--ll-space-12); }
  .ll-trade__label { white-space: normal; }
  .ll-margin-card__values { grid-template-columns: 1fr; gap: var(--ll-space-8); }
}
