.uq-context-help {
  min-width: 0;
  width: 100%;
}

.uq-context-help-heading {
  align-items: center;
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
}

.uq-context-help-heading > :not(.uq-context-help-trigger) {
  min-width: 0;
  overflow-wrap: anywhere;
}

.uq-context-help-heading > .form-label {
  margin-bottom: 0;
}

.uq-context-help-field {
  margin-bottom: 8px;
}

.uq-context-help-trigger {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 50%;
  color: #4b5563;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 28px;
  font-size: 16px;
  height: 28px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  width: 28px;
}

.uq-context-help-trigger:hover,
.uq-context-help-trigger[aria-expanded="true"] {
  background: #f3f4f6;
  color: #1f2937;
}

.uq-context-help-trigger:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.uq-context-help-inline {
  margin-inline-start: 6px;
  vertical-align: middle;
}

.uq-context-help-inline {
  display: inline-flex;
  flex: 0 0 auto;
  width: auto;
}

.uq-context-help-inline > .uq-context-help {
  width: auto;
}

.uq-context-help-inline .uq-context-help-heading {
  gap: 0;
}

.uq-context-help-trigger[hidden] {
  display: none;
}

.uq-context-help-popover {
  background: #fff;
  border: 1px solid #d8e2ea;
  border-radius: 8px;
  box-shadow: 0 6px 24px rgba(16, 24, 40, 0.16);
  box-sizing: border-box;
  flex-direction: column;
  inset: auto;
  margin: 0;
  max-height: min(320px, calc(100dvh - 24px));
  max-width: calc(100vw - 24px);
  padding: 0;
  position: fixed;
  text-align: start;
  width: 340px;
  z-index: 1090;
}

.uq-context-help-popover[hidden] {
  display: none;
}

.uq-context-help-popover.is-open {
  display: flex;
}

.uq-context-help-popover::backdrop {
  background: transparent;
  pointer-events: none;
}

.uq-context-help-popover:focus-visible,
.uq-context-help-content:focus-visible {
  outline: 2px solid #4b5563;
  outline-offset: 2px;
}

.uq-context-help-popover-heading {
  align-items: flex-start;
  border-bottom: 1px solid #edf0f4;
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  justify-content: space-between;
  padding: 10px 12px;
}

.uq-context-help-popover-heading h5 {
  align-self: center;
  color: #1d2939;
  font-size: calc(var(--uq-font-caption, 14px) * var(--uniqq-ui-scale, 1));
  font-weight: 600;
  line-height: 1.5;
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

.uq-context-help-popover .btn-close {
  flex-shrink: 0;
}

.uq-context-help-content {
  color: #475467;
  font-size: calc(var(--uq-font-caption, 14px) * var(--uniqq-ui-scale, 1));
  font-weight: 400;
  line-height: 1.65;
  min-height: 0;
  overflow-wrap: anywhere;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px;
  text-align: start;
  white-space: normal;
}

.uq-context-help-content p {
  margin: 0;
}

/* Header shells truncate their own title copy. Keep that rule from clipping
   full explanations when a help popover is anchored inside a page heading. */
.uq-context-help-popover .uq-context-help-content :is(p, span:not(.badge):not([class*="badge"])) {
  max-width: none !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
}

.uq-context-help-content p + p {
  margin-top: 12px;
}

.uq-context-help-content > div + div {
  margin-top: 12px;
}

@media (max-width: 767.98px), (pointer: coarse) {
  .uq-context-help-trigger {
    flex-basis: 44px;
    height: 44px;
    width: 44px;
  }
}
/* Keep audited help controls neutral even when page themes style buttons. */
body :is(.content, .modal, .dropdown-menu, .offcanvas) button:is(.uq-context-help-trigger, .uq-document-status-help, .pr-field-help, .inventory-pricing-margin-info, .medicine-hybrid-grid .btn[data-bs-toggle="tooltip"]),
:is(.uq-context-help-trigger, .uq-document-status-help, .pr-field-help, .inventory-pricing-margin-info, .medicine-hybrid-grid .btn[data-bs-toggle="tooltip"]) {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  color: #4b5563 !important;
}

body :is(.content, .modal, .dropdown-menu, .offcanvas) button:is(.uq-context-help-trigger, .uq-document-status-help, .pr-field-help, .inventory-pricing-margin-info, .medicine-hybrid-grid .btn[data-bs-toggle="tooltip"]):is(:hover, :focus-visible, [aria-expanded="true"]),
:is(.uq-context-help-trigger, .uq-document-status-help, .pr-field-help, .inventory-pricing-margin-info, .medicine-hybrid-grid .btn[data-bs-toggle="tooltip"]):is(:hover, :focus-visible, [aria-expanded="true"]) {
  background: #f3f4f6 !important;
  color: #1f2937 !important;
}

body :is(.content, .modal, .dropdown-menu, .offcanvas) button:is(.uq-context-help-trigger, .uq-document-status-help, .pr-field-help, .inventory-pricing-margin-info, .medicine-hybrid-grid .btn[data-bs-toggle="tooltip"]) i,
:is(.uq-context-help-trigger, .uq-document-status-help, .pr-field-help, .inventory-pricing-margin-info, .medicine-hybrid-grid .btn[data-bs-toggle="tooltip"]) i {
  color: inherit !important;
}

body :is(.content, .modal, .dropdown-menu, .offcanvas) button:is(.uq-context-help-trigger, .uq-document-status-help, .pr-field-help, .inventory-pricing-margin-info, .medicine-hybrid-grid .btn[data-bs-toggle="tooltip"]):focus-visible,
:is(.uq-context-help-trigger, .uq-document-status-help, .pr-field-help, .inventory-pricing-margin-info, .medicine-hybrid-grid .btn[data-bs-toggle="tooltip"]):focus-visible {
  outline: 2px solid #4b5563 !important;
  outline-offset: 2px !important;
}

.medicine-hybrid-grid .badge[data-bs-toggle="tooltip"] > .icon-info {
  color: #4b5563 !important;
}

.medicine-hybrid-grid .badge[data-bs-toggle="tooltip"]:is(:hover, :focus-visible) > .icon-info {
  color: #1f2937 !important;
}
/* End of contextual-help stylesheet. */
