/* Scam Shield tool — scoped styles. Uses the site palette tokens from style.css. */

.ss { max-width: 820px; }

.ss-notice {
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
  border-radius: var(--radius);
  padding: 14px 16px;
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 22px;
}

/* Tabs */
.ss-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 2px solid var(--line);
  margin-bottom: 22px;
}
.ss-tab {
  border: 0;
  background: transparent;
  padding: 12px 16px;
  font: inherit;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: color var(--transition), border-color var(--transition);
}
.ss-tab:hover { color: var(--brand); }
.ss-tab.is-active { color: var(--brand); border-bottom-color: var(--accent); }

.ss-panel { animation: ss-fade 0.2s ease; }
.ss-panel[hidden] { display: none; }
@keyframes ss-fade { from { opacity: 0; } to { opacity: 1; } }

/* Inputs */
.ss-textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  font: inherit;
  color: var(--text);
  resize: vertical;
  box-shadow: var(--shadow-sm);
}
.ss-textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(26, 63, 111, 0.15); }

.ss-actions { display: flex; gap: 10px; margin: 14px 0; flex-wrap: wrap; }

/* Result */
.ss-result { margin-top: 18px; }
.ss-band {
  border-radius: var(--radius);
  padding: 16px 18px;
  border: 1px solid var(--line);
}
/* Checklist read-out: a fixed-height box holding all three states stacked on top
   of each other (absolutely positioned). Ticking a box only flips data-level on
   the container; CSS shows the matching state. Nothing is created, written, or
   reflowed — so the page cannot move or flicker. */
#ss-checklist-score { position: relative; height: 150px; }
#ss-checklist-score .ss-band {
  position: absolute;
  inset: 0;
  box-sizing: border-box;
  overflow: auto;
  display: none;
  flex-direction: column;
  justify-content: center;
}
#ss-checklist-score[data-level="ok"]     .ss-band[data-band="ok"],
#ss-checklist-score[data-level="warn"]   .ss-band[data-band="warn"],
#ss-checklist-score[data-level="danger"] .ss-band[data-band="danger"] { display: flex; }
.ss-band-head { font-weight: 700; font-size: 1.05rem; margin: 0 0 6px; }
.ss-band.is-ok     { background: #effaf3; border-color: #b7e4c7; }
.ss-band.is-ok .ss-band-head     { color: #1b7a43; }
.ss-band.is-warn   { background: var(--warn-bg); border-color: var(--warn-line); }
.ss-band.is-warn .ss-band-head   { color: #b9770a; }
.ss-band.is-danger { background: #fdecec; border-color: #f1aeae; }
.ss-band.is-danger .ss-band-head { color: #c0392b; }

.ss-hits { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 12px; }
.ss-hits li {
  border-left: 4px solid var(--accent);
  background: var(--bg-soft);
  padding: 10px 14px;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.ss-phrases { color: var(--muted-light); font-weight: 400; }
.ss-why { color: var(--muted); font-size: 0.92rem; display: block; margin-top: 4px; }

.ss-foot-note { color: var(--muted-light); font-size: 0.85rem; margin-top: 16px; }

/* Checklist */
.ss-checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.ss-check-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 16px;
  box-shadow: var(--shadow-sm);
}
.ss-check-item label { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; cursor: pointer; }
.ss-check-item input { width: auto; margin-top: 3px; flex: none; }
.ss-check-item .ss-why { margin: 8px 0 0 26px; }

/* Verify tab */
.ss-verify { display: grid; gap: 14px; padding-left: 20px; }
.ss-verify code { background: var(--bg-soft); padding: 2px 6px; border-radius: 6px; }
.ss-links { display: block; margin-top: 6px; }
.ss-links a { font-weight: 600; }
.ss-subhead { margin: 22px 0 12px; font-size: 1.05rem; color: var(--brand); }

/* Reg-number format checker */
.ss-reg { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.ss-reg label { display: block; font-weight: 600; margin-bottom: 8px; }
.ss-reg-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-start; }
.ss-reg-input { flex: 1 1 220px; text-transform: uppercase; letter-spacing: .04em; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.ss-reg-row .btn { flex: none; margin-top: 4px; }
.ss-reg-result { margin-top: 12px; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--line); font-size: 0.95rem; }
.ss-reg-result code { background: var(--surface); padding: 2px 6px; border-radius: 6px; }
.ss-reg-result.is-ok  { background: #effaf3; border-color: #b7e4c7; }
.ss-reg-result.is-bad { background: #fdecec; border-color: #f1aeae; }

/* FAQ / SEO block */
.ss-faq { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.ss-faq h2 { font-size: 1.3rem; margin: 0 0 16px; }
.ss-faq details { border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 16px; margin-bottom: 10px; background: var(--surface); }
.ss-faq summary { cursor: pointer; font-weight: 600; padding: 12px 0; color: var(--brand); list-style-position: inside; }
.ss-faq summary:hover { color: var(--blue); }
.ss-faq details[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.ss-faq details p { color: var(--muted); margin: 0 0 12px; }
