/* VisaSpecs — document-reference theme + spec-lookup widget styles.

   Palette comes from site.config.json (violet primary, crimson accent — a
   "spec sheet + verification stamp" feel, distinct from the sibling tools
   on this domain). The engine owns light/dark surfaces; we only style the
   widget and a few prose extras. */

/* ---------- lookup controls ------------------------------------------------ */
.vs-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1rem;
  align-items: end;
  margin: 1.1rem 0 1.2rem;
}
.vs-label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
}
.vs-label select,
.vs-label input {
  font: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.65rem;
  min-width: 11rem;
}
.vs-label select:focus,
.vs-label input:focus {
  outline: 2px solid color-mix(in srgb, var(--primary) 55%, transparent);
  outline-offset: 1px;
}
.vs-filter-label {
  flex: 1 1 14rem;
}
.vs-filter-label input {
  width: 100%;
  min-width: 0;
}

/* ---------- spec card ------------------------------------------------------ */
.vs-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    repeating-linear-gradient(0deg, transparent 0 23px, color-mix(in srgb, var(--primary) 7%, transparent) 23px 24px) border-box;
  padding: 1.15rem 1.25rem;
  margin: 0.4rem 0 1.4rem;
}
.vs-card-head {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.7rem;
}
.vs-card-title {
  margin: 0;
  font-size: 1.15rem;
}
.vs-flag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  border-radius: 999px;
  padding: 0.12rem 0.55rem;
  white-space: nowrap;
}
.vs-fields {
  display: grid;
  grid-template-columns: minmax(9.5rem, 12rem) 1fr;
  gap: 0.32rem 1rem;
  margin: 0;
  font-size: 0.93rem;
}
.vs-fields dt {
  color: var(--text-dim);
  font-weight: 600;
}
.vs-fields dd {
  margin: 0;
  font-weight: 550;
}
.vs-note {
  margin: 0.85rem 0 0;
  font-size: 0.9rem;
  color: var(--text-dim);
  border-left: 3px solid var(--accent);
  padding-left: 0.8rem;
}
.vs-src {
  margin: 0.85rem 0 0;
  padding-top: 0.7rem;
  border-top: 1px dashed var(--border);
  font-size: 0.82rem;
  color: var(--text-dim);
}
@media (max-width: 480px) {
  .vs-fields { grid-template-columns: 1fr; gap: 0 0; }
  .vs-fields dd { margin-bottom: 0.4rem; }
}

/* ---------- spec index ----------------------------------------------------- */
.vs-index-h {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-dim);
}
.vs-index {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
  gap: 0.55rem;
  margin: 0 0 0.8rem;
  padding: 0;
  list-style: none;
}
.vs-index-btn {
  display: flex;
  flex-direction: column;
  align-items: start;
  gap: 0.15rem;
  width: 100%;
  text-align: left;
  font: inherit;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.75rem;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}
.vs-index-btn:hover {
  border-color: color-mix(in srgb, var(--primary) 55%, var(--border));
  transform: translateY(-1px);
}
.vs-index-name {
  font-weight: 700;
  font-size: 0.92rem;
}
.vs-index-size {
  font-size: 0.8rem;
  color: var(--text-dim);
}
.vs-empty {
  color: var(--text-dim);
  font-size: 0.9rem;
}
.vs-stamp {
  font-size: 0.8rem;
  color: var(--text-dim);
  border-top: 1px solid var(--border);
  padding-top: 0.6rem;
  margin: 1rem 0 0.4rem;
}

/* ---------- converter ------------------------------------------------------ */
.vs-convert {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 1rem 1.15rem;
  margin: 1.2rem 0 1.6rem;
}
.vs-cv-title {
  margin: 0 0 0.7rem;
  font-size: 1rem;
}
.vs-cv-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1rem;
  align-items: end;
}
.vs-cv-row .vs-label input,
.vs-cv-row .vs-label select {
  min-width: 6.5rem;
}
.vs-cv-out {
  margin: 0.7rem 0 0;
  font-size: 0.9rem;
  font-family: var(--mono);
  color: var(--text);
  min-height: 1.4em;
}

/* ---------- prose extras (used inside markdown pages) ---------------------- */
.vs-callout {
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: calc(var(--radius) * 0.6);
  background: var(--surface);
  padding: 0.75rem 1rem;
  margin: 1.1rem 0;
  font-size: 0.92rem;
}
.vs-callout p {
  margin: 0;
}
.vs-cite {
  font-size: 0.82rem;
  color: var(--text-dim);
  border-top: 1px dashed var(--border);
  padding-top: 0.55rem;
  margin-top: 1.1rem;
}
