/* AI Wizard Tool — text analysis page */

.ai-wizard-tool {
  max-width: 700px;
  margin: 0 auto;
  padding: 24px 0 48px;
}

.ai-wizard-tool-heading {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary, #1e293b);
  margin: 0 0 6px;
}

.ai-wizard-tool-sub {
  font-size: 0.9375rem;
  color: var(--text-secondary, #64748b);
  margin: 0 0 20px;
}

.ai-wizard-textarea {
  width: 100%;
  min-height: 200px;
  border: 1.5px solid var(--border, #e2e8f0);
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  line-height: 1.6;
  padding: 12px 14px;
  resize: vertical;
  box-sizing: border-box;
  color: var(--text-primary, #1e293b);
  background: var(--surface, #fff);
  transition: border-color 0.15s;
  display: block;
}

.ai-wizard-textarea:focus {
  outline: none;
  border-color: #4f46e5;
}

.ai-wizard-textarea::placeholder {
  color: var(--text-placeholder, #94a3b8);
}

.ai-wizard-btn {
  margin-top: 14px;
  background: #4f46e5;
  color: #fff;
  border: none;
  padding: 12px 32px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ai-wizard-btn:hover {
  background: #4338ca;
}

.ai-wizard-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.ai-wizard-btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ai-wizard-spin 0.7s linear infinite;
  flex-shrink: 0;
}

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

/* Result */
.ai-wizard-result {
  margin-top: 28px;
}

.ai-wizard-result-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.ai-wizard-score-circle {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 6px solid #22c55e;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.3s;
}

.ai-wizard-score-circle.score-low    { border-color: #22c55e; }
.ai-wizard-score-circle.score-light  { border-color: #eab308; }
.ai-wizard-score-circle.score-medium { border-color: #f97316; }
.ai-wizard-score-circle.score-high   { border-color: #ef4444; }

.ai-wizard-score-number {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text-primary, #1e293b);
}

.ai-wizard-score-label {
  font-size: 0.7rem;
  color: var(--text-secondary, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 2px;
}

.ai-wizard-verdict-wrap {
  flex: 1;
  min-width: 0;
}

.ai-wizard-verdict {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 4px;
}

.ai-wizard-verdict.score-low    { color: #16a34a; }
.ai-wizard-verdict.score-light  { color: #ca8a04; }
.ai-wizard-verdict.score-medium { color: #ea580c; }
.ai-wizard-verdict.score-high   { color: #dc2626; }

.ai-wizard-risk {
  font-size: 0.875rem;
  color: var(--text-secondary, #64748b);
  margin: 0;
}

/* Breakdown table */
.ai-wizard-breakdown {
  border: 1.5px solid var(--border, #e2e8f0);
  border-radius: 8px;
  overflow: hidden;
}

.ai-wizard-breakdown-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary, #64748b);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 12px 16px 10px;
  border-bottom: 1.5px solid var(--border, #e2e8f0);
  background: var(--surface-subtle, #f8fafc);
}

.ai-wizard-breakdown-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.ai-wizard-breakdown-table th {
  text-align: left;
  padding: 8px 16px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary, #64748b);
  background: var(--surface-subtle, #f8fafc);
  border-bottom: 1px solid var(--border, #e2e8f0);
}

.ai-wizard-breakdown-table th:last-child,
.ai-wizard-breakdown-table td:last-child {
  text-align: right;
}

.ai-wizard-breakdown-table td {
  padding: 9px 16px;
  color: var(--text-primary, #1e293b);
  border-bottom: 1px solid var(--border, #f1f5f9);
}

.ai-wizard-breakdown-table tr:last-child td {
  border-bottom: none;
}

.ai-wizard-breakdown-table tr:hover td {
  background: var(--surface-subtle, #f8fafc);
}

.ai-wizard-breakdown-points {
  font-weight: 600;
  color: #ef4444;
}

.ai-wizard-empty-breakdown {
  padding: 16px;
  color: var(--text-secondary, #64748b);
  font-size: 0.875rem;
}

/* Error */
.ai-wizard-error {
  margin-top: 12px;
  color: #dc2626;
  font-size: 0.875rem;
}

/* AI Wizard score badge for article cards */
.ai-wizard-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #22c55e;
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--text-primary, #1e293b);
  flex-shrink: 0;
  title: "AI Wizard score";
}

.ai-wizard-badge.score-low    { border-color: #22c55e; }
.ai-wizard-badge.score-light  { border-color: #eab308; }
.ai-wizard-badge.score-medium { border-color: #f97316; }
.ai-wizard-badge.score-high   { border-color: #ef4444; }

/* Sidebar tool button */
.sidebar-tool-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  background: none;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary, #64748b);
  text-align: left;
  transition: background 0.12s, color 0.12s;
}

.sidebar-tool-item:hover {
  background: var(--surface-hover, #f1f5f9);
  color: var(--text-primary, #1e293b);
}

.sidebar-tools-section {
  padding: 8px 8px 4px;
  border-top: 1px solid var(--border, #e2e8f0);
  margin-top: 4px;
}

.sidebar-tools-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-muted, #94a3b8);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 4px 6px;
}
