/* AOW Tournament Portal V11.24 — remaining wide-page + mobile readability fixes.
   Presentation only: no changes to bracket connectors, permissions, data or JS. */

/* Match the 1800px V11.23 page canvas instead of legacy inner caps. */
@media (min-width:761px) {
  body.aow-masters-theme .section.tournament-private-admin,
  body.aow-masters-theme .section.tournament-results-admin,
  body.aow-masters-theme .section.aow-avatar-hub,
  body.aow-masters-theme .section.aow-avatar-collection {
    box-sizing:border-box;
    width:100% !important;
    max-width:none !important;
    margin-inline:auto !important;
    min-width:0;
  }
}

/* The old registration rescue widget was styled before the AOW game refresh.
   Give it the same strong tactical panel surfaces and readable type. */
body.aow-masters-theme #late-registration {
  box-sizing:border-box;
  max-width:100%;
  min-width:0;
  border:1px solid #607d72 !important;
  border-left:4px solid #e4bd56 !important;
  border-radius:3px !important;
  background:linear-gradient(155deg,rgba(13,38,40,.98),rgba(5,19,23,.99)) !important;
  color:#e4f3f1;
}
body.aow-masters-theme #late-registration .rescue-intro {
  min-width:0;
  gap:12px 18px;
  align-items:flex-start;
}
body.aow-masters-theme #late-registration .rescue-intro > div {min-width:0;flex:1 1 280px;}
body.aow-masters-theme #late-registration .rescue-intro h3 {
  font-size:clamp(27px,3vw,38px) !important;
  line-height:1.12;
}
body.aow-masters-theme #late-registration .rescue-intro .small,
body.aow-masters-theme #late-registration .rescue-note,
body.aow-masters-theme #late-registration .rescue-mode small,
body.aow-masters-theme #late-registration p.muted {
  font-size:clamp(16px,1.05vw,19px) !important;
  line-height:1.5 !important;
  color:#bad0d1 !important;
}
body.aow-masters-theme #late-registration .rescue-tag {
  box-sizing:border-box;
  max-width:100%;
  border-radius:2px !important;
  border-color:#9c8550 !important;
  background:#303421 !important;
  color:#ffe2a1 !important;
  font:800 16px/1.25 var(--aow-heading) !important;
  letter-spacing:.045em;
  white-space:normal;
  overflow-wrap:anywhere;
}
body.aow-masters-theme #late-registration .rescue-note {
  box-sizing:border-box;
  max-width:100%;
  overflow-wrap:anywhere;
  margin:14px 0;
  padding:15px 16px !important;
  background:rgba(97,88,43,.20) !important;
  border-left:4px solid #dcbe65 !important;
  color:#e0e5d7 !important;
}
body.aow-masters-theme #late-registration .rescue-mode {
  min-width:0;
  border:1px solid #456d72 !important;
  border-radius:2px !important;
  background:#10272b !important;
  color:#eef6f4;
}
body.aow-masters-theme #late-registration .rescue-mode:has(input:checked) {
  background:#263c36 !important;
  border-color:#d5b65d !important;
}
body.aow-masters-theme #late-registration .rescue-mode span {min-width:0;overflow-wrap:anywhere;}
body.aow-masters-theme #late-registration .rescue-mode strong {
  font:800 19px/1.2 var(--aow-heading) !important;
  color:#f2dda4 !important;
}
body.aow-masters-theme #late-registration .rescue-grid,
body.aow-masters-theme #late-registration .rescue-form-grid {max-width:100%;min-width:0;}
body.aow-masters-theme #late-registration .rescue-form-grid > .field {min-width:0;max-width:100%;}
body.aow-masters-theme #late-registration .field label,
body.aow-masters-theme #late-registration form > label {
  display:block;
  font:800 16px/1.3 var(--aow-heading) !important;
  color:#8ed8dc !important;
}
body.aow-masters-theme #late-registration .field :is(input,select),
body.aow-masters-theme #late-registration .rescue-form-grid :is(input,select) {
  box-sizing:border-box;
  min-width:0;
  max-width:100%;
  width:100%;
  min-height:50px;
  font-size:18px !important;
}
body.aow-masters-theme #late-registration .rescue-form-grid .field {
  overflow-wrap:anywhere;
}
body.aow-masters-theme #late-registration .btn {
  min-height:48px;
  font-size:17px !important;
  white-space:normal;
  text-align:center;
}
body.aow-masters-theme #late-registration :is(th,td) {
  font-size:18px !important;
}

/* Bracket Management: no three-column mobile action grid with overlapping text.
   Buttons use explicit grid tracks with no intrinsic overhang. */
@media (max-width:760px) {
  body.aow-masters-theme .bracket-page .bracket-toolbar {
    box-sizing:border-box;
    width:100%;
    min-width:0;
    padding:16px !important;
    border-radius:3px !important;
  }
  body.aow-masters-theme .bracket-page .bracket-toolbar .actions {
    display:grid !important;
    width:100% !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    align-items:stretch !important;
    gap:10px !important;
    min-width:0;
  }
  body.aow-masters-theme .bracket-page .bracket-toolbar .actions > *,
  body.aow-masters-theme .bracket-page .bracket-toolbar .actions form {
    box-sizing:border-box;
    display:flex;
    margin:0 !important;
    padding:0 !important;
    width:100% !important;
    min-width:0 !important;
    max-width:100%;
    grid-column:auto !important;
    justify-self:stretch !important;
  }
  body.aow-masters-theme .bracket-page .bracket-toolbar .actions .btn,
  body.aow-masters-theme .bracket-page .bracket-toolbar .actions .bracket-notify-btn,
  body.aow-masters-theme .bracket-page .bracket-toolbar .actions .danger-action {
    box-sizing:border-box;
    display:flex !important;
    align-items:center;
    justify-content:center;
    width:100% !important;
    min-width:0 !important;
    min-height:52px !important;
    height:auto !important;
    padding:10px 8px !important;
    font:800 16px/1.18 var(--aow-heading) !important;
    letter-spacing:.025em;
    white-space:normal !important;
    overflow-wrap:break-word;
    text-align:center;
    border-radius:2px !important;
  }
  body.aow-masters-theme .bracket-page .bracket-toolbar .bracket-status {font-size:16px !important;}
  /* Late Registration: keep the badge, note and entry fields in the card. */
  body.aow-masters-theme #late-registration {min-width:0;padding:17px !important;}
  body.aow-masters-theme #late-registration .rescue-intro {display:flex;flex-direction:column;align-items:stretch;gap:10px;}
  body.aow-masters-theme #late-registration .rescue-intro > div {flex:auto;max-width:100%;}
  body.aow-masters-theme #late-registration .rescue-tag {align-self:flex-start;}
  body.aow-masters-theme #late-registration .rescue-form-grid,
  body.aow-masters-theme #late-registration .rescue-grid {
    display:grid;
    grid-template-columns:minmax(0,1fr) !important;
    gap:12px;
  }
  body.aow-masters-theme #late-registration .rescue-mode {padding:14px;}
  body.aow-masters-theme #late-registration .btn {width:100%;}
}
@media (max-width:430px) {
  body.aow-masters-theme .bracket-page .bracket-toolbar .actions {
    grid-template-columns:minmax(0,1fr) !important;
  }
  body.aow-masters-theme #late-registration .rescue-tag {font-size:18px !important;}
  body.aow-masters-theme #late-registration .rescue-mode strong {font-size:18px !important;}
}
