/* Archivo generado al dividir styles.css en bloques. */

/* =========================================================
   CBAT APP
   BLOQUE 6 — TARJETAS DE PARTIDO
   VERSIÓN 1.8
   - Compacta
   - Sponsor en hueco inferior derecho
   - Modos sponsor: default / wide / icon
   - Wide con más presencia real
   - Icon más grande y más limpio
   - Sin duplicados de sponsor
   ========================================================= */

/* ===== LISTADOS ===== */

.matches-list,
#partidos-list,
#equipo-partidos-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ===== TARJETA BASE ===== */

.match-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, var(--surface-soft) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 14px 16px;
  box-shadow:
    0 8px 20px rgba(68, 105, 157, 0.06),
    0 2px 6px rgba(15, 23, 42, 0.03);
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    border-color 0.16s ease,
    background-color 0.16s ease;
}

.match-card:hover {
  transform: translateY(-1px);
  box-shadow:
    0 14px 30px rgba(68, 105, 157, 0.10),
    0 4px 12px rgba(15, 23, 42, 0.05);
}

/* ===== BORDE IZQUIERDO SEGÚN CONDICIÓN ===== */

.match-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  height: 100%;
  background: rgba(68, 105, 157, 0.10);
}

.match-card--casa::before {
  background: linear-gradient(180deg, #3568B7 0%, #5C84BE 100%);
}

.match-card--fuera::before {
  background: linear-gradient(180deg, #F0C64B 0%, #E3B52D 100%);
}

.match-card--descanso::before {
  background: linear-gradient(180deg, #D6E4F5 0%, #C6D9F0 100%);
}

/* ===== ESTADO RESULTADO ===== */

.match-card--win {
  border-color: rgba(25, 135, 84, 0.18);
}

.match-card--win .match-card__title {
  color: #125A3A;
}

.match-card--win .match-card__score-number--cbat {
  color: #198754;
}

.match-card--win .match-card__score-status {
  color: #198754;
}

.match-card--lose {
  border-color: rgba(111, 135, 158, 0.16);
}

.match-card--lose .match-card__title {
  color: #173C7B;
}

.match-card--lose .match-card__score-number--cbat {
  color: #506884;
}

.match-card--lose .match-card__score-status {
  color: #5F7692;
}

.match-card--draw .match-card__score-number--cbat,
.match-card--draw .match-card__score-status {
  color: #64748B;
}

/* ===== VARIANTE COMPACTA ===== */

.match-card--compact {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.match-card--compact .match-card__top-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.match-card--compact .match-card__eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
  flex-wrap: wrap;
}

.match-card--compact .match-card__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.match-card--compact .match-card__footer {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  padding-right: 0;
  min-height: 0;
}

/* hueco reservado */
.match-card--compact:has(.match-card__sponsor-inline) .match-card__footer {
  padding-right: 186px;
  min-height: 72px;
}

.match-card--compact:has(.match-card__sponsor-inline--default) .match-card__footer {
  padding-right: 160px;
  min-height: 64px;
}

.match-card--compact:has(.match-card__sponsor-inline--wide) .match-card__footer {
  padding-right: 204px;
  min-height: 74px;
}

.match-card--compact:has(.match-card__sponsor-inline--icon) .match-card__footer {
  padding-right: 148px;
  min-height: 74px;
}

/* ===== TEXTO / JERARQUÍA ===== */

.match-card__title-block {
  min-width: 0;
}

.match-card__title {
  margin: 0;
  font-size: 1.04rem;
  line-height: 1.18;
  font-weight: 900;
  color: #173C7B;
  letter-spacing: -0.01em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.match-card__title--rest {
  font-size: 1rem;
}

.match-card__subtitle {
  margin-top: 4px;
  font-size: 0.95rem;
  line-height: 1.25;
  font-weight: 600;
  color: #5F7084;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.match-card__competition {
  font-size: 0.88rem;
  line-height: 1.1;
  font-weight: 600;
  color: #6C7D92;
  white-space: nowrap;
}

/* ===== BADGES ===== */

.match-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.match-badge--state {
  border: 1px solid transparent;
}

.match-badge--home {
  background: rgba(53, 104, 183, 0.12);
  border-color: rgba(53, 104, 183, 0.18);
  color: #2757A4;
}

.match-badge--away {
  background: rgba(240, 198, 75, 0.22);
  border-color: rgba(227, 181, 45, 0.30);
  color: #946600;
}

.match-badge--rest {
  background: rgba(214, 228, 245, 0.68);
  border-color: rgba(145, 173, 208, 0.28);
  color: #5D7592;
}

/* ===== ACCIONES ===== */

.match-card__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.match-card__actions--top {
  margin-left: auto;
}

.match-card__icon-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(68, 105, 157, 0.14);
  border-radius: 10px;
  appearance: none;
  -webkit-appearance: none;
  background: #FFFFFF;
  color: #173C7B;
  font: inherit;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    opacity 0.16s ease,
    box-shadow 0.16s ease,
    background-color 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease;
}

.match-card__icon-btn:hover {
  transform: translateY(-1px);
}

.match-card__icon-btn:active {
  transform: scale(0.97);
}

.match-card__icon-btn:focus-visible {
  outline: 2px solid rgba(68, 105, 157, 0.28);
  outline-offset: 2px;
}

.match-card__icon-btn svg {
  width: 16px;
  height: 16px;
  display: block;
}

.match-card__icon-btn--whatsapp {
  background: rgba(37, 211, 102, 0.14);
  color: #159447;
  border-color: rgba(37, 211, 102, 0.20);
  box-shadow: none;
}

.match-card__icon-btn--image {
  background: rgba(68, 105, 157, 0.10);
  color: #3568B7;
  border-color: rgba(68, 105, 157, 0.16);
  box-shadow: none;
}

/* ===== RESULTADO LATERAL ===== */

.match-card__score-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  min-width: 92px;
  text-align: right;
}

.match-card__score-result {
  display: inline-flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 6px;
  white-space: nowrap;
}

.match-card__score-number {
  font-size: 1.85rem;
  line-height: 1;
  font-weight: 900;
  color: #506884;
  letter-spacing: -0.03em;
}

.match-card__score-number--cbat {
  color: #173C7B;
}

.match-card__score-separator {
  font-size: 1.15rem;
  line-height: 1;
  font-weight: 700;
  color: #7B90A8;
}

.match-card__score-status {
  font-size: 0.7rem;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: #5F7692;
  text-transform: uppercase;
}

/* ===== META LINE ===== */

.match-card__meta-line {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex-wrap: wrap;
}

.match-card__meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: #6B7B8F;
}

.match-card__meta-icon {
  width: 15px;
  height: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #7A8EA7;
}

.match-card__meta-icon svg {
  width: 15px;
  height: 15px;
  display: block;
}

.match-card__meta-text {
  font-size: 0.9rem;
  line-height: 1.2;
  font-weight: 600;
  color: #65768A;
  min-width: 0;
  overflow-wrap: anywhere;
}

/* ===== SPONSOR HUECO DERECHO ===== */

.match-card__sponsor-inline {
  position: absolute;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 6px;
  pointer-events: none;
}

.match-card__sponsor-prefix {
  display: block;
  font-size: 0.62rem;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8A98A8;
  text-align: right;
  white-space: nowrap;
}

.match-card__sponsor-name {
  display: none;
}

.match-card__sponsor-logo {
  display: block;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: right center;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
  opacity: 0.98;
}

/* DEFAULT */
.match-card__sponsor-inline--default {
  width: 148px;
}

.match-card__sponsor-inline--default .match-card__sponsor-logo {
  max-width: 128px;
  max-height: 44px;
  padding: 4px 8px;
}

/* WIDE */
.match-card__sponsor-inline--wide {
  width: 192px;
}

.match-card__sponsor-inline--wide .match-card__sponsor-logo {
  max-width: 176px;
  max-height: 56px;
  padding: 6px 10px;
}

/* ICON */
.match-card__sponsor-inline--icon {
  width: 132px;
  gap: 6px;
}

.match-card__sponsor-inline--icon .match-card__sponsor-logo {
  max-width: 92px;
  max-height: 68px;
  padding: 6px 8px;
  border-radius: 14px;
}

/* ===== DESCANSO ===== */

.match-card__rest-body {
  display: flex;
  align-items: center;
  min-width: 0;
}

.match-card__rest-summary {
  margin-top: 4px;
  font-size: 0.9rem;
  line-height: 1.25;
  font-weight: 600;
  color: #76879A;
  overflow-wrap: anywhere;
}

/* ===== LEGACY SEGURO ===== */
/* Compatibilidad con otras partes de la app */

.match-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.match-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.match-card__main {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.match-card__teams {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
}

.match-card__team {
  min-width: 0;
  word-break: break-word;
}

.match-card__vs {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.match-card__score {
  display: flex;
  justify-content: center;
  align-items: center;
}

.match-card__info-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.match-card__info-col {
  min-width: 0;
}

.match-card__descanso {
  display: flex;
  flex-direction: column;
}

.match-card__descanso-badge {
  display: inline-flex;
}

.match-card__sponsor-banner {
  display: flex;
}

.match-card__sponsor-label {
  display: block;
}

.match-card__sponsor-logo-wrap {
  display: flex;
}

/* ===== RESPONSIVE TABLET ===== */

@media (max-width: 900px) {
  .match-card {
    padding: 13px 15px;
  }

  .match-card__score-number {
    font-size: 1.72rem;
  }

  .match-card__score-side {
    min-width: 84px;
  }

  .match-card--compact:has(.match-card__sponsor-inline) .match-card__footer {
    padding-right: 166px;
    min-height: 64px;
  }

  .match-card--compact:has(.match-card__sponsor-inline--default) .match-card__footer {
    padding-right: 146px;
    min-height: 58px;
  }

  .match-card--compact:has(.match-card__sponsor-inline--wide) .match-card__footer {
    padding-right: 178px;
    min-height: 66px;
  }

  .match-card--compact:has(.match-card__sponsor-inline--icon) .match-card__footer {
    padding-right: 142px;
    min-height: 66px;
  }

  .match-card__sponsor-inline--default {
    width: 132px;
  }

  .match-card__sponsor-inline--wide {
    width: 164px;
  }

  .match-card__sponsor-inline--icon {
    width: 126px;
  }

  .match-card__sponsor-prefix {
    font-size: 0.56rem;
  }

  .match-card__sponsor-inline--default .match-card__sponsor-logo {
    max-width: 116px;
    max-height: 40px;
  }

  .match-card__sponsor-inline--wide .match-card__sponsor-logo {
    max-width: 148px;
    max-height: 48px;
  }

  .match-card__sponsor-inline--icon .match-card__sponsor-logo {
    max-width: 84px;
    max-height: 60px;
  }
}

/* ===== RESPONSIVE MÓVIL ===== */

@media (max-width: 640px) {
  .matches-list,
  #partidos-list,
  #equipo-partidos-list {
    gap: 10px;
  }

  .match-card {
    border-radius: 16px;
    padding: 12px 13px;
  }

  .match-card::before {
    width: 5px;
  }

  .match-card--compact {
    gap: 8px;
  }

  .match-card--compact .match-card__top-row {
    gap: 8px;
  }

  .match-card--compact .match-card__body {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: start;
  }

  .match-card--compact:has(.match-card__sponsor-inline) .match-card__footer {
    padding-right: 122px;
    min-height: 58px;
  }

  .match-card--compact:has(.match-card__sponsor-inline--default) .match-card__footer {
    padding-right: 108px;
    min-height: 54px;
  }

  .match-card--compact:has(.match-card__sponsor-inline--wide) .match-card__footer {
    padding-right: 134px;
    min-height: 60px;
  }

  .match-card--compact:has(.match-card__sponsor-inline--icon) .match-card__footer {
    padding-right: 108px;
    min-height: 60px;
  }

  .match-card__competition {
    font-size: 0.8rem;
  }

  .match-card__title {
    font-size: 0.97rem;
  }

  .match-card__subtitle,
  .match-card__rest-summary {
    font-size: 0.86rem;
  }

  .match-badge {
    min-height: 25px;
    padding: 0 10px;
    font-size: 10px;
  }

  .match-card__actions {
    gap: 5px;
  }

  .match-card__icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 9px;
  }

  .match-card__icon-btn svg {
    width: 15px;
    height: 15px;
  }

  .match-card__score-side {
    min-width: 68px;
    gap: 1px;
  }

  .match-card__score-result {
    gap: 4px;
  }

  .match-card__score-number {
    font-size: 1.42rem;
  }

  .match-card__score-separator {
    font-size: 0.95rem;
  }

  .match-card__score-status {
    font-size: 0.6rem;
  }

  .match-card__meta-line {
    gap: 8px;
    flex-direction: column;
    align-items: flex-start;
  }

  .match-card__meta-item {
    width: 100%;
  }

  .match-card__meta-text {
    font-size: 0.84rem;
  }

  .match-card__sponsor-prefix {
    font-size: 0.52rem;
  }

  .match-card__sponsor-inline--default {
    width: 100px;
    gap: 4px;
  }

  .match-card__sponsor-inline--wide {
    width: 122px;
    gap: 4px;
  }

  .match-card__sponsor-inline--icon {
    width: 96px;
    gap: 4px;
  }

  .match-card__sponsor-inline--default .match-card__sponsor-logo {
    max-width: 90px;
    max-height: 32px;
    padding: 3px 5px;
  }

  .match-card__sponsor-inline--wide .match-card__sponsor-logo {
    max-width: 112px;
    max-height: 40px;
    padding: 4px 6px;
  }

  .match-card__sponsor-inline--icon .match-card__sponsor-logo {
    max-width: 72px;
    max-height: 54px;
    padding: 4px 6px;
  }
}