/* ==========================================================================
   Vendor directory: the list (/vendors/), a vendor's page
   (/vendors/<slug>/), the forms under it (contact, claim, report) and the
   categories on "List your business" and the manage page.
   templates/vendors/*.html, through {% block extra_css %}; the list also
   loads lists.css (toolbar, chips, drawer), the forms forms.css. Tokens and components — cards, tags, badges, facts, gallery,
   VendorCard — come from site.css as they are (DESIGN.md, "Каталог
   продавцов"): only how they sit together on these pages lives here.
   ========================================================================== */

/* 1. The list -----------------------------------------------------------------
   Filters: the search line, then "Works in", "Based in" and "Category".
   Phone: two selects to a row (filters--compact), the third on its own row.
   Desktop: all four fields and the button on one line, "Category" a little
   wider than the other selects: its longest name is "Portable restrooms &
   waste". */
@media (max-width: 47.99rem) {
  .vendor-filters .vendor-filters__category { grid-column: 1 / -1; }
  .vendor-filters .filters__actions .btn { flex: 1; }
}
@media (min-width: 64rem) {
  .vendor-filters { grid-template-columns: minmax(0, 1.75fr) repeat(2, minmax(0, 1fr)) minmax(0, 1.5fr) auto; }
  .vendor-filters .filters__search { grid-column: auto; }
}

.vendor-grid + .pagination { margin-top: var(--space-7); }

/* "List your business" under the lede (story 128): the head's padding
   already spaces it from the toolbar. */
.page-head .vendor-list__join { margin-bottom: 0; }

/* 2. A vendor's page: head ----------------------------------------------------
   One column; with the vendor's own photo, the photo sits beside the name
   from 56rem (the body's two-column grid) and above it on a phone. Quiet on
   purpose: the loud element of the site is the festival's date poster. */
.vendor-head {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  padding-block: var(--space-4) var(--space-7);
}
.vendor-head__body { min-width: 0; }
.vendor-head__photo { order: -1; aspect-ratio: 4 / 3; max-height: 20rem; --shade: 0; }
@media (min-width: 56rem) {
  .vendor-head { padding-block: var(--space-5) var(--space-8); }
  .vendor-head--photo {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(17rem, 1fr);
    gap: var(--space-7);
    align-items: start;
  }
  .vendor-head__photo { order: 0; max-height: none; }
}

.vendor-head__name {
  max-width: 22ch;
  margin-bottom: var(--space-3);
  overflow-wrap: break-word;
}
.vendor-head__place {
  max-width: var(--measure);
  margin: 0 0 var(--space-4);
  color: var(--color-muted);
  font-size: var(--text-base);
  line-height: 1.45;
}
@media (min-width: 30rem) { .vendor-head__place { font-size: var(--text-md); line-height: 1.4; } }
.vendor-head__tags { margin-bottom: var(--space-4); }
.vendor-head__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  margin: 0;
}
.vendor-head__source { display: inline-flex; align-items: center; min-height: var(--tap); font-weight: 600; }
.vendor-head__actions { margin: var(--space-5) 0 0; }
@media (max-width: 29.99rem) { .vendor-head__actions .btn { flex: 1 1 100%; } }

/* 3. A vendor's page: body ----------------------------------------------------
   Main column: what they sell, about, photos, seen at — each under a
   hairline. Side column: the details card, then the note on a listing from
   public information. */
.vendor-body { padding-bottom: var(--space-8); }
.vendor-section { padding-top: var(--space-4); border-top: 1px solid var(--color-line); }
.vendor-section + .vendor-section { margin-top: var(--space-7); }
.vendor-section > h2 { margin-bottom: var(--space-4); font-size: var(--text-lg); }
.vendor-section__note { margin: calc(-1 * var(--space-2)) 0 var(--space-4); color: var(--color-muted); }
.vendor-section .fest-grid { margin-bottom: 0; }

.vendor-aside { display: grid; gap: var(--space-5); }
.vendor-facts .facts { margin-bottom: 0; }
.vendor-facts dd { overflow-wrap: anywhere; }
/* About this listing: "Listed from public information. Is this your
   business?" (a claim link) on a page the business hasn't verified, then the
   quiet "Report a problem" link on every page. */
.vendor-listing { padding-top: var(--space-4); border-top: 1px solid var(--color-line); }
.vendor-listing p { margin: 0; }
.vendor-listing__note { font-weight: 600; }
.vendor-listing .vendor-listing__how { margin-top: var(--space-2); color: var(--color-muted); font-size: var(--text-sm); overflow-wrap: anywhere; }
.vendor-listing__note + .vendor-listing__how + .vendor-listing__report { margin-top: var(--space-2); }
.vendor-listing__report a { display: inline-flex; align-items: center; min-height: var(--tap); font-size: var(--text-sm); font-weight: 600; }
/* Last in the column, for another business (story 128): "Are you a vendor?
   List your business", under its own hairline like the listing note above,
   as quiet as the report link and as easy to tap. */
.vendor-join { margin: 0; padding-top: var(--space-2); border-top: 1px solid var(--color-line); color: var(--color-muted); font-size: var(--text-sm); }
.vendor-join a { display: inline-flex; align-items: center; min-height: var(--tap); font-weight: 600; }

/* 4. Forms under a vendor's page ----------------------------------------------
   The business the form is about (vendors/includes/form_vendor.html): its
   VendorCard in the same box as a festival's over the festival forms
   (forms.css, .form-festival). */
.form-main > .form-vendor {
  padding: var(--space-4);
  border: 1px solid var(--color-line);
  border-radius: var(--radius);
}
@media (min-width: 30rem) { .form-main > .form-vendor { padding: var(--space-5); } }

/* 5. Categories on "List your business" and the manage page --------------------
   (vendors/includes/categories_field.html, story 129) One field with its
   legend, help and errors; its ticks in two groups, each under a small
   subheading: what the business sells at festivals, then the services
   festival organizers hire. Every tick keeps its 44px row from
   .field--choices. Where two columns fit (the form column on a desktop), a
   group runs down two columns instead of one long list; on a phone, one. */
.choice-group { min-width: 0; margin: 0; padding: 0; border: 0; }
.choice-group + .choice-group { margin-top: var(--space-3); }
.choice-group__title {
  margin-bottom: var(--space-1);
  padding: 0;
  color: var(--color-muted);
  font: 600 var(--text-sm)/1.4 var(--font-body);
}
.choice-group__ticks { columns: 13rem 2; column-gap: var(--space-4); }
.choice-group__ticks > div { break-inside: avoid; }
