/* ============================================================
   Niwro brand overrides for base_site / Hyper theme
   Primary colour: #8B5CF6 (violet-purple)
   Gradient:  #7BB3FF → #8B5CF6 → #EC4899
   ============================================================ */

/* --- CSS variable overrides (light mode) ------------------- */
:root {
    --ct-primary:                #8B5CF6;
    --ct-primary-rgb:            139, 92, 246;
    --ct-primary-text-emphasis:  #3b1fa8;
    --ct-primary-bg-subtle:      #f0ebfe;
    --ct-primary-border-subtle:  #c4adfa;
    --niwro-gradient: linear-gradient(135deg, #7BB3FF 0%, #8B5CF6 55%, #EC4899 100%);
}

/* --- CSS variable overrides (dark mode) -------------------- */
[data-bs-theme="dark"] {
    --ct-primary-text-emphasis:  #c4adfa;
    --ct-primary-bg-subtle:      rgba(139, 92, 246, 0.15);
    --ct-primary-border-subtle:  #6640d6;
}

/* --- Main site topbar ------------------------------------- */
.navbar-custom {
    background: var(--niwro-gradient) !important;
}

/* Make user pill and any remaining topbar elements transparent */
/* Also boost text contrast — 70% white is too faint on the gradient */
html[data-topbar-color=dark] {
    --ct-topbar-user-bg:          transparent;
    --ct-topbar-user-border:      rgba(255, 255, 255, 0.25);
    --ct-topbar-search-bg:        rgba(255, 255, 255, 0.15);
    --ct-topbar-item-color:       #ffffff;
    --ct-topbar-item-hover-color: #ffffff;
}

/* Ensure all topbar text, icons and dropdowns are white */
.navbar-custom .topbar-menu .nav-link,
.navbar-custom .topbar-menu .nav-link i,
.navbar-custom .button-toggle-menu,
.navbar-custom .nav-user,
.navbar-custom .nav-user * {
    color: #ffffff !important;
}

/* Dropdown menus spawned from topbar should revert to normal dark text */
.navbar-custom .dropdown-menu {
    color: initial;
}
.navbar-custom .dropdown-menu .dropdown-item {
    color: var(--ct-dropdown-color, #6c757d) !important;
}

/* --- Login / registration / error card header ------------- */
/* Targets the logo banner on login, password-reset, 403, 404 */
.card-header.bg-primary {
    background: var(--niwro-gradient) !important;
}

/* Logo sizing in card headers */
.card-header img {
    max-height: 120px;
    width: auto;
}
