// - https://github.com/dbarenholz/halcyon-obsidian?tab=readme-ov-file

body {
  --flexcyon-top-actions-alignment: center;
  --flexcyon-media-embed-vertical-margin: 8px;
  --flexcyon-anim-duration: 0.35s;

  --modal-border-color: var(--flexcyon-base-02);
  --toggle-thumb-color: var(--text-on-accent);
  --ribbon-width: 48px;
  --file-line-width: 50rem;
  --vault-name-color: var(--interactive-accent);
  --ribbon-background-collapsed: var(--ribbon-background);
  --workspace-background-translucent: unset;

  --hr-color: #393e48;
  --flexcyon-cust-hr-str-horiz-padding: 8px;
  --flexcyon-cust-hr-str-font-size: 1.11803em;
  --flexcyon-cust-hr-str: "f";

  div.nav-buttons-container {
    justify-content: var(--flexcyon-top-actions-alignment);
    opacity: calc(var(--dimmed) + 0.2);

    &:hover {
      opacity: unset;
    }
  }
  .tree-item-flair {
    color: var(--text-muted);
  }

  .workspace-ribbon {
    border-right: unset;
  }

  &:not(.is-grabbing) :is(.nav-file-title:hover, .nav-folder-title:hover) {
    color: var(--interactive-accent-hover);
  }

  .cm-formatting.cm-formatting-task {
    color: var(--flexcyon-purple-lilac);
  }

  div.modal-content.vertical-tabs-container
    > div.vertical-tab-header
    > div
    > div.vertical-tab-header-group-items {
    & div.vertical-tab-nav-item {
      opacity: var(--dimmed);
    }

    & div.vertical-tab-nav-item.is-active {
      opacity: 1;
    }
  }
}

body.flexcyon-enable-alt-active-item-effect {
  .vertical-tab-nav-item {
    padding-left: 0.5rem;
  }

  .vertical-tab-nav-item.search-settings-input {
    padding-left: 0.1rem;
  }

  .vertical-tab-nav-item.is-active {
    color: var(--text-accent);
    background: linear-gradient(
      to right,
      transparent 0%,
      var(--text-on-accent) 7.5%,
      var(--text-on-accent) 87.5%,
      transparent 100%
    );
    padding-left: 0.75rem;

    &:hover {
      font-weight: bold;
    }
  }
}

body span.media-embed * {
  margin: var(--flexcyon-media-embed-vertical-margin) 0px;
}

.cm-s-obsidian .cm-line.HyperMD-footnote span.cm-hmd-footnote {
  top: -0.1em;
}

body .cm-hr {
  color: var(--text-faint);
}

body.flexcyon-hr-no-reading .markdown-reading-view {
  .el-hr {
    display: none;
  }
}

body.flexcyon-flex-max-mode,
body.flexcyon-cust-str-hr {
  .hr::before {
    position: absolute;
    justify-content: center;
    display: flex;
    width: fit-content;
    margin: 0 auto;
    max-width: 85%;
    right: 0;
    left: calc(0px * 2);

    content: var(--flexcyon-cust-hr-str);
    font-size: var(--flexcyon-cust-hr-str-font-size);
    color: var(--hr-color);
    padding: 0px var(--flexcyon-cust-hr-str-horiz-padding);
    font-style: italic;
  }
}

body.theme-dark.flexcyon-flex-max-mode .hr::before,
body.theme-dark.flexcyon-cust-str-hr .hr::before {
  background-color: var(--color-base-10);
}

body.theme-light.flexcyon-flex-max-mode .hr::before,
body.theme-light.flexcyon-cust-str-hr .hr::before {
  background-color: var(--color-base-00);
}

body.flexcyon-ribbon-top {
  --ribbon-width: max-content;

  .workspace {
    .workspace-ribbon {
      padding-left: 8px;
      margin-left: 8px;
      position: absolute;
      top: -42px;
      .side-dock-actions {
        margin-left: 69px;
        flex-direction: row;
        padding-right: 150vw;
      }
    }
    .workspace-split {
      padding-top: 48px;
    }
  }
}

body.flexcyon-vault-switch-top {
  .workspace-split:has(> .workspace-sidedock-vault-profile) {
    flex-direction: column-reverse;
  }
}

body.flexcyon-vault-reverse {
  .workspace-sidedock-vault-profile {
    flex-direction: row-reverse;
  }
}

body {
  .workspace-sidedock-vault-profile {
    .workspace-drawer-vault-actions {
      gap: 4px;
    }
  }
}
