/* Underbar Universal — widoczność display dodaje PHP (media query). */

.ubu-source {
  display: none !important;
}

.ubu-menu,
.ubu-toc {
  display: none;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 50px;
  margin: 0;
  padding: 0;
  background: var(--ubu-bg, #fff);
  color: var(--ubu-fg, inherit);
  border: 0 !important;
  border-bottom: 1px solid var(--ubu-border, #D9D9D9) !important;
  font-family: var(--ubu-font, inherit);
}

.ubu-menu,
.ubu-toc {
  position: sticky;
  top: var(--ubu-sticky-top, 0px);
  z-index: 4;
  overflow: visible;
}

.ubu-menu {
  overflow: visible;
}

.ubu-frame {
  display: flex;
  align-items: center;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  height: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--ubu-pad-l, 24px);
  padding-right: var(--ubu-pad-r, 24px);
  overflow: hidden;
}

.ubu-track {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: none;
  touch-action: pan-x;
  scrollbar-width: none;
}

.ubu-track::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.ubu-list {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  width: max-content;
  height: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ubu-item {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  height: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ubu-item::before,
.ubu-item::after,
.ubu-link::before,
.ubu-link::after {
  content: none !important;
  display: none !important;
}

.ubu-link {
  display: flex;
  align-items: center;
  box-sizing: border-box;
  height: 100%;
  margin: 0;
  padding: 0 9px;
  color: inherit !important;
  font-family: inherit;
  font-size: var(--ubu-size, 14px);
  font-weight: 400;
  font-style: var(--ubu-style, normal);
  letter-spacing: var(--ubu-tracking, normal);
  text-transform: uppercase;
  line-height: 1.2;
  text-decoration: none !important;
  background: transparent !important;
  white-space: nowrap;
}

.ubu-item.is-parent .ubu-link {
  font-weight: 700;
  text-transform: uppercase;
  padding-right: 0;
}

.ubu-sep ~ .ubu-item .ubu-link {
  text-transform: none;
}

.ubu-sep {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  height: 100%;
  padding: 0 9px;
  font-family: inherit;
  font-size: var(--ubu-size, 14px);
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.2;
  color: #D9D9D9 !important;
  -webkit-text-fill-color: #D9D9D9 !important;
  opacity: 1 !important;
  pointer-events: none;
}

.ubu-menu.ubu-dark .ubu-sep,
.ubu-toc.ubu-dark .ubu-toc__sep {
  color: #343434 !important;
  -webkit-text-fill-color: #343434 !important;
  opacity: 1 !important;
}

.ubu-item:first-child .ubu-link,
.ubu-sep + .ubu-item .ubu-link {
  padding-left: 0;
}

.ubu-item:last-child .ubu-link {
  padding-right: 0;
}

.ubu-text {
  display: inline;
  line-height: 1.2;
}


.ubu-toc__bar,
.ubu-toc__item {
  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
  background: transparent !important;
  background-image: none !important;
  color: inherit !important;
  border: 0;
  box-shadow: none !important;
  outline: none;
  filter: none !important;
  font-family: inherit;
  cursor: pointer;
}

.ubu-toc__bar {
  display: flex;
  align-items: center;
  gap: 0;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0 var(--ubu-pad-r, 24px) 0 var(--ubu-pad-l, 24px);
  overflow: hidden;
  text-align: left;
}

.ubu-toc__label {
  flex-shrink: 0;
  font-size: var(--ubu-size, 14px);
  font-weight: 700;
  letter-spacing: normal;
  text-transform: uppercase;
  line-height: 1.2;
}

.ubu-toc__sep {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  padding: 0 9px;
  font-family: inherit;
  font-size: var(--ubu-size, 14px);
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.2;
  color: #D9D9D9 !important;
  -webkit-text-fill-color: #D9D9D9 !important;
  opacity: 1 !important;
  pointer-events: none;
}

.ubu-toc__current {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  font-size: var(--ubu-size, 14px);
  font-weight: 400;
  line-height: 1.2;
}

.ubu-toc__current-inner {
  display: inline-block;
  white-space: nowrap;
  padding-right: 12px;
}

.ubu-toc.is-marquee .ubu-toc__current-inner {
  animation: ubu-marquee var(--ubu-marquee-dur, 8s) linear infinite;
}

.ubu-toc.is-open .ubu-toc__current-inner {
  animation-play-state: paused;
}

@keyframes ubu-marquee {
  0%, 18% { transform: translateX(0); }
  82%, 100% { transform: translateX(var(--ubu-marquee-shift, 0px)); }
}

@media (prefers-reduced-motion: reduce) {
  .ubu-toc.is-marquee .ubu-toc__current-inner {
    animation: none;
  }
  .ubu-toc__current {
    text-overflow: ellipsis;
  }
}

.ubu-toc__chevron {
  display: block;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin-left: 11px;
  stroke: currentColor;
  fill: none;
  transition: transform 0.2s ease;
}

.ubu-toc.is-open .ubu-toc__chevron {
  transform: rotate(180deg);
}

.ubu-toc__panel {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 51;
  max-height: min(70vh, 420px);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0;
  padding: 4px 0;
  background: var(--ubu-bg, #fff);
  border-bottom: 1px solid var(--ubu-border, #D9D9D9);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.ubu-toc.is-open .ubu-toc__panel {
  display: block;
}

.ubu-toc__item {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-height: 40px;
  margin: 0;
  padding: 8px var(--ubu-pad-r, 24px) 8px var(--ubu-pad-l, 24px);
  text-align: left;
  font-size: var(--ubu-size, 14px);
  font-weight: 400;
  line-height: 1.35;
}

.ubu-toc__item.is-current {
  font-weight: 700;
}
