/* ============================================================
   ACTA Y ESTADÍSTICAS — Balonmano Plasencia
   ============================================================ */

/* Modal overlay */
.modal-acta-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-acta-card {
  background: #ffffff;
  border-radius: 16px;
  width: 100%;
  max-width: 680px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.modal-acta-header {
  padding: 1rem 1.25rem;
  background: #0f172a;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.acta-marcador-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex: 1;
}

.acta-equipo-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 0.95rem;
}

.acta-equipo-header img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.acta-resultado-central {
  font-family: 'Outfit', sans-serif;
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--yellow, #fec30a);
  display: flex;
  gap: 0.3rem;
}

.modal-acta-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
}

.modal-acta-close:hover {
  color: #ffffff;
}

/* Badges de estado */
.acta-estado-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
}

.acta-estado-badge.finalizado {
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
}

.acta-estado-badge.en-progreso {
  background: rgba(239, 68, 68, 0.15);
  color: #dc2626;
}

.acta-estado-badge.pendiente {
  background: rgba(100, 116, 139, 0.15);
  color: #475569;
}

/* Tabs */
.acta-tabs {
  display: flex;
  border-bottom: 1px solid var(--line, #e2e8f0);
  background: #f8fafc;
}

.acta-tab {
  flex: 1;
  padding: 0.75rem;
  border: none;
  background: transparent;
  font-weight: 700;
  font-size: 0.85rem;
  color: #64748b;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.acta-tab.active {
  color: #0f172a;
  border-bottom-color: var(--yellow, #fec30a);
  background: #ffffff;
}

.acta-body {
  padding: 1rem 1.25rem;
  overflow-y: auto;
  flex: 1;
}

/* Timeline */
.acta-timeline {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.acta-evento {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
}

.acta-bloque-sep {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #64748b;
  margin: 0.5rem 0;
}

.acta-evento-centro {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 60px;
}

.acta-evento-minuto {
  font-size: 0.7rem;
  font-weight: 700;
  color: #64748b;
}

.acta-evento-icono {
  font-size: 1rem;
}

.acta-evento-marcador {
  font-weight: 800;
  font-size: 0.8rem;
}

.acta-evento-local {
  text-align: right;
  font-weight: 700;
  font-size: 0.85rem;
}

.acta-evento-visita {
  text-align: left;
  font-weight: 700;
  font-size: 0.85rem;
}

/* Alineaciones */
.acta-alineaciones {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.acta-equipo-col h4 {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.acta-equipo-col h4 img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.acta-jugador-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.82rem;
}

.acta-jugador-dorsal {
  font-weight: 800;
  color: #64748b;
  min-width: 22px;
}

.acta-jugador-nombre {
  font-weight: 600;
}

.acta-jugador-goles {
  font-weight: 800;
  background: #f1f5f9;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 0.75rem;
}

/* Spinner / Loading */
.acta-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  gap: 0.75rem;
  color: #64748b;
  font-weight: 600;
}

.acta-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #e2e8f0;
  border-top-color: var(--yellow, #fec30a);
  border-radius: 50%;
  animation: actaSpin 0.8s linear infinite;
}

@keyframes actaSpin {
  to { transform: rotate(360deg); }
}

/* Panel Estadísticas */
.stats-panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1rem;
}

.stats-resumen {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 0.75rem;
}

.stats-card {
  background: #ffffff;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 10px;
  padding: 0.75rem;
  text-align: center;
}

.stats-card-valor {
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem;
  font-weight: 900;
  color: #0f172a;
}

.stats-card-valor.verde { color: #10b981; }
.stats-card-valor.amarillo { color: #f59e0b; }
.stats-card-valor.rojo { color: #ef4444; }

.stats-card-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  margin-top: 0.2rem;
}

.stats-racha {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.racha-item {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-weight: 800;
  font-size: 0.8rem;
  color: #ffffff;
}

.racha-item.V { background: #10b981; }
.racha-item.E { background: #f59e0b; }
.racha-item.D { background: #ef4444; }

/* Botón de acta en resultados */
.btn-acta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #0f172a;
  color: #ffffff !important;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 0.75rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-acta:hover {
  background: #1e293b;
  transform: translateY(-1px);
}

.btn-acta.en-directo {
  background: #dc2626;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.25);
}

.acta-jugador-foto,
.goleador-foto,
.acta-jugador-row img:not(.escudo-equipo),
.tabla-goleadores img {
  display: none !important;
}
