/*----------------------------------------------------------------
CODEBLOCKS & INLINE CODE
----------------------------------------------------------------*/

.cm-s-obsidian pre.HyperMD-codeblock-begin {
  padding-top: 0.75rem;
}

/* Preview code block background */
.markdown-preview-view pre {
  padding: 1em;
  border-radius: 4px;
  border: 1px solid var(--code-block-border);
  white-space: pre-wrap;
}

/* Code block border color */
.cm-s-obsidian div.HyperMD-codeblock-begin-bg {
	border-top: 1px solid var(--code-block-border);
	padding: 1em !important;
	border-top-left-radius: 4px;
	border-top-right-radius: 4px;
}

/* Code block border color */
.cm-s-obsidian div.HyperMD-codeblock-end-bg {
	border-bottom: 1px solid var(--code-block-border);
	border-bottom-left-radius: 4px;
	border-bottom-right-radius: 4px;
}

/* Code block left and right border colors */
.cm-s-obsidian div.HyperMD-codeblock-bg {
	border-left: 1px solid var(--code-block-border);
	border-right: 1px solid var(--code-block-border);
}

.copy-code-button {
  color: var(--text-normal) !important;
  font-family: var(--font-monospace) !important;
  background-color: var(--background-modifier-border) !important;
  border: 1px solid var(--code-block-border) !important; 
  border-radius: 0px 0px 0px 0px !important;
  display: block;
  text-transform: lowercase !important;
  font-weight: 500 !important;
  margin-left: auto;
  margin-right: 0;
  margin-bottom: -2px;
  padding: 3px 12px !important;
  font-size: 0.8em;
  position: absolute;
  top: 0px;
  right: 0px;
}

.copy-code-button:hover{
	background-color: var(--background-secondary-alt) !important;
}

/*----------------------------------------------------------------
EDITOR SECTION
----------------------------------------------------------------*/

.theme-dark code[class*="language-"],
.theme-dark pre[class*="language-"],
.theme-light code[class*="language-"],
.theme-light pre[class*="language-"]{
    text-shadow: none !important;
    background-color: var(--pre-code) !important;
}

.cm-s-obsidian,
.cm-inline-code{
    -webkit-font-smoothing: auto !important;
    font-size: 17px !important;  /*text size of inline code in editor*/
}

.cm-inline-code{
    font-family: var(--font-monospace) !important;
    color: var(--inline-code) !important;
    background-color: var(--pre-code) !important;
    padding: 1px !important;
}

.HyperMD-codeblock-bg{
    background-color: var(--pre-code) !important;
}

.cm-hmd-codeblock{
	font-size: 17px;
}

.HyperMD-codeblock{
    font-family: var(--font-monospace) !important;
    line-height: 1.5em !important;
    color: var(--code-block) !important;
}

.HyperMD-codeblock-begin{
    border-style: none;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
}

.HyperMD-codeblock-end{
    border-style: none;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
}

/*----------------------------------------------------------------
PREVIEW SECTION
----------------------------------------------------------------*/

.markdown-preview-section pre{
    display: block;
    margin: 1.25em 0em !important;
}

.markdown-preview-section pre code,
.markdown-preview-section code{
    font-family: var(--font-monospace) !important;
    font-size: 100% !important; /*SIZE OF CODE BLOCK TEXT IN PREVIEW*/
    background-color: var(--pre-code) !important;
}

.markdown-preview-section pre code{
    padding: 4px !important;
    line-height: 1.5em !important;
    display: block !important;
    color: var(--code-block) !important;
}

/*styling basic code blocks*/
.markdown-preview-section code{
    border-style: none;
    border-width: .2px;
    border-color:  var(--inline-code);
    color: var(--inline-code) !important;
}
