/* ============================================================================
   Membria base layer: reset, typography, accessibility helpers, icon, button, card.
   Uses var(--mb-*) tokens only (the colours live in membria-tokens.css).
   The styles of the layouts and of the Mb* components live in the *.razor.css files (CSS isolation).
   ============================================================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* WCAG 2.4.11 (Focus Not Obscured): the sticky header must not cover the focused element */
  scroll-padding-top: calc(var(--mb-header-height) + var(--mb-space-4));
}

body {
  margin: 0;
  /* Shorthand property: also removes the decorative background image of the Radzen standard theme. */
  background: var(--mb-bg);
  color: var(--mb-text);
  font-family: var(--mb-font);
  font-size: var(--mb-fs-base);
  line-height: var(--mb-lh);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ---------- Typography ---------- */

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  color: var(--mb-text);
  font-weight: 600;
  line-height: var(--mb-lh-heading);
  letter-spacing: -0.01em;
}

h1 {
  font-size: var(--mb-fs-xl);
}

h2 {
  font-size: var(--mb-fs-lg);
}

h3 {
  font-size: var(--mb-fs-md);
}

p {
  margin: 0;
}

a {
  color: var(--mb-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* FocusOnNavigate puts the focus on the h1 after a page change: no ring needed there. */
h1:focus {
  outline: none;
}

.mb-num {
  font-variant-numeric: tabular-nums;
}

.mb-muted {
  color: var(--mb-text-2);
}

/* A smaller line under a value or a control (a hint, a fact): the markup used it from S1.3 on, the definition came with S1.8. */
.mb-small {
  font-size: var(--mb-fs-sm);
}

kbd,
.mb-kbd {
  display: inline-block;
  padding: 3px 6px;
  border: 1px solid var(--mb-border);
  border-radius: 5px;
  background: var(--mb-surface);
  color: var(--mb-text-2);
  font: 500 11px/1 var(--mb-font);
}

/* ---------- Focus and accessibility helpers ---------- */

:focus-visible {
  outline: var(--mb-focus-width) solid var(--mb-primary);
  outline-offset: var(--mb-focus-offset);
}

.mb-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* "Skip to content": visible on focus only, the first focusable element on the page. */
.mb-skip-link {
  position: fixed;
  top: var(--mb-space-2);
  left: var(--mb-space-2);
  z-index: 1000;
  padding: var(--mb-space-2) var(--mb-space-4);
  border: 1px solid var(--mb-border-strong);
  border-radius: var(--mb-radius);
  background: var(--mb-surface);
  box-shadow: var(--mb-shadow-float);
  color: var(--mb-text);
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-250%);
}

.mb-skip-link:focus {
  transform: none;
}

/* ---------- Icon (Material Symbols, the font shipped in the Radzen package) ---------- */

.mb-icon {
  display: inline-block;
  flex: none;
  width: 1em;
  height: 1em;
  overflow: hidden;
  font-family: "Material Symbols";
  font-size: var(--mb-icon-size, 20px);
  font-style: normal;
  font-weight: 400;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  font-feature-settings: "liga";
  font-variation-settings: "FILL" var(--mb-icon-fill, 0);
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

.mb-icon--lg {
  --mb-icon-size: 24px;
}

/* ---------- QR code (QrCodeSvg.Render draws classes only; the colours come from the tokens, light and dark alike: S4.6 felulet-2 review) ---------- */

.mb-qr__light {
  fill: var(--mb-qr-light);
}

.mb-qr__dark {
  fill: var(--mb-qr-dark);
}

/* ---------- Button (static pages and links; RadzenButton in an interactive island) ---------- */

.mb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--mb-space-2);
  min-height: 36px;
  padding: 0 var(--mb-space-4);
  border: 1px solid var(--mb-border-strong);
  border-radius: var(--mb-radius);
  background: var(--mb-surface);
  color: var(--mb-text);
  font: 500 var(--mb-fs-sm) / 1.2 var(--mb-font);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color var(--mb-transition), border-color var(--mb-transition);
}

.mb-btn:hover {
  background: var(--mb-surface-2);
  text-decoration: none;
}

.mb-btn--primary {
  border-color: var(--mb-primary);
  background: var(--mb-primary);
  color: var(--mb-on-primary);
}

.mb-btn--primary:hover {
  border-color: var(--mb-primary-strong);
  background: var(--mb-primary-strong);
}

/* The destructive main action (S4.2: „Edzés lemondása”; the dialogs' „Archiválás”, „Letiltás”): the danger colour with its own text colour, the word says it too. */
.mb-btn--danger {
  border-color: var(--mb-danger);
  background: var(--mb-danger);
  color: var(--mb-on-danger);
}

.mb-btn--danger:hover {
  border-color: var(--mb-danger-text);
  background: var(--mb-danger-text);
  color: var(--mb-surface);
}

/* A filter or choice button that stays pressed (aria-pressed; S3.7): the chosen one is told by the border, the tint and the weight, not by the colour alone, and keeps an outline in forced colours. */
.mb-btn--toggle[aria-pressed="true"] {
  border-color: var(--mb-primary);
  background: var(--mb-primary-soft);
  font-weight: 600;
}

@media (forced-colors: active) {
  .mb-btn--toggle[aria-pressed="true"] {
    outline: 2px solid CanvasText;
    outline-offset: 1px;
  }
}

.mb-btn[aria-disabled="true"],
.mb-btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.mb-density-comfortable .mb-btn {
  min-height: 44px;
  padding: 0 var(--mb-space-4);
  font-size: 0.9375rem;
  font-weight: 600;
}

/* ---------- Header parts (shared building blocks of the admin and the member surface) ---------- */

/* Icon button: 36 px admin, 44 px member (touch target). */
.mb-iconbtn {
  position: relative;
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--mb-radius);
  background: transparent;
  color: var(--mb-text-2);
  font: inherit;
  cursor: pointer;
  transition: background-color var(--mb-transition), color var(--mb-transition);
}

.mb-iconbtn:hover {
  background: var(--mb-surface-2);
  color: var(--mb-text);
}

.mb-iconbtn[aria-disabled="true"] {
  cursor: default;
}

.mb-density-comfortable .mb-iconbtn {
  width: 44px;
  height: 44px;
}

/* Brand mark: rounded square with connected dots (the final logo is a separate brand task). */
.mb-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--mb-text);
  font-size: var(--mb-fs-md);
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.mb-brand:hover {
  text-decoration: none;
}

.mb-brand__mark {
  display: grid;
  flex: none;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: var(--mb-radius);
  background: var(--mb-primary);
  color: var(--mb-on-primary);
  --mb-icon-size: 18px;
  --mb-icon-fill: 1;
}

/* Organisation dot: the sport-profile colour, decorative only. */
.mb-tenant__dot {
  display: inline-block;
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mb-sport);
}

.mb-avatar {
  display: grid;
  flex: none;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--mb-primary-soft);
  color: var(--mb-primary);
  font-size: var(--mb-fs-xs);
  font-weight: 600;
}

/* ---------- Card ---------- */

.mb-card {
  min-width: 0;
  border: 1px solid var(--mb-border);
  border-radius: var(--mb-radius-lg);
  background: var(--mb-surface);
  box-shadow: var(--mb-shadow);
}

/* MbCard parts (DR-2): the padding lives on the parts, so a table or a list in a flush card runs to the edge. */
.mb-card__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--mb-space-2) var(--mb-space-4);
  padding: var(--mb-space-4) var(--mb-space-4) 0;
}

.mb-card__heading {
  display: flex;
  flex-direction: column;
  gap: var(--mb-space-1);
  min-width: 0;
}

.mb-card__title {
  margin: 0;
  color: var(--mb-text-strong);
  font-size: var(--mb-fs-md);
  font-weight: 600;
}

.mb-card__subtitle {
  margin: 0;
  color: var(--mb-text-2);
  font-size: var(--mb-fs-sm);
}

.mb-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--mb-space-2);
}

.mb-card__body {
  min-width: 0;
  padding: var(--mb-space-4);
}

.mb-card--flush > .mb-card__body {
  padding: 0;
}

.mb-card__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--mb-space-2);
  padding: 0 var(--mb-space-4) var(--mb-space-4);
}

/* ---------- Form primitives (the dialogs and the settings cards: MbFormField holds one field, these lay fields out) ---------- */

/* The body of a form dialog and of a card: the blocks one under the other with the standard gap. */
.mb-stack {
  display: flex;
  flex-direction: column;
  gap: var(--mb-space-4);
}

/* Stack variants (DR-2): the gap of the dense (--sm: space-2) and of the medium (--md: space-3) rhythm; --list resets a ul/ol used as a stack. */
.mb-stack--sm {
  gap: var(--mb-space-2);
}

.mb-stack--md {
  gap: var(--mb-space-3);
}

.mb-stack--list {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* List reset (DR-2): a ul/ol shown without bullets, margin and padding (a grid or flex list adds its own display and gap in the island). */
.mb-list-reset {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Disclosure (S4.2, ui-keret 5.23): a <details> whose <summary> shows its own sign. A flex or styled summary loses the browser's marker,
   so the summary carries <MbIcon Name="expand_more" Class="mb-disclosure__sign" />, which turns when the block is open; the summary is a 44 px target. */
.mb-disclosure > summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--mb-space-1) var(--mb-space-2);
  min-height: 44px;
  cursor: pointer;
  list-style: none;
}

.mb-disclosure > summary::-webkit-details-marker {
  display: none;
}

.mb-disclosure__sign {
  flex: none;
  transition: transform 0.15s;
}

.mb-disclosure[open] > summary .mb-disclosure__sign {
  transform: rotate(180deg);
}

@media (prefers-reduced-motion: reduce) {
  .mb-disclosure__sign {
    transition: none;
  }
}

/* Toolbar (DR-2): a row of buttons or controls that wraps; --center aligns the items on the cross axis, --md widens the gap (space-3), --between spreads the ends. */
.mb-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--mb-space-2);
}

.mb-toolbar--center {
  align-items: center;
}

.mb-toolbar--md {
  gap: var(--mb-space-3);
}

.mb-toolbar--between {
  justify-content: space-between;
}

/* Table (DR-2): the base of a data table (header cell and body cell: rule, padding, left aligned). --cards turns every row into a card under 768 px (the data-label pattern of ui-keret 5.11 and 5.19):
   the header is visually hidden, each cell shows its data-label before the value. The cell rules sit in the base layer (specificity 0,1,1): an island that overrides one uses a longer selector. */
.mb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--mb-fs-sm);
}

.mb-table th,
.mb-table td {
  padding: var(--mb-space-2) var(--mb-space-3);
  border-bottom: 1px solid var(--mb-border);
  text-align: left;
  vertical-align: middle;
}

@media (max-width: 767.98px) {
  .mb-table--cards thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .mb-table--cards,
  .mb-table--cards tbody,
  .mb-table--cards tr,
  .mb-table--cards th,
  .mb-table--cards td {
    display: block;
    width: 100%;
  }

  .mb-table--cards tr {
    margin-bottom: var(--mb-space-3);
    padding: var(--mb-space-2) var(--mb-space-3);
    border: 1px solid var(--mb-border);
    border-radius: var(--mb-radius-lg);
    background: var(--mb-surface);
  }

  .mb-table--cards th,
  .mb-table--cards td {
    padding: var(--mb-space-1) 0;
    border-bottom: 0;
  }

  .mb-table--cards td::before {
    content: attr(data-label) ": ";
    color: var(--mb-text-2);
    font-weight: 600;
  }

  /* A cell without a label (the row's actions) shows no stray „: ” on the card (S3.7). */
  .mb-table--cards td:not([data-label])::before,
  .mb-table--cards td[data-label=""]::before {
    content: none;
  }
}

/* Two columns on a desktop, one on a phone; a field that needs the whole row takes .mb-span-2. */
.mb-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--mb-space-4);
}

.mb-form-grid > .mb-span-2 {
  grid-column: 1 / -1;
}

@media (max-width: 639.98px) {
  .mb-form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* The help line and the error line of a field (MbFormField, and the groups of checks the dialogs lay out by hand). */
.mb-field__help {
  color: var(--mb-text-2);
  font-size: var(--mb-fs-xs);
  line-height: 1.4;
}

/* An icon before a line of text (S4-U B3): the icon and the words apart, a long text wraps beside the icon, not under it; a link or span stays inline. */
.mb-icon-line {
  display: flex;
  align-items: flex-start;
  gap: var(--mb-space-1);
}

a.mb-icon-line,
span.mb-icon-line {
  display: inline-flex;
  align-items: center;
}

.mb-field__error {
  display: flex;
  align-items: flex-start;
  gap: var(--mb-space-1);
  color: var(--mb-danger-text);
  font-size: var(--mb-fs-sm);
  font-weight: 500;
}

.mb-field__error .mb-icon {
  --mb-icon-size: 16px;
  margin-top: 1px;
}

/* A native checkbox or radio with its label: the browser's control, in the brand colour (a real input, so the label and the keyboard work for free). */
.mb-check {
  display: flex;
  align-items: flex-start;
  gap: var(--mb-space-2);
  min-height: 28px;
  cursor: pointer;
}

.mb-check input {
  flex: none;
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--mb-primary);
}

.mb-check--disabled {
  color: var(--mb-text-2);
  cursor: not-allowed;
}

/* A group of checks or radios under a legend (fieldset), laid out in a wrapping row. */
.mb-checkgroup {
  display: flex;
  flex-direction: column;
  gap: var(--mb-space-1);
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.mb-checkgroup > legend {
  padding: 0;
  margin-bottom: var(--mb-space-1);
  font-size: var(--mb-fs-sm);
  font-weight: 500;
}

.mb-checkgroup__row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--mb-space-1) var(--mb-space-5);
}

/* A setting with a switch: the name and its explanation on the left, the switch on the right. */
.mb-switchrow {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--mb-space-4);
}

.mb-switchrow__text {
  min-width: 0;
}

.mb-switchrow__label {
  display: block;
  font-weight: 500;
}

.mb-switchrow__help {
  display: block;
  margin-top: 2px;
  color: var(--mb-text-2);
  font-size: var(--mb-fs-xs);
  line-height: 1.4;
}

/* A code-like value (a key, a member number): a fixed-width face, no wrapping. */
.mb-code {
  font-family: var(--mb-font-mono);
  font-size: 0.92em;
  white-space: nowrap;
}

/* ---------- Menus and link-like buttons (the view menu, the filter menu, the lists: S1.5) ---------- */

/* An item of a menu panel (role="menuitem", menuitemradio…): a full-width button; the checked one of a radio menu is marked by the icon and the soft colour, never by colour alone. */
.mb-menuitem {
  display: flex;
  align-items: center;
  gap: var(--mb-space-2);
  width: 100%;
  min-height: 34px;
  padding: 6px var(--mb-space-3);
  border: 0;
  border-radius: var(--mb-radius);
  background: transparent;
  color: var(--mb-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  --mb-icon-size: 18px;
}

/* On a phone the menus are sheets, and every item is a target a thumb can hit (44 px). */
@media (max-width: 767.98px) {
  .mb-menuitem {
    min-height: 44px;
  }
}

.mb-menuitem:hover,
.mb-menuitem:focus-visible {
  background: var(--mb-surface-2);
}

.mb-menuitem:focus-visible {
  outline-offset: -2px;
}

.mb-menuitem[aria-checked="true"] {
  background: var(--mb-primary-soft);
  color: var(--mb-primary-strong);
  font-weight: 600;
}

.mb-menuitem--danger {
  color: var(--mb-danger-text);
}

.mb-menuitem:disabled,
.mb-menuitem[aria-disabled="true"] {
  color: var(--mb-text-2);
  cursor: not-allowed;
  opacity: 0.7;
}

.mb-menuitem__text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mb-menuitem__mark {
  flex: none;
  color: var(--mb-text-2);
}

.mb-menu__heading {
  margin: 0;
  padding: var(--mb-space-2) var(--mb-space-3) var(--mb-space-1);
  color: var(--mb-text-2);
  font-size: var(--mb-fs-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mb-menu__separator {
  height: 1px;
  margin: var(--mb-space-1) 0;
  border: 0;
  background: var(--mb-border);
}

/* A button that reads as a link („Mentés nézetként”, „Szűrők törlése”): the text in the brand colour, an underline on hover; a real button, so the keyboard and the readers work. */
.mb-linkbtn {
  padding: var(--mb-space-1) 0;
  border: 0;
  background: transparent;
  color: var(--mb-primary);
  font: inherit;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}

.mb-linkbtn:hover {
  text-decoration: underline;
}

.mb-linkbtn:disabled {
  color: var(--mb-text-2);
  cursor: not-allowed;
  text-decoration: none;
}

/* ---------- The look of a text-like field (MbNumber, MbSelect, MbTextArea, MbTimePicker; DR-1) ---------- */

/* One look for every field of the Mb* library, read from the same --rz-input-* variables as Radzen's text box, so a Radzen input and an Mb field stand side by side
   with the same height, border, radius, hover and focus; the invalid field (MbFormField) redeclares the border variables. A phone gets the 44 px target. */
.mb-input {
  width: 100%;
  min-height: var(--rz-input-height, 36px);
  padding: 0 var(--mb-space-3);
  border: var(--rz-input-border);
  border-radius: var(--mb-radius);
  background: var(--mb-surface);
  color: var(--mb-text);
  font: inherit;
  line-height: 1.3;
}

.mb-input::placeholder {
  color: var(--mb-text-2);
  opacity: 1;
}

.mb-input:hover:not(:disabled):not([aria-disabled="true"]) {
  border: var(--rz-input-hover-border);
}

.mb-input:focus-visible,
.mb-input:focus-within {
  border: var(--rz-input-focus-border);
  outline: none;
  box-shadow: var(--rz-input-focus-shadow);
}

.mb-input:disabled,
.mb-input[aria-disabled="true"] {
  background: var(--mb-surface-2);
  color: var(--mb-text-2);
  cursor: not-allowed;
}

@media (max-width: 767.98px) {
  .mb-input {
    min-height: max(44px, var(--rz-input-height, 36px));
  }
}

@media (forced-colors: active) {
  .mb-input:focus-visible,
  .mb-input:focus-within {
    outline: 2px solid Highlight;
  }
}

/* ---------- A check box (MbCheckbox) and a radio (MbRadioGroup): the native input drawn in the library's colours (global: both components share the rules) ---------- */

.mb-checkbox {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: var(--mb-space-2);
    align-items: start;
    min-height: 28px;
}

.mb-checkbox__box {
    appearance: none;
    display: grid;
    place-content: center;
    width: 20px;
    height: 20px;
    margin: 4px 0 0;
    border: 1px solid var(--mb-border-control);
    border-radius: 5px;
    background: var(--mb-surface);
    color: var(--mb-on-primary);
    cursor: pointer;
}

.mb-checkbox__box::after {
    content: "";
    width: 10px;
    height: 5px;
    margin-top: -2px;
    border-bottom: 2px solid currentColor;
    border-left: 2px solid currentColor;
    transform: rotate(-45deg) scale(0);
    transition: transform var(--mb-transition);
}

.mb-checkbox__box:hover:not(:disabled) {
    border-color: var(--mb-text-2);
}

.mb-checkbox__box:checked {
    border-color: var(--mb-primary);
    background: var(--mb-primary);
}

.mb-checkbox__box:checked::after {
    transform: rotate(-45deg) scale(1);
}

/* Only the box (a row selector): no label column, no label height; 24 px, the least target size. */
.mb-checkbox--bare {
    display: inline-grid;
    grid-template-columns: auto;
    min-height: 0;
}

.mb-checkbox--bare .mb-checkbox__box {
    width: 24px;
    height: 24px;
    margin: 0;
}

.mb-checkbox__label {
    padding: 4px 0;
    cursor: pointer;
    overflow-wrap: anywhere;
}

.mb-checkbox__description {
    grid-column: 2;
    margin-top: -2px;
    color: var(--mb-text-2);
    font-size: var(--mb-fs-xs);
    line-height: 1.4;
}

.mb-checkbox--disabled .mb-checkbox__label,
.mb-checkbox--disabled .mb-checkbox__box {
    cursor: not-allowed;
}

.mb-checkbox--disabled .mb-checkbox__label {
    color: var(--mb-text-2);
}

.mb-checkbox--disabled .mb-checkbox__box {
    opacity: 0.6;
}

@media (max-width: 767.98px) {
    .mb-checkbox {
        min-height: 44px;
    }

    .mb-checkbox__label {
        padding-block: 10px;
    }

    .mb-checkbox__box {
        margin-top: 12px;
    }

    .mb-checkbox--bare {
        min-height: 0;
    }

    .mb-checkbox--bare .mb-checkbox__box {
        margin: 0;
    }

    .mb-checkbox--described .mb-checkbox__label {
        padding-bottom: 4px;
    }
}

@media (forced-colors: active) {
    .mb-checkbox__box:checked {
        background: Highlight;
        color: HighlightText;
    }
}

/* The radio is round, and its mark a dot instead of a tick. */
.mb-radio .mb-checkbox__box {
    border-radius: 50%;
}

.mb-radio .mb-checkbox__box::after {
    width: 8px;
    height: 8px;
    margin-top: 0;
    border: 0;
    border-radius: 50%;
    background: currentColor;
    transform: scale(0);
}

.mb-radio .mb-checkbox__box:checked::after {
    transform: scale(1);
}

/* The date picker in a row of filters (MbDatePicker Compact): as wide as the date; on a phone it fills its column. */
.mb-datepicker--compact {
  width: 100%;
  max-width: 12rem;
}

@media (max-width: 767.98px) {
  .mb-datepicker--compact {
    max-width: none;
  }
}

/* A row of filters made of MbFormFields (Folyószámlák, Befizetések, Bizonylatok, Kimutatások): the same look and the same cells as the other forms, wrapping; a phone gets one column. The wide field (the free text) takes two cells. */
.mb-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  align-items: end;
  gap: var(--mb-space-3) var(--mb-space-4);
}

.mb-filters > .mb-filters__wide {
  grid-column: span 2;
}

@media (max-width: 639.98px) {
  .mb-filters {
    grid-template-columns: minmax(0, 1fr);
  }

  .mb-filters > .mb-filters__wide {
    grid-column: auto;
  }
}

/* A link or a code the user copies (the public link of the club, a payment link): a quiet box in a fixed-width face that wraps anywhere instead of pushing the page wider, and scrolls if it must. */
.mb-copylink {
  max-width: 100%;
  margin: 0;
  padding: var(--mb-space-2) var(--mb-space-3);
  overflow-x: auto;
  border: 1px solid var(--mb-border);
  border-radius: var(--mb-radius);
  background: var(--mb-surface-2);
  color: var(--mb-text);
  font-family: var(--mb-font-mono);
  font-size: 0.92em;
  overflow-wrap: anywhere;
  white-space: normal;
}

/* ---------- Link chips (a row of filter links that scrolls sideways: the home's „Kinek a teendői” (S1.8), the inbox's filters (S3.2)) ---------- */

.mb-chips {
    margin-inline: calc(-1 * var(--mb-space-4));
}

.mb-chips__list {
    display: flex;
    gap: var(--mb-space-2);
    margin: 0;
    padding: 2px var(--mb-space-4);
    overflow-x: auto;
    list-style: none;
    scrollbar-width: none;
}

.mb-chips__list::-webkit-scrollbar {
    display: none;
}

.mb-chip {
    --mb-icon-size: 20px;
    display: inline-flex;
    align-items: center;
    gap: var(--mb-space-2);
    min-height: 44px;
    padding: 0 var(--mb-space-3);
    border: 1px solid var(--mb-border-strong);
    border-radius: var(--mb-radius-pill);
    background: var(--mb-surface);
    color: var(--mb-text);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
}

.mb-chip:hover {
    background: var(--mb-surface-2);
    text-decoration: none;
}

.mb-chip[aria-current="true"] {
    border-color: var(--mb-primary);
    background: var(--mb-primary);
    color: var(--mb-on-primary);
}

.mb-chip__avatar {
    display: grid;
    flex: none;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--mb-surface-2);
    color: var(--mb-text-2);
    font-size: 0.6875rem;
    font-weight: 600;
}

.mb-chip[aria-current="true"] .mb-chip__avatar {
    background: var(--mb-hover-overlay);
    color: var(--mb-on-primary);
}

.mb-chip__group {
    font-weight: 400;
    opacity: 0.85;
}

@media (forced-colors: active) {
    .mb-chip[aria-current="true"] {
        outline: 2px solid Highlight;
        outline-offset: -2px;
    }
}

/* ---------- Count badge and unread dot (S3.2: the „Üzenetek” tab, the bell, the organisation menu, the inbox rows) ---------- */

/* The number of the unread: a small pill. It is never the only sign: the element it sits on names the number in words (aria-label or a hidden text). */
.mb-badge {
    display: inline-grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: var(--mb-radius-pill);
    background: var(--mb-danger);
    color: var(--mb-on-danger);
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

/* An unread row's dot (beside the bold title and the word „olvasatlan” for the screen reader). */
.mb-unread-dot {
    display: inline-block;
    flex: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--mb-primary);
}

@media (forced-colors: active) {
    .mb-badge,
    .mb-unread-dot {
        border: 1px solid CanvasText;
    }
}

/* ---------- A strip that scrolls sideways says so (the tab strips: MbSectionNav, MbTabs; DR-1 C7; the chip strips, .mb-chips: S6b.1) ---------- */

/* The classic scroll shadow: a soft edge appears on the side where there is more, and goes away when the strip is scrolled to that end (the covers are `local`, the shadows `scroll`).
   --mb-scrollfade-bg is the colour behind the strip (the page by default; the tabs set the surface). */
.mb-section-nav__list,
.mb-tabs__list,
.mb-chips__list {
  --_edge: color-mix(in srgb, var(--mb-text) 22%, transparent);
  background:
    linear-gradient(to right, var(--mb-scrollfade-bg, var(--mb-bg)) 30%, transparent) left center / 2rem 100% no-repeat local,
    linear-gradient(to left, var(--mb-scrollfade-bg, var(--mb-bg)) 30%, transparent) right center / 2rem 100% no-repeat local,
    linear-gradient(to right, var(--_edge), transparent) left center / 0.9rem 100% no-repeat scroll,
    linear-gradient(to left, var(--_edge), transparent) right center / 0.9rem 100% no-repeat scroll;
}

.mb-sidepanel .mb-tabs__list,
.mb-dialog .mb-tabs__list,
.mb-card .mb-tabs__list,
.mb-sidepanel .mb-chips__list,
.mb-dialog .mb-chips__list,
.mb-card .mb-chips__list {
  --mb-scrollfade-bg: var(--mb-surface);
}

/* Numbers and dates in a table cell do not break (2026. 10. 07. on one line; DR-1 C6); an e-mail address breaks only at its natural places (MbEmail). */
td.mb-num,
th.mb-num {
  white-space: nowrap;
}

.mb-email {
  overflow-wrap: normal;
  word-break: normal;
}

/* In a grid cell (MbEmail NoBreak): one line, an ellipsis when the cell is narrower (the title holds the whole address). */
.mb-email--nowrap {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}

/* An address in a table that turns into cards on a phone (S3.7, the S3.1 Kézbesítések pattern): in the grid one line with an ellipsis (the wrapper's title holds the whole address; MbEmail's break hints off),
   on the card it breaks at the @ and the dots. */
.mb-email-cell {
  display: block;
}

@media (min-width: 768px) {
  .mb-email-cell {
    max-width: 22rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mb-email-cell wbr {
    display: none;
  }
}

/* ---------- Scroll lock while a dialog is open (MbDialog sets the class on <html>) ---------- */

html.mb-dialog-open {
  overflow: hidden;
}

/* ---------- ErrorBoundary (Blazor): a component error is shown in place ---------- */

.blazor-error-boundary {
  padding: var(--mb-space-4);
  border: 1px solid var(--mb-danger);
  border-radius: var(--mb-radius);
  background: var(--mb-danger-soft);
  color: var(--mb-danger-text);
}

.blazor-error-boundary::after {
  content: "Hiba történt.";
  font-weight: 600;
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Forced colours (Windows high contrast) ---------- */

@media (forced-colors: active) {
  .mb-btn--primary {
    border-color: ButtonText;
  }
}

/* The bottom sheet (S4.2: the common cancel sheet; membria-shell.js, [data-mb-sheet]): a modal <dialog> at the bottom of a phone (full width, the main buttons at the thumb, it scrolls
   when taller than the screen), a centred panel from 768 px. The page under it is the dialog's backdrop, so a click there closes it; the padding is the body's, not the dialog's. */
.mb-sheet {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  max-height: 92dvh;
  margin: auto 0 0;
  padding: 0;
  border: 0;
  border-radius: var(--mb-radius-lg) var(--mb-radius-lg) 0 0;
  background: var(--mb-surface);
  color: var(--mb-text);
  box-shadow: var(--mb-shadow-float);
  overflow: auto;
}

.mb-sheet::backdrop {
  background: var(--mb-scrim);
}

.mb-sheet > [data-mb-sheet-body] {
  padding: var(--mb-space-4) var(--mb-space-4) max(var(--mb-space-4), env(safe-area-inset-bottom));
}

.mb-sheet__close {
  position: sticky;
  top: var(--mb-space-2);
  float: right;
  margin: var(--mb-space-2) var(--mb-space-2) 0 0;
  min-width: 44px;
  min-height: 44px;
  font-size: 1.5rem;
  line-height: 1;
}

@media (min-width: 768px) {
  .mb-sheet {
    width: min(560px, calc(100% - 2 * var(--mb-space-4)));
    margin: auto;
    border-radius: var(--mb-radius-lg);
  }
}

/* ---------- Static tabs and key-number tiles outside their components (S4.3, 2026-11-10) ---------- */

/* A static SSR page whose tabs are links (the Jelenlét page: ?ful=…) uses the MbTabs classes without the component, and a page with key numbers uses the S1.12 tiles without
   MemberStatsBody: their rules live in those components' scoped CSS, so here is the shared base (the components' scoped rules, more specific, keep their own behaviour). */
.mb-tabs__strip {
  flex: none;
  border-bottom: 1px solid var(--mb-border);
}

.mb-tabs__list {
  display: flex;
  gap: 2px;
  padding: 0 10px;
  overflow-x: auto;
  scrollbar-width: none;
}

.mb-tabs__tab {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  margin-bottom: -1px;
  padding: 0 var(--mb-space-2);
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--mb-text-2);
  font: 500 var(--mb-fs-sm) / 1.2 var(--mb-font);
  text-decoration: none;
  white-space: nowrap;
}

.mb-tabs__tab:not(.mb-tabs__tab--selected):hover {
  color: var(--mb-text);
}

.mb-tabs__tab--selected {
  border-bottom-color: var(--mb-primary);
  color: var(--mb-primary);
}

.mb-tabs__count {
  padding: 1px 6px;
  border-radius: var(--mb-radius-pill);
  background: var(--mb-surface-2);
  color: var(--mb-text-2);
  font-size: var(--mb-fs-xs);
  font-weight: 600;
}

.mb-tabs__tab--selected .mb-tabs__count {
  background: var(--mb-primary-soft);
  color: var(--mb-primary);
}

.mb-stats-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr));
  gap: var(--mb-space-3);
}

.mb-stats-tile {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding: 14px var(--mb-space-4);
  border: 1px solid var(--mb-border);
  border-radius: var(--mb-radius-lg);
  background: var(--mb-surface);
  box-shadow: var(--mb-shadow);
}

.mb-stats-tile__label,
.mb-stats-tile__sub {
  margin: 0;
  color: var(--mb-text-2);
  font-size: var(--mb-fs-xs);
  font-weight: 500;
}

.mb-stats-tile__value {
  margin: 2px 0;
  font-size: var(--mb-fs-2xl);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

/* The status pill (MbStatusPill's; moved here from its scoped CSS so that a static template's pill, the S4.3 recorder's state and tag, is styled too). Neutral is the default. */
.mb-pill {
  --mb-icon-size: 14px;
  --_bg: var(--mb-surface-2);
  --_fg: var(--mb-text-2);
  display: inline-flex;
  align-items: center;
  gap: var(--mb-space-1);
  padding: 3px var(--mb-space-2);
  border: 1px solid transparent;
  border-radius: var(--mb-radius-pill);
  background: var(--_bg);
  color: var(--_fg);
  font-size: var(--mb-fs-xs);
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
}

.mb-pill--neutral {
  --_bg: var(--mb-surface-2);
  --_fg: var(--mb-text-2);
}

.mb-pill--primary {
  --_bg: var(--mb-primary-soft);
  --_fg: var(--mb-primary);
}

.mb-pill--success {
  --_bg: var(--mb-accent-soft);
  --_fg: var(--mb-accent-text);
}

.mb-pill--warning {
  --_bg: var(--mb-warning-soft);
  --_fg: var(--mb-warning-text);
}

.mb-pill--danger {
  --_bg: var(--mb-danger-soft);
  --_fg: var(--mb-danger-text);
}

.mb-pill--info {
  --_bg: var(--mb-info-soft);
  --_fg: var(--mb-info-text);
}

@media (forced-colors: active) {
  .mb-pill {
      border-color: CanvasText;
  }
}

/* A field's label (MbFormField's, and a label-like line of a component's own: the Jelenlét filter's group summary, the intent sheet's question). Moved here from
   MbFormField's scoped CSS so that it applies outside the component too. */
.mb-field__label {
  color: var(--mb-text);
  font-size: var(--mb-fs-sm);
  font-weight: 500;
}

/* A table's horizontal scroll box (the S1.12 statistics, the S4.3 Jelenlét page): its own scroll, positioned so that a visually hidden caption inside never widens the page
   (DR-1 C3), a focus ring for the keyboard (the region is focusable). Moved here from MemberStatsBody's scoped CSS when a second page used it. */
.mb-stats-table__scroll {
  overflow-x: auto;
  position: relative;
  border-radius: var(--mb-radius);
}

.mb-stats-table__scroll:focus-visible {
  outline: var(--mb-focus-width) solid var(--mb-primary);
  outline-offset: var(--mb-focus-offset);
}

@media (max-width: 767.98px) {
  .mb-tabs__tab {
    min-height: 44px;
    padding: 0 var(--mb-space-3);
  }

  .mb-stats-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
