/* Dark mode styles for Antora default UI */
html.dark-theme,
html.dark-theme body {
  background-color: #1a1b1e;
  color: #c1c2c5;
}

html.dark-theme a {
  color: #4dabf7;
}

html.dark-theme a:hover,
html.dark-theme a:focus {
  color: #74c0fc;
}

html.dark-theme .navbar {
  background-color: #141517;
  color: #f1f3f5;
}

html.dark-theme .navbar a,
html.dark-theme .navbar .navbar-item,
html.dark-theme .navbar .navbar-link {
  color: #f1f3f5;
}

html.dark-theme .navbar .navbar-item:hover,
html.dark-theme .navbar .navbar-link:hover {
  background-color: #1f2125;
}

html.dark-theme .navbar .navbar-menu {
  background-color: #25262b;
  border-color: #373a40;
}

html.dark-theme .navbar .navbar-dropdown {
  background-color: #25262b;
  border-color: #373a40;
}

html.dark-theme .navbar .navbar-dropdown .navbar-item:hover {
  background-color: #2c2e33;
}

html.dark-theme .navbar .button,
html.dark-theme .navbar .button.is-primary {
  background-color: #2c2e33;
  border-color: #373a40;
  color: #f1f3f5;
}

html.dark-theme .navbar .button:hover,
html.dark-theme .navbar .button.is-primary:hover {
  background-color: #3b3d42;
}

html.dark-theme .nav,
html.dark-theme .nav-panel-menu,
html.dark-theme .nav-panel-explore,
html.dark-theme .toolbar,
html.dark-theme .toc.sidebar {
  background-color: #25262b;
  border-color: #373a40;
  color: #c1c2c5;
}

html.dark-theme .nav .title,
html.dark-theme .nav .title a,
html.dark-theme .nav .nav-link,
html.dark-theme .nav .nav-text,
html.dark-theme .toc.sidebar,
html.dark-theme .toc.sidebar a {
  color: #c1c2c5;
}

html.dark-theme .toc .title,
html.dark-theme .toc .title a,
html.dark-theme .toc .toc-menu h3 {
  color: #ffffff;
}

html.dark-theme .nav .nav-item.is-current-page>.nav-link {
  color: #ffffff;
}

html.dark-theme .content,
html.dark-theme .doc {
  color: #c1c2c5;
}

html.dark-theme .doc h1,
html.dark-theme .doc h2,
html.dark-theme .doc h3,
html.dark-theme .doc h4,
html.dark-theme .doc h5,
html.dark-theme .doc h6,
html.dark-theme .doc .title,
html.dark-theme .doc .heading {
  color: #ffffff;
}

html.dark-theme .doc .sect1,
html.dark-theme .doc .sect2,
html.dark-theme .doc .sect3,
html.dark-theme .doc .sect4 {
  border-color: #373a40;
}

html.dark-theme .admonitionblock,
html.dark-theme .exampleblock,
html.dark-theme .sidebarblock,
html.dark-theme .quoteblock,
html.dark-theme .literalblock,
html.dark-theme .listingblock,
html.dark-theme .openblock,
html.dark-theme .tableblock {
  background-color: #25262b;
  border-color: #373a40;
}

/* All block types - more specific selectors for Antora */
html.dark-theme .doc .sidebarblock,
html.dark-theme .doc .sidebarblock>.content {
  background-color: #25262b !important;
  background: #25262b !important;
  border-color: #373a40;
}

html.dark-theme .doc .exampleblock,
html.dark-theme .doc .exampleblock>.content {
  background-color: #1f2125 !important;
  background: #1f2125 !important;
  border-color: #373a40;
}

html.dark-theme .doc .quoteblock,
html.dark-theme .doc .quoteblock blockquote,
html.dark-theme .doc .quoteblock>blockquote {
  background-color: #1f2125 !important;
  background: #1f2125 !important;
  border-color: #4dabf7;
}

html.dark-theme .doc .quoteblock .attribution,
html.dark-theme .doc .quoteblock cite {
  color: #909296;
}

html.dark-theme .doc .verseblock,
html.dark-theme .doc .verseblock pre,
html.dark-theme .doc .verseblock>pre {
  background-color: #1f2125 !important;
  background: #1f2125 !important;
  border-color: #373a40;
  color: #c1c2c5;
}

html.dark-theme .doc .literalblock,
html.dark-theme .doc .literalblock>.content,
html.dark-theme .doc .literalblock pre {
  background-color: #141517 !important;
  background: #141517 !important;
  border-color: #373a40;
}

html.dark-theme .doc .listingblock,
html.dark-theme .doc .listingblock>.content {
  background-color: #141517 !important;
  background: #141517 !important;
  border-color: #373a40;
}

html.dark-theme .doc .openblock,
html.dark-theme .doc .openblock>.content {
  background-color: transparent !important;
  background: transparent !important;
  border-color: #373a40;
}

/* Collapsible blocks (details/summary) */
html.dark-theme .doc details,
html.dark-theme .doc details[open],
html.dark-theme .doc .exampleblock[%collapsible],
html.dark-theme .doc details>summary {
  background-color: #1f2125 !important;
  background: #1f2125 !important;
  border-color: #373a40;
  color: #c1c2c5;
}

html.dark-theme .doc details>summary {
  cursor: pointer;
}

html.dark-theme .doc details>.content {
  background-color: #1f2125 !important;
  background: #1f2125 !important;
}

/* Block titles */
html.dark-theme .doc .sidebarblock>.content>.title,
html.dark-theme .doc .exampleblock>.content>.title,
html.dark-theme .doc .quoteblock>.title,
html.dark-theme .doc .verseblock>.title,
html.dark-theme .doc .literalblock>.title,
html.dark-theme .doc .listingblock>.title,
html.dark-theme .doc .openblock>.title {
  color: #ffffff;
}

/* Admonition blocks - more specific selectors */
html.dark-theme .doc .admonitionblock,
html.dark-theme .doc .admonitionblock>table,
html.dark-theme .doc .admonitionblock>table>tbody>tr,
html.dark-theme .doc .admonitionblock>table>tbody>tr>td,
html.dark-theme .doc .admonitionblock>table>tbody>tr>td.content,
html.dark-theme .doc .admonitionblock>table>tbody>tr>td.icon {
  background-color: #25262b !important;
  background: #25262b !important;
}

html.dark-theme .doc .admonitionblock td.content {
  color: #c1c2c5;
}

html.dark-theme .doc .admonitionblock .title {
  color: #ffffff;
}

/* Specific admonition types with subtle accent colors */
html.dark-theme .doc .admonitionblock.tip>table,
html.dark-theme .doc .admonitionblock.tip>table>tbody>tr,
html.dark-theme .doc .admonitionblock.tip>table>tbody>tr>td {
  background-color: #1a2a1a !important;
  background: #1a2a1a !important;
}

html.dark-theme .doc .admonitionblock.note>table,
html.dark-theme .doc .admonitionblock.note>table>tbody>tr,
html.dark-theme .doc .admonitionblock.note>table>tbody>tr>td {
  background-color: #1a1a2a !important;
  background: #1a1a2a !important;
}

html.dark-theme .doc .admonitionblock.warning>table,
html.dark-theme .doc .admonitionblock.warning>table>tbody>tr,
html.dark-theme .doc .admonitionblock.warning>table>tbody>tr>td {
  background-color: #2a2a1a !important;
  background: #2a2a1a !important;
}

html.dark-theme .doc .admonitionblock.caution>table,
html.dark-theme .doc .admonitionblock.caution>table>tbody>tr,
html.dark-theme .doc .admonitionblock.caution>table>tbody>tr>td {
  background-color: #2a1a1a !important;
  background: #2a1a1a !important;
}

html.dark-theme .doc .admonitionblock.important>table,
html.dark-theme .doc .admonitionblock.important>table>tbody>tr,
html.dark-theme .doc .admonitionblock.important>table>tbody>tr>td {
  background-color: #2a1a2a !important;
  background: #2a1a2a !important;
}

html.dark-theme .quoteblock blockquote,
html.dark-theme .quoteblock p {
  color: #adb5bd;
}

html.dark-theme code,
html.dark-theme pre,
html.dark-theme pre code {
  background-color: #141517;
  color: #e9ecef;
  border-color: #373a40;
}

/* Code blocks - more specific selectors for Antora */
html.dark-theme .doc code,
html.dark-theme .doc pre,
html.dark-theme .doc .listingblock pre,
html.dark-theme .doc .listingblock pre.highlight,
html.dark-theme .doc .listingblock pre.highlight code,
html.dark-theme .doc .literalblock pre,
html.dark-theme .doc pre.content,
html.dark-theme .doc pre.pygments,
html.dark-theme .doc pre.rouge,
html.dark-theme .doc pre.CodeMirror,
html.dark-theme .doc .highlight pre,
html.dark-theme .doc .highlight code {
  background-color: #141517 !important;
  color: #e9ecef;
  border-color: #373a40;
}

html.dark-theme .doc .listingblock .content,
html.dark-theme .doc .literalblock .content {
  background-color: #141517;
}

/* Inline code */
html.dark-theme .doc p code,
html.dark-theme .doc td code,
html.dark-theme .doc li code {
  background-color: #2c2e33;
  color: #ff6b6b;
  border-color: #373a40;
}

/* Syntax highlighting colors for dark mode */
html.dark-theme .doc .hljs,
html.dark-theme .doc .highlight {
  background-color: #141517 !important;
}

html.dark-theme .doc .hljs-keyword,
html.dark-theme .doc .hljs-selector-tag,
html.dark-theme .doc .hljs-literal,
html.dark-theme .doc .hljs-section,
html.dark-theme .doc .hljs-link {
  color: #c678dd;
}

html.dark-theme .doc .hljs-string,
html.dark-theme .doc .hljs-title,
html.dark-theme .doc .hljs-name,
html.dark-theme .doc .hljs-type,
html.dark-theme .doc .hljs-attribute,
html.dark-theme .doc .hljs-symbol,
html.dark-theme .doc .hljs-bullet,
html.dark-theme .doc .hljs-addition,
html.dark-theme .doc .hljs-variable,
html.dark-theme .doc .hljs-template-tag,
html.dark-theme .doc .hljs-template-variable {
  color: #98c379;
}

html.dark-theme .doc .hljs-comment,
html.dark-theme .doc .hljs-quote,
html.dark-theme .doc .hljs-deletion,
html.dark-theme .doc .hljs-meta {
  color: #5c6370;
}

html.dark-theme .doc .hljs-number,
html.dark-theme .doc .hljs-regexp,
html.dark-theme .doc .hljs-literal,
html.dark-theme .doc .hljs-link {
  color: #d19a66;
}

html.dark-theme .doc .hljs-built_in,
html.dark-theme .doc .hljs-builtin-name {
  color: #e6c07b;
}

html.dark-theme .doc .hljs-function {
  color: #61afef;
}

html.dark-theme table {
  border-color: #373a40;
}

html.dark-theme table thead,
html.dark-theme table tfoot {
  background-color: #1f2125;
}

html.dark-theme table tbody tr:nth-child(even) {
  background-color: #1f2125;
}

html.dark-theme .footer {
  background-color: #141517;
  color: #909296;
}

html.dark-theme .footer a {
  color: #f1f3f5;
}

html.dark-theme #search-input {
  background-color: #2c2e33;
  color: #ffffff;
  border-color: #373a40;
}

html.dark-theme .home-link {
  color: #ffffff;
}

/* Toggle button styles */
.theme-toggle {
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  font-size: 0.9rem;
  height: 100%;
}

.navbar .theme-toggle {
  text-transform: none;
}

.theme-toggle:hover {
  background-color: #1f2125;
}

.theme-toggle .theme-icon {
  width: 18px;
  height: 18px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle .theme-icon path,
.theme-toggle .theme-icon circle {
  fill: none;
}

/* Dark mode icon fixes for navigation panels */
/* These icons use dark SVG background images that need to be inverted in dark mode */
html.dark-theme .nav-toggle,
html.dark-theme .home-link,
html.dark-theme .nav-item-toggle,
html.dark-theme .nav-menu-toggle {
  filter: invert(1);
}

/* Component/version selector in navigation */
html.dark-theme .nav-panel-explore .context .version {
  color: #909296;
}

html.dark-theme .nav-panel-explore .context .version:hover {
  color: #c1c2c5;
}

/* Chevron icon in component/version selector */
html.dark-theme .nav-panel-explore .context .version::after {
  filter: invert(1);
}

/* Component/version dropdown menu and parent containers */
html.dark-theme .nav-panel-explore .components,
html.dark-theme .nav-panel-explore .component,
html.dark-theme .nav-panel-explore .component-menu,
html.dark-theme .nav-panel-explore .versions,
html.dark-theme .nav-panel-explore .component-menu ul,
html.dark-theme .nav-panel-explore .component-menu li,
html.dark-theme .nav-panel-explore .versions ul,
html.dark-theme .nav-panel-explore .versions li,
html.dark-theme .nav-panel-explore .context>*,
html.dark-theme .nav-panel-explore .context div {
  background-color: #25262b;
  color: #c1c2c5;
}

html.dark-theme .nav-panel-explore .component-menu a,
html.dark-theme .nav-panel-explore .versions a {
  color: #c1c2c5;
}

html.dark-theme .nav-panel-explore .component-menu a:hover,
html.dark-theme .nav-panel-explore .versions a:hover,
html.dark-theme .nav-panel-explore .component-menu li:hover,
html.dark-theme .nav-panel-explore .versions li:hover {
  background-color: #2c2e33;
  color: #ffffff;
}

html.dark-theme .nav-panel-explore .component-menu .is-current,
html.dark-theme .nav-panel-explore .versions .is-current {
  background-color: #2c2e33;
  color: #ffffff;
}

/* Reduce strong inner shadow on component/version dropdown */
html.dark-theme .nav-panel-explore .components,
html.dark-theme .nav-panel-explore .component,
html.dark-theme .nav-panel-explore .versions {
  box-shadow: none;
}

html.dark-theme .nav-panel-explore .context .selector {
  box-shadow: none;
}

html.dark-theme .nav-panel-explore .context .selector .components {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Float group layout for alternating content */
.float-group::after {
  content: "";
  display: table;
  clear: both;
}

.float-group .left {
  float: left;
  max-width: 45%;
  margin-right: 2rem;
  margin-bottom: 1rem;
}

.float-group .right {
  float: right;
  max-width: 45%;
  margin-left: 2rem;
  margin-bottom: 1rem;
}

.float-group .right.text-right {
  text-align: right;
}

/* Keyboard, button, and menu macros */
html.dark-theme kbd {
  background-color: #2c2e33;
  color: #e9ecef;
  border-color: #495057;
  box-shadow: 0 1px 0 #495057;
}

html.dark-theme .button,
html.dark-theme .btn {
  background-color: #2c2e33;
  color: #e9ecef;
  border-color: #495057;
}

html.dark-theme .menuseq,
html.dark-theme .menu {
  color: #c1c2c5;
}

html.dark-theme .menuseq .caret,
html.dark-theme .menuseq .submenu::before {
  color: #909296;
}

/* Tabs extension support */
html.dark-theme .tabs ul {
  background-color: #1f2125;
  border-color: #373a40;
}

html.dark-theme .tabs ul li {
  background-color: #25262b;
  border-color: #373a40;
  color: #c1c2c5;
}

html.dark-theme .tabs ul li.is-active,
html.dark-theme .tabs ul li[aria-selected="true"] {
  background-color: #141517;
  color: #ffffff;
  border-bottom-color: #141517;
}

html.dark-theme .tabs ul li:hover {
  background-color: #2c2e33;
  color: #ffffff;
}

html.dark-theme .tabpanel,
html.dark-theme .tabs-content {
  background-color: #141517;
  border-color: #373a40;
}

/* STEM / Math rendering */
html.dark-theme .stemblock,
html.dark-theme .mathblock {
  color: #e9ecef;
}

/* Icon roles */
html.dark-theme .icon.red,
html.dark-theme [role="red"] {
  color: #ff6b6b;
}

html.dark-theme .icon.green,
html.dark-theme [role="green"] {
  color: #51cf66;
}

html.dark-theme .icon.yellow,
html.dark-theme [role="yellow"] {
  color: #fcc419;
}

html.dark-theme .icon.blue,
html.dark-theme [role="blue"] {
  color: #4dabf7;
}

/* Video embeds wrapper */
html.dark-theme .videoblock {
  background-color: transparent;
}