/* =====================
   esportes.css
===================== */

.esp-body {
  background: var(--bg-primary);
  min-height: 100vh;
  padding-bottom: calc(var(--bottom-nav-h) + 16px);
  overflow-x: hidden;
}

/* =====================
   SPORT TABS
===================== */
.esp-sport-tabs-wrap {
  padding: 0 16px 4px;
  overflow: hidden;
}

.esp-sport-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 8px;
}

.esp-sport-tabs::-webkit-scrollbar { display: none; }

.esp-sport-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 2px solid transparent;
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 600;
  font-family: var(--font);
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.2s;
  min-width: 68px;
}

.esp-sport-tab i { font-size: 1.3rem; }

.esp-sport-tab.active {
  border-color: var(--accent-green);
  color: var(--accent-green);
  background: rgba(81, 230, 132, 0.06);
}

.esp-sport-tab:hover:not(.active) {
  color: var(--text-primary);
  border-color: var(--border-color);
}

/* =====================
   FLAG PEQUENA
===================== */
.esp-flag-sm {
  width: 18px;
  height: 13px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
}

/* =====================
   JOGOS DO DIA — HEADER
===================== */
.esp-jogos-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.esp-filter-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: border-color 0.2s;
  flex-shrink: 0;
}

.esp-filter-btn:hover { border-color: var(--accent-green); }

.esp-filter-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-green);
  color: #000;
  font-size: 0.62rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
}

.esp-filter-badge.hidden { display: none; }

/* =====================
   PAÍSES LIST
===================== */
.esp-paises-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Item de país */
.esp-pais-item {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.esp-pais-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  cursor: pointer;
  transition: background 0.15s;
  user-select: none;
}

.esp-pais-header:hover { background: var(--bg-card-hover); }

.esp-pais-flag {
  width: 24px;
  height: 17px;
  object-fit: cover;
  border-radius: 3px;
  flex-shrink: 0;
}

.esp-pais-name {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.esp-pais-caret {
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: transform 0.25s;
  flex-shrink: 0;
}

.esp-pais-caret.open { transform: rotate(90deg); }

/* Ligas dentro do país */
.esp-ligas-list {
  display: none;
  flex-direction: column;
  border-top: 1px solid var(--border-color);
}

.esp-ligas-list.open { display: flex; }

/* Item de liga */
.esp-liga-item {
  padding: 11px 14px 11px 44px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-color);
  transition: background 0.15s;
}

.esp-liga-item:last-child { border-bottom: none; }
.esp-liga-item:hover { background: var(--bg-card-hover); }

.esp-liga-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.esp-liga-name {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.esp-liga-caret {
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: transform 0.25s;
}

.esp-liga-caret.open { transform: rotate(90deg); }

/* Partidas dentro da liga */
.esp-partidas {
  display: none;
  flex-direction: column;
  margin-top: 8px;
  gap: 6px;
}

.esp-partidas.open { display: flex; }

/* Card de partida dentro da liga */
.esp-partida-card {
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  border: 1px solid var(--border-color);
}

.esp-partida-info {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.esp-partida-info i { color: var(--accent-green); font-size: 0.8rem; }

.esp-partida-teams {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.esp-partida-team {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.esp-partida-team:last-child { text-align: right; }

.esp-partida-vs {
  font-size: 0.72rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.esp-partida-odds {
  display: flex;
  gap: 5px;
}

.esp-odd-btn {
  flex: 1;
  padding: 7px 4px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  cursor: pointer;
  transition: border-color 0.2s;
  font-family: var(--font);
}

.esp-odd-btn:hover { border-color: var(--accent-green); }

.esp-odd-btn span:first-child {
  font-size: 0.6rem;
  color: var(--text-secondary);
}

.esp-odd-btn span:last-child {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* =====================
   OVERLAY GERAL
===================== */
.esp-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 300;
  backdrop-filter: blur(2px);
}

.esp-overlay.active { display: block; }

/* =====================
   BOTTOM SHEET FILTROS
===================== */
.esp-filter-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 480px;
  margin: 0 auto;
  background: #010830;
  border-radius: 20px 20px 0 0;
  z-index: 400;
  transform: translateY(100%);
  transition: transform 0.33s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 88vh;
  overflow-y: auto;
  scrollbar-width: none;
  padding-bottom: 28px;
}

.esp-filter-sheet::-webkit-scrollbar { display: none; }
.esp-filter-sheet.open { transform: translateY(0); }

.esp-sheet__handle {
  width: 40px;
  height: 4px;
  border-radius: 2px;
  background: var(--border-color);
  margin: 12px auto 0;
}

.esp-sheet__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  padding: 16px 16px 8px;
  border-bottom: 1px solid var(--border-color);
}

/* Grupos de filtro */
.esp-filter-group {
  border-bottom: 1px solid var(--border-color);
}

.esp-filter-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
}

.esp-filter-head__right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.esp-filter-count {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  color: #000;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
}

.esp-filter-count.hidden { display: none; }

.esp-filter-caret {
  color: var(--text-secondary);
  font-size: 1rem;
  transition: transform 0.25s;
}

.esp-filter-caret.open { transform: rotate(180deg); }

.esp-filter-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.28s ease;
}

.esp-filter-body.open { max-height: 300px; }

.esp-filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 20px 16px;
}

.esp-ftag {
  padding: 8px 14px;
  border-radius: var(--radius-full);
  border: 1.5px solid var(--border-color);
  background: transparent;
  color: var(--text-primary);
  font-size: 0.78rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.2s;
}

.esp-ftag:hover { border-color: var(--accent-green); color: var(--accent-green); }

.esp-ftag.active {
  border-color: var(--accent-green);
  color: var(--accent-green);
  background: rgba(81, 230, 132, 0.1);
}

/* Ações do filtro */
.esp-filter-actions {
  display: flex;
  gap: 12px;
  padding: 16px 20px 8px;
}

.esp-filter-clear {
  flex: 1;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-color);
  background: transparent;
  color: var(--text-primary);
  font-size: 0.92rem;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  transition: border-color 0.2s;
}

.esp-filter-clear:hover { border-color: var(--text-primary); }

.esp-filter-confirm {
  flex: 2;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: none;
  background: #fff;
  color: #000;
  font-size: 0.92rem;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  transition: opacity 0.2s;
}

.esp-filter-confirm:hover { opacity: 0.88; }

/* =====================
   RESPONSIVE
===================== */
@media (min-width: 480px) {
  .esp-filter-sheet { max-width: 480px; }
}