/* AI Content Detector — tool.css */

/* ===== MODE SELECTOR ===== */
.aid-mode-row {
  display: flex;
  gap: 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.aid-mode-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .88rem;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  transition: border-color .2s, background .2s;
}
.aid-mode-label:has(input:checked) {
  border-color: var(--primary);
  background: rgba(37, 99, 235, .08);
  font-weight: 600;
}
.aid-mode-label input { margin: 0; }

.aid-resume-notice {
  font-size: .78rem;
  color: var(--text-dim);
  background: rgba(37, 99, 235, .06);
  border: 1px solid rgba(37, 99, 235, .15);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: 14px;
  line-height: 1.5;
}

/* ===== INPUT SECTION ===== */
.aid-input-section {
  margin-bottom: 8px;
}

.aid-label {
  display: block;
  font-size: .88rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.aid-upload-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.aid-upload-hint {
  font-size: .82rem;
  color: var(--text-dim);
}

.aid-upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: .82rem;
}

.aid-file-name {
  font-size: .8rem;
  color: var(--text-dim);
  font-style: italic;
}

#aid-text {
  min-height: 200px;
  font-size: .92rem;
  line-height: 1.7;
}

.aid-meta-row {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: .8rem;
  color: var(--text-dim);
}

/* ===== SCORE SECTION ===== */
.aid-score-section {
  margin-top: 24px;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.aid-score-section h2 {
  font-size: 1.1rem;
  margin-bottom: 20px;
  text-align: center;
}

.aid-gauge-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}

/* ===== CIRCULAR GAUGE ===== */
.aid-gauge {
  position: relative;
  width: 180px;
  height: 180px;
  flex-shrink: 0;
}

.aid-gauge-svg {
  width: 100%;
  height: 100%;
  transform: rotate(0deg);
}

.aid-gauge-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.aid-gauge-pct {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text);
}

.aid-gauge-sub {
  font-size: .75rem;
  color: var(--text-dim);
  margin-top: 4px;
  font-weight: 500;
}

/* ===== VERDICT ===== */
.aid-verdict {
  text-align: center;
  max-width: 300px;
}

.aid-verdict-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: .88rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.aid-verdict-badge.human {
  background: rgba(34, 197, 94, .15);
  color: var(--green);
}

.aid-verdict-badge.mixed {
  background: rgba(245, 158, 11, .15);
  color: var(--orange);
}

.aid-verdict-badge.ai-assisted {
  background: rgba(245, 158, 11, .2);
  color: var(--orange);
}

.aid-verdict-badge.ai {
  background: rgba(239, 68, 68, .15);
  color: var(--red);
}

.aid-verdict-text {
  font-size: .88rem;
  color: var(--text-dim);
  line-height: 1.6;
}

/* ===== METRIC CARDS GRID ===== */
.aid-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.aid-metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  transition: border-color .2s;
}

.aid-metric-card:hover {
  border-color: var(--text-dim);
}

.aid-metric-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.aid-metric-name {
  font-size: .88rem;
  font-weight: 600;
}

.aid-metric-score {
  font-size: .82rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--bg-input);
}

.aid-metric-score.low {
  background: rgba(34, 197, 94, .15);
  color: var(--green);
}

.aid-metric-score.mid {
  background: rgba(245, 158, 11, .15);
  color: var(--orange);
}

.aid-metric-score.high {
  background: rgba(239, 68, 68, .15);
  color: var(--red);
}

/* Metric bar */
.aid-metric-bar {
  height: 6px;
  background: var(--bg-input);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 10px;
}

.aid-metric-fill {
  height: 100%;
  border-radius: 3px;
  width: 0;
  transition: width .6s ease, background .3s;
}

.aid-metric-desc {
  font-size: .78rem;
  color: var(--text-dim);
  line-height: 1.5;
}

/* ===== SENTENCE-LEVEL HIGHLIGHTING ===== */
.aid-legend {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.aid-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  color: var(--text-dim);
}

.aid-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.aid-sentences {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  line-height: 1.8;
  font-size: .9rem;
}

.aid-s {
  padding: 2px 4px;
  border-radius: 3px;
  transition: opacity .2s;
}

.aid-s:hover {
  opacity: .8;
}

.aid-s.s-human {
  background: rgba(34, 197, 94, .15);
}

.aid-s.s-uncertain {
  background: rgba(245, 158, 11, .15);
}

.aid-s.s-ai {
  background: rgba(239, 68, 68, .15);
}

/* Light mode adjustments for sentence highlighting */
[data-theme="light"] .aid-s.s-human {
  background: rgba(21, 128, 61, .12);
}

[data-theme="light"] .aid-s.s-uncertain {
  background: rgba(217, 119, 6, .12);
}

[data-theme="light"] .aid-s.s-ai {
  background: rgba(220, 38, 38, .12);
}

/* ===== DISCLAIMER ===== */
.aid-disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 24px;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .82rem;
  color: var(--text-dim);
  line-height: 1.5;
}

.aid-disclaimer svg {
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--orange);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .aid-gauge-wrap {
    flex-direction: column;
    gap: 16px;
  }

  .aid-gauge {
    width: 160px;
    height: 160px;
  }

  .aid-gauge-pct {
    font-size: 1.8rem;
  }

  .aid-metrics-grid {
    grid-template-columns: 1fr;
  }

  .aid-score-section {
    padding: 16px;
  }

  .aid-sentences {
    padding: 14px;
    font-size: .85rem;
  }

  .aid-verdict {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .aid-gauge {
    width: 140px;
    height: 140px;
  }

  .aid-gauge-pct {
    font-size: 1.5rem;
  }
}
