/**
 * Nuance Detection Panel Styles
 * Styles for the AI-powered nuance detection system
 */

/* Nuance Detection Panel */
#nuanceDetectionPanel {
  background: var(--card-bg, #1e1e1e);
  border: 1px solid var(--border-color, #333);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1rem 0;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#nuanceDetectionPanel .panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--primary-color, #6366f1);
}

#nuanceDetectionPanel .panel-header h3 {
  margin: 0;
  font-size: 1.3rem;
  color: var(--text-primary, #fff);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#nuanceDetectionPanel .panel-header i {
  color: var(--primary-color, #6366f1);
}

#nuanceDetectionPanel .btn-icon {
  background: var(--button-bg, #2a2a2a);
  border: 1px solid var(--border-color, #444);
  color: var(--text-primary, #fff);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
}

#nuanceDetectionPanel .btn-icon:hover {
  background: var(--primary-color, #6366f1);
  border-color: var(--primary-color, #6366f1);
  transform: rotate(180deg);
}

/* Nuance Results */
.nuance-results {
  min-height: 150px;
  max-height: 500px;
  overflow-y: auto;
}

.nuance-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  color: var(--text-secondary, #999);
  text-align: center;
}

.nuance-placeholder i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.nuance-placeholder p {
  margin: 0;
  font-size: 1rem;
}

/* Detected Nuances */
.detected-nuances {
  display: grid;
  gap: 1rem;
}

.nuance-item {
  background: var(--input-bg, #252525);
  border: 1px solid var(--border-color, #333);
  border-radius: 6px;
  padding: 1rem;
  transition: all 0.3s ease;
}

.nuance-item:hover {
  border-color: var(--primary-color, #6366f1);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
}

.nuance-item h4 {
  margin: 0 0 0.75rem 0;
  font-size: 0.95rem;
  color: var(--text-primary, #fff);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.nuance-item h4 i {
  color: var(--primary-color, #6366f1);
  font-size: 1rem;
}

/* Nuance Tags */
.nuance-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  margin: 0.25rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.nuance-tag:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.nuance-tag .confidence {
  background: rgba(255, 255, 255, 0.2);
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 600;
}

.nuance-tag small {
  display: block;
  opacity: 0.8;
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

/* Tone Tags */
.tone-professional {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
}

.tone-friendly {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: #fff;
}

.tone-enthusiastic {
  background: linear-gradient(135deg, #ffa751 0%, #ffe259 100%);
  color: #333;
}

.tone-serious {
  background: linear-gradient(135deg, #434343 0%, #000000 100%);
  color: #fff;
}

.tone-empathetic {
  background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
  color: #333;
}

.tone-confident {
  background: linear-gradient(135deg, #ff6b6b 0%, #feca57 100%);
  color: #fff;
}

.tone-humble {
  background: linear-gradient(135deg, #e0c3fc 0%, #8ec5fc 100%);
  color: #333;
}

.tone-playful {
  background: linear-gradient(135deg, #fdcbf1 0%, #e6dee9 100%);
  color: #333;
}

/* Urgency Tags */
.urgency-critical {
  background: linear-gradient(135deg, #ff0844 0%, #ffb199 100%);
  color: #fff;
  border-left: 4px solid #ff0844;
}

.urgency-high {
  background: linear-gradient(135deg, #fa8231 0%, #ffc837 100%);
  color: #fff;
  border-left: 4px solid #fa8231;
}

.urgency-medium {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: #fff;
  border-left: 4px solid #4facfe;
}

.urgency-low {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
  color: #333;
  border-left: 4px solid #43e97b;
}

/* Collaboration Style Tags */
.style-collaborative {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
}

.style-guided {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: #fff;
}

.style-autonomous {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: #fff;
}

.style-iterative {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
  color: #333;
}

/* Output Format Tags */
.format-code {
  background: #2d2d2d;
  color: #4ec9b0;
  border: 1px solid #4ec9b0;
  font-family: 'Courier New', monospace;
}

.format-documentation {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
}

.format-list {
  background: linear-gradient(135deg, #fa8231 0%, #ffc837 100%);
  color: #fff;
}

.format-essay {
  background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
  color: #333;
}

.format-table {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: #fff;
}

.format-diagram {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: #fff;
}

.format-json {
  background: #1e1e1e;
  color: #ce9178;
  border: 1px solid #ce9178;
  font-family: 'Courier New', monospace;
}

.format-markdown {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
}

/* Complexity Tags */
.complexity-simple {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
  color: #333;
}

.complexity-moderate {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: #fff;
}

.complexity-complex {
  background: linear-gradient(135deg, #fa8231 0%, #ffc837 100%);
  color: #fff;
}

.complexity-expert {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
}

/* Audience Tags */
.audience-developers {
  background: #2d2d2d;
  color: #569cd6;
  border: 1px solid #569cd6;
}

.audience-executives {
  background: linear-gradient(135deg, #434343 0%, #000000 100%);
  color: #fff;
}

.audience-endusers {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: #fff;
}

.audience-students {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
  color: #333;
}

.audience-experts {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
}

/* Constraint Tags */
.constraint-critical {
  background: linear-gradient(135deg, #ff0844 0%, #ffb199 100%);
  color: #fff;
  border-left: 4px solid #ff0844;
  font-weight: 600;
}

.constraint-high {
  background: linear-gradient(135deg, #fa8231 0%, #ffc837 100%);
  color: #fff;
  border-left: 4px solid #fa8231;
}

.constraint-medium {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: #fff;
  border-left: 4px solid #4facfe;
}

/* Creativity Tags */
.creativity-conservative {
  background: linear-gradient(135deg, #868f96 0%, #596164 100%);
  color: #fff;
}

.creativity-balanced {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  color: #fff;
}

.creativity-creative {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: #fff;
}

.creativity-experimental {
  background: linear-gradient(135deg, #ffa751 0%, #ffe259 100%);
  color: #333;
}

/* Nuance Settings */
.nuance-settings {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color, #333);
}

.nuance-settings label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary, #999);
  font-size: 0.9rem;
  cursor: pointer;
  transition: color 0.3s ease;
}

.nuance-settings label:hover {
  color: var(--text-primary, #fff);
}

.nuance-settings input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--primary-color, #6366f1);
}

/* Scrollbar Styling */
.nuance-results::-webkit-scrollbar {
  width: 8px;
}

.nuance-results::-webkit-scrollbar-track {
  background: var(--input-bg, #252525);
  border-radius: 4px;
}

.nuance-results::-webkit-scrollbar-thumb {
  background: var(--primary-color, #6366f1);
  border-radius: 4px;
}

.nuance-results::-webkit-scrollbar-thumb:hover {
  background: var(--primary-hover, #5558e3);
}

/* Responsive Design */
@media (max-width: 768px) {
  #nuanceDetectionPanel {
    padding: 1rem;
  }

  #nuanceDetectionPanel .panel-header h3 {
    font-size: 1.1rem;
  }

  .nuance-tag {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }

  .nuance-item {
    padding: 0.75rem;
  }
}

/* Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nuance-item {
  animation: fadeIn 0.3s ease-out;
}

.nuance-tag {
  animation: fadeIn 0.4s ease-out;
}
