/* Einheitliche Topbar (Partial _topbar.html). Struktur (links nach rechts):
   Menue-Knopf (mobil) · Wortmarke · Hallo, Name · Suche · Datum/Uhrzeit.
   Fix am oberen Rand ueber der Sidebar. Farben/Schrift: theme.css. */

.otb { position: fixed; top: 0; left: 0; right: 0; z-index: 120;
  background: var(--app-bg-soft, #141414); border-bottom: 1px solid var(--app-border-soft, rgba(255,255,255,.12));
  font-family: var(--app-font-body, 'Montserrat', system-ui, sans-serif);
  /* Hallo-Zeile beginnt rechts der 360px-Logo-Box; auf breiten Fenstern ruecken sie zur Inhaltsspalte auf. */
  --otb-content-left: max(384px, calc(212px + ((100vw - 212px - 1080px) / 2) + 32px)); }
.otb, .otb * { font-family: var(--app-font-body, 'Montserrat', system-ui, sans-serif); }
.otb__inner { position: relative; display: flex; align-items: center; gap: 20px; height: var(--app-topbar-h, 72px);
  margin: 0; padding: 0; }

/* Marke (ganz links): O4W-Logo als Bild, Masse wie im Club-Intranet. */
.otb__brand { flex-shrink: 0; box-sizing: border-box; width: 360px; height: var(--app-topbar-h, 72px);
  display: flex; align-items: center; padding: 0 24px; text-decoration: none;
  font-family: var(--app-font-head, 'Montserrat', sans-serif); font-weight: 900; font-size: 18px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--app-text, #FFFFFF); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.otb__brand img { display: block; width: 284px; max-width: 100%; height: auto; }

/* Hallo, Name */
.otb__hello { position: absolute; left: var(--otb-content-left); top: 50%; transform: translateY(-50%);
  flex-shrink: 0; font-size: 13px; color: rgba(255,255,255,.6); white-space: nowrap; }
.otb__hello b { color: var(--app-text, #FFFFFF); font-weight: 700; }
.otb__hello small { display: block; font-size: 10px; color: var(--app-gold, #EA9D17); text-transform: uppercase;
  letter-spacing: .06em; font-weight: 700; }

/* Suche (Seitentreffer aus /api/nav, clientseitig gefiltert) */
/* Sitzt rechts von "Hallo, Name" (200px reserviert) und laesst rechts Platz
   fuer die Uhr (220px); nicht zentriert, weil die Logo-Box links 360px breit ist. */
.otb__search { position: absolute; left: calc(var(--otb-content-left) + 200px); top: 50%; transform: translateY(-50%);
  width: clamp(140px, calc(100vw - var(--otb-content-left) - 420px), 480px); }
.otb__search input { width: 100%; height: 38px; padding: 0 14px 0 38px; background: var(--app-bg, #0A0A0A);
  border: 1px solid var(--app-border-soft, rgba(255,255,255,.12)); border-radius: 8px; color: var(--app-text, #FFF);
  font-size: 14px; }
.otb__search input::placeholder { color: var(--app-text-faint, rgba(255,255,255,.35)); }
.otb__search input:focus { outline: none; border-color: var(--app-gold, #EA9D17); }
.otb__search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px;
  stroke: rgba(255,255,255,.4); }
.otb__results { position: absolute; left: 0; right: 0; top: 44px; background: var(--app-bg-card, #161616);
  border: 1px solid var(--app-border-soft, rgba(255,255,255,.12)); border-radius: 8px; z-index: 130;
  box-shadow: 0 12px 30px rgba(0,0,0,.5); display: none; max-height: min(70vh, 520px); overflow-y: auto; }
.otb__results.on { display: block; }
.otb__res { display: flex; flex-direction: column; gap: 2px; padding: 9px 14px; color: rgba(255,255,255,.75);
  font-size: 13px; text-decoration: none; cursor: pointer; }
.otb__res:hover, .otb__res.sel { background: var(--app-gold-soft, rgba(234,157,23,.14)); color: var(--app-gold, #EA9D17); }
.otb__res b { font-weight: 600; }
.otb__res small { color: rgba(255,255,255,.4); font-size: 11px; }
.otb__res--empty { padding: 12px 14px; color: rgba(255,255,255,.4); font-size: 13px; cursor: default; }

/* Datum + Uhrzeit (rechts) */
.otb__clock { position: absolute; right: 24px; top: 50%; transform: translateY(-50%);
  flex-shrink: 0; text-align: right; line-height: 1.2; white-space: nowrap; }
.otb__clock .d { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--app-text-dim, rgba(255,255,255,.55)); }
.otb__clock .t { font-size: 15px; font-weight: 800; color: var(--app-text, #FFFFFF); font-variant-numeric: tabular-nums; }

/* Menue-Knopf — ab 900px unsichtbar (Sidebar steht permanent). */
.otb__burger { display: none; }

@media (max-width: 899px) {
  .otb { --otb-content-left: 16px; }
  .otb__burger { flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; padding: 0; border: 1px solid rgba(255,255,255,.16); border-radius: 8px;
    background: transparent; color: rgba(255,255,255,.75); cursor: pointer; }
  .otb__burger:hover { border-color: var(--app-gold, #EA9D17); color: var(--app-gold, #EA9D17); }
  .otb__burger[aria-expanded="true"] { border-color: var(--app-gold, #EA9D17);
    color: var(--app-gold, #EA9D17); background: var(--app-gold-soft, rgba(234,157,23,.14)); }
  .otb__burger svg { width: 20px; height: 20px; }
  .otb__brand { width: auto; padding: 0; }
  .otb__brand img { width: 214px; }
  .otb__inner { padding: 0 16px; gap: 14px; }
  .otb__clock { position: static; transform: none; }
  .otb__hello { position: static; transform: none; }
  .otb__search { position: relative; left: auto; top: auto; transform: none; width: min(380px, 42vw); }
}

@media (max-width: 760px) {
  .otb__hello small { display: none; }
  .otb__inner { gap: 12px; padding: 0 16px; }
  .otb__clock { display: none; }
  .otb__search { flex: 1 1 auto; width: auto; min-width: 0; }
}
@media (max-width: 520px) {
  .otb__hello { display: none; }
  .otb__brand img { width: 148px; }
}
