:root {
  --mbb-gradient-left: #3354d8;
  --mbb-gradient-right: #18afef;
  --mbb-text: #ffffff;
  --mbb-title: #000000; /* czarny dla tytułów */
  --mbb-h: 60px;          /* bazowa wysokość paska (część „treści”) */
  /*
    iOS Chrome/Safari mają dynamiczny dolny toolbar. Podczas scrolla potrafi się chować/pokazywać,
    a niektóre implementacje potrafią „doklejać” tę przestrzeń do env(safe-area-inset-bottom),
    co powoduje wrażenie, że pasek "puchnie".

    Żeby pasek ZAWSZE miał stałą, małą wysokość i po prostu "opadał" na dół gdy toolbar znika,
    NIE dodajemy env() do wysokości ani paddingów. Trzymamy stałe 60px.
  */
  --mbb-gap: 10px;
}

/* Pasek: domyślnie ukryty (wjeżdża po scrollu) */
.mobile-bottom-bar {
  position: fixed;
  left: 0;
  right: 0;
  /* pasek widoczny od razu (także gdy JS jest opóźniony przez optymalizacje/caching) */
  bottom: 0 !important; /* ma być zawsze przyklejony do dołu */
  z-index: 9999;

  box-sizing: border-box;
  height: var(--mbb-h);
  padding: 0;

  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0;

  background: #ffd400; /* żółte tło paska */
  border-top: 0; /* bez obramowania u góry */
  box-shadow: 0 -8px 24px rgba(0,0,0,0.12);

  transition: bottom 0.4s ease-out;
  overflow: hidden; /* nic nie ma wystawać poza pasek */

  /* redukcja „jittera” fixed na mobile */
  transform: translateZ(0);

  cursor: pointer;
}


/* Subtelny "shine" – przejazd jasnego refleksu co kilka sekund */
.mobile-bottom-bar::before{
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -60%;
  width: 60%;
  background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.22) 50%, rgba(255,255,255,0) 100%);
  transform: skewX(-18deg);
  animation: mbbShine 8s ease-in-out infinite;
  pointer-events: none;
}
@keyframes mbbShine{
  0%, 70% { transform: translateX(0) skewX(-18deg); opacity: 0; }
  75% { opacity: 1; }
  100% { transform: translateX(220%) skewX(-18deg); opacity: 0; }
}

.mobile-bottom-bar:focus-visible{
  outline: 2px solid rgba(0,0,0,0.55);
  outline-offset: -2px;
}


/* Etykieta UWAGA (pill) w lewym górnym rogu */
.mbb-alert {
  position: absolute;
  top: 7px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  z-index: 6;           /* zawsze nad fade/sliderem */
  pointer-events: none; /* maksymalizujemy klikalność paska */
  user-select: none;
}

/* Link "UWAGA" ma być klikalny mimo pointer-events:none na kontenerze */
.mbb-alert-link{
  pointer-events: auto;
  display: inline-flex;
  text-decoration: none;
  -webkit-tap-highlight-color: rgba(0,0,0,0);
}
.mbb-alert-link:focus,
.mbb-alert-link:active{
  outline: none;
}

/* Małe logo w prawym górnym rogu (link do miejska.pl) */
.mbb-toplogo{
  position: absolute;
  top: 7px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  z-index: 3;
  -webkit-tap-highlight-color: rgba(0,0,0,0);
  -webkit-touch-callout: none;
  user-select: none;
  background: transparent;
  border: 0;
}
.mbb-toplogo:focus,
.mbb-toplogo:active,
.mbb-toplogo:focus-visible{
  outline: none;
  box-shadow: none;
}
.mbb-toplogo img{
  height: 24px;
  width: auto;
  max-width: 140px;
  display: block;
}

.mbb-badge{
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #000;
  color: #fff;
  border-radius: 999px;
  padding: 5px 10px; /* +1px, żeby nie ucinało dołu na mobile */
  font-weight: 900;
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.mbb-sub{
  color: rgba(0,0,0,0.75);
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.2px;
}

.mbb-pulse {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #ff2d2d;
  position: relative;
}

.mbb-pulse::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,0.65);
  transform: scale(0.6);
  opacity: 0.9;
  animation: mbbPulse 1.2s ease-out infinite;
}

@keyframes mbbPulse {
  0%   { transform: scale(0.6); opacity: 0.9; }
  70%  { transform: scale(1.2); opacity: 0.0; }
  100% { transform: scale(1.2); opacity: 0.0; }
}

.mobile-bottom-bar.visible-bar {
  bottom: 0;
}

.mobile-bottom-bar.bounce-bar {
  animation: mbbBounce 0.5s ease-out;
}

@keyframes mbbBounce {
  0% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
  100% { transform: translateY(0); }
}

/* Slider tytułów – pełna szerokość paska */
.mbb-titles {
  flex: 1 1 auto;
  min-width: 0;            /* kluczowe dla ellipsis w flex */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  height: 100%;
  background: transparent;
  padding: 30px 12px 0 12px; /* miejsce na badge UWAGA */
}

.slider-mask {
  width: 100%;
  height: 30px;
  overflow: hidden;
  position: relative; /* potrzebne do fade overlays */
}

/* Subtelne wygaszanie tytułów przy znikaniu (góra/dół) */
.slider-mask::before,
.slider-mask::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  height: 10px;
  pointer-events:none;
  z-index: 2;
}
.slider-mask::before{
  top:0;
  background: linear-gradient(to bottom, #ffd400 0%, rgba(255,212,0,0) 100%);
}
.slider-mask::after{
  bottom:0;
  background: linear-gradient(to top, #ffd400 0%, rgba(255,212,0,0) 100%);
}

.text-wrapper {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.text-wrapper > div {
  height: 30px;
  line-height: 30px;
  width: 100%;
}

.slider-title {
  display: block;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--mbb-title) !important;
  font-weight: 800 !important;
  font-size: 19px !important;
  text-decoration: none;
}

/* Mobile-only */
@media (min-width: 991px) {
  .mobile-bottom-bar { display: none !important; }
}

/* Żeby pasek nie zasłaniał treści na mobile */
@media (max-width: 990px) {
  body {
    /* stała rezerwa, żeby treść nie wchodziła pod pasek */
    padding-bottom: var(--mbb-h);
  }
}


/* Mini-znacznik przed tytułem (ułatwia zauważenie) */
.slider-title::before{
  content: "›";
  display: inline-block;
  margin-right: 8px;
  font-weight: 900;
}
