/* ============================================================
   PARTIDOS — estilos paso 4
   Añadir a css/app.css (o sustituir la sección de partidos)
   ============================================================ */

/* ── Filtros / Tabs ──────────────────────────────────────── */
.filtros-tabs {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.tab-btn {
  flex: 1;
  padding: 7px 4px;
  border: 2px solid var(--color-borde, #ddd);
  border-radius: 8px;
  background: transparent;
  color: var(--color-texto, #333);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}
.tab-btn.activo {
  background: var(--color-magenta, #b00070);
  border-color: var(--color-magenta, #b00070);
  color: #fff;
}

/* ── Lista de cards ──────────────────────────────────────── */
.lista-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 16px 80px;
}
.lista-vacia {
  text-align: center;
  color: #888;
  padding: 40px 16px;
  font-size: 0.95rem;
}
.cargando {
  text-align: center;
  color: #999;
  padding: 40px 16px;
}

/* ── Card de partido ─────────────────────────────────────── */
.card-partido {
  background: #fff;
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  cursor: pointer;
  transition: box-shadow .2s, transform .15s;
  border-left: 4px solid var(--color-azul, #1010a0);
}
.card-partido:active {
  transform: scale(.98);
  box-shadow: 0 1px 4px rgba(0,0,0,.12);
}
.partido-pasado {
  border-left-color: #ccc;
  opacity: .82;
}
.partido-hoy {
  border-left-color: var(--color-magenta, #b00070);
  box-shadow: 0 3px 12px rgba(176,0,112,.18);
}

.partido-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
  gap: 8px;
}
.partido-equipo-nombre {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-azul, #1010a0);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.partido-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 20px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.badge-hoy       { background: var(--color-magenta, #b00070); color: #fff; }
.badge-local     { background: #e8f5e9; color: #2e7d32; }
.badge-visitante { background: #e3f2fd; color: #1565c0; }
.badge-warn      { background: #fff3e0; color: #e65100; }

/* Rival */
.partido-rival-bloque {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
}
.partido-vs {
  font-size: 0.75rem;
  font-weight: 700;
  color: #999;
  text-transform: uppercase;
}
.partido-rival-nombre {
  font-size: 1.15rem;
  font-weight: 800;
  color: #1a1a2e;
}

/* Meta info */
.partido-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 0.83rem;
  color: #555;
  margin-bottom: 6px;
}
.texto-gris { color: #aaa; }

.btn-maps {
  display: inline-block;
  padding: 2px 8px;
  background: #e3f2fd;
  color: #1565c0;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
}

.partido-extra {
  font-size: 0.83rem;
  color: #555;
  margin-bottom: 4px;
}

/* Bloque hija convocada (padre) */
.partido-conv-padre {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f8f9fa;
  border-radius: 8px;
  padding: 7px 10px;
  margin-top: 8px;
  font-size: 0.83rem;
  flex-wrap: wrap;
}
.btn-ausencia {
  margin-left: auto;
  padding: 4px 10px;
  background: #fff3f0;
  color: #c0392b;
  border: 1px solid #ffc5bb;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}

/* Bloque resumen convocatoria (entrenador/coordinador) */
.partido-conv-resumen {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.83rem;
  color: #555;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #f0f0f0;
}
.btn-link {
  background: none;
  border: none;
  color: var(--color-magenta, #b00070);
  font-size: 0.83rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  margin-left: auto;
}

.partido-jornada {
  margin-top: 8px;
  font-size: 0.72rem;
  color: #bbb;
  text-align: right;
}

/* ── Modal ───────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.52);
  z-index: 9999;
  display: flex;
  align-items: flex-end;
  padding: 0;
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }

.modal-contenido {
  background: #fff;
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 20px 20px 36px;
  position: relative;
  animation: slideUp .25s ease;
}
.modal-pequeno {
  max-height: 70vh;
}
@keyframes slideUp { from { transform: translateY(60px); opacity: 0 } to { transform: translateY(0); opacity: 1 } }

.modal-cerrar {
  position: absolute;
  top: 16px;
  right: 16px;
  background: #f0f0f0;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

.modal-header {
  margin-bottom: 16px;
  padding-right: 40px;
}
.modal-subtitulo {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-azul, #1010a0);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 4px;
}
.modal-rival-titulo {
  font-size: 1.4rem;
  font-weight: 800;
  color: #1a1a2e;
  margin-bottom: 8px;
}
.modal-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* Detalle grid */
.detalle-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 14px;
  border: 1px solid #eee;
  border-radius: 10px;
  overflow: hidden;
}
.detalle-fila {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  font-size: 0.88rem;
  border-bottom: 1px solid #f5f5f5;
}
.detalle-fila:last-child { border-bottom: none; }
.detalle-fila span:first-child { color: #777; }
.detalle-fila strong { color: #222; font-weight: 700; }

/* Botones */
.btn-primario {
  display: block;
  width: 100%;
  padding: 14px;
  background: var(--color-magenta, #b00070);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  margin-top: 14px;
}
.btn-peligro {
  background: #c0392b;
}
.btn-secundario {
  display: block;
  width: 100%;
  padding: 11px;
  background: #f0f0f0;
  color: #333;
  border: none;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  margin-top: 10px;
  text-decoration: none;
}

/* Convocatoria */
.conv-seccion {
  margin-top: 18px;
}
.conv-seccion h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: #444;
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.conv-contador {
  display: flex;
  gap: 12px;
  margin-bottom: 10px;
}
.conv-num-si  { font-weight: 700; color: #2e7d32; font-size: 0.85rem; }
.conv-num-no  { font-weight: 700; color: #c0392b; font-size: 0.85rem; }

.conv-lista {
  border: 1px solid #eee;
  border-radius: 10px;
  overflow: hidden;
}
.conv-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  font-size: 0.88rem;
  border-bottom: 1px solid #f5f5f5;
}
.conv-item:last-child { border-bottom: none; }
.conv-no { background: #fff9f9; }
.conv-num {
  width: 22px;
  color: #aaa;
  font-size: 0.78rem;
  font-weight: 600;
  text-align: right;
  flex-shrink: 0;
}
.conv-nombre  { flex: 1; color: #222; }
.conv-check   { font-size: 0.85rem; flex-shrink: 0; }
.conv-motivo  {
  font-size: 0.75rem;
  color: #999;
  margin-top: 2px;
  width: 100%;
  margin-left: 30px;
}
.conv-separador {
  padding: 6px 12px;
  background: #f9f0f0;
  font-size: 0.75rem;
  font-weight: 700;
  color: #c0392b;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* Formulario modal ausencia */
.modal-desc {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 14px;
  line-height: 1.5;
}
.form-label {
  display: block;
  font-size: 0.83rem;
  font-weight: 600;
  color: #555;
  margin-bottom: 6px;
}
.form-textarea {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.9rem;
  font-family: inherit;
  resize: none;
  box-sizing: border-box;
}
.form-textarea:focus {
  outline: none;
  border-color: var(--color-magenta, #b00070);
}
.modal-acciones {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}
.modal-acciones .btn-secundario,
.modal-acciones .btn-primario {
  flex: 1;
  margin-top: 0;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #222;
  color: #fff;
  padding: 12px 24px;
  border-radius: 24px;
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0;
  transition: all .3s ease;
  z-index: 99999;
  pointer-events: none;
  white-space: nowrap;
}
.toast-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Pantalla header sticky */
.pantalla-header {
  position: sticky;
  top: 0;
  background: var(--color-fondo, #f5f5f5);
  z-index: 10;
  padding: 14px 16px 10px;
  border-bottom: 1px solid #e8e8e8;
}
.pantalla-header h2 {
  margin: 0 0 6px;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--color-azul, #1010a0);
}

/* ── Entrenamientos ──────────────────────────────────────── */
.entreno-equipo-titulo {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-azul, #1010a0);
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 8px 4px 4px;
}
.card-entreno {
  background: #fff;
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  border-left: 4px solid var(--color-azul, #1010a0);
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.entreno-excepcion {
  border-left-color: #e65100;
}
.entreno-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.entreno-fecha {
  font-size: 0.95rem;
  font-weight: 800;
  color: #1a1a2e;
}
.entreno-hora, .entreno-campo {
  font-size: 0.85rem;
  color: #555;
}
.entreno-motivo {
  font-size: 0.82rem;
  color: #e65100;
  font-weight: 600;
}

/* ── Noticias ────────────────────────────────────────────── */
.noticias-seccion-titulo {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-azul, #1010a0);
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 8px 4px 4px;
}
.card-noticia {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  cursor: pointer;
  transition: transform .15s;
}
.card-noticia:active { transform: scale(.98); }
.noticia-destacada {
  border: 2px solid var(--color-magenta, #b00070);
}
.noticia-imagen {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}
.noticia-body {
  padding: 14px 16px;
}
.noticia-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.noticia-fecha {
  font-size: 0.75rem;
  color: #999;
}
.noticia-dest {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-azul, #1010a0);
  background: #eef;
  padding: 2px 8px;
  border-radius: 20px;
}
.noticia-titulo {
  font-size: 1rem;
  font-weight: 800;
  color: #1a1a2e;
  margin-bottom: 6px;
  line-height: 1.3;
}
.noticia-preview {
  font-size: 0.85rem;
  color: #666;
  line-height: 1.5;
}

/* Modal noticia */
.noticia-modal-imagen {
  width: calc(100% + 40px);
  margin: -20px -20px 16px;
  height: 200px;
  object-fit: cover;
  display: block;
}
.noticia-modal-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.noticia-modal-titulo {
  font-size: 1.2rem;
  font-weight: 800;
  color: #1a1a2e;
  margin: 0 0 14px;
  line-height: 1.3;
  padding-right: 40px;
}
.noticia-modal-contenido {
  font-size: 0.92rem;
  color: #444;
  line-height: 1.7;
}
