
/* tree */
.project_tree {
  position: relative;
  /* width: -moz-fit-content;
  width: fit-content; */
  /* margin: 0 auto; */
}

.project_tree details>summary {
  list-style: none;
}

.project_tree summary::-webkit-details-marker {
  display: none
}

/* folder */

.project_tree-folder {
  border: var(--base-border);
  border-radius: calc(0.5 * var(--base-rhythm));
  overflow: hidden;
  position: relative;
  padding-left: var(--base-rhythm);
  padding-right: var(--base-rhythm);
  background: var(--color-bg-secondary);
}

.project_tree-folder[open] {
  background: transparent;
}

.project_tree-folder.source {
  padding-right: 0;
  border-right: none;
  border-bottom: none;
}

.project_tree-folder summary {
  position: relative;
  cursor: pointer;
  user-select: none;
}

.project_tree-folder-title {
  font-weight: bold;
  display: flex;
  column-gap: calc(0.5 * var(--base-rhythm));
  font-size: 0.85rem;
  line-height: 1.2;
  color: #666;
  padding: calc(0.5 * var(--base-rhythm));
  position: relative;
}

.project_tree-folder-title::before,
.project_tree-folder-title::after {
  content: '';
  position: absolute;
  top: 0;
  right: -20px;
  left: -20px;
  bottom: 0;
}

.project_tree-folder-title::after {
  background: var(--color-bg-secondary);
}

.project_tree-folder summary:hover > .project_tree-folder-title::before {
  background: var(--color-bg-secondary);
}

.project_tree-folder summary:hover > .project_tree-folder-title,
.project_tree-folder summary:hover::after {
  color: var(--color-fg-accent);
}

/* .icon_collapse_expand is class inside SVG */
.project_tree-folder-title .icon_collapse_expand {
  margin-left: auto;
}
/* .collapsed and .expanded are classes inside SVG .icon_collapse */
.project_tree-folder > summary .icon_collapse_expand .collapsed {
  display: initial;
}
.project_tree-folder > summary .icon_collapse_expand .expanded {
  display: none;
}
.project_tree-folder[open] > summary .icon_collapse_expand .expanded {
  display: initial;
}
.project_tree-folder[open] > summary .icon_collapse_expand .collapsed {
  display: none;
}

.project_tree-folder-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--base-rhythm);
  padding-top: var(--base-rhythm);
  padding-bottom: var(--base-rhythm);
}

/* file */

.project_tree-file {
  display: flex;
  column-gap: var(--base-rhythm);
  padding: calc(0.5 * var(--base-rhythm));
  border-radius: calc(0.5 * var(--base-rhythm));
  transition: background .3s;
  border: 1px solid rgba(255,255,255,0);
}

.project_tree-file:not([href]):hover  {
  border: 1px solid rgba(255,255,255,0.75);
  background: rgba(0,0,0,0.01);
}

.project_tree-file[href]:hover {
  background: rgba(255,255,255,0.5);
}

.project_tree-file[href]:hover .project_tree-file-icon,
.project_tree-file[href]:hover .project_tree-file-title {
  color: var(--color-fg-accent);
}

.project_tree-file-details {
  display: block;
}

.project_tree-file-icon {
  line-height: 0;
}

.project_tree-file-title {
  font-size: 1em;
  font-weight: 500;
  line-height: 1.2;
  transition: color .2s;
}

.project_tree-file-icon,
.project_tree-file-title {
  color: var(--color-fg-secondary);
}

.project_tree-file[href] .project_tree-file-icon,
.project_tree-file[href] .project_tree-file-title {
  color: var(--color-fg-main);
}

.project_tree-file-name {
  font-size: 0.85rem;
  line-height: 1.2;
  color: var(--color-fg-secondary);
  margin-top: 0.25rem;
}

.project_tree-file-aside {
  margin-left: auto;
}

/* dashboard */

.dashboard {
  display: flex;
  align-items: flex-start;
  gap: var(--base-rhythm);
}

.dashboard-main {
  flex-grow: 1;
}

.dashboard-aside {
  width: 30%;
  /* max-width: 300px; */
  font-size: 0.75rem;
  display: flex;
  gap: var(--base-rhythm);
  flex-direction: column;
}

.dashboard-block:empty {
  display: none;
}

.dashboard-block {
  border: var(--base-border);
  border-radius: calc(0.5 * var(--base-rhythm));
  overflow: hidden;
  position: relative;
  padding: var(--base-rhythm);
}

.dashboard-block-title {
  font-weight: 600;
  position: relative;
  top: calc(-1 * var(--base-rhythm));
  color: var(--color-fg-secondary);
  padding: calc(0.5 * var(--base-rhythm)) 0;
}

.dashboard-block-title::after {
  content: '';
  position: absolute;
  top: -20px;
  left: -20px;
  right: -20px;
  bottom: 0;
  background-color: rgba(0,0,0,0.025);
  border-bottom: var(--base-border);
}
