[data-component="session-tab-popover-trigger"] {
  display: flex;
  width: 100%;
  min-width: 0;
}

[data-component="session-tab-popover"] {
  z-index: 50;
  box-sizing: border-box;
  width: 256px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;

  background: var(--v2-background-bg-base);
  border-radius: 6px;
  box-shadow: var(--v2-elevation-floating);

  color: var(--v2-text-text-base);
  font-variant-numeric: tabular-nums;
  user-select: none;
  pointer-events: none;

  transform-origin: var(--kb-hovercard-content-transform-origin);
  /* Entrance: fade in while scaling up from 0.96 to 1.0. */
  animation: sessionTabPopoverIn 150ms cubic-bezier(0.16, 1, 0.3, 1);

  &:focus-visible,
  &:focus-within {
    outline: none;
  }

  /* Exit: subtle fade + scale down, using the same ease-out curve as entry. */
  &[data-closed] {
    animation: sessionTabPopoverOut 100ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }

  [data-slot="header"] {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }

  [data-slot="project"] {
    font-weight: 440;
    font-size: 13px;
    line-height: 1;
    letter-spacing: -0.04px;
    color: var(--v2-text-text-muted);
  }

  [data-slot="title"] {
    font-weight: 530;
    font-size: 13px;
    line-height: 1.2;
    letter-spacing: -0.04px;
    color: var(--v2-text-text-base);
    overflow-wrap: anywhere;
  }

  [data-slot="row"] {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    min-width: 0;
  }

  [data-slot="icon"] {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    color: var(--v2-icon-icon-muted);
  }

  [data-slot="detail"] {
    flex: 1 0 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 440;
    font-size: 13px;
    line-height: 1;
    letter-spacing: -0.04px;
    color: var(--v2-text-text-muted);
  }

  [data-slot="server"] {
    font-weight: 440;
    font-size: 13px;
    line-height: 1;
    letter-spacing: -0.04px;
    color: var(--v2-text-text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@keyframes sessionTabPopoverIn {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes sessionTabPopoverOut {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.96);
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-component="session-tab-popover"],
  [data-component="session-tab-popover"][data-closed] {
    animation: none;
  }
}
