/* SkyyCast Bluesky Post Validator (/tools/bluesky-post-validator).
 *
 * Loaded by that page only, after assets/sc-public.css and
 * assets/sc-image-checker.css. The hero, tool shell, drop zone, buttons,
 * status badges, messages and supporting-content styles are reused from the
 * Image Size Checker's `ic-*` components; this file adds only the few
 * validator-specific `pv-*` pieces (editor, counters, image cards, check
 * rows, result banner). Everything is scoped under `.pub-site` and built from
 * the `--pub-*` tokens: no new fonts, nothing on :root/html/body. Status is
 * always conveyed by a text label and an icon, never by colour alone. */

.pub-site .pv-tool { display: grid; gap: 1.75rem; }

/* ---- Editor ---- */
.pub-site .pv-label {
  display: block;
  margin: 0 0 .5rem;
  font-size: 1.0625rem;
  font-weight: 800;
  color: var(--pub-text);
}
.pub-site .pv-textarea {
  display: block;
  width: 100%;
  min-height: 10rem;
  padding: .9rem 1rem;
  border: 1px solid var(--pub-border-strong);
  border-radius: var(--pub-radius-md);
  background: var(--pub-surface);
  color: var(--pub-text);
  font: inherit;
  font-size: 1.0625rem;
  line-height: 1.55;
  resize: vertical;
  box-sizing: border-box;
  transition: border-color var(--pub-dur-fast) var(--pub-ease), box-shadow var(--pub-dur-fast) var(--pub-ease);
}
.pub-site .pv-textarea::placeholder { color: var(--pub-text-muted); }
.pub-site .pv-textarea:hover { border-color: var(--pub-accent); }
.pub-site .pv-textarea:focus-visible { outline: none; border-color: var(--pub-accent); box-shadow: var(--pub-ring); }
.pub-site .pv-count-line {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1.25rem;
  margin: .6rem 0 0;
  font-size: .9375rem;
  font-weight: 700;
  color: var(--pub-text-secondary);
}
.pub-site .pv-count-line [data-over="true"] { color: var(--pub-danger); }
.pub-site .pv-hint { margin: .35rem 0 0; font-size: .875rem; line-height: 1.5; color: var(--pub-text-muted); }

/* ---- Images ---- */
.pub-site .pv-h2 {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .25rem .6rem;
  margin: 0 0 .75rem;
  font-size: 1.0625rem;
  font-weight: 800;
  color: var(--pub-text);
}
.pub-site .pv-h2 .pv-sub { font-size: .875rem; font-weight: 600; color: var(--pub-text-muted); }
.pub-site .pv-drop { padding: 1.25rem 1rem; }
.pub-site .pv-drop .ic-drop-icon { width: 44px; height: 44px; margin-bottom: .25rem; }
.pub-site .pv-drop .ic-drop-icon svg { width: 22px; height: 22px; }
.pub-site .pv-drop .ic-drop-title { font-size: 1.125rem; }
.pub-site .pv-images { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: .75rem; }
.pub-site .pv-images:empty { display: none; }
.pub-site .pv-image {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: .5rem 1rem;
  align-items: start;
  padding: .85rem;
  border: 1px solid var(--pub-border);
  border-radius: var(--pub-radius-md);
  background: var(--pub-surface);
  box-shadow: var(--pub-shadow-sm);
}
.pub-site .pv-thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: var(--pub-radius-sm, 8px);
  background: var(--pub-bg);
  border: 1px solid var(--pub-border);
}
.pub-site .pv-thumb-empty {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: var(--pub-radius-sm, 8px);
  background: var(--pub-bg);
  border: 1px dashed var(--pub-border-strong);
  color: var(--pub-text-muted);
  font-size: .75rem;
  font-weight: 700;
}
.pub-site .pv-image-body { min-width: 0; display: grid; gap: .3rem; }
.pub-site .pv-image-name { margin: 0; font-weight: 700; color: var(--pub-text); overflow-wrap: anywhere; }
.pub-site .pv-image-meta { margin: 0; font-size: .875rem; color: var(--pub-text-secondary); overflow-wrap: anywhere; }
.pub-site .pv-alt { grid-column: 1 / -1; display: grid; gap: .3rem; }
.pub-site .pv-alt label { font-size: .875rem; font-weight: 700; color: var(--pub-text); }
.pub-site .pv-alt input {
  width: 100%;
  min-height: 44px;
  padding: .5rem .75rem;
  border: 1px solid var(--pub-border-strong);
  border-radius: var(--pub-radius-md);
  background: var(--pub-surface);
  color: var(--pub-text);
  font: inherit;
  font-size: .9375rem;
  box-sizing: border-box;
}
.pub-site .pv-alt input:hover { border-color: var(--pub-accent); }
.pub-site .pv-alt input:focus-visible { outline: none; border-color: var(--pub-accent); box-shadow: var(--pub-ring); }
.pub-site .pv-remove { align-self: start; }

/* ---- Results ---- */
.pub-site .pv-results { display: grid; gap: 1rem; }
.pub-site .pv-results[hidden] { display: none; }
.pub-site .pv-groups { display: grid; gap: 1.25rem; }
.pub-site .pv-groups[hidden] { display: none; }
.pub-site .pv-group { display: grid; gap: .5rem; }
.pub-site .pv-group-title {
  margin: 0;
  font-size: .8125rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--pub-text-muted);
}
.pub-site .pv-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.pub-site .pv-check {
  display: grid;
  grid-template-columns: 4.25rem minmax(0, 1fr);
  gap: .5rem .75rem;
  align-items: start;
  padding: .65rem .85rem;
  border: 1px solid var(--pub-border);
  border-radius: var(--pub-radius-md);
  background: var(--pub-surface);
}
.pub-site .pv-check-text { margin: 0; color: var(--pub-text); font-size: .9375rem; line-height: 1.5; overflow-wrap: anywhere; }
.pub-site .pv-check-text small { display: block; margin-top: .2rem; color: var(--pub-text-secondary); font-size: .8125rem; line-height: 1.45; }
.pub-site .pv-check .ic-badge { justify-self: start; }
.pub-site .ic-badge[data-status="na"] { color: var(--pub-text-secondary); background: var(--pub-bg); border-color: var(--pub-border-strong); }
.pub-site .ic-badge[data-status="na"]::before { content: "i"; font-size: .7rem; font-style: italic; }

.pub-site .pv-result {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--pub-border-strong);
  border-left-width: 5px;
  border-radius: var(--pub-radius-md);
  background: var(--pub-bg);
}
.pub-site .pv-result::before { flex: none; font-size: 1.25rem; font-weight: 800; line-height: 1.3; content: "\2022"; }
.pub-site .pv-result strong { display: block; font-size: 1.125rem; letter-spacing: .02em; text-transform: uppercase; }
.pub-site .pv-result span { display: block; margin-top: .15rem; font-size: .9375rem; color: var(--pub-text-secondary); line-height: 1.45; }
.pub-site .pv-result[data-state="ready"] { background: #ECFDF5; border-color: #A7E3CB; border-left-color: var(--pub-success); }
.pub-site .pv-result[data-state="ready"]::before { content: "\2713"; color: var(--pub-success); }
.pub-site .pv-result[data-state="ready"] strong { color: var(--pub-success); }
.pub-site .pv-result[data-state="attention"] { background: #FFF5F5; border-color: #F2C7C7; border-left-color: var(--pub-danger); }
.pub-site .pv-result[data-state="attention"]::before { content: "\2715"; color: var(--pub-danger); }
.pub-site .pv-result[data-state="attention"] strong { color: var(--pub-danger); }
.pub-site .pv-result[data-state="idle"] strong { color: var(--pub-text); }
.pub-site .pv-result[data-state="idle"]::before { content: none; }
.pub-site .pv-disclaimer { margin: 0; font-size: .875rem; line-height: 1.55; color: var(--pub-text-muted); }
.pub-site .pv-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.pub-site .pv-copy-status { font-size: .9375rem; font-weight: 700; color: var(--pub-success); }
.pub-site .pv-copy-status:empty { display: none; }

@media (max-width: 640px) {
  .pub-site .pv-image { grid-template-columns: 56px minmax(0, 1fr); }
  .pub-site .pv-thumb, .pub-site .pv-thumb-empty { width: 56px; height: 56px; }
  .pub-site .pv-remove { grid-column: 1 / -1; width: 100%; }
  .pub-site .pv-check { grid-template-columns: minmax(0, 1fr); gap: .35rem; }
  .pub-site .pv-actions .ic-btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .pub-site .pv-textarea { transition: none; }
}
