.lm-filter {
  display: flex;
  gap: 8px;
  margin: 0 0 16px;
}

.lm-filter-btn {
  border: 1px solid currentColor;
  background: transparent;
  /* buttons don't inherit text color — without this the theme's light
     button color renders the inactive buttons invisible on the page bg */
  color: inherit;
  padding: 6px 18px;
  cursor: pointer;
  font: inherit;
}

.lm-filter-btn.lm-active {
  /* CI gold (client request 2026-08-28): theme primary gold instead of
     black; dark text keeps readable contrast on the champagne tone */
  background: var(--clr-primary-500, #BAAE92);
  color: #1d1d1d;
}

/* "automatically updated" caption */
.lc-lm-updated {
  font-size: 0.85em;
  opacity: 0.65;
  margin: 0 0 10px;
}

.lc-lm-manual-label {
  font-size: 0.85em;
  opacity: 0.65;
  margin: 22px 0 10px;
}

/* Empty states (client request 2026-09-29): the note must carry the table's
   body typography — without this it renders at browser-default size */
.lc-lm-empty {
  /* 'inherit' is not a legal font-family in the shorthand — an invalid
     fallback would drop the whole font declaration at computed-value time */
  font: normal normal 400 15px/22px var(--font-body, sans-serif);
  color: var(--clr-text-primary, #2D2D2D);
  margin: 0;
  padding: var(--size-3, 12px) 0;
}

/* Active location filter with no surviving rows: hide the header-only
   table instead of showing it clipped above the empty note */
.lc-lm-table.lc-lm-table-empty {
  display: none;
}

/* Column sizing: Datum / Arzt / Reservieren hug their content (the
   width:1px + nowrap shrink-to-fit pattern under table-layout:auto) and
   the OP-Art column takes all remaining width. Applies to the automated
   AND the manual table so both stay aligned in the transition view. */
.lc-lm-page .lc-lm-table,
.lc-lm-page .simple-table table {
  table-layout: auto;
  width: 100%;
}

.lc-lm-page .lc-lm-table th:nth-child(1),
.lc-lm-page .lc-lm-table td:nth-child(1),
.lc-lm-page .simple-table table th:nth-child(1),
.lc-lm-page .simple-table table td:nth-child(1) {
  width: 1px;
  white-space: nowrap;
}

.lc-lm-page .lc-lm-table th:nth-child(2),
.lc-lm-page .lc-lm-table td:nth-child(2),
.lc-lm-page .simple-table table th:nth-child(2),
.lc-lm-page .simple-table table td:nth-child(2) {
  width: 1px;
  white-space: nowrap;
}

/* col 3 (mögliche OP-Art): unsized — absorbs all remaining width */

.lc-lm-page .lc-lm-table th:nth-child(4),
.lc-lm-page .lc-lm-table td:nth-child(4),
.lc-lm-page .simple-table table th:nth-child(4),
.lc-lm-page .simple-table table td:nth-child(4) {
  width: 1px;
}

/* keep the RESERVATIONS-ANFRAGE button on one line on desktop (the
   .simple-table__scroll wrapper provides horizontal scroll if it still
   overflows on narrower screens) */
.lc-lm-page .lc-lm-table td:nth-child(4) a,
.lc-lm-page .simple-table table td:nth-child(4) a {
  white-space: nowrap;
}

/* Narrow viewports: switch to table-layout: FIXED with explicit pixel
   columns. Content-derived widths can never be matched by a hardcoded
   sticky offset across engines (WebKit/Chromium round differently — visible
   as a 1px sliver between the pins); fixed px widths make the column width
   and the pin offset the same number everywhere. Col 3 stays unsized and
   absorbs the rest of the 740px floor. */
@media (max-width: 899px) {
  .lc-lm-page .lc-lm-table,
  .lc-lm-page .simple-table table {
    table-layout: fixed;
    width: 100%;
    min-width: 740px;
    /* border-collapse: collapse computes sticky offsets imprecisely;
       separate + spacing 0 renders identically (no vertical borders) */
    border-collapse: separate;
    border-spacing: 0;
  }
  .lc-lm-page .lc-lm-table thead th,
  .lc-lm-page .simple-table table thead th {
    white-space: normal;
  }

  /* Pinned Datum only (client request 2026-10-01: the Arzt column may
     scroll away). These rules win on specificity (0,3,2)/(0,4,2) over the
     base shrink-to-fit rules and the theme block's inline <style> — NOT on
     source order (the theme's style prints later in the document, so a
     tie would lose). The separator border + shadow mark the edge of the
     pinned region. */
  .lc-lm-page table.lc-lm-table th:nth-child(1),
  .lc-lm-page table.lc-lm-table td:nth-child(1) {
    position: sticky;
    left: 0;
    width: 72px;
    background: #fff;
    border-right: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 6px 0 10px -6px rgba(0, 0, 0, 0.18);
  }
  .lc-lm-page table.lc-lm-table th:nth-child(2),
  .lc-lm-page table.lc-lm-table td:nth-child(2) {
    width: 88px;
  }
  .lc-lm-page table.lc-lm-table th:nth-child(4),
  .lc-lm-page table.lc-lm-table td:nth-child(4) {
    width: 190px;
  }

  /* Transition-era manual table: full dates (03.09.2026) need more. */
  .lc-lm-page .simple-table table:not(.lc-lm-table) th:nth-child(1),
  .lc-lm-page .simple-table table:not(.lc-lm-table) td:nth-child(1) {
    position: sticky;
    left: 0;
    width: 96px;
    background: #fff;
    border-right: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 6px 0 10px -6px rgba(0, 0, 0, 0.18);
  }
  .lc-lm-page .simple-table table:not(.lc-lm-table) th:nth-child(2),
  .lc-lm-page .simple-table table:not(.lc-lm-table) td:nth-child(2) {
    width: 88px;
  }
  .lc-lm-page .simple-table table:not(.lc-lm-table) th:nth-child(4),
  .lc-lm-page .simple-table table:not(.lc-lm-table) td:nth-child(4) {
    width: 190px;
  }
}

/* keep the empty note in lockstep with the table's mobile type scale
   (theme block: 15px → 14px at 768px) */
@media (max-width: 768px) {
  .lc-lm-empty {
    font-size: 14px;
  }
}
