/* Styles pour le menu des Quick Actions AI */

.quick-actions-menu {
  background: #fff;
  border: 1px solid #6767D9;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  min-width: 280px;
  max-width: 320px;
  overflow: hidden;
  animation: quickActionsSlideIn 0.2s ease-out;
}

@keyframes quickActionsSlideIn {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.quick-actions-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px 20px;
  border-bottom: 1px solid #f0f0f0;
  background: #fafbfc;
}

.quick-actions-title {
  font-size: 14px;
  font-weight: 600;
  color: #000;
  letter-spacing: 0.01em;
}

.quick-actions-close {
  background: none;
  border: none;
  font-size: 18px;
  color: #666;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quick-actions-close:hover {
  background: #f0f0f0;
  color: #000;
}

/* Toggle switch styles */
.quick-actions-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
}

.toggle-label {
  font-size: 12px;
  font-weight: 500;
  color: #666;
  white-space: nowrap;
  position: relative;
}

.toggle-label.has-tooltip::after {
  content: "Seules les analyses associées à un projet peuvent avoir un contexte";
  position: fixed;
  bottom: auto;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid #FC554F !important;
    color: #FC554F !important;
    background-color: #FFF2F2 !important;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 12px;
  white-space: wrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 10002;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 280px;
  max-width: 320px;
  text-align: center;
}

.toggle-label.has-tooltip::before {
  content: "";
  position: fixed;
  bottom: auto;
  top: 50%;
  left: 50%;
  transform: translate(-50%, calc(-50% + 20px));
  border: 6px solid transparent;
  border-top-color: #333;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 10002;
  pointer-events: none;
}

.toggle-label.has-tooltip:hover::after,
.toggle-label.has-tooltip:hover::before {
  opacity: 1;
  visibility: visible;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
}

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

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #e5e7eb;
  transition: 0.3s;
  border-radius: 20px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
  background-color: #B7A7FE;
}

.toggle-switch input:checked + .toggle-slider:before {
  transform: translateX(16px);
}

/* Styles pour le toggle désactivé */
.toggle-switch.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.toggle-switch.disabled .toggle-slider {
  cursor: not-allowed;
  background-color: #f3f4f6;
}

.toggle-switch.disabled input:checked + .toggle-slider {
  background-color: #f3f4f6;
}

.toggle-switch.disabled input:checked + .toggle-slider:before {
  background-color: #d1d5db;
  transform: translateX(16px);
}

.quick-actions-list {
  padding: 8px 0;
}

.quick-action-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 4px 10px;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  color: #000000;
  font-size: 14px;
  font-weight: 500;
}

.quick-action-item:hover {
  background: #F9F9FF;
  color: #000000;
}

.quick-action-item:focus {
  outline: none;
  background: #f0f4ff;
  color: #000000;
}

.quick-action-item:active {
  background: #e8ecff;
  transform: translateY(1px);
}

.quick-action-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: none;
  color: #898989;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.quick-action-item:hover .quick-action-icon {
  background: none;
  color: #6767D9;
}

.quick-action-item:focus .quick-action-icon {
  background: none;
  color: #6767D9;
}

.quick-action-item svg {
  width: 16px;
  height: 16px;
}

.quick-action-icon img {
  width: 16px;
  height: 16px;
  filter: brightness(0) saturate(100%) invert(55%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(0.6) contrast(1);
  transition: filter 0.2s ease;
}

.quick-action-item:hover .quick-action-icon img {
  filter: brightness(0) saturate(100%) invert(41%) sepia(100%) saturate(1000%) hue-rotate(230deg) brightness(0.8) contrast(1);
}

.quick-action-item:focus .quick-action-icon img {
  filter: brightness(0) saturate(100%) invert(41%) sepia(100%) saturate(1000%) hue-rotate(230deg) brightness(0.8) contrast(1);
}

/* Styles pour le message de succès */
.quick-action-success {
  animation: quickActionSuccessSlideIn 0.3s ease-out;
}

@keyframes quickActionSuccessSlideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.quick-action-success-content {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quick-action-success-content svg {
  flex-shrink: 0;
}

/* Styles pour le texte de chargement avec gradient animé */
.ai-loading-text {
  background: linear-gradient(45deg, #8785F7, #C188F8, #8785F7);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientMove 2s ease-in-out infinite;
  font-weight: 300 !important;
  font-style: italic;
}

@keyframes gradientMove {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Responsive design */
@media (max-width: 768px) {
  .quick-actions-menu {
    min-width: 260px;
    max-width: 300px;
  }
  
  .quick-action-item {
    padding: 14px 16px;
  }
  
  .quick-actions-header {
    padding: 14px 16px 10px 16px;
  }
}

/* Dark mode support - désactivé par défaut */
/* 
@media (prefers-color-scheme: dark) {
  .quick-actions-menu {
    background: #000;
    border-color: #333;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  }
  
  .quick-actions-header {
    background: #000;
    border-bottom-color: #333;
  }
  
  .quick-actions-title {
    color: #fff;
  }
  
  .quick-action-item {
    color: #e0e0e0;
  }
  
  .quick-action-item:hover {
    background: #F8FAFC;
    color: #000;
  }
  
  .quick-action-item:focus {
    background: #000;
  }
  
  .quick-action-icon {
    background: #000;
    color: #999;
  }
  
  .quick-action-item:hover .quick-action-icon {
    color: #815DEE;
  }
}
*/
