/* Expert Mode: multi-model odds-consensus search panel. */
.expert-panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 16px; margin-bottom: 14px;
}
.expert-panel.hidden { display: none; }
.expert-mode-button {
  min-height: 38px; padding: 0 16px; border-radius: 8px; font-weight: 800;
  cursor: pointer; background: var(--surface-2, #30343a);
  border: 1px solid var(--border, #555); color: inherit;
}
.expert-mode-button:hover,
.expert-mode-button:focus-visible {
  background: linear-gradient(90deg, rgba(34, 197, 94, .22), rgba(34, 197, 94, .03)) !important;
  border-color: rgba(34, 197, 94, .45) !important;
  outline: none;
}
.expert-panel-title { font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.expert-panel-hint { font-size: 12px; color: var(--muted); margin: 0 0 12px; }
.expert-model-grid { display: grid; gap: 6px; max-width: 520px; }
.expert-model-head, .expert-model-row {
  display: grid; grid-template-columns: 1fr 90px 90px 56px; gap: 10px; align-items: center;
}
.expert-model-head span { font-size: 11px; color: var(--muted); text-align: left; }
.expert-model-head span:last-child { text-align: center; }
.expert-model-label { font-size: 13px; color: var(--ink-2); }
.expert-model-min, .expert-model-max {
  font: inherit; color: var(--ink); background: var(--page);
  border: 1px solid var(--border); border-radius: 7px; padding: 5px 8px;
  width: 100%; box-sizing: border-box;
}
.expert-model-required {
  justify-self: center; width: 17px; height: 17px; margin: 0; cursor: pointer;
  accent-color: #22c55e;
}
@media (max-width: 700px) {
  .expert-model-head, .expert-model-row { grid-template-columns: 1fr 76px 76px 44px; gap: 6px; }
}
.expert-panel-footer {
  display: flex; align-items: center; gap: 10px; margin-top: 14px; flex-wrap: wrap;
}
.expert-panel-footer label { font-size: 12px; color: var(--muted); }
#expert-min-match, #expert-reference-tolerance {
  font: inherit; color: var(--ink); background: var(--page);
  border: 1px solid var(--border); border-radius: 7px; padding: 5px 8px; width: 60px;
}
#expert-preset-select {
  font: inherit; color: var(--ink); background: var(--page);
  border: 1px solid var(--border); border-radius: 7px; padding: 5px 8px;
  max-width: 200px;
}

/* Name-a-preset dialog -- reuses the betslip/generator modal chrome. */
.preset-save-modal { width: min(420px, 92vw); }
.preset-save-body {
  padding: 16px 20px 20px;
  display: flex; flex-direction: column; gap: 8px;
}
.preset-save-body label { font-size: 12px; color: var(--muted); }
.preset-save-body input {
  width: 100%; box-sizing: border-box; padding: 9px 12px;
  color: var(--ink); background: var(--page);
  border: 1px solid var(--border); border-radius: 8px; font: inherit;
}
.preset-save-body input:focus-visible {
  outline: none; border-color: #22c55e;
}
.preset-save-error {
  color: var(--critical, #ef4444); font-size: 12.5px; min-height: 0;
}
.preset-save-btn-row { display: flex; gap: 8px; margin-top: 4px; }
.preset-save-btn-row .full-betslip-save-selection { flex: 1 1 auto; margin-top: 0; }

/* Generic yes/no confirmation dialog -- reuses the same modal chrome. */
.confirm-modal { width: min(420px, 92vw); }
.confirm-modal-body {
  padding: 16px 20px 20px;
  display: flex; flex-direction: column; gap: 14px;
}
#confirm-modal-message { font-size: 14px; color: var(--ink); }
/* Compact, deliberately subtler green counterpart of the main GO button. */
.expert-panel .expert-go-button {
  position: relative;
  width: 54px !important;
  min-width: 54px !important;
  max-width: 54px !important;
  height: 54px !important;
  min-height: 54px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  cursor: pointer;
  border: 2px solid #273039 !important;
  color: #65d98a !important;
  background:
    radial-gradient(circle at 36% 28%, rgba(255,255,255,.13) 0 8%, transparent 27%),
    radial-gradient(circle at 50% 62%, #111a14 0 45%, #090e0b 70%, #040605 100%) !important;
  box-shadow:
    inset 0 0 0 2px #3cab62,
    inset 0 0 0 5px #102519,
    inset 0 -6px 10px rgba(0,0,0,.72),
    0 0 0 2px #9aa1a6,
    0 0 0 4px #343a40,
    0 0 7px rgba(54,180,98,.48),
    0 0 12px rgba(34,145,74,.22) !important;
  font-size: 16px !important;
  font-weight: 950 !important;
  letter-spacing: .02em;
  line-height: 1 !important;
  text-shadow: 0 0 5px rgba(75,205,119,.55);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
  -webkit-tap-highlight-color: transparent;
}
.expert-panel .expert-go-button:hover {
  background:
    radial-gradient(circle at 36% 28%, rgba(255,255,255,.17) 0 8%, transparent 27%),
    radial-gradient(circle at 50% 62%, #17251b 0 45%, #0b120d 70%, #040605 100%) !important;
  filter: brightness(1.06);
  transform: translateY(-1px);
}
.expert-panel .expert-go-button:active {
  transform: translateY(2px) scale(.97);
  box-shadow:
    inset 0 0 0 2px #328e52,
    inset 0 0 0 5px #102519,
    inset 0 4px 10px rgba(0,0,0,.84),
    0 0 0 2px #858d92,
    0 0 0 4px #2b3135,
    0 0 5px rgba(54,180,98,.38) !important;
}
.expert-panel .expert-go-button:focus-visible {
  outline: 2px solid #78d99a; outline-offset: 4px;
}
.expert-match-summary { margin-top: 12px; font-size: 12.5px; color: var(--ink-2); }
.expert-match-summary:empty { margin-top: 0; }
.expert-match-summary .expert-match-row {
  display: flex; justify-content: space-between; gap: 10px; max-width: 460px;
  padding: 3px 0; border-bottom: 1px solid var(--border);
}
.expert-match-summary .expert-match-row:last-child { border-bottom: none; }
.expert-match-summary .expert-match-pct { font-weight: 700; color: var(--ink); }
@media (max-width: 700px) {
  .expert-model-grid { max-width: none; }
  .expert-match-summary .expert-match-row { max-width: none; }
}

/* Left-edge highlight showing which card actually drove the results
   currently on screen -- normal filters or Expert Mode. */
#filters.active-search, #expert-panel.active-search {
  border-left: 4px solid #22c55e !important;
}

/* Per-row badge next to the round Similar Games "S" badge, showing how many
   of the currently configured Expert Mode models match this specific row. */
.expert-match-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 9px;
  border: 1px solid #22c55e;
  border-radius: 999px;
  background: transparent;
  color: #22c55e;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  vertical-align: text-bottom;
}

.league .expert-reference-badge { margin-left: 4px; }
.expert-reference-badge:hover,
.expert-reference-badge:focus-visible {
  color: #65d98a !important;
  border-color: #65d98a !important;
  background: rgba(54, 180, 98, .12) !important;
}
