/* ===========================
   DONJA NAVIGACIJA (globalno)
   Jedan izvor visine: --ulr-bottom-nav-height (ostali fiksni elementi je koriste).
   Sigurni razmak je ogranicen (max 12px) da pogresno velika vrijednost
   env(safe-area-inset-bottom) u ugradjenim preglednicima ne napuhne traku.
   =========================== */
:root {
  --ulr-bottom-nav-content: 60px;
  --ulr-bottom-nav-safe: 0px;
  --ulr-bottom-nav-height: calc(var(--ulr-bottom-nav-content) + var(--ulr-bottom-nav-safe));
}
@supports (padding-bottom: min(1px, 2px)) {
  :root { --ulr-bottom-nav-safe: min(env(safe-area-inset-bottom, 0px), 12px); }
}

/* Da sadrzaj SIGURNO ne upadne ispod donje trake (posljednji proizvod ostaje dostupan) */
body.has-bottom-nav {
  padding-bottom: calc(var(--ulr-bottom-nav-height) + 24px);
}

/* Glavna donja traka: kompaktna, uz donji rub, bez transform/backdrop-filter */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  box-sizing: border-box;
  width: 100%;
  max-width: 900px;                     /* ne siri se preko 900px */
  margin: 0 auto;                       /* centriranje bez transform */
  height: var(--ulr-bottom-nav-height);
  padding: 0 0.5rem var(--ulr-bottom-nav-safe);

  z-index: 40;
  display: flex;
  justify-content: space-around;
  align-items: stretch;

  background: rgba(255, 255, 255, 0.98);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 999px 999px 0 0;       /* zaobljena traka kao ranije; visina je fiksna pa je radijus stalan */
}

/* Linkovi / gumbi u donjoj traci */
.bottom-nav-link {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 0.25rem;
  font-size: 0.8rem;
  text-decoration: none;
  color: #444;
  border: none;
  background: none;
}

/* Fokus za tipkovnicu / pristupacnost */
.bottom-nav-link:focus-visible {
  outline: 2px solid #ff8c6a;
  outline-offset: -4px;
  border-radius: 12px;
}

/* Aktivna stranica */
.bottom-nav-link--active {
  font-weight: 600;
  color: #ff7247;
}

/* Trenutno neaktivna opcija */
.bottom-nav-link--disabled {
  opacity: 0.55;
  cursor: default;
}

/* Jezicni nazivi su vec u HTML-u (bez treperenja); html[lang] bira vidljivi */
.bottom-nav .bn { display: none; }
html[lang="hr"] .bottom-nav .bn-hr,
html[lang="en"] .bottom-nav .bn-en,
html:not([lang="hr"]):not([lang="en"]) .bottom-nav .bn-de { display: inline; }

/* Label unutar linka */
.bottom-nav-label {
  display: block;
}
