/* Compact fight-history rows for fighter and boxer profile pages on mobile. */
@media (max-width:760px){
  .fighter-history-section .fight-history-table tbody,
  .boxer-page .fight-history-table.boxing-result-columns-ready tbody{
    gap:7px!important;
  }

  /* MMA: turn the old stacked card into a dense three-line row. */
  .fighter-history-section .fight-history-table tr.history-fight-main-row,
  .fighter-history-section .fight-history-table tr.history-cancelled-row{
    display:grid!important;
    grid-template-columns:auto minmax(0,1fr) auto auto!important;
    grid-template-rows:auto auto auto!important;
    gap:5px 8px!important;
    align-items:center!important;
    width:100%!important;
    padding:9px 10px!important;
    border:1px solid var(--line,#e1e5e8)!important;
    border-radius:13px!important;
    background:#fff!important;
    overflow:visible!important;
    box-shadow:0 2px 8px rgba(18,24,28,.035)!important;
  }

  .fighter-history-section .fight-history-table tr.history-fight-main-row>td,
  .fighter-history-section .fight-history-table tr.history-cancelled-row>td{
    display:block!important;
    width:auto!important;
    min-width:0!important;
    padding:0!important;
    border:0!important;
    background:transparent!important;
    font-size:12px!important;
    line-height:1.25!important;
    text-align:left!important;
    overflow-wrap:normal!important;
  }
  .fighter-history-section .fight-history-table tr.history-fight-main-row>td::before,
  .fighter-history-section .fight-history-table tr.history-cancelled-row>td::before{
    display:none!important;
    content:none!important;
  }

  .fighter-history-section .fight-history-table tr.history-fight-main-row>td:nth-child(2),
  .fighter-history-section .fight-history-table tr.history-cancelled-row>td:nth-child(2){
    grid-column:1!important;
    grid-row:1!important;
    white-space:nowrap!important;
  }
  .fighter-history-section .fight-history-table tr.history-fight-main-row>td:nth-child(3),
  .fighter-history-section .fight-history-table tr.history-cancelled-row>td:nth-child(3){
    grid-column:2!important;
    grid-row:1!important;
  }
  .fighter-history-section .fight-history-table tr.history-fight-main-row>td:nth-child(1),
  .fighter-history-section .fight-history-table tr.history-cancelled-row>td:nth-child(1){
    grid-column:3!important;
    grid-row:1!important;
    white-space:nowrap!important;
  }
  .fighter-history-section .fight-history-table tr.history-fight-main-row>td:nth-child(8),
  .fighter-history-section .fight-history-table tr.history-cancelled-row>td:nth-child(8){
    grid-column:4!important;
    grid-row:1!important;
    justify-self:end!important;
    white-space:nowrap!important;
  }
  .fighter-history-section .fight-history-table tr.history-fight-main-row>td:nth-child(4),
  .fighter-history-section .fight-history-table tr.history-cancelled-row>td:nth-child(4){
    grid-column:1/-1!important;
    grid-row:2!important;
    color:#737981!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  .fighter-history-section .fight-history-table tr.history-fight-main-row>td:nth-child(5),
  .fighter-history-section .fight-history-table tr.history-cancelled-row>td:nth-child(5){
    grid-column:1/3!important;
    grid-row:3!important;
    color:#4f575d!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  .fighter-history-section .fight-history-table tr.history-fight-main-row>td:nth-child(6),
  .fighter-history-section .fight-history-table tr.history-cancelled-row>td:nth-child(6){
    grid-column:3!important;
    grid-row:3!important;
    color:#8a9197!important;
    font-size:10.5px!important;
    white-space:nowrap!important;
  }
  .fighter-history-section .fight-history-table tr.history-fight-main-row>td:nth-child(7),
  .fighter-history-section .fight-history-table tr.history-cancelled-row>td:nth-child(7){
    grid-column:4!important;
    grid-row:3!important;
    justify-self:end!important;
    color:#8a9197!important;
    font-size:10.5px!important;
    white-space:nowrap!important;
  }

  .fighter-history-section .fight-history-table tr.history-fight-main-row>td:nth-child(3) .history-link,
  .fighter-history-section .fight-history-table tr.history-cancelled-row>td:nth-child(3) .history-link{
    display:block!important;
    color:#171a1c!important;
    font-size:14px!important;
    font-weight:800!important;
    line-height:1.15!important;
    white-space:normal!important;
  }
  .fighter-history-section .fight-history-table tr.history-fight-main-row>td:nth-child(4) .history-link,
  .fighter-history-section .fight-history-table tr.history-cancelled-row>td:nth-child(4) .history-link{
    display:block!important;
    max-width:100%!important;
    color:#687077!important;
    font-size:11px!important;
    font-weight:600!important;
    line-height:1.2!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  .fighter-history-section .history-event-date{
    color:#9aa0a5!important;
    font-size:10px!important;
    font-weight:500!important;
  }
  .fighter-history-section .history-result{
    padding:4px 6px!important;
    border-radius:7px!important;
    font-size:10px!important;
    line-height:1!important;
    box-shadow:none!important;
  }
  .fighter-history-section .fight-history-table tr.history-fight-main-row>td:nth-child(1) a,
  .fighter-history-section .fight-history-table tr.history-cancelled-row>td:nth-child(1) a{
    display:inline-flex!important;
    align-items:center!important;
    min-height:24px!important;
    padding:3px 6px!important;
    border:1px solid #e3e7e9!important;
    border-radius:7px!important;
    background:#f7f8f9!important;
    color:#596168!important;
    font-size:10px!important;
    font-weight:800!important;
    line-height:1!important;
  }
  .fighter-history-section .history-details-toggle{
    display:grid!important;
    place-items:center!important;
    width:25px!important;
    height:25px!important;
    min-width:25px!important;
    padding:0!important;
    border:1px solid #dfe4e7!important;
    border-radius:7px!important;
    background:#f7f8f9!important;
    color:#4f575d!important;
    font-size:15px!important;
    font-weight:700!important;
    line-height:1!important;
  }
  .fighter-history-section .history-fight-main-row.history-details-open{
    border-radius:13px 13px 0 0!important;
  }
  .fighter-history-section .history-detail-row:not([hidden]){
    margin-top:-7px!important;
    border-radius:0 0 13px 13px!important;
  }

  /* Boxing: outcome, opponent and date on line one; fight/result/details on line two. */
  .boxer-page .fight-history-table.boxing-result-columns-ready tr.history-fight-main-row,
  .boxer-page .fight-history-table.boxing-result-columns-ready tr.history-cancelled-row{
    display:grid!important;
    grid-template-columns:auto minmax(0,1fr) auto!important;
    grid-template-rows:auto auto auto!important;
    gap:5px 8px!important;
    align-items:center!important;
    width:100%!important;
    padding:9px 10px!important;
    border:1px solid var(--line,#e1e5e8)!important;
    border-radius:13px!important;
    background:#fff!important;
    overflow:visible!important;
    box-shadow:0 2px 8px rgba(18,24,28,.035)!important;
  }
  .boxer-page .fight-history-table.boxing-result-columns-ready tr.history-fight-main-row>td,
  .boxer-page .fight-history-table.boxing-result-columns-ready tr.history-cancelled-row>td{
    display:block!important;
    width:auto!important;
    min-width:0!important;
    padding:0!important;
    border:0!important;
    background:transparent!important;
    font-size:12px!important;
    line-height:1.25!important;
    text-align:left!important;
    overflow-wrap:normal!important;
  }
  .boxer-page .fight-history-table.boxing-result-columns-ready tr.history-fight-main-row>td::before,
  .boxer-page .fight-history-table.boxing-result-columns-ready tr.history-cancelled-row>td::before{
    display:none!important;
    content:none!important;
  }

  .boxer-page .fight-history-table.boxing-result-columns-ready tr.history-fight-main-row>td:nth-child(2),
  .boxer-page .fight-history-table.boxing-result-columns-ready tr.history-cancelled-row>td:nth-child(2){
    grid-column:1!important;
    grid-row:1!important;
    white-space:nowrap!important;
  }
  .boxer-page .fight-history-table.boxing-result-columns-ready tr.history-fight-main-row>td:nth-child(3),
  .boxer-page .fight-history-table.boxing-result-columns-ready tr.history-cancelled-row>td:nth-child(3){
    grid-column:2!important;
    grid-row:1!important;
  }
  .boxer-page .fight-history-table.boxing-result-columns-ready tr.history-fight-main-row>td:nth-child(4),
  .boxer-page .fight-history-table.boxing-result-columns-ready tr.history-cancelled-row>td:nth-child(4){
    grid-column:3!important;
    grid-row:1!important;
    justify-self:end!important;
    color:#8a9197!important;
    font-size:10.5px!important;
    white-space:nowrap!important;
  }
  .boxer-page .fight-history-table.boxing-result-columns-ready tr.history-fight-main-row>td:nth-child(1),
  .boxer-page .fight-history-table.boxing-result-columns-ready tr.history-cancelled-row>td:nth-child(1){
    grid-column:1!important;
    grid-row:2!important;
    white-space:nowrap!important;
  }
  .boxer-page .fight-history-table.boxing-result-columns-ready tr.history-fight-main-row>td:nth-child(5),
  .boxer-page .fight-history-table.boxing-result-columns-ready tr.history-cancelled-row>td:nth-child(5){
    grid-column:2!important;
    grid-row:2!important;
    color:#4f575d!important;
    white-space:normal!important;
  }
  .boxer-page .fight-history-table.boxing-result-columns-ready tr.history-fight-main-row>td:nth-child(7),
  .boxer-page .fight-history-table.boxing-result-columns-ready tr.history-cancelled-row>td:nth-child(7){
    grid-column:3!important;
    grid-row:2!important;
    justify-self:end!important;
    white-space:nowrap!important;
  }
  .boxer-page .fight-history-table.boxing-result-columns-ready tr.history-fight-main-row>td:nth-child(6),
  .boxer-page .fight-history-table.boxing-result-columns-ready tr.history-cancelled-row>td:nth-child(6){
    grid-column:1/-1!important;
    grid-row:3!important;
    color:#7b8389!important;
    font-size:10.5px!important;
    line-height:1.2!important;
  }
  .boxer-page .fight-history-table.boxing-result-columns-ready tr.history-fight-main-row>td:nth-child(6):empty,
  .boxer-page .fight-history-table.boxing-result-columns-ready tr.history-cancelled-row>td:nth-child(6):empty{
    display:none!important;
  }
  .boxer-page .fight-history-table.boxing-result-columns-ready tr.history-fight-main-row>td:nth-child(3) .history-link,
  .boxer-page .fight-history-table.boxing-result-columns-ready tr.history-cancelled-row>td:nth-child(3) .history-link{
    display:block!important;
    color:#171a1c!important;
    font-size:14px!important;
    font-weight:800!important;
    line-height:1.15!important;
    white-space:normal!important;
  }
  .boxer-page .history-result{
    padding:4px 6px!important;
    border-radius:7px!important;
    font-size:10px!important;
    line-height:1!important;
    box-shadow:none!important;
  }
  .boxer-page .fight-history-table.boxing-result-columns-ready tr.history-fight-main-row>td:nth-child(1) a,
  .boxer-page .fight-history-table.boxing-result-columns-ready tr.history-cancelled-row>td:nth-child(1) a{
    display:inline-flex!important;
    align-items:center!important;
    min-height:24px!important;
    padding:3px 6px!important;
    border:1px solid #e3e7e9!important;
    border-radius:7px!important;
    background:#f7f8f9!important;
    color:#596168!important;
    font-size:10px!important;
    font-weight:800!important;
    line-height:1!important;
  }
  .boxer-page .boxing-details-toggle{
    display:grid!important;
    place-items:center!important;
    width:25px!important;
    height:25px!important;
    min-width:25px!important;
    padding:0!important;
    border:1px solid #dfe4e7!important;
    border-radius:7px!important;
    background:#f7f8f9!important;
    color:#4f575d!important;
    font-size:0!important;
    font-weight:700!important;
    line-height:1!important;
  }
  .boxer-page .boxing-details-toggle::before{
    content:"+"!important;
    margin:0!important;
    font-size:15px!important;
    line-height:1!important;
    transform:none!important;
  }
  .boxer-page .boxing-details-toggle[aria-expanded="true"]::before{
    content:"−"!important;
    transform:none!important;
  }
  .boxer-page .fight-history-table.boxing-result-columns-ready .history-fight-main-row.boxing-details-open{
    border-radius:13px 13px 0 0!important;
  }
  .boxer-page .fight-history-table.boxing-result-columns-ready .boxing-details-row:not([hidden]){
    margin-top:-7px!important;
    border-radius:0 0 13px 13px!important;
  }

  .fighter-history-section .fight-history-card-head,
  .boxer-page .fight-history-card-head{
    margin-bottom:9px!important;
    padding:10px 12px!important;
    border-radius:13px!important;
  }
  .fighter-history-section .fight-history-card-head strong,
  .boxer-page .fight-history-card-head strong{
    font-size:13px!important;
  }
  .fighter-history-section .fight-history-card-head span,
  .boxer-page .fight-history-card-head span{
    font-size:10px!important;
  }
}

@media (max-width:420px){
  .fighter-history-section .fight-history-table tbody,
  .boxer-page .fight-history-table.boxing-result-columns-ready tbody{
    gap:6px!important;
  }
  .fighter-history-section .fight-history-table tr.history-fight-main-row,
  .fighter-history-section .fight-history-table tr.history-cancelled-row,
  .boxer-page .fight-history-table.boxing-result-columns-ready tr.history-fight-main-row,
  .boxer-page .fight-history-table.boxing-result-columns-ready tr.history-cancelled-row{
    gap:4px 6px!important;
    padding:8px!important;
    border-radius:12px!important;
  }
  .fighter-history-section .fight-history-table tr.history-fight-main-row>td:nth-child(3) .history-link,
  .fighter-history-section .fight-history-table tr.history-cancelled-row>td:nth-child(3) .history-link,
  .boxer-page .fight-history-table.boxing-result-columns-ready tr.history-fight-main-row>td:nth-child(3) .history-link,
  .boxer-page .fight-history-table.boxing-result-columns-ready tr.history-cancelled-row>td:nth-child(3) .history-link{
    font-size:13px!important;
  }
  .fighter-history-section .history-detail-row:not([hidden]),
  .boxer-page .fight-history-table.boxing-result-columns-ready .boxing-details-row:not([hidden]){
    margin-top:-6px!important;
    border-radius:0 0 12px 12px!important;
  }
}
