/* Styles for HTML widgets baked into book-note Markdown exports. */

code {
  padding: .2em .4em;
  border-radius: 3px;
  background: var(--md2html-code-bg);
  font: .9em var(--md2html-mono-font);
}
.codehilite {
  max-width: 100%;
  min-width: 0;
  margin: 1rem 0 1.5rem;
  overflow-x: auto;
  border: 1px solid var(--md2html-border);
  border-radius: var(--md2html-radius);
  background: var(--md2html-code-bg);
}
.codehilite pre {
  margin: 0;
  padding: 1rem;
  overflow-x: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
}
.codehilite code {
  padding: 0;
  background: transparent;
}
.fenced-code {
  margin: .65rem 0 1rem;
}
.code-language {
  padding: .25rem .45rem 0;
  background: var(--md2html-code-header-bg);
  color: var(--md2html-muted);
  font: .7rem/1.2 var(--md2html-mono-font);
}
.fenced-code pre {
  padding: .2rem .45rem .45rem;
}
.code-box {
  max-width: 100%;
  min-width: 0;
  margin: 1rem 0 1.5rem;
  overflow: hidden;
  border: 1px solid var(--md2html-border);
  border-radius: var(--md2html-radius);
  background: var(--md2html-code-bg);
}
.code-box .codehilite {
  margin: 0;
  border: 0;
  border-radius: 0;
}
.code-box .codehilite pre {
  padding: .2rem 0 .3rem .45rem;
}
.code-header,
.code-summary,
.code-output {
  background: var(--md2html-code-header-bg);
  color: var(--md2html-muted);
  font: .75rem/1.35 var(--md2html-mono-font);
}
.code-header {
  padding: .3rem 0 0 .3rem;
  border-bottom: 1px solid var(--md2html-border);
}
.code-header a,
.code-summary a {
  color: var(--md2html-muted);
  text-decoration: none;
}
.code-header a:hover,
.code-summary a:hover {
  color: var(--md2html-link);
  text-decoration: underline;
}
.code-output {
  padding: .2rem 0 .3rem .3rem;
  border-top: 1px solid var(--md2html-border);
}
.code-output pre {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  white-space: pre-wrap;
  font-family: var(--md2html-mono-font);
}
.code-output span {
  color: var(--md2html-output);
}
.collapsible-code {
  margin: 0;
  border: 0;
}
.code-summary {
  position: relative;
  display: block;
  padding: .5rem .8rem;
  border-bottom: 1px solid var(--md2html-border);
  border-radius: var(--md2html-radius) var(--md2html-radius) 0 0;
  cursor: pointer;
  list-style: none;
  transition: background-color .1s ease-in-out;
}
.code-summary::-webkit-details-marker {
  display: none;
}
.code-summary:hover {
  background: var(--md2html-code-bg);
}
.code-summary::before {
  content: "►";
  position: absolute;
  top: 50%;
  left: .8rem;
  transform: translateY(-50%);
  color: var(--md2html-muted);
  font-size: .6em;
  margin-right: .5rem;
  transition: transform .2s ease-in-out;
}
.collapsible-code[open] > .code-summary::before {
  transform: translateY(-50%) rotate(90deg);
}
.code-summary a,
.code-summary > span:first-child {
  margin-left: 1.2rem;
}
.expand-hint {
  margin-left: .5rem;
  color: var(--md2html-muted);
  font-size: .85em;
  font-style: italic;
}
.collapsible-code > .codehilite {
  border-radius: 0 0 var(--md2html-radius) var(--md2html-radius);
}
.collapsible-code + .code-output {
  margin-top: 0;
  border-radius: 0 0 var(--md2html-radius) var(--md2html-radius);
}

.obsidian-image {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1rem auto;
}

.warning {
  margin: 1rem 0;
  padding: .75rem 1rem;
  border-left: 4px solid var(--md2html-warning-border);
  background: var(--md2html-warning-bg);
}
