/* App-version reload toast (see initAppVersionWatch in init.js) -- not
   Expert Mode specific, just placed here since this file loads on every
   page. Fixed + high z-index so it's visible over the mobile overlay too. */
.tipz365-update-notice {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 9999;
  max-width: calc(100vw - 32px);
  padding: 12px 20px;
  border-radius: 10px;
  border: 1px solid rgba(142, 255, 0, .45);
  background: rgba(8, 15, 20, .96);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
}

/* 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;
}
.filters .filters-bottom-row { align-items: flex-end; }
.filters .filters-bottom-row > #f-reset,
.filters .filters-bottom-row > .expert-mode-button,
.filters .filters-bottom-row > .pro-combo-control > .expert-mode-button {
  box-sizing: border-box;
  width: 120px;
  min-width: 120px;
  height: 38px;
  min-height: 38px;
  font-size: 12px;
  white-space: nowrap;
}
.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;
}
/* Marks whichever filter mechanism was used last (see markExpertToggleOpen
   in core.js): one of the five panel-toggle buttons, Best Kombi, or the
   Odds Drop dropdown. */
.expert-mode-button.panel-toggle-open,
#f-odds-drop.panel-toggle-open {
  border-color: #22c55e !important;
  box-shadow: 0 0 0 1px rgba(34, 197, 94, .45);
}
/* Market / Model / Bookmaker: text turns green once the selection differs
   from its default ("All markets" / "All models" / "Best odds"), and back
   to the normal color as soon as it's reset to that default. */
#mkt-btn.filter-value-active,
#model-btn.filter-value-active,
#f-bookie-trigger.filter-value-active {
  color: #22c55e !important;
}
#pro-combo-btn.active, #rules-divers-btn.active {
  border-color: #f2c94c;
  color: #111820;
  background: #f2c94c;
}
.pro-combo-control { position: relative; }
.pro-combo-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 7px);
  left: 0;
  width: min(390px, 86vw);
  max-height: 70vh;
  overflow-y: auto;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .30);
}
.pro-combo-menu > label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 2px;
  color: var(--ink);
  font-size: 12px;
  cursor: pointer;
}
.pro-combo-menu > label input { accent-color: #f2c94c; }
.pro-combo-menu > label.pro-combo-require-all {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-weight: 600;
}
.pro-combo-message {
  display: none;
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(248, 113, 113, .45);
  border-radius: 7px;
  color: #fecaca;
  background: rgba(127, 29, 29, .24);
  font-size: 12px;
  line-height: 1.35;
}
.pro-combo-message.visible { display: block; }
.pro-combo-menu-actions { display: flex; gap: 8px; margin-top: 9px; }
.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.
   Unscoped (not `.expert-panel .expert-go-button`) so it also reaches
   #pro-combo-apply, which lives in .pro-combo-menu rather than a
   .expert-panel section. */
.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-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-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-go-button:focus-visible {
  outline: 2px solid #78d99a; outline-offset: 4px;
}
/* While a GO button's search/filter action is running: same shape, red
   instead of green. Cleared again as soon as the action settles. */
.expert-go-button.go-loading {
  color: #ff8a8a !important;
  background:
    radial-gradient(circle at 36% 28%, rgba(255,255,255,.13) 0 8%, transparent 27%),
    radial-gradient(circle at 50% 62%, #1a1010 0 45%, #0e0808 70%, #050303 100%) !important;
  box-shadow:
    inset 0 0 0 2px #c23a3a,
    inset 0 0 0 5px #2a0f0f,
    inset 0 -6px 10px rgba(0,0,0,.72),
    0 0 0 2px #9aa1a6,
    0 0 0 4px #343a40,
    0 0 7px rgba(220,53,53,.48),
    0 0 12px rgba(200,30,30,.22) !important;
  text-shadow: 0 0 5px rgba(255,120,120,.55);
  cursor: wait;
}
.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;
}
