Skip to content

A lightweight, macOS-style dock for Windows 11, with glass visuals, smooth magnification, and Genie effect.

3.0 KB
Raw Blame
/* The AI usage island: a black pill under the menu bar that opens into a panel. */

.island {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 5;
  width: fit-content;
  translate: -50% 0;
  overflow: hidden;
  border-radius: 0 0 14px 14px;
  background: #0b0c0f;
  color: #fff;
  font-size: 11px;
  text-align: left;
  box-shadow: 0 10px 28px rgb(0 0 0 / 0.35);
  transition: border-radius 0.25s ease;
}

.island:focus-visible {
  outline: 2px solid var(--color-primary, #0a84ff);
  outline-offset: 2px;
}

.island-compact {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 28px;
  padding: 0 12px;
  width: fit-content;
}

.island-provider {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.island-provider img {
  width: 14px;
  height: 14px;
}

.island-divider {
  width: 1px;
  height: 14px;
  background: rgb(255 255 255 / 0.2);
}

.island-ring {
  width: 14px;
  height: 14px;
  rotate: -90deg;
}

.island-ring circle {
  fill: none;
  stroke: rgb(255 255 255 / 0.18);
  stroke-width: 2.4;
}

.island-ring circle + circle {
  stroke: var(--ring);
  stroke-linecap: round;
}

/* The panel: folded away until the island opens. */
.island-panel {
  display: grid;
  width: 0;
  max-height: 0;
  overflow: hidden;
  padding: 0;
  opacity: 0;
  transition:
    width 0.3s ease,
    max-height 0.3s cubic-bezier(0.3, 0.7, 0.2, 1),
    opacity 0.2s ease,
    padding 0.3s ease;
}

.island-open .island-panel,
.island-hover:is(:hover, :focus-visible, :focus-within) .island-panel {
  width: min(360px, 86vw);
  max-height: min(390px, 80vh);
  overflow-y: auto;
  padding: 4px 14px 12px;
  opacity: 1;
  scrollbar-width: thin;
}

.island-open .island-compact,
.island-hover:is(:hover, :focus-visible, :focus-within) .island-compact {
  width: 100%;
  justify-content: center;
}

.island-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 4px 0 8px;
  border-bottom: 1px solid rgb(255 255 255 / 0.1);
}

.island-head b {
  font-size: 13px;
}

.island-head span,
.island-meta {
  color: rgb(255 255 255 / 0.55);
}

.island-row {
  display: flex;
  gap: 8px;
  padding: 6px 0;
}

.island-row + .island-row {
  border-top: 1px solid rgb(255 255 255 / 0.08);
}

.island-row img {
  flex: none;
  width: 18px;
  height: 18px;
}

.island-detail {
  flex: 1;
  min-width: 0;
}

.island-detail p {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
}

.island-detail b {
  font-size: 12px;
}

.island-bar {
  display: block;
  height: 4px;
  margin: 6px 0;
  overflow: hidden;
  border-radius: 2px;
  background: rgb(255 255 255 / 0.15);
}

.island-bar i {
  display: block;
  height: 100%;
  border-radius: 2px;
}

.island-meta {
  font-size: 10px;
}

@media (max-width: 520px) {
  .island-compact {
    gap: 5px;
    padding: 0 8px;
  }

  .island-provider {
    gap: 4px;
  }

  .island-provider img {
    width: 14px;
    height: 14px;
  }

  .island-divider,
  .island-ring {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .island,
  .island-panel {
    transition: none;
  }
}