/* WebSage AI Readiness Diagnostic — Styles v1.0.0
   All selectors are scoped to .wsaid-tool to avoid theme conflicts.
   ──────────────────────────────────────────────────────────────────────────── */

/* ── Variables ────────────────────────────────────────────────────────────── */
.wsaid-tool {
  --wsaid-brand:   #111827;
  --wsaid-accent:  #2563eb;
  --wsaid-soft:    #f3f4f6;
  --wsaid-text:    #111827;
  --wsaid-muted:   #6b7280;
  --wsaid-ok:      #16a34a;
  --wsaid-warn:    #d97706;
  --wsaid-bad:     #dc2626;
  --wsaid-card:    #ffffff;
  --wsaid-border:  #e5e7eb;

  font-family: Inter, Arial, sans-serif;
  color: var(--wsaid-text);
  line-height: 1.5;
  max-width: 980px;
  margin: 0 auto;
  padding: 32px 18px;
  box-sizing: border-box;
}

.wsaid-tool *,
.wsaid-tool *::before,
.wsaid-tool *::after {
  box-sizing: border-box;
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.wsaid-hero {
  background: linear-gradient(135deg, var(--wsaid-brand), #374151);
  color: #ffffff;
  padding: 34px;
  border-radius: 22px;
  margin-bottom: 22px;
}

.wsaid-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.05;
}

.wsaid-hero p {
  margin: 0;
  color: #e5e7eb;
  font-size: 17px;
}

/* ── Cards ────────────────────────────────────────────────────────────────── */
.wsaid-card {
  background: var(--wsaid-card);
  border: 1px solid var(--wsaid-border);
  border-radius: 18px;
  padding: 24px;
  margin: 18px 0;
  box-shadow: 0 8px 25px rgba(17, 24, 39, 0.05);
}

.wsaid-card h2 {
  font-size: 22px;
  margin: 0 0 8px;
}

.wsaid-note {
  color: var(--wsaid-muted);
  margin: 0 0 18px;
}

/* ── Field grid (lead capture) ───────────────────────────────────────────── */
.wsaid-field-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.wsaid-field-grid input,
.wsaid-field-grid select {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--wsaid-border);
  border-radius: 12px;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  color: var(--wsaid-text);
  transition: border-color 0.2s;
}

.wsaid-field-grid input:focus,
.wsaid-field-grid select:focus {
  outline: none;
  border-color: var(--wsaid-accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* ── Checkbox grid (AI tools / training topics) ──────────────────────────── */
.wsaid-check-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.wsaid-check {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--wsaid-border);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
  font-size: 14px;
  transition: border-color 0.2s, background 0.2s;
}

.wsaid-check:hover {
  border-color: var(--wsaid-accent);
  background: #eff6ff;
}

.wsaid-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--wsaid-accent);
  flex-shrink: 0;
}

.wsaid-bar-title small {
  font-weight: 500;
  color: var(--wsaid-muted);
}

/* ── Questions ────────────────────────────────────────────────────────────── */
.wsaid-question {
  border-top: 1px solid var(--wsaid-border);
  padding: 18px 0;
}

.wsaid-question:first-of-type {
  border-top: none;
}

.wsaid-question-label {
  display: block;
  font-weight: 700;
  margin-bottom: 10px;
}

/* ── Scale (radio grid) ──────────────────────────────────────────────────── */
.wsaid-scale {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.wsaid-scale label {
  border: 1px solid var(--wsaid-border);
  border-radius: 12px;
  padding: 10px 8px;
  text-align: center;
  cursor: pointer;
  background: #fff;
  font-size: 13px;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
  user-select: none;
}

.wsaid-scale label:hover {
  border-color: var(--wsaid-accent);
  background: #eff6ff;
}

.wsaid-scale input[type="radio"] {
  display: none;
}

.wsaid-scale input[type="radio"]:checked + span,
.wsaid-scale label:has(input:checked) {
  /* Fallback handled via JS class .wsaid-selected */
}

.wsaid-scale label.wsaid-selected {
  border-color: var(--wsaid-accent);
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 700;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.wsaid-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.wsaid-btn {
  border: none;
  border-radius: 14px;
  padding: 13px 22px;
  font-weight: 800;
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  text-decoration: none;
  display: inline-block;
}

.wsaid-btn:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.wsaid-btn--primary {
  background: var(--wsaid-accent);
  color: #ffffff;
}

.wsaid-btn--secondary {
  background: #e5e7eb;
  color: var(--wsaid-brand);
}

/* ── Error ───────────────────────────────────────────────────────────────── */
.wsaid-error {
  color: var(--wsaid-bad);
  font-weight: 700;
  margin-top: 10px;
  width: 100%;
}

/* ── Result panel ────────────────────────────────────────────────────────── */
.wsaid-result {
  animation: wsaidFadeUp 0.4s ease both;
}

@keyframes wsaidFadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.wsaid-score-wrap {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 22px;
  align-items: center;
  margin-bottom: 24px;
}

.wsaid-score-circle {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: conic-gradient(var(--wsaid-accent) 0deg, #e5e7eb 0deg);
  font-size: 36px;
  font-weight: 900;
  transition: background 0.6s ease;
  flex-shrink: 0;
}

.wsaid-badge {
  display: inline-block;
  border-radius: 999px;
  padding: 7px 14px;
  font-weight: 800;
  color: #ffffff;
  margin: 6px 0;
  font-size: 14px;
}

.wsaid-pill-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.wsaid-pill {
  background: var(--wsaid-soft);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 600;
}

/* ── Category bars ───────────────────────────────────────────────────────── */
.wsaid-bars {
  margin-top: 18px;
}

.wsaid-bar {
  margin: 14px 0;
}

.wsaid-bar-title {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 6px;
}

.wsaid-bar-bg {
  height: 10px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}

.wsaid-bar-fill {
  height: 10px;
  background: var(--wsaid-accent);
  width: 0;
  border-radius: 999px;
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Recommendations ─────────────────────────────────────────────────────── */
.wsaid-recs {
  padding-left: 20px;
}

.wsaid-recs li {
  margin-bottom: 8px;
  line-height: 1.6;
}

/* ── CTA box ─────────────────────────────────────────────────────────────── */
.wsaid-cta-box {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  padding: 20px;
  margin-top: 18px;
  text-align: center;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 720px) {
  .wsaid-scale {
    grid-template-columns: 1fr;
  }

  .wsaid-field-grid,
  .wsaid-check-grid,
  .wsaid-score-wrap {
    grid-template-columns: 1fr;
  }

  .wsaid-hero {
    padding: 24px;
  }

  .wsaid-score-circle {
    width: 130px;
    height: 130px;
    font-size: 28px;
  }
}

/* ── Print ───────────────────────────────────────────────────────────────── */
@media print {
  .wsaid-tool {
    padding: 0;
  }

  .wsaid-hero {
    background: #111827 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  #wsaidForm,
  .wsaid-actions {
    display: none !important;
  }
}
