/* bioQ Herbarium components (revamp task A2)
   Built only from bioq-tokens.css, which must load first. Each block is a
   self-contained component with a bq- class prefix; pages compose them and
   never restyle their internals.

   Components in this file:
   - bq-button: ink (browse), action (shortlist, enquire), quiet (secondary)
   - bq-chip: filter and toggle chips, pressed state from aria-pressed
   - bq-label: the specimen label (SKU · band, name, materials)
   - bq-specimen: the collection card (4:5 media, optional context image
     revealed on hover, optional shortlist control, label below)
   - bq-tag: the floating label placed over a hero image */

/* Buttons */
.bq-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--bq-space-2);
  min-height: var(--bq-target);
  padding: 0 var(--bq-space-5);
  border: 1px solid transparent;
  border-radius: var(--bq-radius);
  font-family: var(--bq-font-body);
  font-size: var(--bq-text-small);
  font-weight: var(--bq-weight-medium);
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--bq-duration-fast) var(--bq-ease), color var(--bq-duration-fast) var(--bq-ease), border-color var(--bq-duration-fast) var(--bq-ease);
}

.bq-button:focus-visible,
.bq-chip:focus-visible,
.bq-specimen__link:focus-visible,
.bq-specimen__shortlist:focus-visible {
  outline: 2px solid var(--bq-color-focus);
  outline-offset: 2px;
}

.bq-button--ink {
  background: var(--bq-color-ink);
  color: var(--bq-color-on-ink);
}

.bq-button--ink:hover {
  background: var(--bq-color-ink-muted);
}

.bq-button--action {
  background: var(--bq-color-action);
  color: var(--bq-color-on-action);
}

.bq-button--action:hover {
  background: var(--bq-color-action-hover);
}

.bq-button--quiet {
  background: transparent;
  border-color: var(--bq-color-ink);
  color: var(--bq-color-ink);
}

.bq-button--quiet:hover {
  background: var(--bq-color-ink);
  color: var(--bq-color-on-ink);
}

/* Chips */
.bq-chip {
  display: inline-flex;
  align-items: center;
  min-height: var(--bq-target);
  padding: 0 var(--bq-space-4);
  border: 1px solid var(--bq-color-line);
  border-radius: var(--bq-radius);
  background: var(--bq-color-paper);
  color: var(--bq-color-ink);
  font-family: var(--bq-font-body);
  font-size: var(--bq-text-small);
  cursor: pointer;
  transition: background-color var(--bq-duration-fast) var(--bq-ease), border-color var(--bq-duration-fast) var(--bq-ease);
}

.bq-chip:hover {
  border-color: var(--bq-color-control);
}

.bq-chip[aria-pressed="true"] {
  background: var(--bq-color-ink);
  border-color: var(--bq-color-ink);
  color: var(--bq-color-on-ink);
}

/* Specimen label: the data a buyer and a reseller both need, set like a
   herbarium sheet label. */
.bq-label {
  display: grid;
  gap: var(--bq-space-1);
  color: var(--bq-color-ink);
}

.bq-label__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0 var(--bq-space-3);
  padding-top: var(--bq-space-2);
  border-top: 1px solid var(--bq-color-line);
  color: var(--bq-color-ink-muted);
  font-family: var(--bq-font-mono);
  font-size: var(--bq-text-label);
  letter-spacing: var(--bq-tracking-label);
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}

/* SKU and band never break inside; on a narrow card the band moves to its
   own line instead. */
.bq-label__meta > * {
  white-space: nowrap;
}

.bq-label__name {
  margin: 0;
  font-family: var(--bq-font-display);
  font-size: var(--bq-text-lead);
  font-weight: var(--bq-weight-regular);
  line-height: var(--bq-leading-heading);
  text-wrap: balance;
}

.bq-label__materials {
  margin: 0;
  color: var(--bq-color-ink-muted);
  font-family: var(--bq-font-body);
  font-size: var(--bq-text-small);
  line-height: var(--bq-leading-heading);
}

/* Specimen card */
.bq-specimen {
  position: relative;
  display: grid;
  gap: var(--bq-space-3);
  align-content: start;
}

.bq-specimen__media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  max-width: 100%;
  background: var(--bq-color-paper);
}

.bq-specimen__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bq-specimen__context {
  opacity: 0;
  transition: opacity var(--bq-duration) var(--bq-ease);
}

@media (hover: hover) and (pointer: fine) {
  .bq-specimen:hover .bq-specimen__context,
  .bq-specimen:focus-within .bq-specimen__context {
    opacity: 1;
  }
}

/* The whole card is one link; the name carries it and the pseudo-element
   stretches it over the card, so there is a single tab stop. */
.bq-specimen__link {
  color: inherit;
  text-decoration: none;
}

.bq-specimen__link::after {
  content: "";
  position: absolute;
  inset: 0;
}

.bq-specimen__shortlist {
  position: absolute;
  top: var(--bq-space-2);
  right: var(--bq-space-2);
  z-index: 1;
  display: grid;
  place-items: center;
  width: var(--bq-target);
  height: var(--bq-target);
  border: 1px solid var(--bq-color-line);
  border-radius: var(--bq-radius-round);
  background: var(--bq-color-paper);
  color: var(--bq-color-ink);
  font-family: var(--bq-font-body);
  font-size: var(--bq-text-lead);
  line-height: 1;
  cursor: pointer;
}

.bq-specimen__shortlist[aria-pressed="true"] {
  background: var(--bq-color-action);
  border-color: var(--bq-color-action);
  color: var(--bq-color-on-action);
}

/* Floating tag over a hero image */
.bq-tag {
  display: grid;
  gap: var(--bq-space-1);
  width: max-content;
  max-width: 100%;
  padding: var(--bq-space-3) var(--bq-space-4);
  background: var(--bq-color-paper);
  box-shadow: var(--bq-shadow-lift);
}

.bq-tag .bq-label__meta {
  padding-top: 0;
  border-top: 0;
  column-gap: var(--bq-space-6);
}

.bq-tag .bq-label__name {
  font-size: var(--bq-text-body);
}
