/* Schedule opponent picker: progressively enhanced, with no network requests. */
.habs-schedule .habs-opponent-filter {
  position: relative;
  margin: 18px 0 12px;
  color: var(--habs-text, #f4f1e9);
  text-align: left;
}
.habs-schedule .habs-opponent-label {
  display: block;
  margin: 0 0 8px;
  color: var(--habs-cream, #f4f1e9);
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .04em;
}
.habs-schedule .habs-opponent-controls { display: flex; align-items: start; gap: 10px; }
.habs-schedule .habs-opponent-field { position: relative; flex: 1 1 420px; max-width: 540px; min-width: 0; }
.habs-schedule .habs-opponent-input {
  box-sizing: border-box;
  display: block;
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 11px 56px 11px 14px;
  border: 1px solid var(--habs-line, #405267);
  border-radius: 6px;
  background: #0d2035;
  color: #f4f1e9;
  font: inherit;
  font-size: 16px;
  line-height: 1.5;
  box-shadow: none;
}
.habs-schedule .habs-opponent-input::placeholder { color: #b7c4d4; opacity: 1; }
.habs-schedule .habs-opponent-toggle {
  position: absolute;
  top: 2px;
  right: 2px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #f4f1e9;
  font: inherit;
  font-size: 1.15rem;
  cursor: pointer;
}
.habs-schedule .habs-opponent-clear {
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--habs-line, #405267);
  border-radius: 6px;
  background: #0d2035;
  color: #f4f1e9;
  font: inherit;
  font-size: .85rem;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
  cursor: pointer;
}
.habs-schedule .habs-opponent-toggle:hover,
.habs-schedule .habs-opponent-clear:hover { background: #203c58; }
.habs-schedule .habs-opponent-input:focus,
.habs-schedule .habs-opponent-toggle:focus-visible,
.habs-schedule .habs-opponent-clear:focus-visible { outline: 2px solid #f4f1e9; outline-offset: 3px; }
.habs-schedule .habs-opponent-hint {
  margin: 9px 0 0;
  color: #b7c4d4;
  font-size: .78rem;
  line-height: 1.5;
}
.habs-schedule .habs-opponent-popup {
  position: absolute;
  z-index: 30;
  top: calc(100% + 7px);
  right: 0;
  left: 0;
  max-height: min(360px, 55vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid #53647a;
  border-radius: 6px;
  background: #0d2035;
  color: #f4f1e9;
  box-shadow: 0 16px 32px #0006;
}
.habs-schedule .habs-opponent-options { margin: 0; padding: 5px; list-style: none; }
.habs-schedule .habs-opponent-option {
  display: flex;
  align-items: center;
  box-sizing: border-box;
  min-height: 44px;
  margin: 0;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 5px;
  font-size: .9rem;
  line-height: 1.4;
  cursor: pointer;
}
.habs-schedule .habs-opponent-option.is-chosen { font-weight: 800; }
.habs-schedule .habs-opponent-option.is-active,
.habs-schedule .habs-opponent-option:hover { border-color: #8597ac; background: #254360; color: #fff; }
.habs-schedule .habs-opponent-no-match { margin: 0; padding: 5px 15px 15px; color: #b7c4d4; font-size: .85rem; }
.habs-schedule .habs-opponent-results { margin-top: 18px; }
.habs-schedule .habs-opponent-results-title { margin: 0 0 6px; color: #f4f1e9; font-size: clamp(1.15rem, 2.6vw, 1.6rem); }
.habs-schedule .habs-opponent-results-summary { margin: 0 0 18px; color: #b7c4d4; font-size: .9rem; line-height: 1.5; }
.habs-schedule .habs-opponent-month { margin: 0 0 18px; padding: 16px; border: 1px solid var(--habs-line, #405267); border-radius: 6px; background: #0d2035; }
.habs-schedule .habs-opponent-month h4 { margin: 0 0 12px; color: #f4f1e9; font-size: 1.05rem; }
.habs-schedule .habs-opponent-filter[hidden],
.habs-schedule .habs-opponent-popup[hidden],
.habs-schedule .habs-opponent-clear[hidden],
.habs-schedule .habs-opponent-no-match[hidden],
.habs-schedule .habs-opponent-results[hidden],
.habs-schedule.is-opponent-filtered .habs-schedule-views,
.habs-schedule.is-opponent-filtered .habs-month-controls,
.habs-schedule.is-opponent-filtered [data-habs-view] { display: none !important; }
@media (max-width: 560px) {
  .habs-schedule .habs-opponent-controls { flex-wrap: wrap; gap: 8px; }
  .habs-schedule .habs-opponent-field { flex-basis: 100%; max-width: none; }
  .habs-schedule .habs-opponent-clear { min-height: 44px; width: 100%; }
  .habs-schedule .habs-opponent-month { padding: 12px 9px; }
}
@media print {
  .habs-opponent-filter, .habs-opponent-results { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .habs-schedule .habs-opponent-popup { scroll-behavior: auto; }
}
