/*
Onterris - Keycloak Admin Console Theme (Light Minimalist)
Same brand tokens as login theme.
- Pale Blue: #5D9CEC
- Deep Blue: #252D42
- White: #FDFCFC
- Typeface: Inter
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&display=swap');

:root {
  --onterris-pale: #5D9CEC;
  --onterris-deep: #252D42;
  --onterris-white: #FDFCFC;
  --onterris-textblue: #5294EB;
  --onterris-border: #D9DEE8;
}

/* Force light mode; override keycloak.v2 dark variables and realm Dark mode toggle */
html,
body,
.pf-v5-theme-dark,
[data-theme="dark"],
.pf-v5-c-page {
  color-scheme: light !important;
  --pf-v5-global--BackgroundColor--100: #FDFCFC !important;
  --pf-v5-global--BackgroundColor--150: #FFFFFF !important;
  --pf-v5-global--BackgroundColor--200: #FFFFFF !important;
  --pf-v5-global--Color--100: #252D42 !important;
  --pf-v5-global--Color--200: #252D42 !important;
  --pf-v5-global--primary-color--100: #5D9CEC !important;
  --pf-v5-global--link--Color: #252D42 !important;
  --pf-v5-global--link--Color--hover: #5294EB !important;
  --pf-v5-global--link--Color--visited: #252D42 !important;
  font-family: Inter, Arial, sans-serif !important;
}

/* Page background - force light. If Dark mode is On in Realm settings, turn it Off
   so this theme displays correctly; inline styles from dark mode override stylesheets. */
body,
html body {
  background: #E5E7EB !important;
  color: var(--onterris-deep);
}

/* Sidebar and chrome - force light background and dark text */
.pf-v5-c-page__sidebar,
.pf-v5-c-page__main-section,
.pf-v5-c-page__main {
  --pf-v5-global--BackgroundColor--100: #FFFFFF !important;
  --pf-v5-global--BackgroundColor--200: #FDFCFC !important;
  --pf-v5-global--Color--100: #252D42 !important;
  --pf-v5-global--Color--200: #252D42 !important;
  background-color: #FFFFFF !important;
  color: #252D42 !important;
}

/* Header bar (top nav) - force light background */
.pf-v5-c-masthead,
.pf-v5-c-page__main-header .pf-v5-c-masthead,
header.pf-v5-c-masthead,
.pf-v5-c-masthead.pf-m-light {
  --pf-v5-global--BackgroundColor--100: #252D42  !important;
  --pf-v5-global--BackgroundColor--200: #252D42  !important;
  background-color: #252D42  !important;
  background: #252D42  !important;
  border-bottom: 0px solid var(--onterris-border);
}
.pf-v5-c-masthead *,
.pf-v5-c-masthead .pf-v5-c-toolbar__content {
  --pf-v5-global--BackgroundColor--100: #252D42  !important;
  color: #FFFFFF !important;
}
.pf-v5-c-masthead .pf-v5-c-toolbar {
  background-color: #252D42  !important;
}

/* Sidebar nav - dark text (not gray), explicit hover */
.pf-v5-c-page__sidebar,
.pf-v5-c-page__sidebar a,
.pf-v5-c-page__sidebar .pf-v5-c-nav__link,
.pf-v5-c-page__sidebar .pf-v5-c-nav__item,
.pf-v5-c-page__sidebar .pf-v5-c-nav__list,
.pf-v5-c-page__sidebar button,
.pf-v5-c-page__sidebar [class*="nav"] {
  color: #FFFFFF !important;
  background-color: #252D42 !important;
  --pf-v5-global--Color--100: #252D42 !important;
  --pf-v5-global--Color--200: #252D42 !important;
  --pf-v5-c-nav__link--Color: #252D42 !important;
  --pf-v5-c-nav__link--m-current--Color: #252D42 !important;
}
.pf-v5-c-page__sidebar a:hover,
.pf-v5-c-page__sidebar .pf-v5-c-nav__link:hover,
.pf-v5-c-page__sidebar .pf-v5-c-nav__link.pf-m-hover:hover {
  color: #5294EB !important;
  background-color: #E5E7EB !important;
  --pf-v5-c-nav__link--hover--BackgroundColor: #E5E7EB !important;
  --pf-v5-c-nav__link--hover--Color: #5294EB !important;
}
.pf-v5-c-page__sidebar .pf-v5-c-nav__link.pf-m-current,
.pf-v5-c-page__sidebar .pf-v5-c-nav__item .pf-m-current {
  color: #252D42 !important;
  background-color: #E5E7EB !important;
}

/* Tabs (Themes, General, etc.) - dark text and hover */
.pf-v5-c-tabs__link,
.pf-v5-c-tabs__item button {
  color: #252D42 !important;
}
.pf-v5-c-tabs__link:hover,
.pf-v5-c-tabs__item button:hover {
  color: #5294EB !important;
}
.pf-v5-c-tabs__link.pf-m-current {
  color: #252D42 !important;
  border-bottom-color: #252D42 !important;
}

/* Replace Keycloak logo with Onterris logo in masthead */
.pf-v5-c-masthead__brand,
.pf-v5-c-masthead .pf-v5-c-brand,
.pf-v5-c-masthead [class*="brand"] {
  background-image: url("../img/Onterris_Negative_Logo_TM_RGB.svg") !important;
  background-repeat: no-repeat !important;
  background-position: left center !important;
  background-size: contain !important;
  min-height: 40px !important;
  min-width: 120px !important;
  width: 120px !important;
  height: 40px !important;
  display: block !important;
  font-size: 0 !important;
  color: transparent !important;
  text-indent: -9999px !important;
  overflow: hidden !important;
}
.pf-v5-c-masthead__brand img,
.pf-v5-c-masthead .pf-v5-c-brand img,
.pf-v5-c-masthead [class*="brand"] img {
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  position: absolute !important;
}
/* Fallback: if brand is a link, ensure it has size */
.pf-v5-c-masthead__brand a,
.pf-v5-c-masthead .pf-v5-c-brand a {
  display: block !important;
  min-height: 150px !important;
  min-width: 120px !important;
  background-image: url("../img/Onterris_Negative_Logo_TM_RGB.svg") !important;
  background-repeat: no-repeat !important;
  background-position: left center !important;
  background-size: contain !important;
}

/* Primary actions / buttons align with brand */
.pf-v5-c-button.pf-m-primary {
  --pf-v5-c-button--m-primary--BackgroundColor: #252D42 !important;
  --pf-v5-c-button--m-primary--Color: #FFFFFF !important;
}

.pf-v5-c-button.pf-m-primary:hover {
  --pf-v5-c-button--m-primary--hover--BackgroundColor: #1a1f2e !important;
}

.pf-v5-c-page__sidebar-body{
  border-right: 1px solid var(--onterris-border);
}

.pf-v5-c-nav__section-title {
  font-weight: 600;
  background-color: #252D42 !important;
  color: #FFFFFF !important; 
}