/* Phase 4B - consistent round identification across public and admin brackets. */
.brn-round-navigator {
  display:flex;flex-direction:column;gap:10px;margin:14px 0 9px;
  padding:13px 15px;border:1px solid rgba(124,153,200,.24);
  background:linear-gradient(110deg,rgba(22,40,68,.78),rgba(14,22,35,.9));
  border-radius:13px;box-shadow:0 8px 20px rgba(0,0,0,.1);
}
.brn-caption {display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px;
  color:#b8c9e3;font-size:16px;font-weight:850;letter-spacing:.13em;}
.brn-current {font-size:16px;letter-spacing:.06em;color:#eccb81;}
.brn-tabs {display:flex;align-items:center;flex-wrap:wrap;gap:8px;}
.brn-tab {border:1px solid rgba(144,170,214,.28);background:rgba(255,255,255,.045);
  border-radius:8px;min-height:34px;padding:7px 13px;font-family:inherit;font-size:16px;font-weight:800;line-height:1.1;
  letter-spacing:.065em;color:#d1dff3;cursor:pointer;transition:background .16s,border-color .16s,color .16s;}
.brn-tab:hover,.brn-tab:focus-visible {border-color:rgba(239,204,111,.78);color:#fff;outline:none;}
.brn-tab.active {background:rgba(222,183,77,.16);border-color:rgba(230,195,100,.75);color:#ffe8a8;
  box-shadow:inset 0 -2px 0 rgba(239,203,117,.55);}
.tournament-bracket .round-heading.brn-labeled {height:auto;min-height:85px;padding-top:3px;padding-bottom:9px;}
.tournament-bracket .round-heading .brn-round-number {
  display:inline-block;align-self:flex-start;margin:0 0 4px;padding:4px 8px;
  border-radius:5px;border:1px solid rgba(233,196,104,.39);
  background:rgba(233,196,104,.1);color:#f0d38c;
  font-size:16px;line-height:1.2;letter-spacing:.10em;font-weight:850;
}
.tournament-bracket .tournament-round.brn-viewing > .round-heading {border-bottom-color:rgba(233,196,104,.65);}
@media(max-width:650px){
  .brn-round-navigator{padding:10px 11px;gap:7px;margin:10px 0 6px}
  .brn-tabs{gap:6px;}
  .brn-tab{padding:7px 9px;min-height:32px;}
}

/* Phase 4C: native round BO dropdown replaced with portal-select appearance. */
.tournament-bracket .round-bo-form .bracket-bo-portal-select {
  width:84px; min-width:84px; z-index:12;
}
.tournament-bracket .round-bo-form .bracket-bo-portal-select.open {z-index:999;}
.tournament-bracket .round-bo-form .bracket-bo-portal-select .portal-select-trigger {
  width:100%; min-height:30px; padding:4px 8px 4px 10px;
  border:1px solid rgba(112,155,221,.42); border-radius:8px;
  background:rgba(11,25,44,.95); gap:4px;
}
.tournament-bracket .round-bo-form .bracket-bo-portal-select .portal-select-value {
  font-size:16px; font-weight:900; letter-spacing:.05em; color:#dce9ff;
}
.tournament-bracket .round-bo-form .bracket-bo-portal-select .portal-select-arrow {
  font-size:16px; color:#b1c5e6;
}
.tournament-bracket .round-bo-form .bracket-bo-portal-select .portal-select-menu {
  right:0; left:auto; width:160px; min-width:160px;
  max-height:min(380px,55vh); overflow-y:auto;
  z-index:1001;
}
.tournament-bracket .round-bo-form .bracket-bo-portal-select .portal-select-option {
  min-height:43px; padding:7px 9px; gap:8px;
}
.tournament-bracket .round-bo-form .bracket-bo-portal-select .portal-select-option strong {
  font-size:16px;
}
.tournament-bracket .tournament-round:has(.bracket-bo-portal-select.open) {
  position:relative; z-index:101;
}
.tournament-bracket .round-heading-admin:has(.bracket-bo-portal-select.open) {
  position:relative; z-index:102;
}
/* The bronze match shares the same vertical starting position as the final.
   The offset is calculated from the dynamically positioned FINAL card. */
.tournament-bracket .third-place-column .third-place-match-wrap {
  margin-top:var(--brn-third-place-offset,28px);
}
@media(max-width:760px){
  .tournament-bracket .third-place-column .third-place-match-wrap {
    margin-top:var(--brn-third-place-offset,20px);
  }
}

/* Phase 4D: Final and third-place HEADER alignment (not the match cards).
   Both columns use the same round badge and heading height. Admin's Final
   heading also contains a BO selector, which makes its title row 30px high;
   reserve that same title-row height for the bronze heading. */
.tournament-bracket .third-place-heading.brn-labeled {
  box-sizing:border-box;
}
.admin-tournament-bracket .third-place-heading.brn-labeled > span:not(.brn-round-number) {
  display:flex;
  align-items:center;
  min-height:30px;
}

/* V11.57: keep mobile badges, titles and counts inside a consistent inset. */
@media(max-width:760px){
  body.aow-masters-theme .tournament-bracket .round-heading.brn-labeled{
    box-sizing:border-box!important;display:flex!important;flex-direction:column!important;
    align-items:flex-start!important;justify-content:flex-start!important;
    padding:12px!important;gap:8px!important;text-align:left!important;
  }
  body.aow-masters-theme .tournament-bracket .round-heading.brn-labeled > span:not(.brn-round-number){
    display:block;min-width:0;max-width:100%;margin:0;line-height:1.25!important;
    overflow-wrap:anywhere;text-align:left!important;
  }
  body.aow-masters-theme .tournament-bracket .round-heading.brn-labeled small{
    display:block;max-width:100%;margin:0!important;line-height:1.35!important;
    text-align:left!important;white-space:normal;overflow-wrap:anywhere;
  }
  body.aow-masters-theme .brn-tab{min-height:44px;max-width:100%;white-space:normal;text-align:center}
}
.tournament-bracket .third-place-column.brn-viewing > .round-heading{border-bottom-color:rgba(233,196,104,.65)}
