/* ATS Scanner — all styles scoped under .ats-tool so nothing collides with the
   host site's Bootstrap classes (.container, button, body resets, etc.). */

.ats-tool {
  --brand: #0a3d62;
  --brand-light: #3c6382;
  --accent: #e58e26;
  --green: #2e7d32;
  --yellow: #f9a825;
  --red: #c62828;
  --text: #1d2939;
  --muted: #667085;
  --bg: #fafbfc;
  --card-bg: #ffffff;
  --border: #e4e7ec;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  --radius: 8px;

  /* layout (formerly the global .container rule) */
  max-width: 880px;
  margin: 0 auto;
  padding: 32px 24px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  line-height: 1.5;
}

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

.ats-tool .page-head {
  text-align: center;
  margin-bottom: 32px;
}

.ats-tool .page-head h1 {
  font-size: 2.25rem;
  margin: 0 0 12px;
  color: var(--brand);
  font-weight: 700;
}

.ats-tool .page-head p {
  font-size: 1.05rem;
  color: var(--muted);
  margin: 0 auto;
  max-width: 600px;
}

.ats-tool .upload-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
  margin-bottom: 24px;
}

.ats-tool #drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  outline: none;
}

.ats-tool #drop-zone:focus-visible,
.ats-tool #drop-zone:hover {
  border-color: var(--brand);
  background: #f0f7ff;
}

.ats-tool #drop-zone.drag-active {
  border-color: var(--brand);
  background: #e6f0ff;
}

.ats-tool #drop-zone .icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  color: var(--brand-light);
}

.ats-tool #drop-zone .primary {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.ats-tool #drop-zone .secondary {
  color: var(--muted);
  font-size: 0.95rem;
}

.ats-tool .privacy-line {
  margin-top: 16px;
  padding: 12px 16px;
  background: #f4f8fb;
  border-radius: 6px;
  font-size: 0.9rem;
  color: var(--brand);
  border-left: 3px solid var(--brand-light);
}

.ats-tool .industry-field {
  margin-top: 16px;
}

.ats-tool .industry-field label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: var(--muted);
}

.ats-tool .industry-field input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
}

.ats-tool .industry-field input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(10, 61, 98, 0.1);
}

.ats-tool .error {
  background: #fff1f0;
  border: 1px solid #ffd6d6;
  color: var(--red);
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 16px;
}

.ats-tool .processing {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
  text-align: center;
  margin-bottom: 24px;
}

.ats-tool .processing .spinner {
  display: inline-block;
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: ats-spin 0.8s linear infinite;
  margin-bottom: 16px;
}

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

.ats-tool .result-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
  margin-bottom: 24px;
}

.ats-tool .score-display {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.ats-tool #score-ring {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.ats-tool #score-ring[data-band="green"] { background: var(--green); }
.ats-tool #score-ring[data-band="yellow"] { background: var(--yellow); color: #5c3c00; }
.ats-tool #score-ring[data-band="red"] { background: var(--red); }

.ats-tool #score-number {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
}

.ats-tool .score-of {
  font-size: 0.95rem;
  opacity: 0.85;
}

.ats-tool .score-side h2 {
  margin: 0 0 8px;
  font-size: 1.4rem;
}

.ats-tool #doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.ats-tool #doc-meta span:not(:last-child)::after {
  content: '·';
  margin-left: 12px;
}

.ats-tool .section-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 24px 0 12px;
  color: var(--text);
}

.ats-tool .category-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ats-tool .category {
  background: #f8fafc;
  padding: 12px 16px;
  border-radius: 6px;
}

.ats-tool .cat-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 0.95rem;
}

.ats-tool .cat-name { font-weight: 500; }
.ats-tool .cat-score { color: var(--muted); font-variant-numeric: tabular-nums; }

.ats-tool .cat-bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.ats-tool .cat-bar-fill {
  height: 100%;
  background: var(--brand);
  transition: width 0.3s;
}

.ats-tool #top-issues {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ats-tool .issue {
  padding: 12px 16px;
  border-left: 4px solid var(--red);
  background: #fff8f7;
  border-radius: 0 6px 6px 0;
}

.ats-tool .issue.status-partial {
  border-left-color: var(--yellow);
  background: #fffbf0;
}

.ats-tool .issue.pass {
  border-left-color: var(--green);
  background: #f1f8f2;
}

.ats-tool .issue-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.ats-tool .issue-label { font-weight: 600; }
.ats-tool .issue-points {
  color: var(--red);
  font-size: 0.9rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.ats-tool .issue.status-partial .issue-points { color: var(--yellow); }

.ats-tool .issue-note { color: var(--muted); font-size: 0.9rem; margin-top: 4px; }
.ats-tool .issue-confidence { color: var(--muted); font-size: 0.8rem; margin-top: 4px; font-style: italic; }

.ats-tool .check-section {
  margin: 20px 0;
}

.ats-tool .check-section h4 {
  margin: 0 0 8px;
  font-size: 1rem;
  color: var(--brand);
}

.ats-tool .check-section .muted {
  color: var(--muted);
  font-weight: 400;
}

.ats-tool .check-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ats-tool .check {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 8px;
  padding: 6px 0;
  font-size: 0.92rem;
  align-items: baseline;
}

.ats-tool .check-status {
  font-weight: 700;
  font-size: 1.05rem;
}

.ats-tool .check.status-pass .check-status { color: var(--green); }
.ats-tool .check.status-partial .check-status { color: var(--yellow); }
.ats-tool .check.status-fail .check-status { color: var(--red); }

.ats-tool .check-points {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-size: 0.85rem;
}

.ats-tool .check-note {
  grid-column: 2 / -1;
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 2px;
}

.ats-tool .actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.ats-tool button {
  font-family: inherit;
  font-size: 0.95rem;
  padding: 10px 20px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text);
  cursor: pointer;
  font-weight: 500;
}

.ats-tool button:hover {
  background: #f4f6f8;
}

.ats-tool button.primary {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.ats-tool button.primary:hover { background: var(--brand-light); }

/* ---- Email gate ---- */

.ats-tool .email-gate {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.ats-tool .gate-card {
  background: linear-gradient(135deg, #f4f8fb 0%, #e6f0ff 100%);
  border: 1px solid #cfe0f5;
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}

.ats-tool .gate-card h3 {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 1.2rem;
}

.ats-tool .gate-card p {
  margin: 0 0 16px;
  color: var(--text);
}

.ats-tool .email-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ats-tool .email-form input[type="email"] {
  flex: 1 1 240px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
  background: #fff;
}

.ats-tool .email-form input[type="email"]:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(10, 61, 98, 0.12);
}

.ats-tool .email-form button {
  white-space: nowrap;
}

.ats-tool .gate-small {
  margin: 12px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.ats-tool .detailed-locked {
  position: relative;
  filter: blur(6px);
  pointer-events: none;
  user-select: none;
  max-height: 320px;
  overflow: hidden;
  mask-image: linear-gradient(to bottom, black 0%, black 60%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black 60%, transparent 100%);
  margin-top: 12px;
}

.ats-tool .detailed-locked::after {
  content: '\1F512  Enter your email above to unlock the full report';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.92);
  padding: 12px 20px;
  border-radius: 6px;
  font-weight: 600;
  color: var(--brand);
  filter: blur(0);
  font-size: 0.95rem;
  white-space: nowrap;
}

.ats-tool .detailed-unlocked {
  filter: none;
  pointer-events: auto;
  user-select: auto;
  max-height: none;
  overflow: visible;
  mask-image: none;
  -webkit-mask-image: none;
  margin-top: 12px;
}

.ats-tool .visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ---- Upsell card ---- */

.ats-tool .upsell-card {
  margin-top: 24px;
  padding: 24px;
  background: linear-gradient(135deg, #0a3d62 0%, #1e5a85 100%);
  color: #fff;
  border-radius: var(--radius);
}

.ats-tool .upsell-card h3 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 1.25rem;
}

.ats-tool .upsell-card p {
  margin: 0 0 16px;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.55;
}

.ats-tool .upsell-cta {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  padding: 12px 22px;
  border-radius: 6px;
  font-weight: 600;
  transition: background 0.15s;
}

.ats-tool .upsell-cta:hover {
  background: #c97920;
}

/* ---- Responsive ---- */

@media (max-width: 600px) {
  .ats-tool { padding: 24px 16px; }
  .ats-tool .page-head h1 { font-size: 1.6rem; }
  .ats-tool .score-display { flex-direction: column; gap: 16px; text-align: center; }
  .ats-tool #score-ring { width: 120px; height: 120px; }
  .ats-tool #score-number { font-size: 2.5rem; }
  .ats-tool .email-form { flex-direction: column; }
  .ats-tool .email-form input[type="email"] { flex-basis: auto; }
  .ats-tool .detailed-locked { max-height: 240px; }
}
