/* Overrides para layout de cards no desktop e alinhamento visual */

/* Ranking: habilita cards e oculta tabela tradicional em modo desktop */
.rankings-page.cards-view .ranking-table-responsive { display: none; }
.rankings-page.cards-view .ranking-card-list { display: flex; flex-direction: column; gap: 0.75rem; }
.rankings-page.cards-view .ranking-mobile-controls { display: flex; align-items: center; gap: 0.5rem; margin: 0.5rem 0; }

/* Larguras e alinhamentos dos cards no desktop */
.rankings-page.cards-view .ranking-card { border-radius: 12px; overflow: hidden; }
.rankings-page.cards-view .rc-header { display: grid; grid-template-columns: 64px 1fr 180px; align-items: center; }
.rankings-page.cards-view .rc-name .name-variant { font-weight: 600; }
.rankings-page.cards-view .rc-actions { display: flex; gap: 0.5rem; padding: 0.5rem; }
.rankings-page.cards-view .rc-stats { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)); gap: 0.5rem; }

/* Painel expandido nos cards */
.rankings-page.cards-view .rc-expanded .ea-expanded-panel { padding: 0.5rem; background: rgba(0,0,0,0.03); border-radius: 8px; }
.rankings-page.cards-view .ea-expanded-layout { display: flex; gap: 0.75rem; align-items: flex-start; }
.rankings-page.cards-view .ea-expanded-left { flex: 0 0 auto; }
.rankings-page.cards-view .ea-expanded-right { flex: 1; }

/* Perfil: organização de colunas e área de ações */
.ea-modern-profile { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; gap: 1rem; align-items: start; }
@media (max-width: 768px) { .ea-modern-profile { grid-template-columns: 1fr; } }
.ea-profile-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; margin-top: 0.5rem; }
.ea-profile-actions .ea-actions-primary { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; }
.ea-quiet-btn { padding: 0.4rem 0.6rem; border-radius: 6px; }
.ea-variant-chips .ea-variant-chip .chip-name { font-weight: 600; }

/* Draft: nova grade de configuração */
/* ===== DRAFT SETUP STYLES ===== */
.ea-draft-setup-container {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 16px;
  padding: 0;
  margin-bottom: 2rem;
  box-shadow: 0 20px 40px rgba(102, 126, 234, 0.15);
  overflow: hidden;
  position: relative;
}

/* ===== DARK THEME STYLES ===== */
.dark-theme .ea-draft-setup-container {
  background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.ea-draft-setup-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  pointer-events: none;
}

.ea-draft-setup-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 2rem 2rem 1rem;
  color: white;
  position: relative;
  z-index: 1;
}

.ea-draft-setup-title h2 {
  margin: 0 0 0.5rem;
  font-size: 2rem;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.ea-draft-setup-subtitle {
  margin: 0;
  opacity: 0.9;
  font-size: 1.1rem;
  font-weight: 400;
}

.ea-admin-badge {
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(10px);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,0.3);
}

.ea-draft-setup-content {
  background: white;
  border-radius: 16px 16px 0 0;
  padding: 2rem;
  position: relative;
  z-index: 1;
}

.dark-theme .ea-draft-setup-content {
  background: #1a202c;
  color: #e2e8f0;
}

.ea-draft-section {
  margin-bottom: 2.5rem;
}

.ea-draft-section:last-child {
  margin-bottom: 0;
}

.ea-draft-section-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1.5rem;
  font-size: 1.3rem;
  font-weight: 600;
  color: #2d3748;
}

.dark-theme .ea-draft-section-title {
  color: #f7fafc;
}

.ea-draft-section-icon {
  font-size: 1.5rem;
}

.ea-draft-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.ea-draft-field {
  display: flex;
  flex-direction: column;
}

.ea-draft-label {
  margin-bottom: 0.75rem;
}

.ea-draft-label-text {
  display: block;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 0.25rem;
  font-size: 1rem;
}

.dark-theme .ea-draft-label-text {
  color: #f7fafc;
}

.ea-draft-label-desc {
  display: block;
  font-size: 0.875rem;
  color: #718096;
  line-height: 1.4;
}

.dark-theme .ea-draft-label-desc {
  color: #a0aec0;
}

.ea-draft-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.ea-draft-input {
  flex: 1;
  padding: 0.875rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 1rem;
  transition: all 0.2s ease;
  background: #f7fafc;
}

.dark-theme .ea-draft-input {
  background: #2d3748;
  border-color: #4a5568;
  color: #e2e8f0;
}

.ea-draft-input:focus {
  outline: none;
  border-color: #667eea;
  background: white;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.dark-theme .ea-draft-input:focus {
  background: #1a202c;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.ea-draft-input-suffix {
  position: absolute;
  right: 1rem;
  color: #718096;
  font-size: 0.875rem;
  font-weight: 500;
  pointer-events: none;
}

.dark-theme .ea-draft-input-suffix {
  color: #a0aec0;
}

.ea-draft-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.ea-draft-option {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem;
  background: #f7fafc;
  border-radius: 12px;
  border: 2px solid #e2e8f0;
  transition: all 0.2s ease;
}

.dark-theme .ea-draft-option {
  background: #2d3748;
  border-color: #4a5568;
}

.ea-draft-option:hover {
  border-color: #cbd5e0;
  background: #edf2f7;
}

.dark-theme .ea-draft-option:hover {
  border-color: #718096;
  background: #374151;
}

.ea-draft-toggle {
  position: relative;
  flex-shrink: 0;
}

.ea-draft-checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.ea-draft-toggle-label {
  display: block;
  width: 50px;
  height: 28px;
  background: #cbd5e0;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.ea-draft-toggle-slider {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 24px;
  height: 24px;
  background: white;
  border-radius: 50%;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.ea-draft-checkbox:checked + .ea-draft-toggle-label {
  background: #667eea;
}

.ea-draft-checkbox:checked + .ea-draft-toggle-label .ea-draft-toggle-slider {
  transform: translateX(22px);
}

.ea-draft-option-content {
  flex: 1;
}

.ea-draft-option-title {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: #2d3748;
}

.dark-theme .ea-draft-option-title {
  color: #f7fafc;
}

.ea-draft-option-desc {
  margin: 0;
  color: #718096;
  font-size: 0.9rem;
  line-height: 1.4;
}

.dark-theme .ea-draft-option-desc {
  color: #a0aec0;
}

.ea-draft-summary {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  border-radius: 16px;
  padding: 0;
  overflow: hidden;
  position: relative;
}

.dark-theme .ea-draft-summary {
  background: linear-gradient(135deg, #4c1d95 0%, #7c2d12 100%);
}

/* Theme toggle button styles */
.ea-theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ea-theme-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.dark-theme .ea-theme-toggle {
  background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
  color: #333;
}

.ea-draft-summary::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1.5" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
  pointer-events: none;
}

.ea-draft-summary-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem;
  position: relative;
  z-index: 1;
  gap: 2rem;
}

.ea-draft-summary-info {
  flex: 1;
}

.ea-draft-summary-title {
  margin: 0 0 1rem;
  color: white;
  font-size: 1.3rem;
  font-weight: 600;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.ea-draft-summary-stats {
  display: flex;
  gap: 1.5rem;
}

.ea-draft-stat {
  text-align: center;
}

.ea-draft-stat-value {
  display: block;
  font-size: 1.8rem;
  font-weight: 700;
  color: white;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.ea-draft-stat-label {
  display: block;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.9);
  margin-top: 0.25rem;
}

.ea-draft-summary-action {
  text-align: center;
}

.ea-draft-start-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: white;
  color: #667eea;
  border: none;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  margin-bottom: 0.75rem;
}

.ea-draft-start-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  background: #f7fafc;
}

.ea-draft-start-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.ea-draft-start-icon {
  font-size: 1.2rem;
}

.ea-draft-start-note {
  margin: 0;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.8);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
  .ea-draft-form-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
  
  .ea-draft-options-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .ea-draft-setup-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  
  .ea-draft-setup-title h2 {
    font-size: 1.75rem;
  }
  
  .ea-draft-setup-content {
    padding: 1.5rem;
  }
  
  .ea-draft-form-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .ea-draft-summary-content {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }
  
  .ea-draft-summary-stats {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .ea-draft-setup-header {
    padding: 1.5rem 1.5rem 1rem;
  }
  
  .ea-draft-setup-content {
    padding: 1rem;
  }
  
  .ea-draft-setup-title h2 {
    font-size: 1.5rem;
  }
  
  .ea-draft-section-title {
    font-size: 1.1rem;
  }
  
  .ea-draft-summary-content {
    padding: 1.5rem;
  }
  
  .ea-draft-summary-stats {
    flex-direction: column;
    gap: 1rem;
  }
  
  .ea-draft-start-btn {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
  }
}

/* ===== LEGACY STYLES (mantidos para compatibilidade) ===== */
.ea-draft-config { margin-bottom: 1rem; }
.ea-form-grid { display: grid; grid-template-columns: repeat(4, minmax(140px, 1fr)); gap: 0.75rem; }
@media (max-width: 1024px) { .ea-form-grid { grid-template-columns: repeat(3, minmax(140px, 1fr)); } }
@media (max-width: 768px) { .ea-form-grid { grid-template-columns: repeat(2, minmax(140px, 1fr)); } }
@media (max-width: 480px) { .ea-form-grid { grid-template-columns: 1fr; } }
.ea-form-item { display: flex; flex-direction: column; }
.ea-form-item > label { font-size: 0.85rem; margin-bottom: 0.25rem; color: var(--ea-text-dim, #666); }
.ea-form-item .ea-input { width: 100%; }
.ea-form-check { flex-direction: row; align-items: center; }
.ea-actions-row { display: flex; align-items: center; gap: 0.75rem; margin-top: 0.75rem; }

/* Sidebar: alinhamento ao padrão mobile */
.ea-fc-sidebar { background: var(--ea-sidebar-bg, #0b0f19); padding: 0.75rem; }
.ea-fc-sidebar .ea-fc-menu { display: flex; flex-direction: column; gap: 0.25rem; }
.ea-fc-sidebar .ea-fc-menu-item { display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0.75rem; border-radius: 8px; color: var(--ea-sidebar-fg, #cfd3dc); text-decoration: none; }
.ea-fc-sidebar .ea-fc-menu-item.active { background: rgba(255,255,255,0.08); color: #fff; }
.ea-fc-sidebar .ea-fc-menu-item:hover { background: rgba(255,255,255,0.06); color: #fff; }
.ea-fc-sidebar .ea-icon { width: 18px; height: 18px; display: inline-block; }

/* Variações visuais por campeonato (aproveita variáveis do tema, se existirem) */
.rankings-page.cards-view.variant-bcl { background-image: var(--bcl-bg-gradient); }
.rankings-page.cards-view.variant-jcl { background-image: var(--jcl-bg-gradient); }

/* Remoções de fundo e labels conforme solicitado */
/* #background-overlay { display: none !important; }  Removido para permitir overlay escurecido visível */
.rankings-page.cards-view[class*="variant-"] { background: none !important; background-image: none !important; }
.ea-variant-label { display: none !important; }
.ranking-card .rc-name .name-variant { background: none !important; border: 0 !important; padding: 0 !important; }

.ea-grid-3 { display: grid; grid-template-columns: 320px 1fr 320px; gap: 1rem; }
@media (max-width: 1024px) { .ea-grid-3 { grid-template-columns: 1fr; } }
.ea-grid-4 { display: grid; grid-template-columns: repeat(4, minmax(160px, 1fr)); }
@media (max-width: 1024px) { .ea-grid-4 { grid-template-columns: repeat(2, minmax(160px, 1fr)); } }
.ea-table { display: grid; grid-template-columns: 1fr 120px 120px; }
.ea-table-row { display: contents; }
.ea-table-header .ea-table-cell { font-weight: 600; opacity: 0.9; }
.ea-table-cell { padding: 0.5rem; border-bottom: 1px solid rgba(255,255,255,0.06); }
.ea-dot { display:inline-block; width:10px; height:10px; border-radius:50%; }
.ea-dot-green { background:#39d98a; }
