.App {
    font-family: sans-serif;
    text-align: center;
  }
    
  .excalidraw-wrapper {
    height: 100%;
    margin: 0px;
    background-color: var(--background-primary);
    position:relative;
  }
  
  .context-menu-option__shortcut {
      background-color: transparent !important;
  }

.block-language-excalidraw {
  text-align:center;
}

.excalidraw .github-corner {
  display: none;
}

svg.excalidraw-svg {
	width: 100%;
}

.excalidraw-embedded-img {
  width: 100%;
}

.excalidraw-svg-right-wrap {
  float: right;
  margin: 0px 0px 20px 20px;
  width: 100%;
}

.excalidraw-svg-left-wrap {
  float: left;
  margin: 0px 35px 20px 0px;
  width: 100%;
}

.excalidraw-svg-right {
  float: right;
}

.excalidraw-svg-center {
  text-align: center;
  margin: auto;
  width: 100%;
}

.excalidraw-svg-left {
  float: left;
}

div.excalidraw-svg-right,
div.excalidraw-svg-left {
  display: table;
  width: 100%;
}

button.ToolIcon_type_button[title="Export"] {
  display:none;
}

.excalidraw-prompt-div {
  display: flex;
  max-width: 800px;
}

.excalidraw-prompt-form {
  display: flex;
  flex-grow: 1;
}

.excalidraw-prompt-input {
  flex-grow: 1;
}

.excalidraw-prompt-button {
  width: 9em;
}

.excalidraw-export-button {
  width: 9em;
  margin-left: 10px;
}

.excalidraw-prompt-buttons-div {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: space-evenly;
}

.excalidraw-export-buttons-div {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: right;
}

li[data-testid] {
  border: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
}

.excalidraw .context-menu-option-separator {
  margin: 4px !important;
}

.excalidraw .popover {
  padding: 0 !important;
  border-color: transparent !important;
  border: 0 !important;
  background-color: transparent !important;
  overflow-y: auto !important;
  position: fixed !important;
} 

.disable-zen-mode--visible {
  color: var(--text-primary-color);
}

.disable-zen-mode {
  width: 9em !important;
}

.ex-coffee-div {
	text-align: center;
	margin-bottom: 10px;
}

.excalidraw-scriptengine-install td>img {
  width: 100%;
  max-width:800px;
}

.excalidraw-scriptengine-install img.coffee {
  width: 130px;
}

.excalidraw-scriptengine-install tr {
  vertical-align: top;
}

.excalidraw-scriptengine-install table {
  max-width: 130ch;
}

.excalidraw-scriptengine-install td.label {
  min-width: 11ch;
  font-weight: bold;
  padding-right: 5px;
}

.excalidraw-scriptengine-install td.data {
  width: 100%;
}

.excalidraw-scriptengine-install .modal-content {
  max-width: 130ch;
  user-select: text;
}

.excalidraw-scriptengine-install .modal {
  max-height:90%;
  width: auto;
}

.excalidraw-prompt-center {
  text-align: center !important;
}

.excalidraw-prompt-center button {
  margin: 0 10px;
}

.excalidraw-prompt-center.filepath {
  text-align: center;
  font-weight: bold;
  margin-bottom: 2em;
}

.excalidraw-dirty {
  color: var(--text-error);
}

.workspace-leaf-content .excalidraw-view {
  padding: 0px 1px; /*1px so on ipad swipe in from left and right still works*/
  overflow: hidden;
}

.excalidraw-videoWrapper {
  max-width:600px;
}
.excalidraw-videoWrapper.settings {
  max-width:340px;
}

.excalidraw-videoWrapper div{
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  margin: 0 auto;
}

.excalidraw-videoWrapper.settings iframe {
  position: relative;
  margin-bottom: 1rem;
}

.excalidraw-videoWrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.excalidraw-release .modal-content{
  padding-right: 5px;
  margin-right: -5px;
  user-select: text;
}

.excalidraw-release .modal {
  max-height: 80%;
  max-width: 42em;
}

.excalidraw .Island .scrollbar {
  --scrollbar-thumb-bg: silver;
}

.excalidraw .ToolIcon__icon img{
  height: 1rem;
}

.excalidraw-scriptengine-install tbody>tr>td>div>img {
  height:20px;
  background-color: silver;
  padding: 2px;
}

.excalidraw-scriptengine-install tbody>tr>td>div {
  width: 50px;
  display: inline-block;
}

.excalidraw-release p>a>img {
  width: 100%
}

.excalidraw .context-menu-option {
  box-shadow: none;
}

.excalidraw-colorpicker-overlay {
  position: fixed;
  inset: 0;
  background: transparent;
  z-index: 9998;
}

.excalidraw-colorpicker-popup {
  position: absolute;
  padding: 12px;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  background-color: var(--background-primary);
  border: 1px solid var(--background-modifier-border);
  z-index: 9999;
  scrollbar-gutter: stable both-edges;
}

.excalidraw-colorpicker-grid {
  display: grid;
  overflow-y: auto;
  padding-right: 4px;
  max-height: 260px;
}

.excalidraw-colorpicker-swatch {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--interactive-accent-hover);
  box-sizing: border-box;
  cursor: pointer;
}

textarea.excalidraw-wysiwyg {
  border: none;
  outline: none;
  -webkit-box-shadow: none;
  -moz-box-shadow: none;
  box-shadow: none;
  border-radius: 0;  
}

.is-tablet .excalidraw button,
.is-mobile .excalidraw button {
  padding: initial;
  height: 1.8rem;
}

.excalidraw button,
.ToolIcon button {
  box-shadow: none;
  justify-content: initial;
}

.excalidraw {
  --default-button-size: 2rem !important;
  --default-icon-size: 1rem !important;
  --lg-button-size: 1.8rem !important;
  --lg-icon-size: 1rem !important;
  --editor-container-padding: var(--size-4-2);
}

.excalidraw .tray-zoom {
  height: var(--default-button-size);
  pointer-events: initial;
  padding-bottom: 0.05rem;
  padding-top: 0.05rem;
}

.excalidraw-container.theme--dark {  /* unused */
  background-color: #121212;
  color: #fff;
}

/* https://discordapp.com/channels/686053708261228577/989603365606531104/1041266507256184863 */
/*.workspace-leaf {
	contain: none !important;
}*/

.color-picker-content {
  overflow-y: auto;
  max-height: 10rem;
}

.excalidraw .ToolIcon__keybinding {
  font-size: 0.45rem !important;
}

/*
.Island > .Stack > .Stack {
  padding:0.2rem;
}
*/

label.color-input-container > input {
  max-width: 5rem;
}

.excalidraw-hidden {
  display: none !important;
}

.excalidraw .App-toolbar-content .dropdown-menu {
  max-height: 70vh;
  overflow-y: auto;
}

.excalidraw .selected-shape-actions .panelColumn,
.excalidraw .App-mobile-menu .panelColumn
 {
  max-height: 70vh;
  overflow-y: auto;
}

.excalidraw .App-mobile-menu {
  width: 12.5rem !important;
}

.excalidraw .panelColumn .buttonList {
  max-width: 13rem;
}

.excalidraw input[type="color"] {
  width: 1.65rem;
  height: 1.65rem;
}

.excalidraw input[type="color"]::-webkit-color-swatch {
    height: 1.65rem;
}


.excalidraw input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.excalidraw-settings input[type="text"] {
  min-width: 10em;
}

div.excalidraw-draginfo {
  position: absolute;
  z-index: 1000;
  color: var(--text-normal);
  padding: 3px;
  background: var(--color-base-40);
  display: block;
  border-radius: 5px;
}

.excalidraw [data-radix-popper-content-wrapper] {
  /*Overrides position:fixed in popover*/
  position: absolute !important;
}

/* In Obsidian-Excalidraw, the Sidebar-Trigger is sometimes in a Container/
   Island, so it shall be styled like any other of its .ToolIcon siblings */
.excalidraw :where(.mobile-misc-tools-container, .tray-misc-tools-container) .sidebar-trigger {
  background-color: unset;
  border-radius: 0;
  box-shadow: none;
  /* this appears to me as the least impactful way of undoing the upstream mess */
  --lg-button-size: var(--button-height, var(--default-button-size));

  &:hover {
    background-color: var(--button-hover-bg);
  }

  &:active {
    background-color: var(--button-hover-bg);
    box-shadow: none;
    border: 1px solid var(--button-active-border);
  }
}

.excalidraw-sidepanel-container {
  height: 100%;
}

.excalidraw-sidepanel {
  display: flex;
  flex-direction: column;
  gap: 0;
  height: 100%;
}

.excalidraw-sidepanel__controls {
  display: flex;
  align-items: center;
  gap: var(--size-4-1);
  padding: var(--size-4-2) var(--size-4-2);
  border-bottom: 1px solid var(--divider-color, var(--background-modifier-border));
  background-color: var(--background-secondary);
}

.excalidraw-sidepanel__select {
  flex: 1;
}

.excalidraw-sidepanel__empty {
  padding: 0.75rem;
  color: var(--text-muted);
}

.excalidraw-sidepanel__body {
  flex: 1;
  overflow: hidden;
  position: relative;
  background-color: var(--background-primary);
}

.excalidraw-sidepanel-tab {
  display: none;
  flex-direction: column;
  height: 100%;
}

.excalidraw-sidepanel-tab.is-active {
  display: flex;
}

.excalidraw-sidepanel-tab__label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.excalidraw-sidepanel-tab__content {
  flex: 1;
  overflow: auto;
  padding: 0.5rem;
}

.excalidraw-sidepanel-tab__button { /* probably unused */
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
}

.excalidraw-sidepanel-tab__button.is-active {
  background: var(--background-primary-alt, var(--background-secondary));
  color: var(--text-normal);
}

.excalidraw-sidepanel-tab__button:hover {
  background: var(--background-primary-alt, var(--background-secondary));
}

.excalidraw-sidepanel-tab__icon {
  display: inline-flex;
}

.excalidraw-sidepanel-tab__icon.is-hidden {
  display: none;
}

.excalidraw-sidepanel-tab__close {
  border: none;
  background: transparent;
  color: inherit;
  display: inline-flex;
  padding: 0.1rem;
  border-radius: 4px;
}

.excalidraw-sidepanel-tab__close:hover {
  background: var(--background-modifier-hover);
}

.excalidraw-sidepanel-tab__close.is-hidden {
  display: none;
}
/*Arrow Picker Popover Overflow*/
/*
.excalidraw .selected-shape-actions .Island.App-menu__left,
.excalidraw .selected-shape-actions .Island.App-menu__left .panelColumn,
.excalidraw .Island .App-mobile-menu,
.excalidraw .Island .App-mobile-menu .panelColumn {
	overflow: visible;
}*/

.excalidraw__embeddable-container .view-header {
  display: none !important;
}

.excalidraw__embeddable-container input {
  background: initial;
}

.excalidraw .embeddable-menu {
  width: fit-content;
  height: fit-content;
  position: absolute;
  display: block;
  z-index: var(--zIndex-canvasButtons);
  transition: opacity var(--anim-duration-fast) ease-in-out;

  /* slower fadeout */
  &[style*="opacity: 0.2;"] {
    transition-duration: var(--anim-duration-moderate);
  }
}

.excalidraw .welcome-screen-center__logo svg {
  width: 5rem !important;
}

.excalidraw-image-wrapper {
  text-align: center;
}

.excalidraw-image-wrapper img {
  margin: auto;
}


.modal-content.excalidraw-scriptengine-install .hit-count {
  margin-left: 0.5em;
  white-space: nowrap;
  font-size: smaller;
}

.modal-content.excalidraw-scriptengine-install .active-highlight {
  border: 2px solid var(--color-accent-2);
  background-color: var(--color-accent);
}

.excalidraw-svg svg a {
  text-decoration: none;
}

.excalidraw .Modal {
  background-color: initial;
  border: initial;
  max-width: initial;
  max-height: initial;
  width: initial;
  height: initial;
}

summary.excalidraw-setting-h1 {
  font-variant: var(--h1-variant);
  letter-spacing: -0.015em;
  line-height: var(--h1-line-height);
  font-size: var(--h1-size);
  color: var(--h1-color);
  font-weight: var(--h1-weight);
  font-style: var(--h1-style);
  font-family: var(--h1-font);
  /*margin-block-start: var(--p-spacing);*/
  margin-block-end: var(--p-spacing);
}

summary.excalidraw-setting-h3 {
  font-variant: var(--h3-variant);
  letter-spacing: -0.015em;
  line-height: var(--h3-line-height);
  font-size: var(--h3-size);
  color: var(--h3-color);
  font-weight: var(--h3-weight);
  font-style: var(--h3-style);
  font-family: var(--h3-font);
  margin-block-start: var(--p-spacing);
  margin-block-end: var(--p-spacing);
}

summary.excalidraw-setting-h4 {
  font-variant: var(--h4-variant);
  letter-spacing: -0.015em;
  line-height: var(--h4-line-height);
  font-size: var(--h4-size);
  color: var(--h4-color);
  font-weight: var(--h4-weight);
  font-style: var(--h4-style);
  font-family: var(--h4-font);
  margin-block-start: var(--p-spacing);
  margin-block-end: var(--p-spacing);
}

hr.excalidraw-setting-hr {
  margin: 1rem 0rem 0rem 0rem;
}

.excalidraw-mdEmbed-hideFilename .mod-header {
  display: none;
}

.excalidraw__embeddable-container .canvas-node:not(.is-editing).transparent {
  ::-webkit-scrollbar,
  ::-webkit-scrollbar-horizontal {
    display: none;
  }
}

/* 
//https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/1456
.canvas-node:not(.is-editing):has(.excalidraw-canvas-immersive) {
  ::-webkit-scrollbar,
  ::-webkit-scrollbar-horizontal {
    display: none;
  }
  background-color: transparent !important;
}

.canvas-node:not(.is-editing) .canvas-node-container:has(.excalidraw-canvas-immersive) {
  border:       unset;
  box-shadow:   unset;
}
*/

.excalidraw .canvas-node .ex-md-font-hand-drawn {
  --font-text: "Virgil";
}

.excalidraw .canvas-node .ex-md-font-code {
  --font-text: "Cascadia";
}

.excalidraw__embeddable-container .workspace-leaf,
.excalidraw__embeddable-container .workspace-leaf .view-content {
  ::-webkit-scrollbar,
  ::-webkit-scrollbar-horizontal {
    display: none;
  }
  background-color: transparent !important;
}

.excalidraw__embeddable-container .workspace-leaf-content .view-content {
  padding-left: 2px;
  padding-right: 2px;
  padding-top: 0px;
  padding-bottom: 0px;
}

.excalidraw__embeddable-container .workspace-leaf .view-content {
  display: flex;
  align-items: center;
  justify-content: center;
}

.excalidraw__embeddable-container  .workspace-leaf-content .image-container,
.excalidraw__embeddable-container .workspace-leaf-content .audio-container,
.excalidraw__embeddable-container .workspace-leaf-content .video-container {
  display: flex;
}

.excalidraw__embeddable-container .canvas-node-container {
  border: 2px solid var(--canvas-color);
}

.excalidraw__embeddable-container .canvas-node {
  --shadow-border-themed-inset: inset 0 0 0 1px rgb(var(--canvas-color));;
  --shadow-border-themed: 0 0 0 2px rgb(var(--canvas-color));
}

.excalidraw__embeddable-container .canvas-node.is-selected.is-themed .canvas-node-container,
.excalidraw__embeddable-container .canvas-node.is-focused.is-themed .canvas-node-container {
  border-color: var(--canvas-color);
}

img.excalidraw-cropped-pdfpage,
.excalidraw-cropped-pdfpage svg {
  background-color: white;
}

.excalidraw .pdf-toolbar,
.excalidraw .pdf-container {
  width: 100%;
}

.ex-opacity-30 {
  opacity: 0.3;
}

.ex-opacity-15 {
  opacity: 0.15;
}

.ex-opacity-8 {
  opacity: 0.08;
}

.ex-opacity-5 {
  opacity: 0.05;
}

.ex-opacity-0 {
  opacity: 0;
}

.popover .excalidraw-svg {  
  width: 100%;
  max-width: inherit;
  height: 100%;
  max-height: inherit;
}

root {
 --excalidraw-caret-color: initial;
}

textarea.excalidraw-wysiwyg, .excalidraw input {
  caret-color: var(--excalidraw-caret-color) !important;
}

.excalidraw-settings-links-container {
    align-items: center;
    color: inherit;
    display: flex;
    gap: .3em;
    text-align: center;
    text-decoration: none;
    flex-wrap: wrap;
    justify-content: center;
    flex-direction: row;
}

.excalidraw-settings-links-container a {
  display: flex; /* Align children horizontally */
  align-items: center; /* Center items vertically */
  text-align: left;
  margin-right: 4px;
  margin-left: 4px;
}

.excalidraw-settings-links-container svg,
.ex-setting-actions-container svg {
  margin-right: 8px;
  height: 30px;
  width: 30px;
}

.excalidraw-rank {
  text-align: center;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.excalidraw-rank svg {
  height: 8rem;
  width: 8rem;
}

.excalidraw .color-picker-content input[type="color"] {
  filter: var(--theme-filter);
}

.ExcTextField__input input::placeholder {
  color: var(--select-highlight-color);
}

.excalidraw textarea::placeholder {
  color: var(--color-gray-50);
}

.excalidraw textarea.ttd-dialog-input {
  caret-color: var(--excalidraw-caret-color) !important;
}

.excalidraw .ToolIcon_type_button {
  color: var(--text-primary-color);
}

.excalidraw-setting-desc {
  padding: 10px;
  cursor: pointer;
  background-color: var(--background-secondary);
  border: 1px solid var(--background-modifier-border);
  border-radius: 5px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.excalidraw-setting-desc:hover {
  background-color: var(--background-modifier-hover);
  color: var(--text-accent);
}

.excalidraw-release .nav-buttons-container {
  display: flex;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--background-modifier-border);
}

.excalidraw-release .nav-button {
  padding: 8px 16px;
  border: none;
  background: transparent;
  cursor: pointer;
}

.excalidraw-release .nav-button.is-active {
  border-bottom: 2px solid var(--interactive-accent);
  margin-bottom: -2px;
}

.is-mobile .modal-container.excalidraw-modal .modal.excalidraw-modal {
  align-self: flex-start;
  transform: none !important;
  margin-top: calc(var(--safe-area-inset-top) + var(--header-height) + var(--size-4-2));
  width: 100%;
}

.excalidraw .picker-content {
  grid-gap: 0.2rem !important;
}

.excalidraw .picker-content button.picker-option{
  width: 1.85rem !important;
  height: 1.85rem !important;
}

.excalidraw .picker {
  padding: 0.2rem !important;
}

.excalidraw .context-menu {
  height: fit-content;
}

.excalidraw-prompt-buttonbar-top,
.excalidraw-prompt-buttonbar-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;  /* keep both rows top‐aligned */
  row-gap: 0.5em;           /* vertical space when wrapped */
}

/* top bar specifics */
.excalidraw-prompt-buttonbar-top {
  padding: 0.5em 0;
  border-top: 1px solid var(--background-modifier-border);
}

/* bottom bar specifics */
.excalidraw-prompt-buttonbar-bottom {
  margin-top: 1rem;
}

/* make each child a flex row */
.excalidraw-prompt-buttonbar-top  > div,
.excalidraw-prompt-buttonbar-bottom > div {
  display: flex;
}

/* push the first group to the left */
.excalidraw-prompt-buttonbar-top  > div:first-child,
.excalidraw-prompt-buttonbar-bottom > div:first-child {
  margin-right: auto;
}

/* push the second group to the right */
.excalidraw-prompt-buttonbar-top  > div:last-child,
.excalidraw-prompt-buttonbar-bottom > div:last-child {
  margin-left: auto;
}

.excalidraw-search.document-search-container {
  display: flex;
  flex-direction: column;
  background: var(--background-secondary);
  border-radius: 8px;
  box-shadow: 0 1px 4px 0 rgba(0,0,0,0.10);
  padding: 0.5em 0.8em;
  margin-bottom: 2em;
  width: fit-content;
  max-width: calc(100% - 1.6em);
  position: sticky;
  top: 1rem;
  margin-right: auto;
  margin-left: auto;
}

.excalidraw-search .document-search {
  align-items: center;
  align-self: center;
  max-width: 30rem;
  width: min(100%, 30rem);
}

.excalidraw-search .search-input-container.document-search-input {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  background: var(--background-primary);
  border-radius: 6px;
  border: 1px solid var(--background-modifier-border);
  min-width: 0;
}

.excalidraw-search .search-input-container .clickable-icon {
  display: flex;
  align-items: center;
  color: var(--text-faint);
}

.excalidraw-search .search-input-container input[type="text"] {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-normal);
  font-size: 1em;
  flex: 1 1 auto;
  padding: 0.1em 2em;
  margin: 0;
}

.excalidraw-search .document-search-count {
  margin-left: 0.5em;
  color: var(--text-faint);
  font-size: 0.95em;
  white-space: nowrap;
  min-width: 3.5em;
  text-align: right;
}

.excalidraw-search .document-search-buttons {
  display: flex;
  align-items: center;
  gap: 2px;
}

.excalidraw-search .document-search-button {
  background: none;
  border: none;
  outline: none;
  box-shadow: none;
  padding: 0.1em 0.2em;
  margin: 0 1px;
  border-radius: 4px;
  cursor: pointer;
  color: var(--text-faint);
  transition: background 0.15s;
  height: 2em;
  width: 2em;
  display: flex;
  align-items: center;
  justify-content: center;
}

.excalidraw-search .document-search-button:hover, .excalidraw-search .document-search-button:focus {
  background: var(--background-modifier-hover);
  color: var(--text-accent);
}

.excalidraw-search .document-search-button svg {
  width: 1.3em;
  height: 1.3em;
  stroke: currentColor;
  fill: none;
  pointer-events: none;
}

/*remove blur from PDF embed*/
.excalidraw__embeddable-container canvas {
  image-rendering: auto;
}

.excalidraw__embeddable-container .mod-nofilter canvas {
  filter: none !important;
}

.excalidraw__embeddable-container .canvas-node.is-selected .canvas-node-container,
.excalidraw__embeddable-container .canvas-node.is-focused .canvas-node-container {
  border-color: inherit;
  box-shadow: inherit;
}

.excalidraw__embeddable-container .pdf-toolbar-right {
  display: none;
}

.excalidraw-scriptengine-install .modal-close-button {
  z-index: 9999;
}

.excalidraw .App-bottom-bar .App-toolbar {
  justify-content: start;
}

.excalidraw-left-handed .excalidraw .App-bottom-bar {
  justify-content: flex-end !important;
  left: auto !important;
  right: 0 !important;
  transform: none !important;

  .App-toolbar {
    justify-content: end;
  }
}

.excalidraw--tray .App-bottom-bar > .Island > .App-toolbar > .App-toolbar-content {
  /* This will render the undo/redo buttons as if they weren't
  in a separate container, but simply part of the row */
  > :not([class]) {
    display: contents;
  }

  > .ToolIcon__icon:empty {
    display: none;
  }
}

.excalidraw .excalidraw-ui-top-right.library-and-pen,
.excalidraw.excalidraw--mobile .excalidraw-ui-top-right {
  flex-direction: row;
  flex-wrap: wrap;
  gap: var(--size-4-1);
  justify-content: center;
  align-items: center;
}

.excalidraw .excalidraw-ui-top-right.library-and-pen .ToolIcon__penMode {
  margin: auto;
}

.excalidraw :is(.mobile-misc-tools-container, .tray-misc-tools-container) {
  margin-right: unset;

  &.layer-ui__wrapper__top-right--compact {
    gap: 0; /* there shouldn't be a larger gap in a "compact" mode */
  }
}

.excalidraw .FixedSideContainer_side_top {
    padding-top: 0 !important;
}

.excalidraw .ToolIcon.ToolIcon__penMode {
	height:fit-content
}

.excalidraw-LatexPrompt {
  .cm-editor {
    margin-top: var(--size-4-2);
    justify-content: center;
    align-items: center;

    /* this is safe, if unsupported, will be ignored */
    anchor-name: --latex-editor;

    & > .cm-scroller, & > .cm-announcment {
      align-self: start;
      width: 100%
    }

    /* taken from Obsidian, doesn't apply automatically,
       because the rule does not have :focus-within */
    &.cm-focused {
      border-color: var(--background-modifier-border-focus);
      transition: box-shadow 0.15s ease-in-out, border 0.15s ease-in-out;
      box-shadow: 0 0 0 var(--input-border-width-focus) var(--background-modifier-border-focus);
    }

    /* centering the popup */
    & .cm-tooltip-cursor.cm-tooltip {
      left: unset !important;

      & .cm-tooltip-arrow {
        left: 50% !important;
        transform: translateX(-50%);
      }
    }

    mjx-container[jax="CHTML"][display="true"] {
      margin: 0;
    }
  }

  .cm-content {
    caret-color: var(--caret-color);
  }
}

@supports (anchor-name: --test) {
  .excalidraw-LatexPrompt .cm-editor .cm-tooltip-cursor.cm-tooltip {
    position: fixed !important;
    position-anchor: --latex-editor;
    top: unset !important;
    max-width: calc(100vw - var(--size-4-4));
    margin: var(--size-4-2) 0;
    overflow-x: clip;

    &.cm-tooltip-above {
      bottom: anchor(top);
    }

    &.cm-tooltip-below {
      top: anchor(bottom) !important;
    }
  }
}

.excalidraw-filetype-tag {
    order: 99;
}

.excalidraw-mobile-navbar-docked {
  position: relative;
}

.excalidraw svg.svg-icon {
  color: var(--icon-fill-color);
}


.is-mobile .excalidraw.excalidraw--mobile .FixedSideContainer.FixedSideContainer_side_top.App-top-bar {
  margin-top: 1rem
}

/*
Obsidian Sheets Plus support
*/
.excalidraw__embeddable__outer .lj-content-view {
	width: var(--embeddable-width);
	height: var(--embeddable-height);
}

.excalidraw__embeddable__outer #sheet-box {
	height: calc(var(--embeddable-height) - var(--lj-toolbar-height) + 40px);
}

.excalidraw__embeddable__outer .lj-univer .univer-relative.univer-grid {
    width: var(--embeddable-width);
}

/*
End Obsidian Sheets Plus support
*/