/* =========================================================
   MIS PARTIDOS · MATCH CARD · REFINED SPACING
   ========================================================= */

.mp-match-card-shell{
  width: 100%;
}

.mp-match-card{
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
  color: #fff;
  background: transparent;
}

/* =========================
   WRAP GENERAL
   ========================= */

.mp-match-main-wrap{
  position: relative;
  width: 100%;
  padding-top: 16px;
  overflow: visible;
}

/* =========================
   BLOQUE PRINCIPAL
   ========================= */

.mp-match-main-row{
  position: relative;
  width: 100%;
  min-height: 86px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow:
    0 8px 18px rgba(0,0,0,.22),
    inset 0 1px 0 rgba(255,255,255,.03);
  overflow: visible;
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    border-color .18s ease,
    background .18s ease;
}

.mp-match-main-row.clickable{
  cursor: pointer;
}

.mp-match-main-row.clickable:hover{
  transform: translateY(-1px);
  box-shadow:
    0 12px 24px rgba(0,0,0,.28),
    0 0 0 1px rgba(83,255,173,.10);
}

.mp-match-card.is-match .mp-match-main-row{
  background:
    linear-gradient(180deg, rgba(8,29,24,.82), rgba(9,20,18,.92)),
    linear-gradient(90deg, rgba(6,190,132,.16), rgba(6,190,132,.08));
  border-color: rgba(41,217,163,.48);
}

.mp-match-card.is-event .mp-match-main-row{
  background:
    linear-gradient(180deg, rgba(7,20,24,.84), rgba(8,17,20,.92)),
    linear-gradient(90deg, rgba(1,77,78,.22), rgba(1,77,78,.10));
  border-color: rgba(31,143,144,.50);
}

.mp-match-main-row-inner{
  position: relative;
  display: grid;
  grid-template-columns: minmax(0,1fr) 46px 34px 46px minmax(0,1fr);
  align-items: center;
  gap: 10px;
  min-height: 86px;
  padding: 14px 18px 12px 18px;
}

/* =========================
   CHIPS SUPERIORES
   ========================= */

.mp-match-top-chips{
  position: absolute;
  left: 50%;
  top: -12px;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: nowrap;
  max-width: 92%;
  overflow: hidden;
}

.mp-match-chip{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 260px;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(83,255,173,.34);
  background: rgba(2,87,64,.94);
  color: #ecfff6;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 2px 8px rgba(0,0,0,.22);
}

.mp-match-chip-field{
  max-width: 330px;
  justify-content: flex-start;
  text-align: left;
  padding-left: 10px;
  padding-right: 8px;
}

/* =========================
   HOVER RICO · MISMO LOOK QUE EVENTO
   SOLO CUANDO LLEVE .is-truncated
   ========================= */

.mp-rich-hover-target{
  position: relative;
}

.mp-rich-hover-target.is-truncated:hover{
  overflow: visible;
  z-index: 80;
}

.mp-rich-hover-target.is-truncated:hover::after{
  content: attr(data-fulltext);
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  transform: translateX(-50%);
  z-index: 9999;

  display: block;
  min-width: 240px;
  max-width: 420px;
  padding: 10px 12px;

  border-radius: 12px;
  border: 1.5px solid #06BE84;
  background:
    linear-gradient(0deg, rgba(6,190,132,0.10), rgba(6,190,132,0.10)),
    #0f1a1e;
  box-shadow:
    0 2px 10px rgba(0,0,0,.45),
    0 0 10px rgba(6,190,132,.25);

  color: #E9EEF1;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.18;
  text-align: center;
  white-space: normal;
  word-break: break-word;
  pointer-events: none;
}

.mp-rich-hover-target.is-truncated:hover::before{
  content: "";
  position: absolute;
  left: 50%;
  top: calc(100% + 2px);
  transform: translateX(-50%) rotate(45deg);
  width: 10px;
  height: 10px;
  z-index: 9998;

  background: #0f1a1e;
  border-left: 1.5px solid #06BE84;
  border-top: 1.5px solid #06BE84;
  pointer-events: none;
}

/* =========================
   NOMBRES DE EQUIPO
   ========================= */

.mp-match-team{
  min-width: 0;
  min-height: 48px;
  display: flex;
  align-items: center;
}

.mp-match-team-left{
  justify-content: flex-end;
  padding-right: 4px;
}

.mp-match-team-right{
  justify-content: flex-start;
  padding-left: 4px;
}

.mp-match-team-name{
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.1;
  color: #f5fff9;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
  text-wrap: balance;
  word-break: break-word;
}

/* =========================
   ESCUDOS Y VS
   ========================= */

.mp-match-shield-wrap{
  display: flex;
  align-items: center;
  justify-content: center;
}

.mp-match-shield{
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.8px solid #E9FFF7;
  box-shadow: 0 1px 4px rgba(0,0,0,.34);
  background: #0d1516;
}

.mp-match-shield.is-new-positive{
  border-color: #39FF14;
  box-shadow: 0 0 6px #39FF14, 0 0 12px rgba(57,255,20,.55);
}

.mp-match-shield.is-new-negative{
  border-color: #FF2B2B;
  box-shadow: 0 0 6px #FF2B2B, 0 0 12px rgba(255,43,43,.48);
}

.mp-match-vs{
  min-width: 34px;
  text-align: center;
  font-size: 1rem;
  font-weight: 900;
  color: rgba(245,255,249,.92);
  letter-spacing: .04em;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* =========================
   EVENTO
   ========================= */

.mp-match-event-center{
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  min-height: 58px;
}

.mp-match-event-icon{
  height: 38px;
  width: auto;
  object-fit: contain;
  display: block;
}

.mp-match-event-title{
  font-size: 1rem;
  font-weight: 800;
  color: #f2fffb;
  line-height: 1.15;
  max-width: 90%;
}

/* =========================
   BADGES LATERALES
   ========================= */

.mp-match-side-badges{
  position: absolute;
  top: -4px;
  left: -14px;
  z-index: 25;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.mp-match-side-badge{
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #06BE84;
  background: #023e2f;
  box-shadow: 0 2px 6px rgba(0,0,0,.35);
}

/* =========================
   BADGE OPCIÓN
   ========================= */

.mp-match-option-badge{
  position: absolute;
  right: -5px;
  bottom: -5px;
  z-index: 25;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  font-weight: 900;
  line-height: 1;
  box-shadow:
    0 2px 8px rgba(0,0,0,.38),
    inset 0 1px 0 rgba(255,255,255,.08);
}

.mp-match-option-text{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  user-select: none;
}

/* A = verde */
.mp-match-option-badge.is-option-a{
  background: radial-gradient(circle at 30% 30%, rgba(120,255,190,.95), rgba(28,180,95,.96));
  border: 2px solid rgba(195,255,220,.95);
  color: #04160c;
  box-shadow:
    0 0 8px rgba(57,255,20,.55),
    0 0 16px rgba(57,255,20,.28),
    0 2px 8px rgba(0,0,0,.38);
}

/* B = amarillo */
.mp-match-option-badge.is-option-b{
  background: radial-gradient(circle at 30% 30%, rgba(255,233,120,.98), rgba(255,181,32,.96));
  border: 2px solid rgba(255,245,190,.95);
  color: #1d1404;
  box-shadow:
    0 0 8px rgba(255,193,7,.48),
    0 0 16px rgba(255,193,7,.24),
    0 2px 8px rgba(0,0,0,.38);
}

/* Coordinador = círculo morado neón */
.mp-match-option-badge.is-option-coor{
  background: radial-gradient(circle at 30% 30%, rgba(222,140,255,.98), rgba(145,58,255,.96));
  border: 2px solid rgba(238,205,255,.95);
  color: transparent;
  box-shadow:
    0 0 8px rgba(181,74,255,.62),
    0 0 16px rgba(181,74,255,.30),
    0 2px 8px rgba(0,0,0,.38);
}

/* Desconocido = gris con ? */
.mp-match-option-badge.is-option-unknown{
  background: radial-gradient(circle at 30% 30%, rgba(180,188,196,.98), rgba(108,116,124,.96));
  border: 2px solid rgba(228,232,236,.88);
  color: #101316;
  box-shadow:
    0 0 6px rgba(185,197,205,.20),
    0 2px 8px rgba(0,0,0,.38);
}

/* =========================
   FILA DE PILLS
   ========================= */

.mp-match-pills-row{
  width: 88%;
  margin: 0 auto;
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 8px;
  align-items: stretch;
}

.mp-card-pill-col{
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mp-card-pill-col-confirm{
  position: relative;
}

.mp-card-pill{
  width: 100%;
  min-height: 30px;
  border-radius: 10px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition:
    transform .15s ease,
    border-color .15s ease,
    background .15s ease,
    box-shadow .15s ease;
}

.mp-card-pill:hover{
  transform: translateY(-1px);
}

.mp-card-pill-teal{
  color: #effff7;
  border: 1.5px solid #06BE84;
  background: rgba(6,190,132,.11);
}

.mp-card-pill-success{
  color: #f0fff4;
  border: 1.5px solid #28a745;
  background: rgba(40,167,69,.14);
}

.mp-card-pill-warning{
  color: #fff5e4;
  border: 1.5px solid #FFA500;
  background: rgba(255,165,0,.16);
}

.mp-pill-inline{
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.mp-pill-icon{
  width: 14px;
  height: 14px;
  object-fit: contain;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.35));
}

.mp-kms-badge{
  position: absolute;
  right: -12px;
  bottom: -6px;
  width: 32px;
  height: 32px;
  z-index: 6;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  background: radial-gradient(circle at 30% 30%, rgba(120,255,190,.95), rgba(28,180,95,.96));
  border: 2px solid rgba(195,255,220,.95);
  color: #04160c;
  box-shadow:
    0 0 8px rgba(57,255,20,.55),
    0 0 16px rgba(57,255,20,.28),
    0 2px 8px rgba(0,0,0,.38);
}

.mp-kms-text{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.01em;
  user-select: none;
}

/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 860px){
  .mp-match-main-wrap{
    padding-top: 14px;
  }

  .mp-match-main-row{
    min-height: 92px;
  }

  .mp-match-main-row-inner{
    grid-template-columns: minmax(0,1fr) 40px 30px 40px minmax(0,1fr);
    min-height: 92px;
    padding: 16px 12px 12px 12px;
    gap: 8px;
  }

  .mp-match-team-name{
    font-size: .92rem;
  }

  .mp-match-shield{
    width: 36px;
    height: 36px;
  }

  .mp-match-vs{
    min-width: 30px;
    font-size: .92rem;
  }

  .mp-match-top-chips{
    gap: 5px;
    max-width: 94%;
  }

  .mp-match-chip{
    font-size: 10px;
    min-height: 21px;
    padding: 0 7px;
  }

  .mp-match-chip-field{
    max-width: 210px;
    justify-content: flex-start;
    text-align: left;
    padding-left: 9px;
    padding-right: 7px;
  }

  .mp-match-pills-row{
    width: 100%;
    grid-template-columns: 1fr;
    gap: 6px;
    margin-top: 8px;
  }

  .mp-match-side-badges{
    left: -8px;
    top: -2px;
  }

  .mp-match-side-badge{
    width: 28px;
    height: 28px;
  }

  .mp-match-option-badge{
    right: -3px;
    bottom: -3px;
    width: 24px;
    height: 24px;
  }

  .mp-match-option-text{
    font-size: 12px;
  }

  .mp-kms-badge{
    right: -4px;
    bottom: -4px;
    width: 28px;
    height: 28px;
  }

  .mp-kms-text{
    font-size: 8px;
  }

  .mp-rich-hover-target.is-truncated:hover::after{
    min-width: 200px;
    max-width: 300px;
    font-size: 12px;
    padding: 9px 10px;
  }
}