/* Turn-tail produced-files summary: one measured chip lane plus an optional
   native-folder action below it. */

.root {
  position: relative;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  column-gap: 8px;
  row-gap: 6px;
  margin-top: 16px;
  font-size: 13px;
  line-height: 22px;
}

.label {
  grid-column: 1;
  grid-row: 1;
  color: var(--dsw-alias-label-tertiary);
}

.row {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
}

/* One produced file. A link by behavior (it opens the file), a chip by shape:
   full paths are long, while the measured lane stays on one row. */
.file {
  flex: 0 0 auto;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin: 0;
  padding: 0 8px;
  border: none;
  border-radius: 6px;
  background: var(--dsw-alias-interactive-bg-hover);
  color: var(--dsw-alias-label-secondary);
  font: inherit;
  cursor: pointer;
}

.file:hover {
  color: var(--dsw-alias-label-primary);
  text-decoration: underline;
}

.file:focus-visible,
.showFolder:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--dsw-alias-border-l3);
}

/* Overflow count: the row never silently drops files it did not show. */
.more {
  flex: 0 0 auto;
  white-space: nowrap;
  color: var(--dsw-alias-label-tertiary);
}

.showFolder {
  grid-column: 2;
  grid-row: 2;
  justify-self: start;
  margin: 0;
  padding: 0 2px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--dsw-alias-label-tertiary);
  font: inherit;
  line-height: 20px;
  cursor: pointer;
}

.showFolder:hover {
  color: var(--dsw-alias-label-secondary);
  text-decoration: underline;
}

/* Exact browser-native probes for every candidate shown count. They share the
   visible styles but never affect layout, accessibility, or scroll width. */
.measure {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  visibility: hidden;
  pointer-events: none;
  contain: strict;
}

.probe {
  position: absolute;
  inset: 0 auto auto 0;
  width: max-content;
}
