/* Ladder match dialogs: scoped so sitewide modals keep their own styling. */
.public-site .ladder-match-modal .modal-dialog {
  width: min(680px, calc(100% - 28px));
  max-width: 680px;
  margin: 30px auto;
}
.public-site .ladder-match-modal .modal-content {
  overflow: hidden;
  border: 1px solid #3b3a35;
  border-radius: 14px;
  background: #1b1d1b;
  color: #f7f5ef;
  box-shadow: 0 24px 80px rgba(0,0,0,.55);
}
.public-site .ladder-match-modal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 23px 26px 18px;
  border-bottom: 1px solid #383a37;
}
.public-site .ladder-match-modal .modal-header .close {
  float: none;
  margin: -6px -7px 0 0;
  padding: 6px;
  color: #d6d2ca;
  font-size: 28px;
  opacity: 1;
  text-shadow: none;
}
.public-site .ladder-match-modal .modal-title {
  margin: 5px 0 3px;
  color: #fff;
  font-size: 26px;
  font-weight: 750;
  line-height: 1.15;
}
.public-site .ladder-match-modal .modal-header p { margin: 0; color: #b7b3aa; font-size: 13px; }
.public-site .ladder-modal-kicker {
  color: #e5b955;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .14em;
}
.public-site .ladder-match-modal .modal-body {
  max-height: min(74vh, 650px);
  overflow-y: auto;
  padding: 20px 26px 24px;
}
.public-site .ladder-match-modal .modal-footer {
  display: block;
  padding: 14px 26px 18px;
  border-top: 1px solid #383a37;
  text-align: left;
}
.public-site .ladder-match-modal .modal-footer a { color: #e5b955; font-size: 12px; }
.public-site .ladder-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 14px;
}
.public-site .ladder-modal-field { display: grid; align-content: start; gap: 6px; min-width: 0; }
.public-site .ladder-modal-field label { margin: 0; color: #eeeae2; font-size: 12px; font-weight: 700; }
.public-site .ladder-modal-field .form-control {
  width: 100%;
  height: 44px;
  padding: 9px 12px;
  border: 1px solid #41433f;
  border-radius: 7px;
  background: #292b29;
  color: #f7f5ef;
  font-size: 14px;
}
.public-site .ladder-modal-field .form-control:focus {
  border-color: #e5b955;
  box-shadow: 0 0 0 3px rgba(229,185,85,.15);
}
.public-site .ladder-modal-field small { color: #aaa69d; font-size: 11px; line-height: 1.4; }
.public-site .ladder-modal-options { display: grid; gap: 8px; padding: 16px 0 0; }
.public-site .ladder-modal-options label { font-size: 12px; }
.public-site .ladder-modal-options input { margin-right: 7px; accent-color: #e5b955; }
.public-site .ladder-modal-lineup { margin-top: 22px; border-top: 1px solid #383a37; padding-top: 20px; }
.public-site .ladder-modal-lineup__heading { display: flex; justify-content: space-between; align-items: end; gap: 12px; }
.public-site .ladder-modal-lineup__heading h3 { margin: 3px 0 0; font-size: 19px; }
.public-site .ladder-modal-lineup__heading strong { color: #e5b955; font-size: 12px; white-space: nowrap; }
.public-site .ladder-modal-players { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 9px; margin-top: 16px; }
.public-site .ladder-modal-player {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  min-height: 54px;
  margin: 0;
  padding: 8px;
  border: 1px solid #40413d;
  border-radius: 8px;
  background: #272927;
  cursor: pointer;
}
.public-site .ladder-modal-player:has(input:checked) { border-color: #e5b955; background: #343022; }
.public-site .ladder-modal-player img,
.public-site .ladder-modal-player__fallback {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  object-fit: cover;
  border-radius: 50%;
  background: #3a3932;
  color: #e5b955;
  font-weight: 700;
}
.public-site .ladder-modal-player > span:not(.ladder-modal-player__fallback) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #f7f5ef;
  font-size: 12px;
}
.public-site .ladder-modal-player input { margin-left: auto; flex: none; accent-color: #e5b955; }
.public-site .ladder-modal-player:has(input:disabled) { opacity: .55; cursor: default; }
.public-site .ladder-modal-help { margin: 12px 0 0; color: #aaa69d; font-size: 12px; }
.public-site .ladder-modal-submit,
.public-site .ladder-match-join {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 42px;
  padding: 8px 17px;
  border: 0;
  border-radius: 7px;
  background: #e5b955;
  color: #161513 !important;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}
.public-site .ladder-modal-submit { width: 100%; margin-top: 22px; cursor: pointer; }
.public-site .ladder-modal-submit:disabled { opacity: .5; cursor: not-allowed; }
.public-site .ladder-match-list { display: grid; gap: 10px; }
.public-site .ladder-match-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 15px;
  border: 1px solid #40413d;
  border-radius: 9px;
  background: #262825;
}
.public-site .ladder-match-item__main { min-width: 0; }
.public-site .ladder-match-item__label { color: #e5b955; font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.public-site .ladder-match-item h3 { margin: 4px 0; font-size: 16px; overflow-wrap: anywhere; }
.public-site .ladder-match-item h3 span { color: #b7b3aa; font-size: 13px; font-weight: 500; }
.public-site .ladder-match-item p { margin: 0; color: #aaa69d; font-size: 12px; }
.public-site .ladder-match-item__actions { display: flex; align-items: center; gap: 8px; flex: none; }
.public-site .ladder-match-item__actions form { margin: 0; }
.public-site .ladder-match-link, .public-site .ladder-match-cancel { padding: 8px 10px; font-size: 12px; }
.public-site .ladder-match-link { color: #e5b955; }
.public-site .ladder-match-cancel { border: 1px solid #79474b; border-radius: 6px; background: #42272a; color: #fff; cursor: pointer; }
.public-site .ladder-match-empty { margin: 0; padding: 22px; border: 1px dashed #51514a; border-radius: 8px; color: #b7b3aa; text-align: center; }
.public-site .ladder-match-empty[hidden] { display: none; }
@media (max-width: 620px) {
  .public-site .ladder-match-modal .modal-dialog { margin: 12px auto; }
  .public-site .ladder-match-modal .modal-header { padding: 18px; }
  .public-site .ladder-match-modal .modal-body { padding: 16px 18px; max-height: calc(100dvh - 155px); }
  .public-site .ladder-match-modal .modal-footer { padding: 12px 18px; }
  .public-site .ladder-modal-grid { grid-template-columns: 1fr; }
  .public-site .ladder-modal-players { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .public-site .ladder-match-item { align-items: stretch; flex-direction: column; }
  .public-site .ladder-match-item__actions { justify-content: flex-end; }
}
