/* Shared visual primitives for the VerseNotes Scripture tool family. */

:root {
  --vt-primary: #400561;
  --vt-accent: #7c3626;
  --vt-text: #251f28;
  --vt-muted: #6b626d;
  --vt-paper: #ffffff;
  --vt-surface: #fffff8;
  --vt-border: rgba(64, 5, 97, 0.18);
  --vt-shadow: 0 14px 40px rgba(45, 28, 48, 0.12);
  --vt-serif: Georgia, "Times New Roman", serif;
  --vt-sans: Arial, Helvetica, sans-serif;
}

.vt-shell,
.vt-shell * {
  box-sizing: border-box;
}

.vt-shell {
  width: min(100% - 2rem, 52rem);
  margin: 2.5rem auto 4rem;
  padding: clamp(1.25rem, 4vw, 2.5rem);
  border: 1px solid var(--vt-border);
  border-radius: 1rem;
  background: var(--vt-surface);
  box-shadow: var(--vt-shadow);
  color: var(--vt-text);
  font-family: var(--vt-serif);
}

.vt-header {
  padding-bottom: 1.1rem;
  border-bottom: 2px solid var(--vt-primary);
}

.vt-kicker,
.vt-section-heading,
.vt-field > span,
.vt-field > label,
.vt-label {
  color: var(--vt-muted);
  font-family: var(--vt-sans);
  font-weight: 700;
}

.vt-kicker,
.vt-section-heading {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  line-height: 1.2;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.vt-title {
  margin: 0;
  color: var(--vt-primary);
  font-size: clamp(2rem, 6vw, 3rem);
  line-height: 1;
}

.vt-intro {
  max-width: 39rem;
  margin: 0.75rem 0 0;
  color: var(--vt-muted);
  font-size: 1rem;
  line-height: 1.5;
}

.vt-section {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--vt-border);
}

.vt-card {
  padding: 1rem;
  border: 1px solid var(--vt-border);
  border-radius: 0.75rem;
  background: var(--vt-paper);
}

.vt-control-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: 0.85rem;
}

.vt-field {
  display: grid;
  align-content: start;
  gap: 0.35rem;
  margin: 0;
}

.vt-field > span,
.vt-field > label,
.vt-label {
  font-size: 0.76rem;
  line-height: 1.2;
}

.vt-input,
.vt-field input,
.vt-field textarea,
.vt-field select {
  width: 100%;
  min-height: 2.75rem;
  margin: 0;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--vt-border);
  border-radius: 0.45rem;
  background-color: var(--vt-paper);
  color: var(--vt-text);
  font: 400 1rem/1.3 var(--vt-sans);
}

.vt-field textarea {
  min-height: 7rem;
  resize: vertical;
}

.vt-field select {
  padding-right: 2rem;
}

.vt-input:focus-visible,
.vt-field input:focus-visible,
.vt-field textarea:focus-visible,
.vt-field select:focus-visible,
.vt-button:focus-visible,
.vt-segmented input:focus-visible + span {
  outline: 3px solid var(--vt-primary);
  outline-offset: 2px;
}

.vt-hint,
.vt-status {
  margin: 0;
  color: var(--vt-muted);
  font: 400 0.84rem/1.45 var(--vt-sans);
}

.vt-segmented {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 0.4rem;
}

.vt-segmented label {
  position: relative;
  margin: 0;
  cursor: pointer;
}

.vt-segmented input {
  position: absolute;
  opacity: 0;
}

.vt-segmented span {
  display: grid;
  min-height: 2.75rem;
  padding: 0.55rem 0.7rem;
  place-items: center;
  border: 1px solid var(--vt-border);
  border-radius: 0.45rem;
  background: var(--vt-paper);
  color: var(--vt-text);
  font: 700 0.86rem/1.25 var(--vt-sans);
  text-align: center;
}

.vt-segmented input:checked + span {
  border-color: var(--vt-primary);
  background: var(--vt-primary);
  color: #ffffff;
}

.vt-button {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1rem;
  border: 2px solid var(--vt-primary);
  border-radius: 0.45rem;
  background: var(--vt-primary);
  color: #ffffff;
  font: 700 0.9rem/1.2 var(--vt-sans);
  cursor: pointer;
}

.vt-button:hover {
  background: var(--vt-accent);
  border-color: var(--vt-accent);
}

.vt-button--secondary {
  background: transparent;
  color: var(--vt-primary);
}

.vt-warning {
  margin: 0.7rem 0 0;
  padding: 0.7rem 0.8rem;
  border-left: 4px solid var(--vt-accent);
  background: rgba(124, 54, 38, 0.08);
  color: var(--vt-accent);
  font: 700 0.84rem/1.4 var(--vt-sans);
}

.vt-preview-frame {
  overflow: hidden;
  border: 1px solid var(--vt-border);
  border-radius: 0.6rem;
  background: #ffffff;
}

.vt-callout {
  box-sizing: border-box;
  width: min(100% - 2rem, 52rem);
  margin: -1.5rem auto 4rem;
  padding: clamp(1.25rem, 4vw, 2rem);
  border-left: 4px solid var(--vt-accent);
  background: rgba(64, 5, 97, 0.04);
  color: var(--vt-text);
  font-family: var(--vt-serif);
}

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

@media (max-width: 35rem) {
  .vt-shell {
    width: min(100% - 1rem, 52rem);
    margin-top: 1rem;
    border-radius: 0.75rem;
  }

  .vt-callout {
    width: min(100% - 1rem, 52rem);
  }
}
