.c-toolbar {
  --toolbar-layer: 10000;
  --toolbar-bg: #000000d9;
  --toolbar-text: #fff;
  --toolbar-text-muted: #999;

  display: contents;
  font-family:
    ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
    "Noto Color Emoji";
}

.c-toolbar_root {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: var(--toolbar-layer);
  background-color: var(--toolbar-bg);
  color: var(--toolbar-text);
  border: 1px solid rgba(52, 56, 65, 1);
  border-radius: 999px;
  box-shadow: var(--ds-shadow-s);
  transition: opacity 0.6s cubic-bezier(0.19, 1, 0.22, 1);
  user-select: none;
  display: flex;
  justify-content: center;
  font-size: 0.75rem;
  overflow: hidden;
}

.c-toolbar_items {
  display: inline-flex;
  flex-flow: row;
  align-items: center;

  .item {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.375rem 0.5rem;
    line-height: 1.5;
    display: flex;
    align-items: center;
    width: fit-content;
    height: 100%;

    &:is(:first-of-type) {
      padding-inline-start: 0.75rem;
    }
    &:is(:last-of-type) {
      padding-inline-end: 0.75rem;
    }
    &:hover {
      background-color: #ffffff20;
    }
    &.profile {
      text-transform: capitalize;
    }
  }

  .separator {
    background: rgba(52, 56, 65, 1);
    width: 1px;
    height: 100%;
  }
}

/**
 * Toolbar Panels
 */
.c-toolbar_canvas {
  position: absolute;
  inset: 0;
  display: none;

  &[data-visible="true"] {
    display: block;
  }
}

.c-toolbar_window {
  display: flex;
  flex-flow: column;
  background-color: #000000;
  border: 1px solid rgba(52, 56, 65, 1);
  color: var(--toolbar-text);
  width: min(580px, 100%);
  max-width: calc(100% - (16px * 2));
  max-height: 480px;
  border-radius: 12px;
  padding: 24px;
  position: fixed;
  z-index: var(--toolbar-layer);
  bottom: 58px;
  right: 16px;

  & > [data-toolbar-app] {
    display: none;
  }
  & > [data-toolbar-app][data-visible="true"] {
    display: block;
  }

  /* base content styles */
  hr {
    border: 1px solid rgba(27, 30, 36, 1);
    margin: 1em 0;
    display: inline-flex;
    width: 100%;
  }

  header {
    display: flex;

    :is(h1, h2) {
      display: flex;
      align-items: center;
      gap: 8px;
      font-weight: 600;
      font-size: 22px;
      letter-spacing: -0.01em;
      color: var(--toolbar-text);
    }
  }

  .main-container {
    display: flex;
    flex-flow: column;
    height: 100%;
    gap: 1.5rem;
    color: var(--toolbar-text-muted);

    :is(h2, h3, h4) {
      font-weight: 600;
      margin-bottom: 4px;
      color: var(--toolbar-text);
      font-size: 1rem;
    }
  }

  .setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
  }
}

/**
 * Toolbar Common
 */
.c-toolbar-badge {
  --text-color: #bfc1c9;
  --border-color: #bfc1c9;
  --size: 24px;
  font-family: var(--ds-font-code);
  border-radius: 4px;
  padding: 8px;
  font-size: 12px;
  color: var(--text-color);
  height: var(--size);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
}

.c-toolbar-button {
  display: inline-flex;
}

/**
 * Toolbar Apps
 */
.c-toolbar div[data-toolbar-app="home"] {
  header {
    display: flex;
    flex-flow: row;
    justify-content: space-between;
    align-items: center;
  }

  .version {
    display: flex;
    flex-flow: row;
    gap: 0.8em;
  }

  .links {
    display: flex;
    justify-content: center;
    margin: auto 0;
    gap: 24px;

    .icon {
      --icon-size: 24px;
    }

    a {
      text-decoration: none;
      display: flex;
      flex-flow: column;
      align-items: center;
      gap: 0.7em;
      flex: 1;
      white-space: nowrap;
      font-weight: 600;
      color: var(--toolbar-text);
    }
  }
}
