/**
 * AI-Powered Mode Toggle Styles
 *
 * Styling for the AI enhancement mode toggle in Advanced Prompt Generation
 *
 * @author Vigthoria Prompt Studio
 * @date October 18, 2025
 */

.ai-mode-toggle-section {
  margin: 20px 0;
  padding: 20px;
  background: linear-gradient(135deg, #1a1f35 0%, #2d1b3d 100%);
  border-radius: 12px;
  border: 1px solid rgba(102, 126, 234, 0.3);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.ai-mode-toggle-wrapper {
  display: flex;
  align-items: center;
  gap: 15px;
}

.ai-mode-label-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}

.ai-mode-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  color: #fff;
  font-weight: 500;
}

.ai-mode-label i {
  font-size: 20px;
  color: #ffd700;
}

.beta-badge {
  display: inline-block;
  padding: 2px 8px;
  background: #ffd700;
  color: #764ba2;
  font-size: 11px;
  font-weight: 700;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ai-mode-description {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.9);
  font-style: italic;
}

/* Toggle Switch */
.ai-mode-switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 30px;
  flex-shrink: 0;
}

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

.ai-mode-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(102, 126, 234, 0.2);
  transition: 0.4s;
  border-radius: 30px;
  border: 2px solid rgba(102, 126, 234, 0.4);
}

.ai-mode-slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .ai-mode-slider {
  background-color: #ffd700;
  border-color: #ffd700;
}

input:focus + .ai-mode-slider {
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.3);
}

input:checked + .ai-mode-slider:before {
  transform: translateX(30px);
  background-color: #667eea;
}

/* AI Mode Info Box */
.ai-mode-info {
  margin-top: 15px;
  padding: 15px;
  background: rgba(20, 25, 45, 0.6);
  border-radius: 8px;
  border-left: 4px solid #667eea;
  border: 1px solid rgba(102, 126, 234, 0.3);
  color: #e0e0e0;
  font-size: 13px;
  line-height: 1.6;
  backdrop-filter: blur(10px);
}

.ai-mode-info i {
  color: #667eea;
  margin-right: 8px;
}

.ai-mode-info strong {
  color: #667eea;
}

/* Enabled State */
.ai-mode-toggle-section.ai-enabled {
  background: linear-gradient(135deg, #2a1f45 0%, #3d1f4d 100%);
  border-color: rgba(102, 126, 234, 0.6);
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
  animation: ai-pulse 2s ease-in-out infinite;
}

@keyframes ai-pulse {
  0%, 100% {
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
  }
  50% {
    box-shadow: 0 4px 30px rgba(102, 126, 234, 0.6);
  }
}

/* Loading State */
.ai-mode-loading {
  margin-top: 20px;
  padding: 20px;
  background: linear-gradient(90deg, #1a1f35 0%, #2a1f45 50%, #1a1f35 100%);
  background-size: 200% 100%;
  border-radius: 12px;
  border: 1px solid rgba(102, 126, 234, 0.4);
  color: #e0e0e0;
  text-align: center;
  animation: ai-loading-gradient 2s linear infinite;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

@keyframes ai-loading-gradient {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}

.ai-mode-loading-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.ai-mode-loading-title i {
  animation: ai-spin 1s linear infinite;
}

@keyframes ai-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.ai-mode-loading-progress {
  margin-top: 15px;
}

.ai-mode-progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(20, 25, 45, 0.6);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 10px;
  border: 1px solid rgba(102, 126, 234, 0.3);
}

.ai-mode-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #667eea, #a78bfa, #667eea);
  background-size: 200% 100%;
  transition: width 0.3s ease;
  animation: ai-progress-shine 1.5s linear infinite;
}

@keyframes ai-progress-shine {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}

.ai-mode-loading-status {
  font-size: 14px;
  color: rgba(224, 224, 224, 0.9);
  margin-top: 5px;
}

.ai-mode-loading-step {
  font-weight: 600;
  color: #667eea;
}

/* Responsive */
@media (max-width: 768px) {
  .ai-mode-toggle-wrapper {
    flex-direction: column;
    align-items: flex-start;
  }

  .ai-mode-label {
    font-size: 14px;
  }

  .ai-mode-description {
    font-size: 12px;
  }

  .ai-mode-info {
    font-size: 12px;
  }
}
