/* GreenBets - Goal Analysis, Charts, Betting Markets & Match Metrics Stylesheet */

/* Model Selector Toolbar */
.model-selector-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0 14px;
}

.model-selector {
  display: inline-flex;
  background: #e3eae5;
  border-radius: 6px;
  padding: 3px;
  gap: 3px;
  border: 1px solid #d0dcd4;
}

.model-selector button {
  background: transparent;
  border: 0;
  border-radius: 4px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  color: #4b6154;
  cursor: pointer;
  transition: all 0.15s ease;
}

.model-selector button[aria-pressed="true"] {
  background: #ffffff;
  color: #175434;
  font-weight: 750;
  box-shadow: 0 1px 4px rgba(23, 84, 52, 0.15);
}

.model-selector button:hover:not([aria-pressed="true"]) {
  background: rgba(255, 255, 255, 0.5);
  color: #1f3629;
}

/* Summary Chips */
.chart-summary-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.summary-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 20px;
  background: #f0f5f2;
  border: 1px solid #d4e2da;
  color: #385244;
}

.summary-chip strong {
  color: #175434;
  font-weight: 750;
}

.summary-chip.chip-highlight {
  background: #e6f6ec;
  border-color: #a0dcba;
  color: #145933;
}

/* ==========================================================================
   GRÁFICA DE DISTRIBUCIÓN DE GOLES (POISSON / DIXON-COLES)
   ========================================================================== */
.goal-chart-container {
  background: #ffffff;
  border: 1px solid #dce5df;
  border-radius: 8px;
  padding: 20px 16px 14px;
  margin: 14px 0 24px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.goal-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #edf2ee;
}

.goal-chart-header strong {
  font-size: 13px;
  color: #213629;
}

.goal-chart-header span {
  font-size: 11px;
  color: #6d7f74;
}

.goal-chart {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
  height: 210px;
  padding: 10px 4px 0;
  position: relative;
  background: repeating-linear-gradient(
    to bottom,
    transparent,
    transparent 49px,
    #f4f7f5 49px,
    #f4f7f5 50px
  );
  border-bottom: 2px solid #cad6ce;
}

.goal-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  min-width: 0;
  text-align: center;
  position: relative;
  transition: transform 0.15s ease;
}

.goal-column:hover {
  transform: translateY(-2px);
}

.goal-prob-pill {
  font-size: 11px;
  font-weight: 700;
  color: #586e61;
  font-variant-numeric: tabular-nums;
  margin-bottom: 6px;
  padding: 2px 4px;
  border-radius: 3px;
  white-space: nowrap;
}

.goal-column.is-peak .goal-prob-pill {
  color: #0f5132;
  background: #d1fae5;
  border: 1px solid #a7f3d0;
  font-weight: 850;
  box-shadow: 0 1px 3px rgba(16, 185, 129, 0.2);
}

.goal-bar-track {
  width: 72%;
  height: 145px;
  background: #edf3f0;
  border-radius: 6px 6px 0 0;
  display: flex;
  align-items: flex-end;
  position: relative;
  overflow: hidden;
}

.goal-bar-fill {
  width: 100%;
  background: linear-gradient(180deg, #408867 0%, #266045 100%);
  border-radius: 5px 5px 0 0;
  transition: height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.goal-column.is-peak .goal-bar-track {
  background: #d1f2df;
}

.goal-column.is-peak .goal-bar-fill {
  background: linear-gradient(180deg, #10b981 0%, #059669 100%);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.45);
}

.goal-label {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.2;
}

.goal-label b {
  font-size: 13px;
  color: #202b25;
}

.goal-label small {
  font-size: 9px;
  color: #7b8e83;
}

.goal-peak-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 800;
  color: #047857;
  background: #d1fae5;
  border: 1px solid #a7f3d0;
  border-radius: 3px;
  padding: 1px 4px;
  margin-top: 3px;
  white-space: nowrap;
}

/* ==========================================================================
   MARCADORES EXACTOS MÁS PROBABLES (TOP 6 CARDS)
   ========================================================================== */
.exact-scores-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 24px;
}

.exact-score-card {
  background: #ffffff;
  border: 1px solid #dce4df;
  border-radius: 7px;
  padding: 12px 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  position: relative;
  overflow: hidden;
}

.exact-score-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
}

.exact-score-card.is-favorite {
  border-color: #22c55e;
  background: #f7fdf9;
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.15);
}

.exact-score-card.is-favorite::before {
  content: "TOP 1";
  position: absolute;
  top: 0;
  right: 0;
  background: #22c55e;
  color: #ffffff;
  font-size: 8px;
  font-weight: 800;
  padding: 2px 6px;
  border-bottom-left-radius: 5px;
  letter-spacing: 0.05em;
}

.score-badge {
  font-size: 9px;
  font-weight: 750;
  padding: 2px 6px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.score-card-home .score-badge {
  background: #e6f6ec;
  color: #145933;
  border: 1px solid #b3e3c8;
}

.score-card-draw .score-badge {
  background: #fdf8e9;
  color: #7d5916;
  border: 1px solid #f4dfa7;
}

.score-card-away .score-badge {
  background: #edf5fc;
  color: #195282;
  border: 1px solid #bcdcfa;
}

.exact-score-card .score-res {
  font-size: 22px;
  font-weight: 850;
  color: #1b2f23;
  font-variant-numeric: tabular-nums;
  margin: 2px 0;
}

.exact-score-card .score-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 100%;
}

.exact-score-card .score-prob {
  font-size: 13px;
  font-weight: 750;
  color: #1e5c3b;
  font-variant-numeric: tabular-nums;
}

.exact-score-card .score-odds {
  font-size: 10px;
  color: #6f8076;
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   ESTADÍSTICAS COMPARATIVAS HEAD-TO-HEAD (API-FOOTBALL & UNDERSTAT)
   ========================================================================== */
.h2h-panel {
  background: #ffffff;
  border: 1px solid #dce4df;
  border-radius: 8px;
  padding: 0;
  margin: 24px 0 28px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
  overflow: hidden;
}

.h2h-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid #edf2ee;
}

.h2h-panel .panel-collapsible-inner {
  padding: 16px 20px 20px;
}

.h2h-teams-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: #f6f9f7;
  border: 1px solid #e1e9e4;
  border-radius: 6px;
  margin-bottom: 20px;
}

.h2h-team {
  display: flex;
  align-items: center;
  gap: 10px;
}

.h2h-team.team-home {
  justify-content: flex-start;
}

.h2h-team.team-away {
  justify-content: flex-end;
  text-align: right;
}

.h2h-team strong {
  font-size: 13px;
  color: #1a2f23;
  min-width: 0;
  overflow-wrap: anywhere;
}

.h2h-team-badge {
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 3px;
  text-transform: uppercase;
}

.team-home .h2h-team-badge {
  background: #235d3d;
  color: #ffffff;
}

.team-away .h2h-team-badge {
  background: #3c73ad;
  color: #ffffff;
}

.h2h-vs-badge {
  font-size: 11px;
  font-weight: 800;
  color: #83948a;
  background: #ffffff;
  border: 1px solid #dce4df;
  padding: 3px 8px;
  border-radius: 12px;
}

.h2h-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.h2h-row {
  display: grid;
  grid-template-columns: minmax(64px, 84px) minmax(180px, 1fr) minmax(64px, 84px);
  align-items: center;
  gap: 16px;
  min-height: 30px;
}

.h2h-val {
  font-size: 15px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  color: #4f6458;
  white-space: nowrap;
}

.h2h-val.val-home {
  text-align: right;
}

.h2h-val.val-away {
  text-align: left;
}

.h2h-val.is-lead {
  color: #175434;
  font-weight: 850;
}

.h2h-row.away-leading .val-away.is-lead {
  color: #195282;
}

.h2h-center {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.h2h-label {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 11px;
  font-weight: 650;
  color: #3b5043;
  line-height: 1.2;
  text-align: center;
  overflow-wrap: anywhere;
}

.h2h-dual-bar {
  display: flex;
  height: 10px;
  background: #edf2ef;
  border-radius: 5px;
  overflow: hidden;
  position: relative;
}

.h2h-bar-home {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #235d3d);
  border-radius: 5px 0 0 5px;
  transition: width 0.4s ease;
}

.h2h-bar-divider {
  width: 2px;
  height: 100%;
  background: #ffffff;
  flex-shrink: 0;
}

.h2h-bar-away {
  height: 100%;
  background: linear-gradient(90deg, #3c73ad, #5e9dd9);
  border-radius: 0 5px 5px 0;
  transition: width 0.4s ease;
}

.h2h-row.has-missing-stat .h2h-dual-bar {
  opacity: 0.45;
}

.h2h-row.has-missing-stat .h2h-val {
  color: #8a9a91;
  font-weight: 700;
}

.h2h-cards-display {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.card-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 18px;
  border-radius: 2px;
  font-size: 9px;
  font-weight: 800;
  color: #1a201c;
}

.card-pill.yellow {
  background: #facc15;
  border: 1px solid #eab308;
}

.card-pill.red {
  background: #ef4444;
  border: 1px solid #dc2626;
  color: #ffffff;
}

/* ==========================================================================
   MERCADOS DE APUESTAS & CARDS
   ========================================================================== */
.markets-container {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin: 18px 0 28px;
}

.market-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.market-card {
  background: #ffffff;
  border: 1px solid #dce4df;
  border-radius: 6px;
  padding: 12px 14px;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.market-card:hover {
  border-color: #8bbfa0;
  box-shadow: 0 2px 8px rgba(35, 93, 61, 0.08);
}

.market-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.market-card-label {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.market-card-label strong {
  font-size: 13px;
  color: #1f3026;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.market-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 4px;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.market-badge.badge-1x,
.market-badge.badge-x2,
.market-badge.badge-12 {
  background: #eaf3ed;
  color: #1e5a3c;
  border: 1px solid #bedbc8;
}

.market-badge.badge-ml {
  background: #1e3d2b;
  color: #c5ef79;
  border: 1px solid #2f5e43;
}

.market-badge.badge-yes {
  background: #e6f6ec;
  color: #1b633b;
  border: 1px solid #a3dcba;
}

.market-badge.badge-no {
  background: #f4f6f4;
  color: #55695e;
  border: 1px solid #d5ded8;
}

.market-card-prob {
  font-size: 15px;
  font-weight: 750;
  color: #1e5c3b;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.market-bar-track {
  height: 5px;
  background: #e8eee9;
  border-radius: 3px;
  overflow: hidden;
  margin: 8px 0 6px;
}

.market-bar-fill {
  height: 100%;
  background: #2e7a54;
  border-radius: 3px;
  transition: width 0.35s ease;
}

.market-card p {
  margin: 0;
  font-size: 11px;
  color: #63756b;
  line-height: 1.45;
}

/* ==========================================================================
   GEMINI AI TIPSTER BANNER & CARDS
   ========================================================================== */
#gemini-explain {
  background: #235b42;
  color: #ffffff;
  border: 0;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  padding: 10px 16px;
  cursor: pointer;
}

#gemini-explain:disabled {
  opacity: 0.6;
  cursor: wait;
}

.gemini-block {
  background: #ffffff;
  border: 1px solid #dce4df;
  border-radius: 6px;
  padding: 16px;
  margin: 16px 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.gemini-block h4 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 700;
  color: #235d3d;
  display: flex;
  align-items: center;
  gap: 8px;
}

.gemini-block p {
  margin: 6px 0;
  font-size: 13px;
  color: #202623;
  line-height: 1.6;
}

.gemini-block svg {
  width: 16px;
  height: 16px;
  color: #235d3d;
}

/* ==========================================================================
   RESPONSIVE QUERIES
   ========================================================================== */
@media (max-width: 768px) {
  .exact-scores-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .goal-chart {
    gap: 4px;
    height: 180px;
  }

  .goal-column {
    font-size: 10px;
  }

  .goal-prob-pill {
    font-size: 10px;
    padding: 1px 2px;
  }

  .goal-bar-track {
    height: 110px;
    width: 80%;
  }

  .goal-label b {
    font-size: 11px;
  }

  .goal-label small {
    display: none;
  }

  .goal-peak-badge {
    font-size: 8px;
    padding: 0 2px;
  }

  .h2h-row {
    grid-template-columns: 54px 1fr 54px;
    gap: 10px;
  }

  .h2h-teams-bar {
    grid-template-columns: 1fr auto 1fr;
    gap: 8px;
    padding: 8px 10px;
  }
}

@media (max-width: 480px) {
  .exact-scores-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .goal-chart {
    gap: 2px;
  }

  .model-selector-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .model-selector {
    width: 100%;
  }

  .model-selector button {
    flex: 1;
    text-align: center;
  }

  .h2h-header {
    padding: 16px 14px 12px;
  }

  .h2h-panel .panel-collapsible-inner {
    padding: 14px;
  }

  .h2h-teams-bar {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .h2h-vs-badge {
    justify-self: center;
  }

  .h2h-team,
  .h2h-team.team-away {
    justify-content: space-between;
    text-align: left;
  }

  .h2h-row {
    grid-template-columns: 46px 1fr 46px;
    gap: 8px;
  }

  .h2h-val {
    font-size: 13px;
  }

  .h2h-label {
    font-size: 10px;
  }
}

/* ==========================================================================
   RESULTADOS ANTERIORES & HISTORIAL (FORMA Y H2H)
   ========================================================================== */
.match-history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.match-history-row {
  display: grid;
  grid-template-columns: 55px 1fr 28px;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid #dce4df;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.15s ease;
  font-size: 13px;
  color: #1e2822;
}

.match-history-row:hover {
  background: #f4f8f5;
  border-color: #92c4a3;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(35, 93, 61, 0.08);
}

.match-history-date {
  font-size: 11px;
  font-weight: 600;
  color: #728479;
  white-space: nowrap;
}

.match-history-teams {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.team-side {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.team-side.team-home {
  justify-content: flex-end;
  text-align: right;
}

.team-side.team-away {
  justify-content: flex-start;
  text-align: left;
}

.team-side .team-name {
  font-size: 12px;
  color: #4b5d52;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.team-side.is-target .team-name {
  color: #122c1d;
  font-weight: 750;
}

.team-crest-mini {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f0f4f1;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid #d0dcd4;
}

.team-crest-mini img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.team-crest-mini .crest-fallback {
  font-size: 8px;
  font-weight: 800;
  color: #215437;
  text-transform: uppercase;
}

.match-history-score {
  padding: 3px 8px;
  background: #edf3ef;
  border-radius: 4px;
  white-space: nowrap;
}

.match-history-score b {
  font-size: 12px;
  font-weight: 800;
  color: #1c3224;
  font-variant-numeric: tabular-nums;
}

.match-history-badge {
  display: flex;
  justify-content: center;
  align-items: center;
}

.outcome-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.02em;
}

/* Victoria / Win */
.outcome-badge.outcome-win {
  background: #e6f6ec;
  color: #145933;
  border: 1px solid #a3dcba;
}

/* Empate / Draw */
.outcome-badge.outcome-draw {
  background: #fef8e7;
  color: #805c18;
  border: 1px solid #fae29c;
}

/* Derrota / Loss */
.outcome-badge.outcome-loss {
  background: #fef0f0;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

/* H2H Badges */
.outcome-badge.outcome-h2h-home {
  background: #e6f6ec;
  color: #145933;
  border: 1px solid #a3dcba;
}

.outcome-badge.outcome-h2h-draw {
  background: #fef8e7;
  color: #805c18;
  border: 1px solid #fae29c;
}

.outcome-badge.outcome-h2h-away {
  background: #edf5fc;
  color: #18507f;
  border: 1px solid #b8d9f7;
}

@media (max-width: 600px) {
  .match-history-row {
    grid-template-columns: 46px 1fr 22px;
    gap: 6px;
    padding: 8px 6px;
  }
  .match-history-date {
    font-size: 10px;
  }
  .team-crest-mini {
    width: 18px;
    height: 18px;
  }
  .team-side .team-name {
    font-size: 11px;
  }
  .match-history-score {
    padding: 2px 4px;
  }
  .match-history-score b {
    font-size: 11px;
  }
  .outcome-badge {
    width: 19px;
    height: 19px;
    font-size: 10px;
  }
}

/* ==========================================================================
   COMPARADOR DE CUOTAS EXPANDIBLE / COLAPSABLE & LOGOS DE CASAS DE APUESTAS
   ========================================================================== */

/* Header collapse button for whole section */
.section-collapse-btn {
  background: transparent;
  border: 1px solid #d4ded7;
  border-radius: 4px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #4b6154;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
}

.section-collapse-btn:hover {
  background: #eef4f0;
  border-color: #92b8a1;
  color: #175434;
}

.section-collapse-btn svg {
  width: 16px;
  height: 16px;
  transition: transform 0.25s ease;
}

.section-collapse-btn[aria-expanded="false"] svg {
  transform: rotate(180deg);
}

.panel-collapsible-wrapper {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 0.25s ease-out, opacity 0.2s ease-out;
  opacity: 1;
}

.panel-collapsible-wrapper.is-collapsed {
  grid-template-rows: 0fr;
  opacity: 0;
  pointer-events: none;
}

.panel-collapsible-inner {
  overflow: hidden;
  min-height: 0;
}

/* Odds Toggle Button Bar */
.odds-table-toggle-bar {
  margin: 16px 0 12px;
}

.odds-collapse-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: #f4f8f5;
  border: 1px solid #cce0d3;
  border-radius: 6px;
  color: #1c3d2a;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.odds-collapse-toggle:hover {
  background: #e9f3ec;
  border-color: #8fbf9f;
  color: #123320;
}

.odds-toggle-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.odds-toggle-info svg {
  width: 16px;
  height: 16px;
  color: #235d3d;
}

.odds-toggle-count {
  display: inline-block;
  background: #d1fae5;
  color: #065f46;
  font-size: 11px;
  font-weight: 750;
  padding: 2px 7px;
  border-radius: 12px;
  border: 1px solid #a7f3d0;
}

.odds-toggle-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #556c5e;
}

.odds-chevron-icon {
  width: 16px;
  height: 16px;
  transition: transform 0.25s ease;
}

.odds-collapse-toggle[aria-expanded="false"] .odds-chevron-icon {
  transform: rotate(180deg);
}

.odds-table-collapsible {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 0.25s ease-out, opacity 0.2s ease-out;
  opacity: 1;
}

.odds-table-collapsible.is-collapsed {
  grid-template-rows: 0fr;
  opacity: 0;
  pointer-events: none;
}

.odds-table-collapsible-inner {
  overflow: hidden;
  min-height: 0;
}

/* Bookmaker logos & badges in table */
.bookmaker-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.bm-logo-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.bm-logo-svg {
  display: block;
  height: 24px;
  width: auto;
  max-width: 84px;
  object-fit: contain;
}

.bm-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.bm-title {
  font-size: 12px;
  font-weight: 700;
  color: #1a2a20;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bm-ref-pill {
  display: inline-block;
  font-size: 9px;
  font-weight: 800;
  color: #3b604b;
  background: #edf3ee;
  border: 1px solid #c9dcd0;
  border-radius: 3px;
  padding: 1px 4px;
  width: fit-content;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Odds table cells */
.odds-table {
  display: grid;
  grid-template-columns: minmax(180px, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: 0;
  border: 1px solid #d5ded8;
  border-radius: 6px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.odds-table > * {
  padding: 10px 12px;
  border-bottom: 1px solid #e2eae5;
  display: flex;
  align-items: center;
}

.odds-table strong {
  background: #f0f5f2;
  color: #173d28;
  font-size: 12px;
  font-weight: 750;
  justify-content: center;
}

.odds-cell {
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  text-align: center;
}

.odds-cell b {
  font-size: 13px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  color: #1f3629;
}

.odds-cell small {
  font-size: 10px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.odds-cell.is-best-odds {
  background: #f0fdf4;
}

.odds-cell-positive b {
  color: #0f6938;
}

.odds-cell-positive small {
  color: #047857;
  background: #d1fae5;
  padding: 1px 5px;
  border-radius: 3px;
}

.odds-cell-neutral b {
  color: #85530e;
}

.odds-cell-neutral small {
  color: #92400e;
}

.odds-cell-negative b {
  color: #4b6354;
}

.odds-cell-negative small {
  color: #6b7280;
}

/* Best Odds Cards */
.best-odds-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 10px 0 6px;
}

.best-odds-card {
  background: #ffffff;
  border: 1px solid #d7e2da;
  border-radius: 8px;
  padding: 14px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  position: relative;
}

.best-odds-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(23, 61, 40, 0.08);
}

.best-odds-card.ev-positive {
  background: #f7fdf9;
  border-color: #8ed0a5;
  box-shadow: inset 3px 0 0 #10b981;
}

.best-odds-card.ev-positive .best-odds-quote {
  color: #065f46;
}

.best-odds-card.ev-neutral {
  background: #fffdf7;
  border-color: #f2d58e;
  box-shadow: inset 3px 0 0 #f59e0b;
}

.best-odds-card.ev-neutral .best-odds-quote {
  color: #92400e;
}

.best-odds-card.ev-negative {
  background: #fcfcfc;
  border-color: #dce4de;
  box-shadow: inset 3px 0 0 #9ca3af;
}

.best-odds-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px;
}

.best-odds-market {
  font-size: 13px;
  font-weight: 750;
  color: #173825;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.best-odds-main {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.best-odds-quote {
  font-size: 22px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.best-odds-ev-pill {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 12px;
  font-variant-numeric: tabular-nums;
}

.best-odds-ev-pill.ev-pos {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.best-odds-ev-pill.ev-neu {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.best-odds-ev-pill.ev-neg {
  background: #f3f4f6;
  color: #4b5563;
  border: 1px solid #e5e7eb;
}

.best-odds-bm {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid #edf2ee;
  margin-top: 2px;
}

.best-odds-bm .bm-logo-svg {
  height: 20px;
}

.best-odds-bm-name {
  font-size: 12px;
  font-weight: 700;
  color: #2b4334;
}

.best-odds-footer {
  font-size: 11px;
  color: #63776b;
  display: flex;
  justify-content: space-between;
  padding-top: 2px;
}

@media (max-width: 768px) {
  .best-odds-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .odds-table {
    grid-template-columns: minmax(130px, 1.4fr) repeat(3, minmax(0, 1fr));
  }
}

/* ==========================================================================
   MOTOR DE CONFIANZA (ACCURACY, TASAS DE ACIERTO & FIABILIDAD)
   ========================================================================== */
.trust-panel {
  background: #ffffff;
  border: 1px solid #dce4df;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 26px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.trust-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #eef3ef;
  margin-bottom: 16px;
}

.trust-panel-title-area h2 {
  margin: 4px 0 2px;
  font-size: 18px;
  color: #173825;
  display: flex;
  align-items: center;
  gap: 8px;
}

.trust-panel-title-area h2 svg {
  width: 20px;
  height: 20px;
  color: #1a633d;
}

.trust-panel-title-area p {
  margin: 0;
  font-size: 12px;
  color: #5c7064;
}

.trust-panel-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Metric summary cards */
.trust-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.trust-metric-card {
  background: #f7faf8;
  border: 1px solid #d6e2da;
  border-radius: 6px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.trust-metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 3px 8px rgba(23, 75, 47, 0.08);
}

.trust-metric-label {
  font-size: 11px;
  font-weight: 700;
  color: #4b6154;
  display: flex;
  align-items: center;
  gap: 6px;
}

.trust-metric-label svg {
  width: 14px;
  height: 14px;
  color: #1b6840;
}

.trust-metric-value {
  font-size: 22px;
  font-weight: 850;
  color: #173d28;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.trust-metric-sub {
  font-size: 10px;
  color: #65796d;
  line-height: 1.35;
}

.trust-metric-card.highlight-card {
  background: #f0fdf4;
  border-color: #86efac;
}

.trust-metric-card.highlight-card .trust-metric-value {
  color: #065f46;
}

/* Trust badge & thermometer */
.trust-badge-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.trust-badge-pill {
  font-size: 12px;
  font-weight: 850;
  padding: 4px 10px;
  border-radius: 12px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.trust-badge-high {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #6ee7b7;
}

.trust-badge-medium {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}

.trust-badge-low {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

/* Current match confidence banner */
.trust-match-banner {
  background: #f0f7f3;
  border: 1px solid #b7dcbe;
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.trust-match-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.trust-match-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #99cbb2;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #145933;
  flex-shrink: 0;
}

.trust-match-icon svg {
  width: 20px;
  height: 20px;
}

.trust-match-desc strong {
  display: block;
  font-size: 13px;
  color: #143e26;
  margin-bottom: 2px;
}

.trust-match-desc p {
  margin: 0;
  font-size: 12px;
  color: #3b5b47;
}

/* Three explanatory concept cards */
.trust-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.trust-concept-card {
  background: #ffffff;
  border: 1px solid #dce5df;
  border-radius: 6px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.trust-concept-card h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 750;
  color: #183e27;
  display: flex;
  align-items: center;
  gap: 7px;
}

.trust-concept-card h3 svg {
  width: 15px;
  height: 15px;
  color: #235d3d;
}

.trust-concept-card p {
  margin: 0;
  font-size: 11.5px;
  color: #4f6356;
  line-height: 1.5;
}

.trust-hitrate-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 4px;
}

.trust-hitrate-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.trust-hitrate-header {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 650;
  color: #2b4234;
}

.trust-hitrate-bar {
  height: 6px;
  background: #e6eee9;
  border-radius: 3px;
  overflow: hidden;
}

.trust-hitrate-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #059669);
  border-radius: 3px;
}

.trust-key-points {
  margin: 4px 0 0;
  padding-left: 16px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 11px;
  color: #4b6053;
  line-height: 1.45;
}

.trust-key-points li strong {
  color: #123320;
}

.model-picks-preview {
  margin-top: 16px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid #d7e3da;
  border-radius: 6px;
}

.model-picks-preview .section-heading {
  margin-bottom: 8px;
}

.model-picks-preview ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

.model-picks-preview li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid #e7eee9;
  color: #243a2d;
  font-size: 13px;
}

.model-picks-preview li:last-child {
  border-bottom: 0;
}

.model-picks-preview li strong {
  flex: 0 0 auto;
  color: #17613b;
}

.model-picks-preview p {
  margin: 8px 0 0;
  color: #68796e;
  font-size: 11px;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .trust-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .trust-cards-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .trust-metrics-grid {
    grid-template-columns: 1fr;
  }
  .trust-match-banner {
    flex-direction: column;
    align-items: flex-start;
  }
}
