/*
 * Products venue controller layout (ui/catalogue-venue.js).
 *
 * The screens are built from the shared design system: gk-button, gk-field,
 * gk-record-layout, gk-workspace-layout, gk-data-table, gk-modal, gk-card, gk-alert, gk-badge, gk-collapse,
 * gk-detail-grid, gk-timeline and gk-empty-state, with the `gk-admin-native`
 * base styling the bare checkboxes. This file only places them: grid and
 * flex layout, and the space between blocks. Every value is a token from
 * tokens-shared.css or admin-foundation.css.
 */
.catalogue-venue {
  min-width: 0;
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-14);
  line-height: var(--lh-normal);
}

.catalogue-venue [hidden] { display: none !important; }

.catalogue-venue h4 {
  margin: var(--space-2xl) 0 var(--space-xs);
  font-family: var(--font-display);
  font-size: var(--fs-14);
  line-height: var(--lh-snug);
}
.catalogue-venue p { margin: 0 0 var(--space-lg); }
.catalogue-venue .catalogue-note { color: var(--text-muted); }
.catalogue-venue code,
.catalogue-venue pre { font-family: var(--mono); font-size: var(--fs-12); overflow-wrap: anywhere; white-space: pre-wrap; }
.catalogue-venue pre { margin: 0; }
.catalogue-venue ul { margin: 0 0 var(--space-lg); padding-inline-start: var(--space-4xl); }

/* Blocks stack with one gap between them. */
.catalogue-venue gk-alert,
.catalogue-venue gk-page-header,
.catalogue-venue gk-empty-state,
.catalogue-venue gk-data-table,
.catalogue-venue gk-timeline,
.catalogue-venue gk-collapse,
.catalogue-venue .catalogue-boundary { display: block; margin-bottom: var(--space-2xl); }
.catalogue-venue .catalogue-boundary { margin-top: var(--space-2xl); }
.catalogue-venue gk-detail-grid { margin-bottom: var(--space-2xl); }
.catalogue-venue .catalogue-service { margin: 0 0 var(--space-2xl); text-align: end; }
.catalogue-venue #catalogue-retry:not([hidden]) { display: inline-block; margin-bottom: var(--space-2xl); }
/* A panel's heading sits on the panel's own 16px inset, at the panel-heading size. */
.catalogue-venue gk-section-header { --section-header-pad: 0 0 var(--space-2xl); --section-header-font-size: var(--fs-16); }
/* The last block in a card leaves the card's own inset as the bottom gap. */
.catalogue-venue gk-card > :last-child,
.catalogue-venue .catalogue-panel > section > :last-child { margin-bottom: 0; }
.catalogue-venue .catalogue-actions:empty { display: none; }
/* A field followed by its action or a tick box keeps the block gap. */
.catalogue-venue :is(.catalogue-boundary, .catalogue-tab-panel, .catalogue-panel > section) > gk-field:has(+ :is(gk-button, label, .catalogue-actions)) { margin-bottom: var(--space-2xl); }
.catalogue-venue .catalogue-boundary > label { display: flex; align-items: center; min-height: var(--gk-min-tap); margin-bottom: var(--space-2xl); }
.catalogue-venue gk-field:has(> [data-select-price-book]) { max-width: var(--control-width-lg); }
.catalogue-venue gk-empty-state { --empty-pad: var(--space-2xl) var(--space-3xl); }
.catalogue-venue .catalogue-loading { margin: 0; padding: var(--space-lg) 0; color: var(--text-muted); }

/* Layout */
#catalogue-app { container-type: inline-size; min-width: 0; }
.catalogue-products { min-width: 0; }
.catalogue-resume { padding: var(--space-lg); margin-bottom: var(--space-2xl); background: var(--primary-surface); border-radius: var(--radius-input); }
.catalogue-resume p { margin-bottom: var(--space-sm); }
.catalogue-products[view="detail"] .catalogue-resume { display: none; }
.catalogue-panel { min-width: 0; }
.catalogue-view > .catalogue-panel + .catalogue-panel { margin-top: var(--space-2xl); }
.catalogue-tab-panel { min-width: 0; }

.catalogue-venue .catalogue-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-md);
  margin-bottom: var(--space-2xl);
}
.catalogue-venue gk-section-header .catalogue-actions { margin-bottom: 0; justify-content: flex-end; }
.catalogue-venue .catalogue-editor-more { min-width: 0; margin: 0; }
.catalogue-venue .catalogue-editor-more .catalogue-actions { margin-top: var(--space-sm); margin-bottom: 0; }
.catalogue-venue .catalogue-editor-support { margin-top: var(--space-lg); }

.catalogue-venue .catalogue-grid {
  --admin-form-min: 15rem;
  margin: 0 0 var(--space-2xl);
}
.catalogue-venue .catalogue-row { --admin-form-align: end; }
/* One search and the filters a person adds, with the page's actions on the same row. */
.catalogue-venue gk-filter-bar { margin-bottom: var(--space-2xl); }
.catalogue-venue .catalogue-quiet { color: var(--text-muted); white-space: nowrap; }
/* A list row's name is plain text in the list's value size; the row opens it and shows that it can. */
.catalogue-venue .catalogue-row-link {
  appearance: none; display: inline; margin: 0; padding: 0; border: 0; background: none;
  color: var(--text); font: inherit; text-align: left; overflow-wrap: anywhere; cursor: pointer;
}
.catalogue-venue .catalogue-row-link:disabled { cursor: default; }
.catalogue-venue .catalogue-row-link:focus-visible { outline: var(--focus-outline-width) solid var(--focus-ring-color); outline-offset: var(--space-2xs); border-radius: var(--radius-control); }
.catalogue-venue tr:has(.catalogue-row-link) { cursor: pointer; }
.catalogue-venue tr[aria-selected="true"] .catalogue-row-link { font-weight: var(--fw-title); }

.catalogue-venue fieldset { margin: 0 0 var(--space-2xl); }
.catalogue-venue [data-product-sections] { margin-top: var(--space-lg); }

.catalogue-venue .catalogue-live {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Phones: a 16px gutter and one column. 720px is the admin breakpoint set's phone width (@golfkit/web-ui-assets/breakpoints.mjs). */
@media (max-width: 720px) {
  .catalogue-venue { padding: var(--space-2xl); }
  .catalogue-venue--hosted { padding: 0; }
  /* On a phone a panel heading stays on one line beside its badge, so the first field is on the first screen. */
  .catalogue-venue gk-section-header { --section-header-font-size: var(--fs-14); --section-header-pad: 0 0 var(--space-sm); }
  .catalogue-venue .catalogue-service { text-align: start; }
}

@media print {
  .catalogue-venue .catalogue-inventory,
  .catalogue-venue gk-button,
  .catalogue-venue gk-modal,
  .catalogue-venue gk-alert { display: none !important; }
  .catalogue-products { display: block; }
}
/* The inspector floats over the page; nothing reserves room for it. */
.storefront-workspace { min-width: 0; }
.storefront-workspace > section { min-width: 0; display: grid; align-content: start; gap: var(--space-2xl); }
.storefront-workspace [data-storefront-inspector] .catalogue-grid { --admin-form-min: 15rem; }
.storefront-items { min-width: 0; }
.storefront-items > :last-child { margin-bottom: 0; }
.catalogue-venue .catalogue-source-connection { margin-bottom: var(--space-2xl); }
.storefront-workspace > gk-sheet section { min-width: 0; }
.storefront-workspace > gk-sheet .catalogue-panel { margin: 0; }
.storefront-workspace > gk-sheet [slot="actions"] { margin-bottom: 0; }
.storefront-secondary { display: block; color: var(--text-muted); font-size: var(--fs-12); overflow-wrap: anywhere; }
.storefront-price { min-width: 0; }
