/* ============================================================
   Bivisor Datacall — Grafana Frontend Overrides
   Colors sourced from configs/branding/bivisor_square.svg.
   Applied via views/index.html <link> injection (relative path,
   safe under the /datacall/ subpath).
   ============================================================ */

:root {
  --bivisor-primary:      #2A4B6B;
  --bivisor-primary-dark: #1C3350;
  --bivisor-accent:       #88C2E6;
  --bivisor-bg:           #16232B;
  --bivisor-surface:      #273B49;
  --bivisor-text:         #E8EDF5;
  --bivisor-muted:        #7A8A99;
}

/* Remove the top-bar search box */
[aria-label="Search dashboards"],
[data-testid="search-button"],
button[aria-label="Search"],
.search-field-wrapper,
.navbar-search,
.navbar-button--search,
nav [class*="search"],
header [class*="SearchButton"],
header [class*="search-button"],
div[class*="TopSearchInput"],
div[class*="topSearchInput"],
input[placeholder*="Search"],
.search-wrapper,
.search-container {
  display: none !important;
}

/* Hide "Grafana" wordmark in the sidemenu logo */
.sidemenu-logo svg text,
a[aria-label="Home"] svg text,
[class*="HomeButton"] svg text,
nav svg text[class*="wordmark"],
nav svg .wordmark {
  display: none !important;
}

a[aria-label="Home"]::after,
a[href="/"][class*="Logo"]::after {
  content: "Bivisor Datacall";
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--bivisor-accent);
  margin-left: 6px;
  white-space: nowrap;
}

header,
nav[class*="Navbar"],
div[class*="Navbar"],
.navbar {
  background: var(--bivisor-surface) !important;
  border-bottom: 1px solid rgba(136, 194, 230, 0.25) !important;
}

nav[class*="SideMenu"],
div[class*="SideMenu"],
.sidemenu {
  background: var(--bivisor-bg) !important;
  border-right: 1px solid rgba(136, 194, 230, 0.18) !important;
}

nav[class*="SideMenu"] a:hover,
.sidemenu a:hover {
  background: rgba(136, 194, 230, 0.12) !important;
  color: var(--bivisor-accent) !important;
}

button[class*="primary"],
a[class*="primary"],
[class*="Button--primary"] {
  background: var(--bivisor-primary) !important;
  border-color: var(--bivisor-primary) !important;
}

button[class*="primary"]:hover,
[class*="Button--primary"]:hover {
  background: var(--bivisor-primary-dark) !important;
}

a, a:visited {
  color: var(--bivisor-accent);
}

[class*="active"] a,
[class*="MenuItem--active"] {
  color: var(--bivisor-accent) !important;
  border-left-color: var(--bivisor-primary) !important;
}

body,
#reactRoot,
[class*="PageContents"],
main {
  background: var(--bivisor-bg) !important;
}

[class*="LoginLogo"] svg text,
[class*="loginLogo"] svg text,
.login-logo svg text {
  display: none !important;
}

[class*="LoginLogo"]::after,
.login-logo::after {
  content: "Bivisor Datacall";
  display: block;
  text-align: center;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--bivisor-accent);
  margin-top: 10px;
}

[class*="LoginSubTitle"],
[class*="login-subtitle"] {
  display: none !important;
}

footer[class*="Footer"],
div[class*="Footer"],
.footer {
  display: none !important;
}

[class*="PanelContainer"],
[class*="panel-container"] {
  border: 1px solid rgba(136, 194, 230, 0.15) !important;
  border-radius: 6px !important;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bivisor-bg); }
::-webkit-scrollbar-thumb { background: var(--bivisor-primary); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--bivisor-accent); }
