[x-cloak] { display: none !important; }
html, body { background-color: #080d14; }

/* Shared logo treatment. Keep this scoped to known logo surfaces. */
:where(
  img[alt="OddsZone"],
  .bk-logo-link img,
  .race-logo-link img,
  .race-link-card img,
  .race-book-pill img,
  .home-search-result__match-logos img,
  .home-link-card__brand-logo,
  .search-avatar--team img,
  .search-match-card__team img
) {
  border-radius: 6px;
}

::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: #0f1827; }
::-webkit-scrollbar-thumb { background: #1e3048; border-radius: 2px; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
}

.topbar-brand {
  min-width: 0;
  z-index: 2;
}

.topbar-actions {
  min-width: 0;
  z-index: 2;
}

.topbar-search {
  display: block;
  position: fixed;
  top: 1.5rem;
  left: var(--topbar-search-left, 50vw);
  z-index: 3;
  width: min(clamp(8rem, 32vw, 32rem), calc(var(--topbar-search-gap, 100vw) - 0.75rem));
  transform: translate(-50%, -50%);
}

.topbar-search__field {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  height: 2rem;
  padding: 0 0.35rem 0 0.65rem;
  border: 1px solid rgba(30, 48, 72, 0.9);
  border-radius: 999px;
  background: rgba(8, 13, 20, 0.88);
  box-shadow: 0 10px 28px rgba(2, 8, 23, 0.16);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.topbar-search:focus-within .topbar-search__field {
  border-color: rgba(34, 211, 238, 0.34);
  background: rgba(8, 13, 20, 0.96);
  box-shadow: 0 14px 34px rgba(2, 8, 23, 0.24);
}

.topbar-search__icon {
  width: 0.9rem;
  height: 0.9rem;
  flex: 0 0 auto;
  color: #64748b;
}

.topbar-search input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #e2e8f0;
  font-size: 0.78rem;
}

.topbar-search input::placeholder {
  color: #64748b;
}

.topbar-search button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.45rem;
  height: 1.45rem;
  flex: 0 0 auto;
  border: 0;
  border-radius: 0.45rem;
  background: rgba(34, 211, 238, 0.14);
  color: #67e8f9;
  cursor: pointer;
}

.topbar-search button:hover {
  background: rgba(34, 211, 238, 0.22);
  color: #cffafe;
}

.topbar-search button svg {
  width: 0.85rem;
  height: 0.85rem;
}

.topbar-search-panel {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 50%;
  width: min(30rem, calc(100vw - 2rem));
  max-height: min(28rem, calc(100vh - 5rem));
  overflow-y: auto;
  padding: 0.45rem;
  border: 1px solid rgba(30, 48, 72, 0.95);
  border-radius: 0.95rem;
  background: rgba(8, 13, 20, 0.98);
  box-shadow: 0 20px 48px rgba(2, 8, 23, 0.38);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -6px);
  visibility: hidden;
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
}

.topbar-search-panel.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
  visibility: visible;
}

.topbar-search-suggest {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 2.9rem;
  padding: 0.58rem 0.65rem;
  border-radius: 0.7rem;
  color: #e2e8f0;
  text-decoration: none;
  transition: background-color 0.14s ease, color 0.14s ease;
}

.topbar-search-suggest:hover,
.topbar-search-suggest:focus-visible {
  background: rgba(15, 23, 42, 0.95);
  color: #f8fafc;
  outline: none;
}

.topbar-search-suggest__type {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3.6rem;
  padding: 0.22rem 0.42rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.92);
  color: #94a3b8;
  font-size: 0.63rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.topbar-search-suggest__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid rgba(51, 65, 85, 0.72);
  border-radius: 0.65rem;
  background: rgba(15, 23, 42, 0.92);
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 800;
}

.topbar-search-suggest__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.topbar-search-suggest__avatar--team img {
  padding: 0.12rem;
  object-fit: contain;
}

.topbar-search-suggest__body {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.topbar-search-suggest__title {
  overflow: hidden;
  color: #f8fafc;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-search-suggest__meta {
  overflow: hidden;
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-search-suggest__children {
  color: #fbbf24;
  font-size: 0.66rem;
  font-weight: 800;
}

.topbar-search-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  padding: 0.6rem;
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 600;
}

@media (max-width: 1100px) {
  .topbar-search {
    width: min(clamp(7rem, 36vw, 25rem), calc(var(--topbar-search-gap, 100vw) - 0.5rem));
  }
}

@media (max-width: 520px) {
  .topbar-search__field {
    gap: 0.3rem;
    padding: 0 0.25rem 0 0.45rem;
  }

  .topbar-search__icon {
    width: 0.82rem;
    height: 0.82rem;
  }

  .topbar-search button {
    width: 1.35rem;
    height: 1.35rem;
  }

  .topbar-search input::placeholder {
    color: transparent;
  }
}

.nav-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px; border-radius: 6px;
  font-size: 0.8125rem; font-weight: 500; color: #64748b;
  transition: all 0.15s; white-space: nowrap; text-decoration: none;
  width: 100%;
}
.nav-item:hover { background: #162032; color: #cbd5e1; }
.nav-item.active { background: #1c2a3f; color: #22d3ee; }
.nav-item .icon { width: 15px; height: 15px; flex-shrink: 0; }

.nav-domain {
  display: flex; align-items: center; gap: 6px; width: 100%;
  padding: 4px 10px; border-radius: 6px;
  font-size: 0.65rem; font-weight: 700; color: #475569;
  text-transform: uppercase; letter-spacing: 0.08em;
  transition: color 0.15s; cursor: pointer; user-select: none;
  background: none; border: none;
  position: relative;
}
.nav-domain:hover { color: #94a3b8; }
.nav-sub { padding-left: 8px; border-left: 1px solid #1e3048; margin-left: 13px; }

.nav-tooltip {
  position: absolute; left: calc(100% + 8px); top: 50%; transform: translateY(-50%);
  background: #1e293b; color: #cbd5e1; font-size: 0.75rem; font-weight: 500;
  padding: 4px 10px; border-radius: 6px; white-space: nowrap;
  border: 1px solid #334155; pointer-events: none;
  opacity: 0; transition: opacity 0.15s;
  z-index: 100;
}
.nav-domain:hover .nav-tooltip,
.nav-item:hover .nav-tooltip,
button:hover > .nav-tooltip { opacity: 1; }

@media (min-width: 768px) {
  .main-expanded  { margin-left: 208px; }
  .main-collapsed { margin-left: 48px; }
}
.sidebar-transition { transition: margin-left 0.2s ease-in-out; }

.mobile-tab {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 4px; color: #475569; transition: color 0.15s;
  flex: 1; text-decoration: none; min-width: 0;
}
.mobile-tab.active { color: #22d3ee; }
.mobile-tab svg { width: 20px; height: 20px; flex-shrink: 0; }
.mobile-tab span { font-size: 0.58rem; font-weight: 500; }
