/* =============================================================================
   EMAIL SELECTION STYLES
   Styles pour la sélection multiple des emails
   ============================================================================= */

/* Toolbar de sélection */
.email-selection-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border: 2px solid #cbd5e1;
  border-radius: 8px;
  margin-bottom: 16px;
  gap: 16px;
  flex-wrap: wrap;
}

.selection-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.selection-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Bouton de sélection */
.selection-btn {
  padding: 8px 16px;
  background: white;
  border: 2px solid #3b82f6;
  border-radius: 6px;
  color: #3b82f6;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.selection-btn:hover {
  background: #eff6ff;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.selection-btn.active {
  background: #3b82f6;
  color: white;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.selection-btn.active:hover {
  background: #2563eb;
}

/* Bouton de classification */
.classify-btn {
  padding: 8px 16px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: 2px solid #059669;
  border-radius: 6px;
  color: white;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}

.classify-btn:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.classify-btn:active {
  transform: translateY(0);
}

/* Compteur de sélection */
.selection-counter {
  padding: 6px 12px;
  background: #f1f5f9;
  border: 2px solid #cbd5e1;
  border-radius: 6px;
  color: #475569;
  font-weight: 600;
  font-size: 13px;
}

/* Boutons d'action de sélection */
.selection-action-btn {
  padding: 6px 12px;
  background: white;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  color: #475569;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}

.selection-action-btn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #1e293b;
}

/* Wrapper de checkbox dans les emails */
.email-checkbox-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  flex-shrink: 0;
}

/* Checkbox personnalisée */
.email-checkbox {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #3b82f6;
  margin: 0;
  flex-shrink: 0;
}

.email-checkbox:hover {
  transform: scale(1.1);
}

/* Email item en mode sélection */
.email-item.selection-mode {
  display: flex;
  flex-direction: row;
  align-items: stretch;
}

.email-item.selection-mode .email-content {
  flex: 1;
  cursor: pointer;
}

/* Email item sélectionné */
.email-item.selected {
  background: #eff6ff !important;
  border-left: 4px solid #3b82f6 !important;
}

.email-item.selected:hover {
  background: #dbeafe !important;
}

/* Email item classifié et sélectionné */
.email-item.classified.selected {
  background: linear-gradient(to right, #eff6ff 0%, #f0fdf4 100%) !important;
  border-left: 4px solid #6366f1 !important;
}

/* Ajustements pour les email-items normaux */
.email-item:not(.selection-mode) {
  cursor: pointer;
  padding: 12px 16px;
}

.email-item:not(.selection-mode) .email-checkbox-wrapper {
  display: none !important;
}

/* Animation lors de la sélection */
@keyframes selectPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(59, 130, 246, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
  }
}

.email-item.selected {
  animation: selectPulse 0.4s ease-out;
}

/* Responsive */
@media (max-width: 768px) {
  .email-selection-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .selection-controls {
    justify-content: center;
  }

  .selection-actions {
    justify-content: center;
  }

  .selection-btn,
  .classify-btn {
    flex: 1;
    justify-content: center;
  }
}

