/* Membership venue controller styles. Everything is scoped to .mb-venue so the same file
   serves Membership's own console and Core's tenant admin from the checksum-pinned package.
   Cards, alerts, timelines, fields and tables are
   the shared gk-* components; this file only lays them out with the shared tokens. */
.mb-venue {
  min-width: 0;
  color: var(--text);
  font-size: var(--fs-14);
}
.mb-venue [hidden] { display: none !important; }
.mb-venue h2, .mb-venue h3, .mb-venue h4 { margin: 0; color: var(--text); }
.mb-venue h3 { font-size: var(--fs-16); }
.mb-venue h4 { font-size: var(--fs-14); margin-top: var(--space-2xl); }
.mb-venue h2:focus-visible, .mb-venue h3:focus-visible { outline: var(--focus-outline-width) solid var(--focus-ring-color); outline-offset: var(--focus-outline-offset); }

.mb-venue > gk-alert { margin: 0 0 var(--space-2xl); }
.mb-workspace { --page-header-mb: 0; display: grid; gap: var(--space-2xl); min-width: 0; }
.mb-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-lg); }
.mb-head h2 { flex: 1 1 auto; font-size: var(--fs-20); }
.mb-view { display: grid; gap: var(--space-2xl); min-width: 0; }
.mb-view > gk-card { min-width: 0; }
.mb-finance-page { display: grid; gap: var(--space-2xl); min-width: 0; }
.mb-finance-panel { display: grid; gap: var(--space-2xl); min-width: 0; }
.mb-finance-panel > gk-card { min-width: 0; }
.mb-plan-directory > gk-card { min-width: 0; }
.mb-enquiry-tasks .mb-form > h4:first-child { margin-top: 0; }
.mb-view[aria-busy="true"] { opacity: .6; }
.mb-view-switch { justify-self: start; }

.mb-section { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-2xl); min-width: 0; }
.mb-form { display: grid; gap: var(--space-2xl); min-width: 0; }
.mb-fields { display: grid; gap: var(--space-2xl); grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); }
.mb-fields gk-field { min-width: 0; }
.mb-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm); }
.mb-note { margin: 0; color: var(--text-muted); }
.mb-code { font-family: var(--mono); font-size: var(--fs-13); overflow-wrap: anywhere; }
.mb-terms { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: var(--lh-relaxed); }
.mb-badges { display: inline-flex; flex-wrap: wrap; gap: var(--space-xs); }
.mb-metrics { display: grid; gap: var(--space-md); grid-template-columns: repeat(auto-fill, minmax(min(100%, 9rem), 1fr)); }
.mb-explain p { margin: 0 0 var(--space-sm); }
.mb-explain p:last-child { margin-bottom: 0; }
.mb-status-line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-md); }
.mb-steps { display: grid; gap: var(--space-sm); margin: 0; padding: 0; list-style: none; }
.mb-steps li { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-md); }
.mb-exceptions { display: grid; gap: var(--space-lg); margin: 0; padding: 0; list-style: none; }
.mb-confirm { display: block; margin-top: var(--space-md); }
.mb-confirm h4 { margin: 0 0 var(--space-xs); }
.mb-confirm p { margin: 0 0 var(--space-md); overflow-wrap: anywhere; }

.mb-venue gk-data-table { display: block; overflow-x: auto; }
.mb-venue dl { display: grid; grid-template-columns: minmax(8rem, max-content) minmax(0, 1fr); gap: var(--space-sm) var(--space-3xl); }

@media (max-width: 720px) {
  .mb-actions gk-button, .mb-form > .mb-actions gk-button { flex: 1 1 100%; }
  .mb-venue dl { grid-template-columns: minmax(0, 1fr); }
}

/* The inspector floats over the directory; neither narrows to make room. */
.mb-record-inspector { min-width: 0; }
.mb-record-inspector > .mb-inspector-directory { min-width: 0; box-sizing: border-box; }
.mb-record-inspector gk-sheet > [slot="actions"] { min-height: 44px; }

/* Overview and shared blocks */
.mb-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-sm) var(--space-2xl); min-width: 0; }
.mb-toolbar:empty { display: none; }
.mb-meta { color: var(--text-muted); font-size: var(--fs-caption); }
.mb-block-title { margin: 0; font-size: var(--fs-panel); font-weight: var(--fw-title); }
.mb-venue h3.mb-block-title { font-size: var(--fs-panel); }
.mb-breakdown { display: flex; flex-wrap: wrap; gap: var(--space-3xs) var(--space-2xl); margin: 0; color: var(--text-muted); font-size: var(--fs-body); }
.mb-breakdown strong { color: var(--text); font-weight: var(--fw-ui); }
.mb-link { display: inline-flex; align-items: center; justify-self: start; min-block-size: var(--control-height); padding: 0; border: 0; background: none; color: var(--link); font: inherit; font-weight: var(--fw-ui); cursor: pointer; text-align: start; }
.mb-link:hover { color: var(--link-hover); text-decoration: underline; }
.mb-link:focus-visible { outline: var(--focus-outline-width) solid var(--focus-ring-color); outline-offset: var(--focus-outline-offset); border-radius: var(--radius-control); }
.mb-basis, .mb-support { margin-block: 0; }
.mb-basis > .mb-note { margin-block: var(--space-sm) 0; }
.mb-venue td { overflow-wrap: anywhere; }
.mb-venue td .mb-support { margin-block: var(--space-2xs) 0; }
@media (pointer: fine) {
  .mb-venue td .mb-support > summary { min-block-size: 0; padding: 0; font-weight: 400; }
}
.mb-venue [data-gk-list] > thead > tr > th { vertical-align: middle; }
.mb-status { display: inline-flex; align-items: center; gap: var(--space-sm); }
.mb-status[data-tone]::before { content: ""; flex: none; inline-size: var(--space-sm); block-size: var(--space-sm); border-radius: var(--radius-pill); background: var(--dot); }
.mb-status[data-tone="caution"] { --dot: var(--caution-solid); }
.mb-status[data-tone="danger"] { --dot: var(--danger-solid); }
.mb-search { max-inline-size: 28rem; }
.mb-scan { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm); max-inline-size: 28rem; min-width: 0; }
.mb-scan input { flex: 1 1 12rem; min-width: 0; }
.mb-record-inspector gk-sheet gk-card { --card-border-w: 0; --card-pad: 0; --card-radius: 0; }
.mb-filters { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm); min-width: 0; }
.mb-filters input { flex: 1 1 14rem; min-width: 0; max-inline-size: 24rem; }
.mb-filters select { flex: 0 1 12rem; min-width: 0; }
#mb-content { max-inline-size: 48rem; }
.mb-heading-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); min-width: 0; }
.mb-inline-form { display: flex; flex-wrap: wrap; align-items: end; gap: var(--space-sm); min-width: 0; }
.mb-inline-form gk-field { flex: 0 1 16rem; min-width: 0; }
#mb-download-form > :empty { display: none; }
.mb-periods { display: grid; gap: var(--space-sm); margin: 0; padding: 0; list-style: none; }
.mb-filter-row { align-items: end; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); max-inline-size: 48rem; }
