/* 1.0.318 — finish sparse reference flows and disabled guidance. */
@media (min-width: 769px) {
  /* The safe disabled message is a pseudo-element, so place it explicitly in
     the same two-row footer grid that previously contained a real span. */
  #fotor-root .editor-shell:not(.is-mobile) .left-panel .ai-hair-footer[data-sg-disabled-reason]::before {
    content: attr(data-sg-disabled-reason) !important;
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    color: rgba(157,167,180,.76) !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    text-align: left !important;
  }

  #fotor-root .editor-shell:not(.is-mobile) .left-panel .ai-hair-footer[data-sg-disabled-reason] > select {
    grid-row: 2 !important;
  }

  #fotor-root .editor-shell:not(.is-mobile) .left-panel .ai-hair-footer[data-sg-disabled-reason] > .ai-hair-run {
    grid-row: 2 !important;
  }

  /* A sparse add-person catalog (description + one photo option) should end
     near its controls instead of stretching an empty scroller to the footer. */
  #fotor-root .editor-shell:not(.is-mobile) .sg-add-person-page > .ai-hair-scroll:has(.ai-hair-grid > :last-child:nth-child(-n + 2)) {
    flex: 0 0 auto !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    padding-bottom: 12px !important;
    overflow: visible !important;
  }

  #fotor-root .editor-shell:not(.is-mobile) .sg-add-person-page:has(> .ai-hair-scroll .ai-hair-grid > :last-child:nth-child(-n + 2)) > .ai-hair-footer {
    position: static !important;
    flex: 0 0 auto !important;
    margin-top: 0 !important;
  }
}
