/* Official FaxCore Brand Stylesheet */
:root {
  /* Official FaxCore Palette */
  --fxc-blue: #537DB5;        /* Logo Blue */
  --fxc-dark-blue: #0B3348;   /* Dark Blue */
  --fxc-white: #FFFFFF;       /* White */
  --fxc-dark-grey: #333333;   /* Dark Grey */
  --fxc-orange: #FF9326;      /* Orange Accent */

  --bs-primary: #537DB5;
  --bs-primary-rgb: 83, 125, 181;
  --bs-link-color: #537DB5;
  --bs-link-hover-color: #0B3348;
  --bs-body-color: #333333;
  --fxc-light: #f8fafc;
  --fxc-border: #e2e8f0;
}

[data-bs-theme="dark"] {
  --bs-primary: #6c95cc;
  --bs-primary-rgb: 108, 149, 204;
  --bs-link-color: #82a8dc;
  --bs-link-hover-color: #FF9326;
  --bs-body-color: #e2e8f0;
  --fxc-dark: #0f172a;
  --fxc-slate: #1e293b;
  --fxc-light: #1e293b;
  --fxc-border: #334155;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: -0.01em;
  color: var(--bs-body-color);
}

/* Header & Navbar - FaxCore Dark Blue */
.navbar {
  background-color: var(--fxc-dark-blue) !important;
  box-shadow: 0 2px 4px 0 rgba(11, 51, 72, 0.15);
  border-bottom: 2px solid var(--fxc-blue) !important;
}

.navbar .navbar-brand,
.navbar .nav-link {
  color: #f8fafc !important;
  font-weight: 500;
}

.navbar .nav-link:hover {
  color: var(--fxc-orange) !important;
}

.navbar .navbar-brand {
  font-size: 0 !important;
  line-height: 0 !important;
  display: inline-flex;
  align-items: center;
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
  margin-right: 2rem;
}

.navbar-brand img {
  height: 28px !important;
  margin-right: 0 !important;
  display: block;
}

/* Header & Navbar - Theme Switcher Button & Dropdown */
.navbar .btn:not(.dropdown-item),
.navbar .dropdown-toggle,
.navbar a.dropdown-toggle,
.navbar .btn-lg {
  color: #f8fafc !important;
  opacity: 0.95;
  transition: color 0.15s ease, opacity 0.15s ease;
}

.navbar .btn:not(.dropdown-item):hover,
.navbar .dropdown-toggle:hover,
.navbar a.dropdown-toggle:hover,
.navbar .btn:not(.dropdown-item):focus,
.navbar .dropdown-toggle:focus {
  color: var(--fxc-orange) !important;
  opacity: 1;
}

.navbar .dropdown-toggle::after {
  border-top-color: currentColor !important;
}

.navbar .dropdown-menu {
  border: 1px solid var(--fxc-border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.navbar .dropdown-menu .dropdown-item {
  color: var(--bs-dropdown-link-color, var(--bs-body-color)) !important;
  font-weight: 500;
  padding: 0.45rem 1rem;
}

.navbar .dropdown-menu .dropdown-item i {
  margin-right: 0.5rem;
}

.navbar .dropdown-menu .dropdown-item:hover,
.navbar .dropdown-menu .dropdown-item:focus {
  background-color: rgba(83, 125, 181, 0.12) !important;
  color: var(--fxc-blue) !important;
}

[data-bs-theme="dark"] .navbar .dropdown-menu .dropdown-item:hover,
[data-bs-theme="dark"] .navbar .dropdown-menu .dropdown-item:focus {
  background-color: rgba(83, 125, 181, 0.25) !important;
  color: #93c5fd !important;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  color: var(--fxc-dark-blue);
  letter-spacing: -0.02em;
}

[data-bs-theme="dark"] h1,
[data-bs-theme="dark"] h2,
[data-bs-theme="dark"] h3,
[data-bs-theme="dark"] h4,
[data-bs-theme="dark"] h5,
[data-bs-theme="dark"] h6 {
  color: #f1f5f9;
}

h1 {
  border-bottom: 2.5px solid var(--fxc-blue);
  padding-bottom: 0.4rem;
  margin-bottom: 1.5rem;
}

/* Callouts / Alerts */
.alert {
  border-radius: 8px;
  border-width: 1px 1px 1px 4px;
  border-style: solid;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}

.alert h5 {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-top: 0;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
}

.alert h5::before {
  font-size: 1.2em;
  margin-right: 0.5rem;
  line-height: 1;
}

/* Light Mode Alerts */
.alert-tip, .alert-info, .TIP, .NOTE {
  border-color: #bfdbfe;
  border-left-color: var(--fxc-blue) !important;
  border-left-width: 5px !important;
  background-color: rgba(83, 125, 181, 0.08) !important;
  color: #1e3a5f;
}

.alert-tip h5, .alert-info h5, .TIP h5, .NOTE h5 {
  color: #1d4ed8 !important;
}

.alert-warning, .WARNING {
  border-color: #fde68a;
  border-left-color: var(--fxc-orange) !important;
  border-left-width: 5px !important;
  background-color: rgba(255, 147, 38, 0.09) !important;
  color: #78350f;
}

.alert-warning h5, .WARNING h5 {
  color: #b45309 !important;
}

.alert-danger, .IMPORTANT, .CAUTION {
  border-color: #fecaca;
  border-left-color: #ef4444 !important;
  border-left-width: 5px !important;
  background-color: rgba(239, 68, 68, 0.08) !important;
  color: #7f1d1d;
}

.alert-danger h5, .IMPORTANT h5, .CAUTION h5 {
  color: #b91c1c !important;
}

/* Dark Mode Alerts (Vibrant, high-contrast, perfectly legible) */
[data-bs-theme="dark"] .alert {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

[data-bs-theme="dark"] .alert-tip,
[data-bs-theme="dark"] .alert-info,
[data-bs-theme="dark"] .TIP,
[data-bs-theme="dark"] .NOTE {
  background-color: rgba(56, 189, 248, 0.1) !important;
  border-color: rgba(56, 189, 248, 0.25) !important;
  border-left-color: #38bdf8 !important;
  border-left-width: 5px !important;
  color: #e2e8f0 !important;
}

[data-bs-theme="dark"] .alert-tip h5,
[data-bs-theme="dark"] .alert-info h5,
[data-bs-theme="dark"] .TIP h5,
[data-bs-theme="dark"] .NOTE h5 {
  color: #38bdf8 !important;
}

[data-bs-theme="dark"] .alert-tip h5::before,
[data-bs-theme="dark"] .alert-info h5::before,
[data-bs-theme="dark"] .TIP h5::before,
[data-bs-theme="dark"] .NOTE h5::before {
  color: #38bdf8 !important;
}

[data-bs-theme="dark"] .alert-warning,
[data-bs-theme="dark"] .WARNING {
  background-color: rgba(251, 191, 36, 0.1) !important;
  border-color: rgba(251, 191, 36, 0.25) !important;
  border-left-color: #fbbf24 !important;
  border-left-width: 5px !important;
  color: #fef3c7 !important;
}

[data-bs-theme="dark"] .alert-warning h5,
[data-bs-theme="dark"] .WARNING h5 {
  color: #fbbf24 !important;
}

[data-bs-theme="dark"] .alert-warning h5::before,
[data-bs-theme="dark"] .WARNING h5::before {
  color: #fbbf24 !important;
}

[data-bs-theme="dark"] .alert-danger,
[data-bs-theme="dark"] .IMPORTANT,
[data-bs-theme="dark"] .CAUTION {
  background-color: rgba(248, 113, 113, 0.1) !important;
  border-color: rgba(248, 113, 113, 0.25) !important;
  border-left-color: #f87171 !important;
  border-left-width: 5px !important;
  color: #fee2e2 !important;
}

[data-bs-theme="dark"] .alert-danger h5,
[data-bs-theme="dark"] .IMPORTANT h5,
[data-bs-theme="dark"] .CAUTION h5 {
  color: #f87171 !important;
}

[data-bs-theme="dark"] .alert-danger h5::before,
[data-bs-theme="dark"] .IMPORTANT h5::before,
[data-bs-theme="dark"] .CAUTION h5::before {
  color: #f87171 !important;
}

[data-bs-theme="dark"] .alert p,
[data-bs-theme="dark"] .alert li {
  color: inherit;
}

[data-bs-theme="dark"] .alert strong {
  color: #ffffff;
}

[data-bs-theme="dark"] .alert a {
  text-decoration: underline;
  font-weight: 600;
}

[data-bs-theme="dark"] .alert-info a,
[data-bs-theme="dark"] .TIP a,
[data-bs-theme="dark"] .NOTE a {
  color: #93c5fd !important;
}

[data-bs-theme="dark"] .alert-warning a,
[data-bs-theme="dark"] .WARNING a {
  color: #fde68a !important;
}

[data-bs-theme="dark"] .alert-danger a,
[data-bs-theme="dark"] .IMPORTANT a,
[data-bs-theme="dark"] .CAUTION a {
  color: #fca5a5 !important;
}

/* Code blocks */
pre {
  border-radius: 8px;
  border: 1px solid var(--fxc-border);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

/* Tables */
.table {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.04);
}

.table thead th {
  background-color: rgba(11, 51, 72, 0.06);
  color: var(--fxc-dark-blue);
  font-weight: 600;
  border-bottom: 2px solid var(--fxc-blue);
}

[data-bs-theme="dark"] .table thead th {
  background-color: rgba(83, 125, 181, 0.15);
  color: #e2e8f0;
}

/* Images & Screenshots */
article img {
  border-radius: 6px;
  border: 1px solid var(--fxc-border);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  margin: 1.2rem 0;
  max-width: 100%;
  height: auto;
}

/* Badges & Accent Buttons */
.badge-fxc {
  background-color: var(--fxc-blue);
  color: #fff;
  font-weight: 600;
  padding: 0.35em 0.65em;
  border-radius: 4px;
}

.btn,
article a.btn {
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  border-radius: 6px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Suppress DocFX external link underline & arrow icon on buttons */
.btn::after,
article a.btn::after,
article a.btn.external::after,
a.external.btn::after {
  display: none !important;
  content: none !important;
}

.btn-primary,
article a.btn-primary {
  background-color: var(--fxc-dark-blue);
  border-color: var(--fxc-dark-blue);
  color: #ffffff !important;
  text-decoration: none !important;
}

.btn-primary:hover,
article a.btn-primary:hover {
  background-color: var(--fxc-blue);
  border-color: var(--fxc-blue);
  color: #ffffff !important;
  text-decoration: none !important;
}

/* Dark Mode - Rich, vibrant, high-contrast primary button */
[data-bs-theme="dark"] .btn-primary,
[data-bs-theme="dark"] article a.btn-primary {
  background: linear-gradient(180deg, #2b6cb0 0%, #1d4d82 100%) !important;
  border: 1px solid #4a88cc !important;
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3), 0 0 12px rgba(43, 108, 176, 0.2) !important;
  text-decoration: none !important;
}

[data-bs-theme="dark"] .btn-primary:hover,
[data-bs-theme="dark"] article a.btn-primary:hover {
  background: linear-gradient(180deg, #3780d1 0%, #255c9b 100%) !important;
  border-color: #63a2ed !important;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35), 0 0 16px rgba(55, 128, 209, 0.35) !important;
  text-decoration: none !important;
}

[data-bs-theme="dark"] .btn-primary i,
[data-bs-theme="dark"] article a.btn-primary i {
  color: #ffffff !important;
}

[data-bs-theme="dark"] .btn-outline-primary,
[data-bs-theme="dark"] article a.btn-outline-primary {
  color: #93c5fd !important;
  border-color: #3b82f6 !important;
  text-decoration: none !important;
}

[data-bs-theme="dark"] .btn-outline-primary:hover,
[data-bs-theme="dark"] article a.btn-outline-primary:hover {
  background-color: #1d4ed8 !important;
  border-color: #3b82f6 !important;
  color: #ffffff !important;
  text-decoration: none !important;
}

/* Spruced-Up Next / Previous Article Pager Links (Full Interactive Hotspot Cards) */
#nextArticle:empty {
  display: none !important;
  border: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

#nextArticle {
  display: flex !important;
  justify-content: space-between;
  gap: 16px;
  padding-top: 24px;
  margin-top: 48px;
  border-top: 2px solid var(--fxc-border) !important;
}

#nextArticle .prev,
#nextArticle .next {
  flex: 1;
  max-width: 48%;
  display: flex;
  flex-direction: column;
  background: var(--bs-body-bg);
  border: 1.5px solid var(--fxc-border);
  border-radius: 10px;
  padding: 14px 18px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  position: relative;
  cursor: pointer;
}

#nextArticle .next {
  margin-left: auto;
  text-align: right;
  align-items: flex-end;
}

#nextArticle .prev {
  text-align: left;
  align-items: flex-start;
}

#nextArticle .prev:hover,
#nextArticle .next:hover {
  border-color: var(--fxc-orange);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(11, 51, 72, 0.08);
}

#nextArticle .prev:active,
#nextArticle .next:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(11, 51, 72, 0.06);
}

#nextArticle .prev:focus-within,
#nextArticle .next:focus-within {
  border-color: var(--fxc-orange);
  outline: 2px solid var(--fxc-blue);
  outline-offset: 2px;
}

#nextArticle span {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--fxc-orange);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: none;
  transition: color 0.2s ease;
}

#nextArticle span i {
  font-size: 13px;
  display: inline-block;
  transition: transform 0.2s ease;
}

#nextArticle .prev:hover span i.bi-chevron-left {
  transform: translateX(-4px);
}

#nextArticle .next:hover span i.bi-chevron-right {
  transform: translateX(4px);
}

#nextArticle a {
  font-size: 15px;
  font-weight: 600;
  color: var(--fxc-dark-blue) !important;
  text-decoration: none !important;
  line-height: 1.35;
}

/* Stretched Hotspot: Expands the link hitbox over the entire card area including the < Previous / Next > labels */
#nextArticle .prev a::after,
#nextArticle .next a::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 10;
  cursor: pointer;
}

#nextArticle .prev:hover a,
#nextArticle .next:hover a {
  color: var(--fxc-blue) !important;
}

#nextArticle .prev:hover span,
#nextArticle .next:hover span {
  color: var(--fxc-dark-blue);
}

[data-bs-theme="dark"] #nextArticle .prev,
[data-bs-theme="dark"] #nextArticle .next {
  background: rgba(30, 41, 59, 0.7);
  border-color: #334155;
}

[data-bs-theme="dark"] #nextArticle a {
  color: #f1f5f9 !important;
}

[data-bs-theme="dark"] #nextArticle .prev:hover a,
[data-bs-theme="dark"] #nextArticle .next:hover a {
  color: #93c5fd !important;
}

[data-bs-theme="dark"] #nextArticle .prev:hover span,
[data-bs-theme="dark"] #nextArticle .next:hover span {
  color: #f8fafc;
}

/* ==========================================================================
   Accessibility & WCAG AA Contrast Compliance (Ratios >= 4.5:1)
   ========================================================================== */

/* Darken muted and secondary text so contrast is >= 4.5:1 (Bootstrap default is 4.48:1) */
.text-secondary,
.text-muted {
  color: #495057 !important; /* Contrast on white: 7.0:1 (passes AAA) */
}

/* Footer text & links */
footer .text-secondary {
  color: #3f474e !important; /* Contrast on bg-body-tertiary: 6.8:1 */
}

footer a.text-secondary {
  color: #3f474e !important;
}

footer a.text-secondary:hover {
  color: #0d6efd !important;
  text-decoration: underline !important;
}

/* Success badge in meta header */
.badge.bg-success-subtle {
  background-color: #d1e7dd !important;
  color: #0f5132 !important; /* Contrast: 7.2:1 */
}

/* Dark mode accessibility overrides */
[data-bs-theme="dark"] .text-secondary,
[data-bs-theme="dark"] .text-muted,
[data-bs-theme="dark"] footer .text-secondary,
[data-bs-theme="dark"] footer a.text-secondary {
  color: #cbd5e1 !important; /* Contrast on dark: > 9:1 */
}

[data-bs-theme="dark"] .badge.bg-success-subtle {
  background-color: #0f5132 !important;
  color: #d1e7dd !important;
}

