/* =========================================
   Obsidian Publish Custom Theme
   Dark background + Pink accent + White text
   ========================================= */

/* ------------------------------
   Global variables and fonts
------------------------------ */
body {
  --font-text: "Courier New", monospace;
  --font-interface: "Courier New", monospace;
  --h1-font: "Courier New", monospace;
  --h2-font: "Courier New", monospace;

  --background-primary: #222222;
  --background-secondary: #333333;
  --text-primary: #ffffff;
  --text-secondary: #dddddd;
  --accent-color: #ffc1cb;
  --link-color: #ffc1cb;
}

/* ------------------------------
   Base styling
------------------------------ */
.published-container {
  background-color: var(--background-primary);
  color: var(--text-primary);
  font-family: var(--font-text);
}

/* Force white text globally */
.published-container,
.published-container * {
  color: #ffffff !important;
}

/* Headings */
.published-container h1,
.published-container h2,
.published-container h3,
.published-container h4,
.published-container h5,
.published-container h6 {
  font-family: var(--font-text);
  color: var(--accent-color) !important;
  margin-top: 1em;
}

/* Links */
.published-container a {
  color: var(--link-color) !important;
  text-decoration: none;
}
.published-container a:hover {
  text-decoration: underline;
}

/* Blockquotes */
.published-container blockquote {
  border-left: 4px solid var(--accent-color);
  padding-left: 1em;
  margin: 1em 0;
  background-color: var(--background-secondary);
  color: #ffffff !important;
  font-style: italic;
}

/* Code blocks */
.published-container code,
.published-container pre {
  background-color: var(--background-secondary);
  color: #ffffff !important;
  font-family: "Courier New", monospace;
}
.published-container pre {
  padding: 1em;
  overflow-x: auto;
  border-radius: 4px;
  margin: 1em 0;
}

/* Tables */
.published-container table {
  border-collapse: collapse;
  width: 100%;
  margin: 1em 0;
}
.published-container table th,
.published-container table td {
  border: 1px solid var(--accent-color);
  padding: 0.5em 1em;
  color: #ffffff !important;
}
.published-container table th {
  background-color: var(--background-secondary);
}

/* Images */
.published-container img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1em auto;
}

/* Footnotes */
.published-container .footnotes {
  font-size: 0.9em;
  color: #dddddd !important;
}

/* Buttons */
button,
.published-container a.button {
  background: none;
  border: 1px solid var(--accent-color);
  color: var(--accent-color);
  padding: 0.4em 0.8em;
  font-family: var(--font-text);
}
button:hover,
.published-container a.button:hover {
  background: var(--accent-color);
  color: var(--background-primary);
}

/* Selection */
::selection {
  background: var(--accent-color);
  color: var(--background-primary);
}

/* =========================================
   GRAPH VIEW OVERRIDES
   Using official variables + fallback
   ========================================= */

/* Main graph variable overrides */
.theme-dark {
  --graph-background: #ffffff !important;
  --graph-text-color: #ffffff !important;
  --graph-line-color: #ffc1cb !important;
  --graph-node-color: #ffc1cb !important;
  --graph-node-hover-color: #ffffff !important;
  --graph-node-focused-color: #ffffff !important;
  --graph-node-tag-color: #ffc1cb !important;
  --graph-node-attachment-color: #ffc1cb !important;
  --graph-controls-color: #ffffff !important;
  --graph-controls-background: #ffffff !important;
  --graph-height: 600px !important;
}

/* Fallback selectors for older builds */
.graph-view {
  background-color: #222222 !important;
}
.graph-view .node-label {
  fill: #ffffff !important;
  color: #ffffff !important;
}
.graph-view .link {
  stroke: #ffc1cb !important;
}
.graph-view .node {
  fill: #ffc1cb !important;
  stroke: #ffc1cb !important;
}
.graph-view .node:hover {
  fill: #ffffff !important;
  stroke: #ffffff !important;
}
