/* Only affects the standalone majsterkowo_categorytree widget. */
/* The bottom border also separates navigation from the independent filter block. */
.mct {
  width: 100%;
  color: inherit;
  margin: 0 0 1.7rem;
  padding: 0 0 1.2rem;
  border-bottom: 1px solid #dbe4de;
}
.mct-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .35rem 0 .8rem;
}
.mct-heading {
  color: inherit;
  font-weight: 700;
  font-size: 1.08rem;
  text-decoration: none;
}
.mct-list { margin: 0; padding: 0; list-style: none; }
.mct-item { position: relative; margin: 0 0 .08rem; padding: 0; }
.mct-row {
  display: flex;
  align-items: center;
  min-width: 0;
  border-radius: 6px;
}
.mct-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .35rem;
  flex: 1;
  min-width: 0;
  padding: .43rem .35rem .43rem .12rem;
  line-height: 1.35;
  font-size: .91rem;
  color: #323a36;
  text-decoration: none;
  border-radius: 6px;
}
.mct-name { min-width: 0; overflow-wrap: anywhere; }
.mct-count {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-width: 1.55rem;
  padding: .08rem .3rem;
  font-size: .72rem;
  line-height: 1.5;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: #617568;
  background: #edf2ee;
  border-radius: 12px;
}
/* Hover/focus applies to the entire category row, including the left
   expander and the space around the label, just like the active-row fill. */
.mct-item:not(.mct-item--active) > .mct-row:hover,
.mct-item:not(.mct-item--active) > .mct-row:focus-within {
  background: #edf5f0;
}
.mct-link:hover,
.mct-link:focus-visible {
  color: #173c30;
  background: transparent;
  text-decoration: none;
}
/* Distinguish the navigation link from the separate expand/collapse button.
   Keep the row-wide background established in 0.3.1. */
.mct-link:hover .mct-name,
.mct-link:focus-visible .mct-name {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
/* Hierarchy: bold top-level sections, smaller deeper levels and guide lines. */
.mct-level-0 > .mct-item > .mct-row > .mct-link { font-weight: 600; }
.mct-level-1 > .mct-item > .mct-row > .mct-link { font-size: .89rem; }
.mct-level-2 > .mct-item > .mct-row > .mct-link { font-size: .86rem; }
.mct-level-3 > .mct-item > .mct-row > .mct-link { font-size: .84rem; }
.mct-children {
  position: relative;
  margin-left: .74rem;
  padding-left: .4rem;
  border-left: 1px solid #d9e3dd;
}
.mct-children > .mct-list > .mct-item::before {
  content: "";
  position: absolute;
  top: 1.06rem;
  left: -.42rem;
  width: .36rem;
  border-top: 1px solid #d9e3dd;
  pointer-events: none;
}
.mct-children[hidden] { display: none !important; }
/* Highlight only the active row, without left borders or path accents. */
.mct-item--active > .mct-row {
  background: #e0f0e5;
}
.mct-item--active > .mct-row > .mct-link {
  color: #276b48;
  font-weight: 600;
}
.mct-item--active > .mct-row .mct-count {
  color: #245b3e;
  background: #cce5d4;
  font-weight: 700;
}
/* Each row reserves a small LEFT column for its expander, or an empty
   placeholder. Category labels and right-aligned counters remain aligned. */
.mct-toggle-placeholder {
  display: block;
  flex: 0 0 26px;
  width: 26px;
  height: 1px;
  pointer-events: none;
}
.mct-toggle {
  display: inline-flex;
  flex: 0 0 26px;
  width: 26px;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #687e72;
  cursor: pointer;
}
/* A darker, localized highlight signals that the arrow opens a submenu,
   instead of navigating to the category like its neighbouring text link. */
.mct-toggle:hover,
.mct-toggle:focus-visible {
  background: #d4e7da;
  color: #245b3e;
}
.mct-toggle:focus-visible { outline-offset: 2px; }
.mct-toggle svg { transition: transform .14s ease; transform-origin: center; }
.mct-toggle[aria-expanded="true"] svg { transform: rotate(90deg); }
.mct-mobile-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: .2rem;
  min-height: 38px;
  border: 1px solid #d5ded7;
  border-radius: 6px;
  color: inherit;
  background: #fff;
  padding: .4rem .65rem;
}
.mct-mobile-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
@media (max-width: 767.98px) {
  .mct-mobile-toggle { display: inline-flex; }
  .mct-content { display: none; }
  .mct.mct--mobile-open > .mct-content { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  .mct-toggle svg,
  .mct-mobile-toggle svg { transition: none; }
}
