/* Módulo 2: Amigo Invisible */
.santa-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
}

@media (max-width: 960px) {
  .santa-layout {
    grid-template-columns: 1fr;
  }
}

/* Panel de Configuración del Sorteo */
.santa-config-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 28px;
}

.santa-header-box {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.santa-icon-badge {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #e53e3e 0%, #dd6b20 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  box-shadow: 0 4px 16px rgba(229, 62, 62, 0.4);
}

/* Cuadrícula de Selección de Participantes */
.selection-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.participants-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  max-height: 280px;
  overflow-y: auto;
  padding: 4px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}

.participant-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  cursor: pointer;
  user-select: none;
  transition: all var(--transition-fast);
}

.participant-chip:hover {
  border-color: var(--color-sun-glow);
}

.participant-chip.selected {
  border-color: #e53e3e;
  background: rgba(229, 62, 62, 0.12);
}

.participant-chip input[type="checkbox"] {
  accent-color: #e53e3e;
  cursor: pointer;
}

.chip-avatar {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
}

.chip-alias {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Interruptor de Memoria Histórica */
.toggle-switch-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 24px;
}

.toggle-switch-info {
  display: flex;
  flex-direction: column;
}

.toggle-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-main);
}

.toggle-desc {
  font-size: 12px;
  color: var(--text-muted);
}

/* Switch styling */
.switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: var(--border-medium);
  transition: .3s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--color-sun-primary);
}

input:checked + .slider:before {
  transform: translateX(22px);
}

/* Histórico de Sorteos */
.santa-history-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 28px;
}

.draws-history-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 16px;
}

.draw-item-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all var(--transition-fast);
}

.draw-item-card:hover {
  border-color: var(--color-sun-primary);
}

.draw-title {
  font-weight: 700;
  font-size: 16px;
  color: var(--text-main);
}

.draw-meta {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 4px;
}

/* Modal de Asignaciones Reveladas */
.pairings-table {
  width: 100%;
  border-collapse: collapse;
}

.pairings-table th, .pairings-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 14px;
}

.pairings-table th {
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
}

.masked-badge {
  filter: blur(5px);
  user-select: none;
  transition: filter 0.3s ease;
}

.unmasked .masked-badge {
  filter: none;
}
