/* SB Feature Groups 1.7.14 — the help icon next to a feature name never takes a line of its own.
   Loaded only while the «FC_HELP_SLOT» switch is on. Browsers without :has() keep the previous layout.
   :not(#sbfg-x) only raises specificity above the !important rules of front.css / values.css. */
@supports selector(:has(*)) {
  .sbffc-root {
    --sbfg-help-size: 16px;   /* icon size */
    --sbfg-help-edge: 3px;    /* icon → cell edge */
    --sbfg-help-gap: 3px;     /* icon → text */
    --sbfg-help-top: 7px;     /* icon → cell top */
  }

  .sbffc-root.sbffc-single-root { --sbfg-help-top: 9px; }

  /* room for the icon, only in cells that have one */
  .sbffc-root:not(#sbfg-x) .sbffc-feature-name-cell:has(.myfeadesc-tooltip-trigger, .kfa-unified-help-icon),
  .sbffc-root:not(#sbfg-x) .sbfg-frozen-cell:has(.myfeadesc-tooltip-trigger, .kfa-unified-help-icon) {
    padding-inline-end: calc(var(--sbfg-help-size) + var(--sbfg-help-edge) + var(--sbfg-help-gap)) !important;
  }

  /* touch screens: the frozen copy of the column follows the real cell (same padding, same line breaks) */
  .sbffc-root:not(#sbfg-x) .sbfg-frozen-cell:has(.myfeadesc-tooltip-trigger, .kfa-unified-help-icon) {
    padding-block: 6px !important;
    padding-inline-start: 8px !important;
  }
  .sbffc-root:not(#sbfg-x) .sbfg-frozen-cell:has(.myfeadesc-tooltip-trigger, .kfa-unified-help-icon) .sbffc-feature-name-text {
    white-space: normal !important;
    overflow: visible !important;
  }

  /* cells that are position:static in these layouts need an anchor for the icon (sticky ones already are) */
  .sbffc-root.sbffc-single-root:not(#sbfg-x) .sbffc-feature-name-cell,
  .sbffc-root.sbffc-one-visible-product:not(#sbfg-x) .sbffc-feature-name-cell {
    position: relative !important;
  }

  .sbffc-root:not(#sbfg-x) .sbffc-feature-name-cell .myfeadesc-tooltip-trigger,
  .sbffc-root:not(#sbfg-x) .sbfg-frozen-cell .myfeadesc-tooltip-trigger,
  .sbffc-root:not(#sbfg-x) .sbffc-feature-name-cell .kfa-unified-help-icon,
  .sbffc-root:not(#sbfg-x) .sbfg-frozen-cell .kfa-unified-help-icon {
    position: absolute !important;
    top: var(--sbfg-help-top) !important;
    bottom: auto !important;
    inset-inline-end: var(--sbfg-help-edge) !important;
    inset-inline-start: auto !important;
    float: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    width: var(--sbfg-help-size) !important;
    min-width: var(--sbfg-help-size) !important;
    max-width: var(--sbfg-help-size) !important;
    height: var(--sbfg-help-size) !important;
    min-height: var(--sbfg-help-size) !important;
    max-height: var(--sbfg-help-size) !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
  }
  .sbffc-root:not(#sbfg-x) .sbffc-feature-name-cell .kfa-unified-help-icon,
  .sbffc-root:not(#sbfg-x) .sbfg-frozen-cell .kfa-unified-help-icon {
    font-size: var(--sbfg-help-size) !important;
  }
}
