/* PH-21 — computed priority: G02 badge tooltip (Figma 156:6226) and the
   G03 « Modifier » override form. Tokens only (colors_and_type.css). */

.prr-badge {
  position: relative;
  display: inline-flex;
  border-radius: var(--radius-xs);
}
.prr-badge:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* Figma: inverse surface, 12 px padding, title semibold, lines regular, note small. */
.prr-tip {
  position: absolute;
  top: calc(100% + var(--space-2));
  left: 0;
  z-index: 40;
  display: none;
  flex-direction: column;
  gap: var(--space-1);
  width: max-content;
  max-width: 320px;
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: var(--bg-inverse);
  color: var(--text-inverse);
  box-shadow: var(--shadow-overlay);
  font-size: var(--text-base);
  line-height: var(--leading-snug);
  font-weight: var(--font-weight-regular);
  text-align: left;
  white-space: normal;
  pointer-events: none;
}
.prr-badge:hover .prr-tip,
.prr-badge:focus-visible .prr-tip,
.prr-badge:focus .prr-tip {
  display: flex;
}
/* The queue table scrolls inside its frame: the last rows open the tooltip upward. */
tr:nth-last-child(-n+2) .prr-tip {
  top: auto;
  bottom: calc(100% + var(--space-2));
}
.prr-tip-title {
  font-weight: var(--font-weight-semibold);
}
.prr-tip-note {
  font-size: var(--text-sm);
}

/* G03: badge, « Impact : … · Urgence : … » and « Modifier ». */
.prr-line {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.prr-line-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}
.prr-line-text {
  color: var(--text-primary);
  font-size: var(--text-base);
}
.prr-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-primary);
  font: inherit;
  font-size: var(--text-base);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.prr-link:focus-visible {
  outline: none;
  border-radius: var(--radius-xs);
  box-shadow: var(--focus-ring);
}

.prr-override {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
}
.prr-override-title {
  margin: 0;
  font-size: var(--text-base);
  font-weight: var(--font-weight-semibold);
}
.prr-override-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

@media (max-width: 760px) {
  .prr-link { min-height: 44px; }
  .prr-tip { max-width: calc(100vw - 2 * var(--space-4)); }
}
