/* VE-v26 — prevent header-pill collisions in the dynamic team table.
   Extra Services keeps its dedicated two-line header and wider one-line data.
   The columns below keep their existing widths and visual editor settings. */
@media (min-width: 921px) {
  .team-panel .team-table[data-dynamic-metrics="1"] thead th[data-metric-key] {
    box-sizing: border-box !important;
    min-width: 0 !important;
    padding-left: 2px !important;
    padding-right: 2px !important;
    overflow: hidden !important;
    text-overflow: clip !important;
    vertical-align: middle !important;
    text-align: center !important;
  }

  .team-panel .team-table[data-dynamic-metrics="1"] thead th[data-metric-key] .metric-header-pill {
    box-sizing: border-box !important;
    display: inline-flex !important;
    inline-size: fit-content !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 3px 4px !important;
    margin: 0 auto !important;
    font-size: clamp(9px, 0.60vw, 11px) !important;
    line-height: 1.13 !important;
    text-align: center !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
    hyphens: auto;
    text-wrap: balance;
    overflow: hidden !important;
  }

  /* Keep the special title split as exactly two intended lines. */
  .team-panel .team-table[data-dynamic-metrics="1"] thead th[data-metric-key="extraServices"] .team-extra-header-pill {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 32px !important;
    padding: 3px 6px !important;
  }
  .team-panel .team-table[data-dynamic-metrics="1"] thead th[data-metric-key="extraServices"] .team-extra-header-line {
    display: block !important;
    white-space: nowrap !important;
  }

  /* At wider TV resolutions the headers can use a little more type size
     without allowing natural-width pills to paint over adjacent columns. */
  html[data-responsive-layout="tv"] .team-panel .team-table[data-dynamic-metrics="1"] thead th[data-metric-key] .metric-header-pill {
    font-size: clamp(9.5px, 0.63vw, 12px) !important;
  }
}
