/*--------------------------------------------------------------
# Brand palette theme
# Only loaded when the page's Library/Home has a Brand Palette (see Views/Partials/BrandPaletteTheme.cshtml),
# which declares --eo-palette-{dark,primary,secondary,tertiary,light} on :root. Each role falls back to the
# NiceAdmin default so a partly filled palette still looks right. Custom CSS loads after this and wins.
--------------------------------------------------------------*/
:root {
  --eo-theme-dark: var(--eo-palette-dark, #012970);
  --eo-theme-primary: var(--eo-palette-primary, #4154f1);
  --eo-theme-primary-shade: color-mix(in srgb, var(--eo-theme-primary) 80%, #000);
  --eo-theme-secondary: var(--eo-palette-secondary, #f6f9ff);
  --eo-theme-tertiary: var(--eo-palette-tertiary, #899bbd);
  --eo-theme-light: var(--eo-palette-light, #ffffff);
}

/* Text & headings */
body,
.card-body {
  color: var(--eo-theme-dark);
}

h1, h2, h3, h4, h5,
.card-title {
  color: var(--eo-theme-primary);
}

/* Buttons */
.btn-primary,
.btn-success {
  --bs-btn-color: var(--eo-theme-light);
  --bs-btn-bg: var(--eo-theme-primary);
  --bs-btn-border-color: var(--eo-theme-primary);
  --bs-btn-hover-color: var(--eo-theme-light);
  --bs-btn-hover-bg: var(--eo-theme-primary-shade);
  --bs-btn-hover-border-color: var(--eo-theme-primary-shade);
  --bs-btn-active-color: var(--eo-theme-light);
  --bs-btn-active-bg: var(--eo-theme-primary-shade);
  --bs-btn-active-border-color: var(--eo-theme-primary-shade);
  --bs-btn-focus-shadow-rgb: var(--eo-palette-primary-rgb, 65, 84, 241);
}

.btn-secondary {
  --bs-btn-color: var(--eo-theme-light);
  --bs-btn-bg: var(--eo-theme-tertiary);
  --bs-btn-border-color: var(--eo-theme-tertiary);
  --bs-btn-hover-color: var(--eo-theme-light);
  --bs-btn-hover-bg: color-mix(in srgb, var(--eo-theme-tertiary) 80%, #000);
  --bs-btn-hover-border-color: color-mix(in srgb, var(--eo-theme-tertiary) 80%, #000);
  --bs-btn-active-color: var(--eo-theme-light);
  --bs-btn-active-bg: color-mix(in srgb, var(--eo-theme-tertiary) 80%, #000);
  --bs-btn-active-border-color: color-mix(in srgb, var(--eo-theme-tertiary) 80%, #000);
}

.btn-outline-primary {
  --bs-btn-color: var(--eo-theme-primary);
  --bs-btn-border-color: var(--eo-theme-primary);
  --bs-btn-hover-color: var(--eo-theme-light);
  --bs-btn-hover-bg: var(--eo-theme-primary);
  --bs-btn-hover-border-color: var(--eo-theme-primary);
  --bs-btn-active-color: var(--eo-theme-light);
  --bs-btn-active-bg: var(--eo-theme-primary-shade);
  --bs-btn-active-border-color: var(--eo-theme-primary-shade);
}

.btn-primary,
.btn-success,
.btn-secondary,
.btn-outline-primary {
  --bs-btn-disabled-color: #fff;
  --bs-btn-disabled-bg: grey;
  --bs-btn-disabled-border-color: grey;
}

/* Bordered tabs */
.nav-tabs-bordered .nav-link:hover,
.nav-tabs-bordered .nav-link:focus {
  color: var(--eo-theme-primary);
}

.nav-tabs-bordered .nav-link.active {
  background-color: #fff;
  color: var(--eo-theme-primary-shade);
  border-bottom-color: var(--eo-theme-primary-shade);
}

/* Sidebar */
.sidebar-nav .nav-heading {
  color: var(--eo-theme-tertiary);
}

.sidebar-nav .nav-link,
.sidebar-nav .nav-link:hover {
  color: var(--eo-theme-primary);
  background: var(--eo-theme-secondary);
}

.sidebar-nav .nav-link i,
.sidebar-nav .nav-link:hover i {
  color: var(--eo-theme-primary);
}

.sidebar-nav .nav-link.collapsed {
  color: var(--eo-theme-dark);
  background: #fff;
}

.sidebar-nav .nav-link.collapsed i {
  color: var(--eo-theme-tertiary);
}

.sidebar-nav .nav-content a {
  color: var(--eo-theme-primary);
}

.sidebar-nav .nav-content a:hover,
.sidebar-nav .nav-content a.active {
  color: var(--eo-theme-primary-shade);
}

.sidebar-nav .nav-content a.active i {
  color: var(--eo-theme-primary-shade);
  background-color: var(--eo-theme-light);
}

/* Badges without an explicit bg-* colour */
.badge:not([class*="bg-"]):not([class*="text-bg-"]) {
  background-color: var(--eo-theme-primary);
  color: var(--eo-theme-light);
}

/* Information panels */
.information-panels--cards .information-panels__card,
.information-panels--flip-cards .information-panels__flip-card {
  --information-panel-accent: var(--eo-theme-dark);
}

.information-panels--cards .information-panels__card-title,
.information-panels--flip-cards .information-panels__flip-card-title {
  color: var(--eo-theme-light);
}

.information-panels--cards .information-panels__card--has-background .information-panels__card-footer::after,
.information-panels--flip-cards .information-panels__flip-card--has-background .information-panels__flip-card-front::after {
  background: rgba(0, 0, 0, 0.65);
}

.information-panels--flip-cards .information-panels__flip-card-title {
  position: relative;
  z-index: 1;
}
