/* Hard incompatibilities stay visible and disabled; a compact question-mark
   explains the grounded cause. Shared by the main builder drawer and picker. */
.picker-card.card-incompatible {
  position: relative;
  overflow: visible;
  z-index: 1;
}
.picker-card.card-incompatible:has(.pc-help-wrap:hover),
.picker-card.card-incompatible:has(.pc-help-wrap[data-help-open]),
.picker-card.card-incompatible:has(.pc-help-wrap:focus-within) {
  z-index: 40;
}
.pc-action-row {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  min-width: 0;
}
.pc-action-row > .builder-add-btn {
  flex: 1 1 auto;
  width: auto !important;
  min-width: 0;
}
.pc-help-wrap {
  position: relative;
  flex: 0 0 29px;
  width: 29px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.pc-help-trigger {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 29px;
  height: 29px;
  padding: 0;
  border: 1px solid var(--border,#cbd5e1);
  border-radius: 50%;
  color: var(--danger,#b91c1c);
  background: var(--surface,#fff);
  font: inherit;
  font-size: 16px;
  line-height: 1;
  font-weight: 900;
  cursor: help;
}
.pc-help-trigger:focus-visible {
  outline: 3px solid var(--primary,#f97316);
  outline-offset: 2px;
}
.pc-help-popover {
  display: none;
  position: absolute;
  z-index: 50;
  inset-block-end: calc(100% + 10px);
  inset-inline-end: 0;
  width: min(320px, 76vw);
  max-height: min(50vh, 325px);
  overflow-y: auto;
  box-sizing: border-box;
  padding: 12px 13px;
  border: 1px solid var(--border,#cbd5e1);
  border-radius: 12px;
  color: var(--text,#111827);
  background: var(--surface,#fff);
  box-shadow: 0 12px 32px rgba(0,0,0,.22);
  text-align: right;
  direction: rtl;
  white-space: normal;
  font-size: 12.5px;
  line-height: 1.85;
}
.pc-help-popover > strong {
  display: block;
  color: var(--danger,#b91c1c);
  font-size: 13px;
  margin-bottom: 7px;
}
.pc-help-reason {
  display: grid;
  gap: 3px;
  margin: 0 0 9px;
}
.pc-help-reason:last-child { margin-bottom: 0; }
.pc-help-reason > b { font-weight: 850; color: var(--text,#111827); }
.pc-help-reason > span { color: var(--text-muted,#64748b); }
.pc-help-reason > span:last-child { color: var(--text,#111827); }
.pc-help-reason > span:last-child b { color: var(--success,#16803d); }
.pc-help-wrap[data-help-open] .pc-help-popover { display: block; }
@media (hover: hover) and (pointer: fine) {
  .pc-help-wrap:hover .pc-help-popover { display: block; }
}
@media (max-width: 760px) {
  .pc-help-trigger { cursor: pointer; width: 32px; height: 32px; }
  .pc-help-wrap { flex-basis: 32px; width: 32px; }
  .pc-help-popover { width: min(295px, 76vw); }
}
