/* R19: requested Fixtures, Matchups and League layout refinements. */

/* Profile: the remaining season schedule is one complete white tile. */
#app .r19-season-fixtures{
    box-sizing:border-box;
    width:calc(100% - 32px);
    margin:12px 16px 0!important;
    padding:16px!important;
    border:1px solid #dce3eb;
    border-radius:14px;
    background:#fff;
    box-shadow:0 4px 14px rgba(15,23,42,.04);
}
.r19-season-fixture-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin-bottom:12px}
.r19-season-fixture-heading h2{margin:3px 0 0!important}
.r19-season-fixture-heading>span{flex:0 0 auto;padding:4px 7px;border-radius:7px;background:#eef2f6;color:#66758a;font-size:8px;font-weight:850}
.r19-season-fixtures .r18-season-fixture-head,
.r19-season-fixtures .r18-season-fixture-row{grid-template-columns:54px minmax(0,1fr) 76px;gap:10px}
.r19-season-fixtures .r18-season-fixture-head>span:first-child,
.r19-season-fixtures .r18-season-fixture-row>strong{color:#7a8798;font-size:8px;font-weight:900}
.r19-season-fixtures .r18-season-fixture-head>span:last-child,
.r19-season-fixtures .r18-season-fixture-row>span:last-child{text-align:right}
.r19-season-fixtures .r18-season-fixture-row>span:nth-child(2){color:#111827;font-weight:800}

/* Matchups: gameweek, Key Matchups and Jump stay compact; the three status
   choices return as readable buttons below them. */
.r19-matchups-toolbar{grid-template-columns:minmax(116px,1fr) 44px 64px!important}
#app .r19-decision-filter{box-sizing:border-box;width:100%;min-height:56px!important;margin:8px 0 0!important;padding:8px 10px!important}
#app .r19-decision-filter>div span{font-size:7px!important}
#app .r19-decision-filter>div strong{font-size:10px!important}
#app .r19-decision-filter nav{flex:0 0 auto;display:grid;grid-template-columns:repeat(3,minmax(48px,1fr));gap:4px;padding:4px}
#app .r19-decision-filter button{min-height:31px;padding:6px 9px;font-size:8px}

/* Key Matchups: one even inset around the list, matching borders on every
   row, and fixed symmetrical position columns so all three games line up. */
#app .r19-key-matchups{padding:8px!important;border-color:#dce3eb!important}
#app .r19-key-matchups>div{padding:0!important;gap:6px}
#app .r19-key-matchups>div button{
    box-sizing:border-box;
    align-items:center!important;
    justify-content:center!important;
    min-height:56px;
    padding:9px 10px!important;
    border:1px solid #dce3eb!important;
    border-radius:10px!important;
    background:#f7f9fb!important;
    text-align:center!important;
}
#app .r19-key-matchups .r13-key-names{
    grid-template-columns:30px minmax(0,1fr) 22px minmax(0,1fr) 30px!important;
    align-items:center;
    justify-items:center;
    gap:5px!important;
    text-align:center;
}
#app .r19-key-matchups .r13-key-names>b{width:30px;text-align:center!important}
#app .r19-key-matchups .r13-key-names strong,
#app .r19-key-matchups .r13-key-names strong:last-child,
#app .r19-key-matchups>div button small{width:100%;text-align:center!important}

/* Match detail: profile actions and the result tile use the same 8px rhythm. */
#app .r18-matchup-profiles{margin-bottom:8px}
#app .r18-matchup-profiles+.score-detail-section{margin-top:0!important;padding-top:0!important}

/* League: give movement and entrant details breathing room, and make the
   control/meta/table gaps symmetrical. */
#app .r19-league-header{margin-bottom:0!important}
#app .r19-league-header .r18-list-meta{margin-top:8px}
#app .r19-league-header+.r13-league-list{margin-top:5px!important}
#app .r19-league-header+.r13-league-list .r13-league-columns,
#app .r19-league-header+.r13-league-list .r13-league-row{grid-template-columns:7fr 10fr 33fr 21fr 13fr 16fr!important;column-gap:2px!important}
#app .r19-league-header+.r13-league-list .r13-league-columns span:nth-child(3),
#app .r19-league-header+.r13-league-list .r13-league-person{padding-left:5px}

/* Team Filter: no divider above Pot 1, with matching top/bottom inset. */
#app .r19-league-header .r18-expand-panel{padding:8px 10px!important}
#app .r19-league-header .r18-expand-panel .league-filter-pot:first-of-type{padding-top:8px;border-top:0!important}
#app .r19-league-header .r18-expand-panel .league-filter-clear{margin-bottom:0}

@media(max-width:430px){
    #app .r19-season-fixtures{width:calc(100% - 24px);margin-left:12px!important;margin-right:12px!important;padding:13px!important}
    .r19-season-fixtures .r18-season-fixture-head,.r19-season-fixtures .r18-season-fixture-row{grid-template-columns:48px minmax(0,1fr) 67px;gap:7px;padding-left:10px;padding-right:10px}
    .r19-matchups-toolbar{grid-template-columns:minmax(105px,1fr) 40px 57px!important}
    #app .r19-decision-filter{align-items:center;flex-direction:row}
    #app .r19-decision-filter nav{width:auto;grid-template-columns:repeat(3,minmax(43px,1fr))}
    #app .r19-decision-filter button{font-size:7.5px;padding-left:6px;padding-right:6px}
    #app .r19-key-matchups{padding:7px!important}
    #app .r19-key-matchups>div button{padding-left:7px!important;padding-right:7px!important}
    #app .r19-key-matchups .r13-key-names{grid-template-columns:26px minmax(0,1fr) 18px minmax(0,1fr) 26px!important;gap:3px!important}
    #app .r19-key-matchups .r13-key-names>b{width:26px}
    #app .r19-league-header+.r13-league-list .r13-league-columns,
    #app .r19-league-header+.r13-league-list .r13-league-row{grid-template-columns:7fr 10fr 33fr 21fr 13fr 16fr!important;column-gap:1px!important}
    #app .r19-league-header+.r13-league-list .r13-league-columns span:nth-child(3),
    #app .r19-league-header+.r13-league-list .r13-league-person{padding-left:4px}
}

@media(max-width:359px){
    #app .r19-decision-filter{align-items:flex-start;flex-direction:column}
    #app .r19-decision-filter nav{width:100%}
}
