/* Forge extras: loaded on every page, whatever theme is picked. */

/* Tabs and links switched off for a one-person forge. */
#navbar a.item[href$="/explore/repos"],
#navbar a.item[href$="/explore/organizations"],
.repository .issue-list-toolbar a[href$="/milestones"],
.repository .list-header a[href$="/milestones"],
.repository .overflow-menu-items a[href$="/milestones"] {
  display: none !important;
}

/* ---- Top bar: Kyle's Forge, your repos as tabs, Issues and PRs as icons --
   The repo tabs come from templates/custom/extra_links.tmpl. */
@media (min-width: 768px) {
  #navbar .navbar-left { flex: 1; }
  #navbar #navbar-logo {
    order: 0;
    gap: 8px;
    margin-right: 8px;
    padding-right: 16px;
    border-right: 1px solid var(--color-secondary);
    border-radius: 0;
  }
  #navbar #navbar-logo::after {
    content: "Kyle's Forge";
    font-weight: 700;
    font-size: 15px;
    letter-spacing: -0.01em;
    color: var(--color-text);
    white-space: nowrap;
  }
  #navbar .forge-repo-tab {
    order: 1;
    align-self: stretch;
    margin: 0 2px !important;
    padding: 0 14px !important;
    border-radius: 0 !important;
    color: var(--color-text-light-2);
    font-weight: 550;
    box-shadow: inset 0 -2px 0 transparent;
    transition: color 0.12s, box-shadow 0.12s, background 0.12s;
  }
  #navbar .forge-repo-tab:hover {
    color: var(--color-text);
    background: var(--color-nav-hover-bg);
    box-shadow: inset 0 -2px 0 var(--color-primary-alpha-50);
  }
  #navbar .forge-repo-tab.active {
    color: var(--color-text-dark);
    background: transparent;
    box-shadow: inset 0 -2px 0 var(--color-primary);
  }
  /* Issues and Pull requests: icon buttons at the right of the bar. */
  #navbar .navbar-left > a.item[href$="/issues"],
  #navbar .navbar-left > a.item[href$="/pulls"] {
    order: 2;
    font-size: 0;
    padding: 0 10px !important;
  }
  #navbar .navbar-left > a.item[href$="/issues"] { margin-left: auto !important; }
  #navbar .navbar-left > a.item[href$="/issues"]::before,
  #navbar .navbar-left > a.item[href$="/pulls"]::before {
    content: "";
    width: 16px;
    height: 16px;
    background: currentColor;
    -webkit-mask: var(--forge-icon) center / contain no-repeat;
    mask: var(--forge-icon) center / contain no-repeat;
  }
  #navbar .navbar-left > a.item[href$="/issues"] {
    --forge-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z'/%3E%3Cpath d='M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Z'/%3E%3C/svg%3E");
  }
  #navbar .navbar-left > a.item[href$="/pulls"] {
    --forge-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M1.5 3.25a2.25 2.25 0 1 1 3 2.12v5.26a2.25 2.25 0 1 1-1.5 0V5.37A2.25 2.25 0 0 1 1.5 3.25Zm5.68-.53L9.94.47a.25.25 0 0 1 .43.18V2h.88A2.75 2.75 0 0 1 14 4.75v5.88a2.25 2.25 0 1 1-1.5 0V4.75c0-.69-.56-1.25-1.25-1.25h-.88v1.35a.25.25 0 0 1-.43.18L7.18 3.28a.25.25 0 0 1 0-.36ZM3.75 2.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm0 9.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm8.25.75a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Z'/%3E%3C/svg%3E");
  }
}
