/* ==========================================================================
   Syntax Highlighting: Visual Studio / VS Code style for C# and Code Blocks
   ========================================================================== */

/* --------------------------------------------------------------------------
   Dark Mode (Slate Theme) - inspired by VS Code Dark+ / Visual Studio Dark
   -------------------------------------------------------------------------- */
[data-md-color-scheme="slate"] {
  --md-code-hl-keyword-color: #569cd6;    /* VS Blue */
  --md-code-hl-string-color: #ce9178;     /* Warm Coral / Peach */
  --md-code-hl-number-color: #b5cea8;     /* Soft Mint Green */
  --md-code-hl-function-color: #dcdcaa;   /* Soft Yellow */
  --md-code-hl-constant-color: #4fc1ff;   /* Bright Cyan */
  --md-code-hl-variable-color: #9cdcfe;   /* Light Sky Blue */
  --md-code-hl-name-color: #9cdcfe;       /* Default Identifiers */
  --md-code-hl-comment-color: #6a9955;    /* Comment Green */
  --md-code-hl-operator-color: #d4d4d4;   /* Neutral Operator */
  --md-code-hl-punctuation-color: #d4d4d4;/* Neutral Punctuation */
}

/* Classes, Structs, Interfaces, Enums: Teal */
[data-md-color-scheme="slate"] .highlight .nc {
  color: #4ec9b0 !important;
}

/* Built-in language types (int, string, void, bool, double...): Teal */
[data-md-color-scheme="slate"] .highlight .kt {
  color: #4ec9b0 !important;
}

/* Methods and Function invocations: Yellow */
[data-md-color-scheme="slate"] .highlight .nf {
  color: #dcdcaa !important;
}

/* Properties, Fields, and Members: Light Cyan / Blue */
[data-md-color-scheme="slate"] .highlight .na,
[data-md-color-scheme="slate"] .highlight .py {
  color: #9cdcfe !important;
}

/* Variables and Parameters: Light Sky Blue */
[data-md-color-scheme="slate"] .highlight .nv {
  color: #9cdcfe !important;
}

/* Enum members and Constants: Cyan */
[data-md-color-scheme="slate"] .highlight .no {
  color: #4fc1ff !important;
}

/* Attributes: [STAThread], [FormAttribute(...)] */
[data-md-color-scheme="slate"] .highlight .nd {
  color: #4ec9b0 !important;
}

/* String interpolation braces { } */
[data-md-color-scheme="slate"] .highlight .si {
  color: #569cd6 !important;
  font-weight: bold;
}

/* Comments */
[data-md-color-scheme="slate"] .highlight .c,
[data-md-color-scheme="slate"] .highlight .c1,
[data-md-color-scheme="slate"] .highlight .cm,
[data-md-color-scheme="slate"] .highlight .cs {
  color: #6a9955 !important;
  font-style: italic;
}


/* --------------------------------------------------------------------------
   Light Mode (Default Theme) - inspired by VS Code Light+ / Visual Studio Light
   -------------------------------------------------------------------------- */
[data-md-color-scheme="default"] {
  --md-code-hl-keyword-color: #0000ff;    /* Pure Blue */
  --md-code-hl-string-color: #a31515;     /* Dark Crimson Red */
  --md-code-hl-number-color: #098658;     /* Dark Emerald Green */
  --md-code-hl-function-color: #795e26;   /* Warm Golden Brown */
  --md-code-hl-constant-color: #0070c1;   /* Medium Blue / Cyan */
  --md-code-hl-variable-color: #001080;   /* Deep Navy */
  --md-code-hl-name-color: #001080;       /* Default Identifiers */
  --md-code-hl-comment-color: #008000;    /* Forest Green */
  --md-code-hl-operator-color: #222222;   /* Dark Grey */
  --md-code-hl-punctuation-color: #222222;/* Dark Grey */
}

/* Classes, Structs, Interfaces, Enums: Teal */
[data-md-color-scheme="default"] .highlight .nc {
  color: #267f99 !important;
}

/* Built-in language types (int, string, void, bool, double...): Blue */
[data-md-color-scheme="default"] .highlight .kt {
  color: #0000ff !important;
}

/* Methods and Function invocations: Warm Golden Brown */
[data-md-color-scheme="default"] .highlight .nf {
  color: #795e26 !important;
}

/* Properties, Fields, and Members: Deep Navy */
[data-md-color-scheme="default"] .highlight .na,
[data-md-color-scheme="default"] .highlight .py {
  color: #001080 !important;
}

/* Variables and Parameters: Deep Navy */
[data-md-color-scheme="default"] .highlight .nv {
  color: #001080 !important;
}

/* Enum members and Constants: Medium Blue / Cyan */
[data-md-color-scheme="default"] .highlight .no {
  color: #0070c1 !important;
}

/* Attributes: [STAThread] */
[data-md-color-scheme="default"] .highlight .nd {
  color: #267f99 !important;
}

/* String interpolation braces { } */
[data-md-color-scheme="default"] .highlight .si {
  color: #0000ff !important;
  font-weight: bold;
}

/* Comments */
[data-md-color-scheme="default"] .highlight .c,
[data-md-color-scheme="default"] .highlight .c1,
[data-md-color-scheme="default"] .highlight .cm,
[data-md-color-scheme="default"] .highlight .cs {
  color: #008000 !important;
  font-style: italic;
}

/* ==========================================================================
   Clean XML Tag Tree Toggles (No admonition box, reliable arrow, header highlight)
   ========================================================================== */
.md-typeset .xml-tags details,
.md-typeset details.clean-toggle {
  display: block !important;
  border: none !important;
  border-left: none !important;
  box-shadow: none !important;
  background: transparent !important;
  margin: 0.25rem 0 0.25rem 0.8rem !important;
  padding: 0 !important;
  font-size: inherit !important;
  color: inherit !important;
}

/* Summary: azzera padding a sinistra dell'icona penna ed evidenzia l'header */
.md-typeset .xml-tags details > summary,
.md-typeset details.clean-toggle > summary {
  display: flex !important;
  align-items: center !important;
  list-style: none !important;
  cursor: pointer !important;
  padding: 0.35rem 0.6rem !important;
  margin: 0.15rem 0 !important;
  background-color: var(--md-default-fg-color--lightest, rgba(0, 0, 0, 0.04)) !important;
  border-radius: 4px !important;
  font-weight: 600 !important;
  transition: background-color 0.15s ease !important;
}

/* Nasconde il marker nativo del browser */
.md-typeset .xml-tags details > summary::-webkit-details-marker,
.md-typeset details.clean-toggle > summary::-webkit-details-marker {
  display: none !important;
}

/* Rimpiazza completamente l'icona penna di Material con una freccia pulita */
.md-typeset .xml-tags details > summary::before,
.md-typeset details.clean-toggle > summary::before {
  display: inline-block !important;
  content: "▶" !important;
  font-size: 0.65em !important;
  margin-right: 0.5rem !important;
  transition: transform 0.15s ease !important;
  background: none !important;
  mask-image: none !important;
  -webkit-mask-image: none !important;
  width: auto !important;
  height: auto !important;
  position: static !important;
  color: inherit !important;
  opacity: 0.7 !important;
}

/* Ruota la freccia verso il basso quando aperto */
.md-typeset .xml-tags details[open] > summary::before,
.md-typeset details.clean-toggle[open] > summary::before {
  transform: rotate(90deg) !important;
}

/* Rimuove qualsiasi chevron a destra */
.md-typeset .xml-tags details > summary::after,
.md-typeset details.clean-toggle > summary::after {
  display: none !important;
  content: none !important;
}

/* Evidenziazione header tema scuro */
[data-md-color-scheme="slate"] .md-typeset .xml-tags details > summary,
[data-md-color-scheme="slate"] .md-typeset details.clean-toggle > summary {
  background-color: rgba(255, 255, 255, 0.06) !important;
}

/* Hover effect sull'header */
.md-typeset .xml-tags details > summary:hover,
.md-typeset details.clean-toggle > summary:hover {
  background-color: rgba(25, 118, 210, 0.08) !important;
}

[data-md-color-scheme="slate"] .md-typeset .xml-tags details > summary:hover,
[data-md-color-scheme="slate"] .md-typeset details.clean-toggle > summary:hover {
  background-color: rgba(255, 255, 255, 0.1) !important;
}

/* Spaziatura contenuto interno */
.md-typeset .xml-tags details > ul,
.md-typeset .xml-tags details > p {
  margin-left: 0.8rem !important;
}

/* Linea verticale a sinistra quando il toggle è aperto */
.md-typeset .xml-tags details[open],
.md-typeset details.clean-toggle[open] {
  border-left: 2px solid var(--md-default-fg-color--lighter, rgba(0, 0, 0, 0.12)) !important;
  padding-left: 0.6rem !important;
  margin-left: 0.5rem !important;
}

[data-md-color-scheme="slate"] .md-typeset .xml-tags details[open],
[data-md-color-scheme="slate"] .md-typeset details.clean-toggle[open] {
  border-left-color: rgba(255, 255, 255, 0.15) !important;
}





