/*
 * The producers page (M1-PRODUCERS, design 02.2 Producători din broșură): a centred head, the next-event block on
 * a band, the filter bar, the count and the note, the cards in 1, 2 and 3 columns (the .grid of base.css) and the
 * pagination. Everything is made of the design tokens and the shared components; only what is particular to
 * this page is here.
 */

.producers-head {
  margin-block: var(--spacing-24) var(--spacing-48);
}

.producers-head h1 {
  margin-bottom: var(--spacing-16);
}

.producers-head .lead {
  max-width: var(--size-40rem);
}

/* The band is the width of the window: its colour reaches past the 1200 px column by a shadow, clipped so the page
   never scrolls sideways */
.producers-band {
  margin-bottom: var(--spacing-48);
  padding-block: var(--spacing-48);
  background: var(--color-background-band);
  box-shadow: 0 0 0 100vmax var(--color-background-band);
  clip-path: inset(0 -100vmax);
}

.producers-filter {
  margin-top: var(--spacing-32);
}

.producers-range {
  display: inline-block;
}

.producers-note {
  margin: var(--spacing-8) 0 0;
  color: var(--color-text-secondary);
  font-size: var(--font-size-14);
  line-height: var(--line-height-20);
}

.producers-results-title {
  margin: var(--spacing-48) 0 var(--spacing-24);
  font-size: var(--font-size-32);
  line-height: var(--line-height-40);
  letter-spacing: var(--letter-spacing-h2);
}

/* The heading script focuses after a filter is a region, not a control: no ring, only the transparent outline
   forced-colours mode keeps. Its top stays 24 px below the viewport's top when the browser scrolls to it. */
.producers-results-title {
  scroll-margin-top: var(--spacing-24);
}

h2.producers-results-title:is(:focus, :focus-visible) {
  outline: var(--border-width-2) solid transparent;
  box-shadow: none;
}

.producers-empty {
  max-width: var(--size-40rem);
}

.producer-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--size-12-5rem);
  padding: var(--spacing-24);
  background: var(--color-background-placeholder);
}

.producer-logo img {
  max-width: 100%;
  max-height: var(--size-8rem);
  object-fit: contain;
}

.producer-card .card-body {
  gap: var(--spacing-8);
}

/* The map number and the grouping of the brochure (brief-m1-3): the number is a neutral tag, the grouping the eyebrow of the design */
.producer-eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--spacing-8);
}

.producer-eyebrow .eyebrow {
  margin: 0;
}

.producer-card .tags {
  margin-bottom: var(--spacing-8);
}

.producer-card .card-title {
  margin-top: var(--spacing-8);
  overflow-wrap: anywhere;
}

.producer-facts {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-8);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--font-size-14);
  line-height: var(--line-height-20);
}

.producer-facts li {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-8);
  min-width: 0;
  overflow-wrap: anywhere;
}

.producer-icon {
  flex: none;
  color: var(--color-action);
}

.producer-verify {
  margin: 0;
  color: var(--color-text-warning);
  font-size: var(--font-size-14);
  line-height: var(--line-height-20);
}

.producer-card .card-actions {
  padding-top: var(--spacing-8);
}

/* CC-3: from 1024 px the two buttons take one row (the visit toggle is the icon in the card's corner, not a third button), a label does not wrap,
   and both keep the 16 px of inline padding of .button.small as design 02.2 draws them (brief-m4-6). Romanian and English fit at every width.
   Russian does not at 1280 px and wider, where the three columns give a card body of about 334 px: "Карточка производителя" and "Показать на карте"
   take 8 px there, and from 1024 to 1279 px, where the cards are two a row, the full 16 px fit. */
@media (min-width: 1024px) {
  .producer-card .card-actions {
    flex-wrap: nowrap;
    gap: var(--spacing-8);
  }

  .producer-card .card-actions > .button {
    flex: none;
  }
}

@media (min-width: 1024px) and (max-width: 1279.98px) {
  .producers-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  html[lang="ru"] .producer-card .card-actions > .button {
    padding-inline: var(--spacing-8);
  }
}

.producers-pagination {
  margin-top: var(--spacing-48);
}

/* The end of the list (brief-m1-6): the map, the brochure's source line and the link to its page 1 */
.producers-source {
  display: grid;
  justify-items: start;
  gap: var(--spacing-12);
  margin-top: var(--spacing-48);
}

.producers-source .brochure-source {
  max-width: none;
}

.producers-source__actions {
  margin: 0;
}
