/* Predicción por partido: chip, panel "duelo de pronósticos" y bottom sheet. */

/* --- Chip en match cards --- */
.mp-chip {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 8px; padding: 6px 12px;
  border: 1px dashed var(--brand-1); border-radius: var(--r-pill);
  background: #fff; color: var(--brand-1);
  font: inherit; font-size: 0.76rem; font-weight: 700;
  cursor: pointer; transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
  width: 100%; justify-content: center;
}
.mp-chip:hover { background: var(--live-soft); transform: translateY(-1px); }
.mp-chip.is-set { border-style: solid; background: var(--surface-soft); color: var(--ink); }
.mp-chip.is-set strong { font-variant-numeric: tabular-nums; }
.mp-chip__lock { opacity: 0.7; }

/* --- Panel duelo de pronósticos --- */
.mp-duel-host:empty { display: none; }
.mp-duel { padding: 14px 16px; margin: 12px 0; }
.mp-duel__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.mp-duel__title { font-family: var(--font-display); font-weight: 700; font-size: 0.92rem; color: var(--ink); }
.mp-duel__edit {
  border: 1px solid var(--hairline); background: #fff; border-radius: var(--r-pill);
  padding: 4px 10px; font: inherit; font-size: 0.72rem; font-weight: 600; color: var(--ink-2); cursor: pointer;
}
.mp-duel__edit:hover { border-color: var(--brand-1); color: var(--brand-1); }

.mp-duel__grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: stretch; }
.mp-duel__vs {
  align-self: center; font-family: var(--font-display); font-weight: 800; font-size: 0.78rem;
  color: var(--ink-3); background: var(--surface-sunk); border-radius: 50%;
  width: 34px; height: 34px; display: grid; place-items: center;
}

.mp-side {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  gap: 4px; padding: 12px 8px; border-radius: var(--r-md); border: 1px solid var(--hairline);
  background: var(--surface-soft); text-align: center; min-height: 108px;
}
.mp-side--user.is-hit { border-color: var(--win); background: #F0FDF4; }
.mp-side__label { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.mp-side__score {
  font-family: var(--font-display); font-weight: 800; font-size: 2rem; line-height: 1.1;
  color: var(--ink); font-variant-numeric: tabular-nums;
}
.mp-side__score i { font-style: normal; color: var(--ink-3); padding: 0 2px; }
.mp-side__scorer { display: inline-flex; align-items: center; gap: 6px; font-size: 0.74rem; color: var(--ink-2); }
.mp-side__scorer img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; background: #fff; box-shadow: var(--shadow-sm); }
.mp-side__scorer em { font-style: normal; font-weight: 600; }
.mp-side__empty { font-size: 0.8rem; color: var(--ink-3); line-height: 1.35; margin-top: 8px; }
.mp-side__cta {
  margin-top: 8px; border: none; border-radius: var(--r-pill); padding: 9px 14px;
  background: var(--grad-brand); color: #fff; font: inherit; font-size: 0.8rem; font-weight: 700; cursor: pointer;
  box-shadow: var(--shadow-sm); transition: transform var(--t-fast) var(--ease);
}
.mp-side__cta:hover { transform: translateY(-1px); }

/* Lado IA clicable → detalle del pronóstico (análisis IA + evolución) */
.mp-side--link {
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease);
}
@media (hover: hover) {
  .mp-side--link:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: rgba(79, 70, 229, 0.35);
  }
}
.mp-side--link:focus-visible { outline: 2px solid var(--brand-1); outline-offset: 2px; }
.mp-side__more {
  margin-top: 6px; display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.68rem; font-weight: 700; color: var(--brand-1);
}
.mp-side__more i { font-style: normal; transition: transform var(--t-fast) var(--ease); }
@media (hover: hover) {
  .mp-side--link:hover .mp-side__more i { transform: translateX(2px); }
}
@media (prefers-reduced-motion: reduce) {
  .mp-side--link, .mp-side__more i { transition: none; }
}

/* % del modelo EN GRANDE */
.mp-side__big {
  font-family: var(--font-display); font-weight: 800; font-size: 2.4rem; line-height: 1;
  background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent;
  font-variant-numeric: tabular-nums;
}
.mp-side__big small { font-size: 1.1rem; font-weight: 700; }
.mp-side__fav { font-size: 0.8rem; font-weight: 700; color: var(--ink); }
.mp-side__likely { font-size: 0.7rem; color: var(--ink-3); }
.mp-probbar { display: flex; width: 100%; height: 6px; border-radius: var(--r-pill); overflow: hidden; background: var(--surface-sunk); margin-top: 6px; }
.mp-probbar i { display: block; height: 100%; }
.mp-probbar__h { background: var(--blue, #4F46E5); }
.mp-probbar__d { background: var(--draw); }
.mp-probbar__a { background: var(--green, #16A34A); }

/* Franja del resultado real */
.mp-real {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-top: 12px; padding: 8px 10px; border-radius: var(--r-sm);
  background: var(--surface-sunk);
}
.mp-real.is-live { background: var(--live-soft); }
.mp-real__label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-2); }
.mp-real.is-live .mp-real__label { color: var(--live); animation: mp-pulse 1.4s ease-in-out infinite; }
.mp-real__score { font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.mp-real__ko { font-size: 0.78rem; color: var(--ink-2); font-weight: 600; }
@keyframes mp-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }

/* Veredicto */
.mp-verdict { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 10px; }
.mp-vchip {
  display: inline-flex; align-items: center; padding: 4px 10px; border-radius: var(--r-pill);
  font-size: 0.72rem; font-weight: 700;
}
.mp-vchip.is-hit { background: #F0FDF4; color: var(--win); border: 1px solid #BBF7D0; }
.mp-vchip.is-miss { background: var(--surface-sunk); color: var(--ink-3); }
.mp-vchip.is-going { background: var(--live-soft); color: var(--live); }
.mp-vchip.is-total { background: var(--grad-brand); color: #fff; }

/* --- Bottom sheet --- */
.mp-backdrop {
  position: fixed; inset: 0; z-index: 90; background: rgba(12, 16, 25, 0.45);
  display: flex; align-items: flex-end; justify-content: center;
  animation: mp-fade var(--t) var(--ease);
}
.mp-backdrop.is-closing { opacity: 0; transition: opacity 180ms var(--ease); }
.mp-backdrop.is-closing .mp-sheet { transform: translateY(30px); }
@keyframes mp-fade { from { opacity: 0; } }

.mp-sheet {
  width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto;
  background: #fff; border-radius: var(--r-lg) var(--r-lg) 0 0;
  box-shadow: var(--shadow-lg); padding: 16px 18px calc(18px + env(safe-area-inset-bottom));
  animation: mp-up var(--t-slow) var(--ease); transition: transform 180ms var(--ease);
}
@keyframes mp-up { from { transform: translateY(60px); opacity: 0.6; } }
@media (min-width: 700px) {
  .mp-backdrop { align-items: center; }
  .mp-sheet { border-radius: var(--r-lg); }
}

.mp-sheet__head { position: relative; padding-right: 34px; margin-bottom: 12px; }
.mp-sheet__match { display: flex; align-items: center; gap: 10px; }
.mp-sheet__match img { width: 30px; height: 30px; border-radius: 50%; object-fit: contain; background: var(--surface-soft); box-shadow: var(--shadow-sm); }
.mp-sheet__names { font-family: var(--font-display); font-weight: 700; font-size: 0.98rem; }
.mp-sheet__names em { font-style: normal; color: var(--ink-3); font-weight: 600; font-size: 0.8rem; padding: 0 2px; }
.mp-sheet__ko { display: block; margin-top: 4px; font-size: 0.74rem; color: var(--ink-3); }
.mp-sheet__close {
  position: absolute; top: 0; right: 0; width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--hairline); background: var(--surface-soft); color: var(--ink-2);
  font: inherit; cursor: pointer;
}

.mp-gate p { margin: 6px 0; font-size: 0.88rem; color: var(--ink-2); line-height: 1.45; }
.mp-gate b { color: var(--brand-1); }
.mp-loading { padding: 8px 0 4px; }
.mp-status .gz-spinner--sm { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }

.mp-score { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center; margin: 6px 0 4px; }
.mp-score__side { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.mp-score__side > img { width: 38px; height: 38px; border-radius: 50%; object-fit: contain; background: var(--surface-soft); box-shadow: var(--shadow-sm); }
.mp-score__team { font-size: 0.78rem; font-weight: 600; color: var(--ink-2); text-align: center; }
.mp-score__ctrl { display: flex; align-items: center; gap: 10px; }
.mp-score__val {
  font-family: var(--font-display); font-weight: 800; font-size: 1.9rem; min-width: 34px; text-align: center;
  font-variant-numeric: tabular-nums;
}
.mp-score__dash { font-family: var(--font-display); font-weight: 800; color: var(--ink-3); font-size: 1.4rem; }
.mp-step {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--hairline);
  background: var(--surface-soft); font: inherit; font-size: 1.3rem; font-weight: 700; color: var(--ink);
  cursor: pointer; transition: background var(--t-fast) var(--ease);
}
.mp-step:active { background: var(--live-soft); border-color: var(--brand-1); color: var(--brand-1); }

.mp-hint { margin: 8px 0 2px; text-align: center; font-size: 0.76rem; color: var(--ink-3); }

.mp-sec { margin: 16px 0 8px; font-family: var(--font-display); font-size: 0.9rem; font-weight: 700; }
.mp-sec small { font-weight: 600; color: var(--ink-3); font-size: 0.72rem; }

.mp-teamtabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.mp-teamtab {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--hairline); border-radius: var(--r-sm); background: #fff;
  padding: 8px 6px; font: inherit; font-size: 0.78rem; font-weight: 600; color: var(--ink-2); cursor: pointer;
}
.mp-teamtab img { width: 20px; height: 20px; border-radius: 50%; object-fit: contain; }
.mp-teamtab.is-active { border-color: var(--brand-1); color: var(--brand-1); background: var(--live-soft); }

.mp-players { max-height: 250px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--hairline); border-radius: var(--r-sm); padding: 6px; }
.mp-player {
  display: flex; align-items: center; gap: 10px; padding: 7px 8px; border: 1px solid transparent;
  border-radius: var(--r-sm); background: #fff; font: inherit; text-align: left; cursor: pointer; width: 100%;
}
.mp-player:hover { background: var(--surface-soft); }
.mp-player.is-sel { border-color: var(--brand-1); background: var(--live-soft); }
.mp-player img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; background: var(--surface-soft); }
.mp-player__name { flex: 1; font-size: 0.82rem; font-weight: 600; color: var(--ink); }
.mp-player__pos { font-size: 0.68rem; color: var(--ink-3); }
.mp-player--none .mp-player__name { color: var(--ink-3); font-weight: 500; }

.mp-save {
  display: block; width: 100%; margin-top: 14px; border: none; border-radius: var(--r-sm);
  background: var(--grad-brand); color: #fff; padding: 13px; font: inherit; font-size: 0.92rem;
  font-weight: 700; cursor: pointer; box-shadow: var(--shadow-md);
}
.mp-save:disabled { opacity: 0.6; cursor: default; }
.mp-status { margin: 8px 0 0; text-align: center; font-size: 0.8rem; min-height: 1.2em; color: var(--ink-2); }
.mp-status.is-ok { color: var(--win); font-weight: 700; }
.mp-status.is-err { color: var(--loss); font-weight: 600; }
.mp-note { margin: 10px 0 0; text-align: center; font-size: 0.7rem; color: var(--ink-3); line-height: 1.4; }

@media (prefers-reduced-motion: reduce) {
  .mp-backdrop, .mp-sheet, .mp-chip, .mp-side__cta { animation: none; transition: none; }
  .mp-real.is-live .mp-real__label { animation: none; }
}
