/* Keep the native table cells, status colours and Master Detail POST forms. */
@media (max-width: 650px) {
  #brfc-pilot.season-pilot .season-selector .wpdt-c table.wpDataTable tbody {
    gap: 10px;
  }
  #brfc-pilot.season-pilot .season-selector .wpdt-c table.wpDataTable tbody tr:has(td.column-season_name) {
    position: relative;
    display: flex !important;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 8px;
    padding: 16px 72px 16px 16px;
  }
  /* A presentation-only line break groups the existing position/points cells. */
  #brfc-pilot.season-pilot .season-selector .wpdt-c table.wpDataTable tbody tr:has(td.column-season_name)::after {
    content: '';
    order: 4;
    flex-basis: 100%;
    height: 0;
    margin-top: 9px;
  }
  #brfc-pilot.season-pilot .season-selector .wpdt-c table.wpDataTable tbody tr td.column-season_name {
    order: 1;
    flex-basis: 100%;
    margin-bottom: 6px;
    font: 700 16px/22px 'DM Sans', Arial, sans-serif !important;
  }
  #brfc-pilot.season-pilot .season-selector .wpdt-c table.wpDataTable tbody tr td.column-competition_name {
    order: 2;
    max-width: 100%;
    overflow-wrap: anywhere;
    font: 400 12px/18px 'DM Sans', Arial, sans-serif !important;
  }
  #brfc-pilot.season-pilot .season-selector .wpdt-c table.wpDataTable tbody tr td.column-tier {
    order: 3;
    align-self: baseline;
    text-align: left !important;
    font: 400 12px/18px 'DM Sans', Arial, sans-serif !important;
  }
  #brfc-pilot.season-pilot .season-selector .wpdt-c table.wpDataTable tbody tr td.column-tier::before {
    content: '\00b7';
    margin-right: 8px;
    color: #96a1b0;
  }
  #brfc-pilot.season-pilot .season-selector .wpdt-c table.wpDataTable tbody tr td:is(.column-final_position, .column-league_points_total) {
    padding: 0 !important;
    border: 0 !important;
    text-align: left !important;
    font: 700 13px/18px 'DM Sans', Arial, sans-serif !important;
  }
  #brfc-pilot.season-pilot .season-selector .wpdt-c table.wpDataTable tbody tr td.column-final_position {
    order: 5;
  }
  #brfc-pilot.season-pilot .season-selector .wpdt-c table.wpDataTable tbody tr td.column-league_points_total {
    order: 6;
  }
  #brfc-pilot.season-pilot .season-selector .wpdt-c table.wpDataTable tbody tr td:is(.column-final_position, .column-league_points_total)::before,
  #brfc-pilot.season-pilot .season-selector .wpdt-c table.wpDataTable tbody tr td.column-league_points_total::after {
    color: #627086;
    font: 400 12px/18px 'DM Sans', Arial, sans-serif;
    text-transform: none;
    letter-spacing: normal;
  }
  #brfc-pilot.season-pilot .season-selector .wpdt-c table.wpDataTable tbody tr td.column-final_position::before {
    content: 'Position';
    margin-right: 5px;
  }
  #brfc-pilot.season-pilot .season-selector .wpdt-c table.wpDataTable tbody tr td.column-league_points_total::before {
    content: '\00b7';
    margin-right: 8px;
  }
  #brfc-pilot.season-pilot .season-selector .wpdt-c table.wpDataTable tbody tr td.column-league_points_total::after {
    content: ' points';
  }
  #brfc-pilot.season-pilot .season-selector .wpdt-c table.wpDataTable tbody tr td.column-masterdetail {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 44px !important;
  }
  #brfc-pilot.season-pilot .season-selector .wpdt-c .master_detail_column_btn {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    border-radius: 8px !important;
  }
  #brfc-pilot.season-pilot .season-selector .wpdt-c .master_detail_column_btn:focus-visible {
    outline: 2px solid #0877cf;
    outline-offset: 3px;
  }
}
