/*
Theme Name: Liga Comunal (Elementor)
Theme URI: https://ligacomunal.cl
Template: hello-elementor
Author: Liga Comunal
Description: Theme hijo de Hello Elementor para Liga de Fútbol Comunal. CPTs, Series, Widgets de Elementor, Bootstrap 5.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
Text Domain: liga-comunal
*/

/* =====================================================
   VARIABLES
   ===================================================== */
:root {
  --lc-primary:   #1a3a6e;
  --lc-secondary: #e8b800;
  --lc-accent:    #d62828;
  --lc-dark:      #111827;
  --lc-success:   #16a34a;
  --lc-danger:    #dc2626;
  --lc-warning:   #f59e0b;
  --lc-gray:      #f8f9fa;
}

/* =====================================================
   ELEMENTOR OVERRIDES
   ===================================================== */
.elementor-kit-tag h1,
.elementor-kit-tag h2,
.elementor-kit-tag h3 { line-height: 1.3; }

/* =====================================================
   WIDGETS LIGA — TABLA DE POSICIONES
   ===================================================== */
.lc-widget-wrapper { font-family: inherit; }

.lc-tabla-posiciones th {
  background: var(--lc-primary);
  color: white;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  vertical-align: middle;
  padding: 10px 8px;
}
.lc-tabla-posiciones td {
  vertical-align: middle;
  font-size: 0.88rem;
  padding: 8px;
}
.lc-tabla-posiciones .pts { font-weight: 700; color: var(--lc-primary); font-size: 1rem; }
.lc-tabla-posiciones .equipo-link { font-weight: 600; color: #111; text-decoration: none; }
.lc-tabla-posiciones .equipo-link:hover { color: var(--lc-primary); }
.lc-tabla-posiciones .zona-campeon td:first-child  { border-left: 4px solid var(--lc-success); }
.lc-tabla-posiciones .zona-descenso td:first-child { border-left: 4px solid var(--lc-danger); }

.escudo-mini {
  width: 28px; height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

/* =====================================================
   WIDGETS LIGA — FIXTURE
   ===================================================== */
.lc-fixture-fecha {
  background: var(--lc-primary);
  color: white;
  padding: 9px 16px;
  font-weight: 700;
  font-size: 0.88rem;
  border-radius: 8px 8px 0 0;
}

.lc-partido-row {
  display: grid;
  grid-template-columns: 1fr 100px 1fr;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border-bottom: 1px solid #e9ecef;
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}
.lc-partido-row:hover { background: #f8f9fa; color: inherit; }
.lc-partido-row:last-child { border-bottom: none; border-radius: 0 0 8px 8px; }

.lc-partido-equipo { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.88rem; }
.lc-partido-equipo.visitante { flex-direction: row-reverse; text-align: right; }

.lc-score {
  background: var(--lc-primary);
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  padding: 5px 12px;
  border-radius: 6px;
  text-align: center;
  letter-spacing: 2px;
}
.lc-score-pending {
  background: #e9ecef;
  color: #6c757d;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 6px;
  text-align: center;
  font-size: 0.82rem;
}

/* =====================================================
   WIDGETS LIGA — TABS DE SERIES
   ===================================================== */
.lc-series-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 0; padding: 12px 12px 0; border-bottom: 2px solid #dee2e6; }
.lc-series-tab {
  padding: 7px 16px;
  border-radius: 6px 6px 0 0;
  border: 1px solid transparent;
  background: #f8f9fa;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: #6c757d;
  transition: all 0.15s;
  border-bottom: none;
  margin-bottom: -2px;
}
.lc-series-tab:hover { background: #e9ecef; color: #333; }
.lc-series-tab.active {
  background: #fff;
  color: var(--lc-primary);
  border-color: #dee2e6;
  border-bottom-color: #fff;
}

.lc-tab-content { display: none; }
.lc-tab-content.active { display: block; }

/* =====================================================
   WIDGETS LIGA — ESTADÍSTICAS
   ===================================================== */
.lc-stat-player-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid #f0f0f0; }
.lc-stat-player-row:last-child { border-bottom: none; }
.lc-stat-rank { width: 24px; text-align: center; font-weight: 700; color: #adb5bd; font-size: 0.82rem; flex-shrink: 0; }
.lc-stat-rank.top1 { color: #f59e0b; }
.lc-stat-rank.top2 { color: #9ca3af; }
.lc-stat-rank.top3 { color: #b45309; }
.lc-stat-foto { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.lc-stat-foto-ph { width: 34px; height: 34px; border-radius: 50%; background: #e9ecef; display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; }
.lc-stat-info { flex: 1; min-width: 0; }
.lc-stat-nombre { font-weight: 600; font-size: 0.88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc-stat-equipo { font-size: 0.72rem; color: #6c757d; }
.lc-stat-valor { font-weight: 800; font-size: 1.2rem; color: var(--lc-primary); min-width: 32px; text-align: right; }

/* =====================================================
   WIDGETS LIGA — PRÓXIMOS PARTIDOS
   ===================================================== */
.lc-proximo-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid #f0f0f0; text-decoration: none; color: inherit; transition: background 0.15s; }
.lc-proximo-item:hover { background: #f8f9fa; }
.lc-proximo-item:last-child { border-bottom: none; }
.lc-proximo-vs { font-size: 0.82rem; flex: 1; }
.lc-proximo-vs strong { display: block; font-weight: 700; }
.lc-proximo-badge { background: var(--lc-primary); color: #fff; font-size: 0.72rem; font-weight: 700; padding: 3px 8px; border-radius: 20px; white-space: nowrap; }

/* =====================================================
   WIDGETS LIGA — GOLEADORES (mini sidebar)
   ===================================================== */
.lc-goleador-row { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-bottom: 1px solid #f0f0f0; font-size: 0.83rem; }
.lc-goleador-row:last-child { border-bottom: none; }
.lc-goleador-num { width: 18px; font-weight: 700; color: #adb5bd; text-align: center; flex-shrink: 0; }
.lc-goleador-nombre { flex: 1; font-weight: 600; text-decoration: none; color: #111; }
.lc-goleador-nombre:hover { color: var(--lc-primary); }
.lc-goleador-goles { font-weight: 800; color: var(--lc-primary); }

/* =====================================================
   PANEL DELEGADO
   ===================================================== */
.lc-input-goles {
  width: 55px;
  text-align: center;
  font-weight: 700;
  font-size: 1rem;
  padding: 6px;
  border: 1.5px solid #dee2e6;
  border-radius: 6px;
  outline: none;
}
.lc-input-goles:focus { border-color: var(--lc-primary); box-shadow: 0 0 0 3px rgba(26,58,110,0.1); }

/* =====================================================
   UTILIDADES
   ===================================================== */
.tarjeta-amarilla { background: #fbbf24; width: 11px; height: 16px; border-radius: 2px; display: inline-block; vertical-align: middle; }
.tarjeta-roja     { background: #dc2626; width: 11px; height: 16px; border-radius: 2px; display: inline-block; vertical-align: middle; }
.numero-camiseta  { background: var(--lc-primary); color: white; font-weight: 700; font-size: 0.72rem; padding: 2px 7px; border-radius: 20px; }
.lc-serie-badge   { background: var(--lc-secondary); color: #111; font-weight: 700; font-size: 0.72rem; padding: 2px 8px; border-radius: 20px; }

/* =====================================================
   EVENTOS META BOX ADMIN
   ===================================================== */
.lc-evento-row { background: #f9f9f9; border: 1px solid #ddd; border-radius: 4px; padding: 8px 10px; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lc-evento-row select, .lc-evento-row input { font-size: 13px; }
.lc-remove-evento { cursor: pointer; color: #cc0000; background: none; border: none; font-size: 16px; padding: 0 4px; }
#lc-eventos-wrap { max-height: 500px; overflow-y: auto; }
.lc-evento-tipo   { min-width: 130px; }
.lc-evento-min    { width: 60px; }
.lc-evento-equipo, .lc-evento-jugador, .lc-evento-jugador2 { min-width: 160px; }

@media (max-width: 575px) {
  .lc-partido-row { grid-template-columns: 1fr 72px 1fr; gap: 5px; padding: 10px 10px; }
  .lc-partido-equipo { font-size: 0.78rem; gap: 5px; }
  .lc-score { font-size: 0.88rem; padding: 4px 8px; }
}
