/*
 * FreeTech / GitLab visual scoped labels
 * Turns ordinary labels like workflow::to-do into a two-part visual pill.
 * Server-side GitLab behavior is not changed.
 */

.ft-glsl-root.gl-label,
.gl-label.ft-glsl-root {
  padding: 0 !important;
  overflow: hidden !important;
}

.ft-glsl-text {
  display: inline-flex !important;
  align-items: stretch !important;
  max-width: 100% !important;
  padding: 0 !important;
  overflow: hidden !important;
  border-radius: inherit !important;
  white-space: nowrap !important;
  vertical-align: middle !important;
  color: var(--ft-glsl-fg, inherit) !important;
}

.ft-glsl-part {
  display: inline-flex !important;
  align-items: center !important;
  min-height: 18px !important;
  padding: 0 0.48em !important;
  font: inherit !important;
  line-height: 18px !important;
  color: var(--ft-glsl-fg, inherit) !important;
}

.ft-glsl-scope {
  background: var(--ft-glsl-scope-bg, rgba(0, 0, 0, 0.22)) !important;
  font-weight: 600 !important;
}

.ft-glsl-value {
  background: var(--ft-glsl-value-bg, transparent) !important;
}

/* Preserve the original textContent as workflow::to-do for accessibility/copying, but hide :: visually. */
.ft-glsl-separator {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  border: 0 !important;
  white-space: nowrap !important;
}

/* Compact GitLab labels on issue boards/lists. */
.gl-label-sm.ft-glsl-root .ft-glsl-part,
.ft-glsl-root.gl-label-sm .ft-glsl-part,
.gl-label-sm .ft-glsl-text .ft-glsl-part {
  min-height: 16px !important;
  line-height: 16px !important;
  padding-left: 0.42em !important;
  padding-right: 0.42em !important;
}

/* Do not re-split real Premium scoped labels if they appear later. */
.gl-label-scoped .ft-glsl-text,
.gl-label-scoped .ft-glsl-part {
  all: revert;
}
