/* Integración Cancha verde, compartida también con las páginas de Django Admin. */
.select2-container--torneo {
  max-width: 100%;
  min-width: 0;
  color: var(--color-text);
  font: 400 14px/1.55 var(--font-body);
}
.select2-container--torneo .select2-selection {
  min-height: 44px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-button);
  background: var(--color-surface);
  color: var(--color-text);
}
.select2-container--torneo .select2-selection--single { height: auto; padding: 10px 38px 10px 12px; }
.select2-container--torneo .select2-selection--single .select2-selection__rendered { padding: 0; }
.select2-container--torneo .select2-selection__placeholder { color: var(--color-muted); }
.select2-container--torneo .select2-selection__arrow {
  position: absolute;
  top: 0;
  right: 12px;
  height: 44px;
  width: 12px;
  display: grid;
  place-items: center;
}
.select2-container--torneo .select2-selection__arrow b {
  width: 7px;
  height: 7px;
  border: solid var(--color-muted);
  border-width: 0 1.5px 1.5px 0;
  transform: translateY(-2px) rotate(45deg);
}
.select2-container--torneo.select2-container--open .select2-selection__arrow b { transform: translateY(2px) rotate(225deg); }
.select2-container--torneo.select2-container--focus .select2-selection,
.select2-container--torneo.select2-container--open .select2-selection { border-color: var(--color-primary); }
.select2-container--torneo .select2-selection:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 3px; }
.select2-container--torneo .select2-selection[aria-invalid=true] { border-color: var(--color-danger, #a0392d); }
.select2-container--torneo.select2-container--disabled .select2-selection { background: var(--color-bg); color: var(--color-muted); cursor: not-allowed; }
.select2-container--torneo .select2-selection__clear {
  float: right;
  margin: 0 5px 0 10px;
  border: 0;
  padding: 0 3px;
  background: transparent;
  color: var(--color-muted);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.select2-container--torneo .select2-selection--multiple { padding: 5px 8px; }
.select2-container--torneo .select2-selection--multiple .select2-selection__rendered { display: inline; margin: 0; padding: 0; list-style: none; }
.select2-container--torneo .select2-selection__choice {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  gap: 6px;
  margin: 3px;
  padding: 2px 7px;
  border: 1px solid var(--color-border);
  border-radius: 5px;
  background: var(--color-soft);
}
.select2-container--torneo .select2-selection__choice__display { overflow: hidden; text-overflow: ellipsis; }
.select2-container--torneo .select2-selection__choice__remove { border: 0; padding: 0; background: transparent; color: var(--color-primary); font: inherit; cursor: pointer; }
.select2-container--torneo .select2-search--inline .select2-search__field { height: 24px; min-height: 0; margin: 4px 0 0; border: 0; padding: 0; font: inherit; color: inherit; background: transparent; resize: none; }
.select2-container--torneo .select2-dropdown {
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-button);
  background: var(--color-surface);
  box-shadow: 0 10px 30px #19362a1a;
}
.select2-container--torneo .select2-search--dropdown { padding: 8px; }
.select2-container--torneo .select2-search--dropdown .select2-search__field {
  width: 100%;
  min-height: var(--search-min-height, 44px);
  box-sizing: border-box;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-button);
  padding: var(--search-padding-block, 10px) var(--search-padding-end, 12px);
  background: var(--color-surface);
  color: var(--color-text);
  font: inherit;
}
.select2-container--torneo .select2-search--dropdown .select2-search__field:focus { border-color: var(--color-primary); outline: 2px solid var(--color-primary); outline-offset: -2px; }
.select2-container--torneo .select2-results > .select2-results__options { max-height: 240px; overflow-y: auto; overscroll-behavior: contain; }
.select2-container--torneo .select2-results__option { min-height: 44px; box-sizing: border-box; padding: 10px 12px; overflow-wrap: anywhere; }
.select2-container--torneo .select2-results__option--selected { background: var(--color-soft); }
.select2-container--torneo .select2-results__option--highlighted.select2-results__option--selectable { background: var(--color-primary); color: #fff; }
.select2-container--torneo .select2-results__option--disabled,
.select2-container--torneo .select2-results__message { color: var(--color-muted); }
.schedule-select-option { line-height:1.3; white-space:normal; }
.schedule-select-option .matchup-side { font-weight:650; }
.schedule-select-meta { font-size:12px; opacity:.9; }
.schedule-select-time { font-weight:600; }
.schedule-match-dropdown .select2-results__option--selectable { border-top:1px solid var(--color-border); }
.schedule-match-dropdown .select2-results__group { padding:7px 12px; color:var(--color-primary); font-size:12px; }
@media (max-width: 600px) {
  .select2-container--torneo { font-size: 16px; }
  .select2-container--torneo .select2-results > .select2-results__options { max-height: min(240px, 35dvh); }
}
.select2-container--torneo .schedule-match-dropdown .select2-results > .select2-results__options { max-height: min(360px, 40dvh); }

.swal2-popup.torneo-alert {
  font-family: var(--font-body);
  color: var(--color-text);
  border-radius: var(--radius-card);
}
.torneo-alert .swal2-title { font-family: var(--font-heading); }
.torneo-alert .swal2-styled { border-radius: var(--radius-button); }

.dt-container {
  --dt-row-selected: 22, 75, 53;
  color: var(--color-text);
  font-family: var(--font-body);
}
.dt-container .dt-input {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-button);
}
.dt-container .dt-paging .dt-paging-button.current,
.dt-container .dt-paging .dt-paging-button.current:hover {
  color: var(--color-primary) !important;
  border-color: var(--color-border);
  background: var(--color-soft);
}
.dt-container .dt-paging .dt-paging-button:hover {
  color: #fff !important;
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.daterangepicker {
  font-family: var(--font-body);
  color: var(--color-text);
  border-color: var(--color-border);
  border-radius: var(--radius-card);
  max-width: calc(100vw - 16px);
}
.daterangepicker .calendar-table { border-radius: var(--radius-card); }
.daterangepicker td.active, .daterangepicker td.active:hover,
.daterangepicker .ranges li.active { background: var(--color-primary); color: #fff; }
.daterangepicker td.in-range { background: var(--color-soft); color: var(--color-text); }
.daterangepicker td.active.in-range { background: var(--color-primary); color: #fff; }
.daterangepicker .drp-buttons { border-color: var(--color-border); white-space: normal; }
.torneo-picker-button {
  font: 500 12px/1.4 var(--font-body);
  padding: 7px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-button);
  cursor: pointer;
}
.torneo-picker-apply { background: var(--color-primary); color: #fff; }
.torneo-picker-cancel { background: var(--color-surface); color: var(--color-text); }
.torneo-picker-button:disabled { opacity: .5; cursor: default; }
.torneo-picker-button:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 3px; }

@media (max-width: 600px) {
  .daterangepicker .drp-calendar { float: none; max-width: 100%; }
  .daterangepicker .drp-selected { display: block; padding-bottom: 8px; }
  .dt-container .dt-layout-row { gap: 12px; }
}
