/* Nexus Documentation Theme */
/* Based on Nexus Portal Theme Colors and Styling */
/* Inspired by CASP Design Language */

/* ============================================
   CSS Custom Properties (Design Tokens)
   ============================================ */
:root,
[data-bs-theme="light"] {
  /* Background Colors - Light Mode */
  --nexus-body-bg: #f8f9fc;

  /* Nexus Brand Colors - Light Mode */
  --nexus-primary: rgb(83, 28, 179);
  --nexus-primary-hover: rgb(66, 22, 143);
  --nexus-primary-rgb: 83, 28, 179;
  --nexus-secondary: #858796;
  --nexus-success: #1cc88a;
  --nexus-info: #36b9cc;
  --nexus-warning: #f6c23e;
  --nexus-danger: #e74a3b;

  /* Semantic Colors - Light Mode */
  --nexus-body-color: #5a5c69;
  --nexus-heading-color: #3a3b45;
  --nexus-border-color: #dddfeb;

  /* Card Colors - Light Mode */
  --nexus-card-bg: #ffffff;
  --nexus-card-bg-hover: #ffffff;
  --nexus-card-border: #dddfeb;
  --nexus-card-header-bg: #f8f9fc;

  /* Typography */
  --nexus-font-family: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Shadows - Light Mode */
  --nexus-shadow-sm: 0 0.125rem 0.25rem 0 rgba(58, 59, 69, 0.2);
  --nexus-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
  --nexus-shadow-hover: 0 0.5rem 2rem 0 rgba(58, 59, 69, 0.2);

  /* Border Radius */
  --nexus-border-radius: 0.35rem;
  --nexus-border-radius-sm: 0.25rem;

  /* Force white nav links for purple navbar background */
  --bs-nav-link-color: rgb(0,0,0);
  --bs-nav-link-hover-color: rgba(0, 0, 0, 0.8);
  --bs-navbar-color: #ffffff;
  --bs-navbar-hover-color: rgba(0, 0, 0, 0.8);
  --bs-navbar-active-color: #ffffff;
}

/* ============================================
   Dark Mode
   ============================================ */
[data-bs-theme="dark"] {
  /* Background Colors - Dark Mode */
  --nexus-body-bg: #1a1d20;

  /* Brand Colors - Dark Mode */
  --nexus-primary: rgb(168, 85, 247);
  --nexus-primary-hover: rgb(147, 51, 234);
  --nexus-primary-rgb: 168, 85, 247;
  --nexus-secondary: #a7acb1;
  --nexus-success: #75b798;
  --nexus-info: #6edff6;
  --nexus-warning: #ffda6a;
  --nexus-danger: #ea868f;

  /* Semantic Colors - Dark Mode */
  --nexus-body-color: #dee2e6;
  --nexus-heading-color: #eaecf4;
  --nexus-border-color: #495057;

  /* Card Colors - Dark Mode */
  --nexus-card-bg: #2b3035;
  --nexus-card-bg-hover: #343a40;
  --nexus-card-border: #495057;
  --nexus-card-header-bg: #343a40;

  /* Shadows - Dark Mode */
  --nexus-shadow-sm: 0 0.125rem 0.25rem 0 rgba(0, 0, 0, 0.4);
  --nexus-shadow: 0 0.15rem 1.75rem 0 rgba(0, 0, 0, 0.3);
  --nexus-shadow-hover: 0 0.5rem 2rem 0 rgba(0, 0, 0, 0.4);

  /* Force white nav links for purple navbar background */
  --bs-nav-link-color: #ffffff;
  --bs-nav-link-hover-color: rgba(255, 255, 255, 0.8);
  --bs-navbar-color: #ffffff;
  --bs-navbar-hover-color: rgba(255, 255, 255, 0.8);
  --bs-navbar-active-color: #ffffff;
}

/* Apply colors directly to navigation elements */
.navbar .nav-link,
.navbar-nav .nav-link {
  color: #ffffff !important;
}

.navbar .nav-link:hover,
.navbar-nav .nav-link:hover,
.nav-link:hover {
  color: rgba(255, 255, 255, 0.8) !important;
}

.navbar .nav-link.active,
.navbar-nav .nav-link.active {
  color: #ffffff !important;
}

/* Navbar text */
.navbar,
.navbar-brand,
.navbar-text {
  color: #ffffff !important;
}

.navbar-brand:hover {
  color: rgba(255, 255, 255, 0.8) !important;
}

    .navbar .btn {
        color: #ffffff !important;
    }

    .navbar .dropdown-menu {
        color: rgba(255, 255, 255, 0.8) !important;
    }

/* ============================================
   Global Typography & Body Styling
   ============================================ */
body {
  font-family: var(--nexus-font-family);
  color: var(--nexus-body-color);
  background-color: var(--nexus-body-bg);
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 400;
  color: var(--nexus-heading-color);
}

/* ============================================
   Links
   ============================================ */
a {
  color: var(--nexus-primary);
  text-decoration: none;
}

a:hover {
  color: var(--nexus-primary-hover);
  text-decoration: underline;
}

/* ============================================
   Cards
   ============================================ */
.card {
  background-color: var(--nexus-card-bg);
  border: 1px solid var(--nexus-card-border);
  border-radius: var(--nexus-border-radius);
  box-shadow: var(--nexus-shadow);
  margin-bottom: 1.5rem;
  color: var(--nexus-body-color);
  transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.card-header {
  background-color: var(--nexus-card-header-bg);
  border-bottom: 1px solid var(--nexus-border-color);
  padding: 0.75rem 1.25rem;
  border-radius: var(--nexus-border-radius) var(--nexus-border-radius) 0 0;
}

.card-header h5,
.card-header h6 {
  font-size: 1.1rem;
  margin: 0;
  color: var(--nexus-heading-color);
}

.card-body {
  padding: 1.25rem;
}

.card-title {
  font-weight: 600;
  margin-bottom: 0.75rem;
}

/* Card text colors */
.text-primary {
  color: var(--nexus-primary) !important;
}

.text-secondary {
  color: var(--nexus-secondary) !important;
}

.text-muted {
  color: var(--nexus-gray-600) !important;
}

/* ============================================
   Landing Page Cards
   ============================================ */
.card.h-100 {
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.card.h-100:hover {
  transform: translateY(-4px);
  background-color: var(--nexus-card-bg-hover);
  box-shadow: var(--nexus-shadow-hover);
}

.card.border-0 {
  border: 0;
}

.card.shadow-sm {
  box-shadow: var(--nexus-shadow-sm);
}

/* ============================================
   Lists
   ============================================ */
.list-unstyled {
  padding-left: 0;
  list-style: none;
}

.list-unstyled li {
  margin-bottom: 0.5rem;
}

.list-unstyled li a {
  display: flex;
  align-items: center;
  color: var(--nexus-body-color);
  transition: color 0.2s ease;
}

.list-unstyled li a:hover {
  color: var(--nexus-primary);
  text-decoration: none;
}

.list-unstyled li a i {
  color: var(--nexus-primary);
  transition: transform 0.2s ease;
}

.list-unstyled li a:hover i {
  transform: translateX(4px);
}

/* ============================================
   Alerts
   ============================================ */
.alert-danger > p {
  color: var(--nexus-danger);
}

.alert {
  border-radius: var(--nexus-border-radius);
  padding: 0.75rem 1.25rem;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  border-radius: var(--nexus-border-radius);
  font-weight: 400;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-primary {
  background-color: var(--nexus-primary);
  border-color: var(--nexus-primary);
  color: white;
}

.btn-primary:hover {
  background-color: var(--nexus-primary-hover);
  border-color: var(--nexus-primary-hover);
  color: white;
}

/* ============================================
   Bootstrap Grid Enhancements (Styling Only)
   ============================================ */
.row.g-4 > * {
  margin-bottom: 1.5rem;
}

/* ============================================
   Modern Theme Article Customization
   ============================================ */
article h2 {
  margin-top: 2rem;
  padding: 1rem;
  border-left: 4px solid var(--nexus-primary);
  color: var(--nexus-heading-color);
}

article ul {
  list-style: none;
  padding-left: 1rem;
}

article ul li {
  padding: 0.5rem 0;
}

article ul li a {
  text-decoration: none;
  font-weight: 500;
  color: var(--nexus-body-color);
}

article ul li a:hover {
  color: var(--nexus-primary);
  text-decoration: underline;
}

/* ============================================
   Code Blocks
   ============================================ */
code {
  color: #e83e8c;
  background-color: var(--nexus-card-header-bg);
  padding: 0.2rem 0.4rem;
  border-radius: 0.5rem;
  font-size: 87.5%;
}

[data-bs-theme="dark"] code {
  color: #e685b5;
}

pre {
  background-color: var(--nexus-card-header-bg);
  border: 1px solid var(--nexus-border-color);
  border-radius: var(--nexus-border-radius);
  padding: 1rem;
  color: var(--nexus-body-color);
}

pre code {
  background-color: transparent;
  padding: 0;
}

/* ============================================
   Content Container Styling
   ============================================ */
.container,
.container-fluid {
  position: relative;
  z-index: 1;
}

/* Main content area */
article.content {
  background-color: var(--nexus-card-bg);
  border: 1px solid var(--nexus-card-border);
  border-radius: var(--nexus-border-radius);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--nexus-shadow);
}

/* ============================================
   Anchor Links (DocFX Generated)
   ============================================ */
/* Hide anchor links in card titles */
.card-title .anchorjs-link {
  display: none !important;
}

/* Style anchor links in article headings */
article h2 .anchorjs-link,
article h3 .anchorjs-link,
article h4 .anchorjs-link,
article h5 .anchorjs-link,
article h6 .anchorjs-link {
  opacity: 0;
  transition: opacity 0.2s ease;
}

article h2:hover .anchorjs-link,
article h3:hover .anchorjs-link,
article h4:hover .anchorjs-link,
article h5:hover .anchorjs-link,
article h6:hover .anchorjs-link {
  opacity: 0.5;
}

article h2 .anchorjs-link:hover,
article h3 .anchorjs-link:hover,
article h4 .anchorjs-link:hover,
article h5 .anchorjs-link:hover,
article h6 .anchorjs-link:hover {
  opacity: 1;
  color: var(--nexus-primary);
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
  .card {
    margin-bottom: 1rem;
  }

  .card-body {
    padding: 1rem;
  }

  article.content {
    padding: 1.5rem;
  }
}

.bg-body {
    background-color: rgb(83,28,179) !important;
}


/* ============================================
   Logo Styling
   ============================================ */
#logo {
    max-height: 2.5rem;
    height: auto;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    display: block;
}

/* Navbar logo container */
.navbar-brand #logo,
.navbar #logo {
    max-height: 3.5rem;
    transition: opacity 0.3s ease;
}

.navbar-brand:hover #logo,
.navbar:hover #logo {
    opacity: 0.8;
}

/* Adjust for different navbar heights */
.navbar-nav #logo {
    max-height: 1.8rem;
}

/* Mobile responsive logo */
@media (max-width: 768px) {
    #logo {
        max-height: 2rem;
        max-width: 150px;
    }
}