/* ── Contact modal ──
   Self-contained styles for the JS-injected contact modal (js/contact-modal.js).
   Loaded on the standalone tool pages (ki-check, go-live-check) that don't include
   the main css/style.css. All CSS variables carry fallbacks so the modal renders
   correctly regardless of which page-level variables are defined. */
.vs-modal-open {
  overflow: hidden;
}

.vs-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.vs-modal[hidden] {
  display: none;
}

.vs-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  animation: vsModalFade 0.2s ease;
}

.vs-modal__card {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: #ffffff;
  border-radius: var(--radius-lg, 16px);
  box-shadow: 0 30px 80px rgba(60, 40, 20, 0.28), 0 8px 24px rgba(0, 0, 0, 0.12);
  animation: vsModalPop 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.vs-modal__close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: #757575;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 999px;
  transition: background var(--transition, 260ms ease-out), color var(--transition, 260ms ease-out);
}

.vs-modal__close:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #212121;
}

.vs-modal__body {
  padding: 40px 36px 36px;
}

.vs-modal__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.9rem;
  line-height: 1.15;
  color: #1c1a18;
  margin: 0 0 6px;
}

.vs-modal__sub {
  font-size: 0.9rem;
  color: var(--color-muted, #757575);
  margin: 0 0 22px;
}

.vs-modal__form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.vs-modal__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.vs-modal__field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.vs-modal__field label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #4a4540;
  letter-spacing: 0.01em;
}

.vs-modal__field input,
.vs-modal__field textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: var(--radius-sm, 10px);
  font: inherit;
  font-size: 0.95rem;
  color: #1c1a18;
  background: #faf8f6;
  transition: border-color var(--transition, 260ms ease-out), box-shadow var(--transition, 260ms ease-out);
}

.vs-modal__field textarea {
  resize: vertical;
  min-height: 76px;
}

.vs-modal__field input:focus,
.vs-modal__field textarea:focus {
  outline: none;
  border-color: var(--color-accent, #d32f2f);
  box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.12);
  background: #ffffff;
}

.vs-modal__consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #4a4540;
  margin-top: 2px;
  cursor: pointer;
}

.vs-modal__consent input {
  margin-top: 2px;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  accent-color: var(--color-accent, #d32f2f);
}

.vs-modal__consent a {
  color: var(--color-accent, #d32f2f);
  text-decoration: underline;
}

.vs-modal__error {
  background: #fff3f3;
  border: 1px solid rgba(211, 47, 47, 0.4);
  color: #a31f1f;
  padding: 10px 12px;
  border-radius: var(--radius-sm, 10px);
  font-size: 0.85rem;
}

.vs-modal__submit {
  margin-top: 6px;
  width: 100%;
  padding: 14px 20px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #d32f2f, #b71c1c);
  color: #ffffff;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: box-shadow var(--transition, 260ms ease-out), transform var(--transition, 260ms ease-out), opacity var(--transition, 260ms ease-out);
}

.vs-modal__submit:hover:not(:disabled) {
  box-shadow: 0 12px 40px rgba(211, 47, 47, 0.28);
  transform: translateY(-1px);
}

.vs-modal__submit:disabled {
  opacity: 0.65;
  cursor: default;
}

.vs-modal__success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 24px 0 8px;
}

.vs-modal__check {
  width: 76px;
  height: 76px;
  margin-bottom: 18px;
}

.vs-modal__check-circle {
  stroke: #1f9d64;
  stroke-width: 2.5;
  stroke-dasharray: 151;
  stroke-dashoffset: 151;
}

.vs-modal__check-mark {
  stroke: #1f9d64;
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
}

.vs-modal__check--play .vs-modal__check-circle {
  animation: vsCheckCircle 0.5s ease forwards;
}

.vs-modal__check--play .vs-modal__check-mark {
  animation: vsCheckMark 0.35s 0.45s ease forwards;
}

.vs-modal__success-text {
  font-size: 1.05rem;
  font-weight: 600;
  color: #1c1a18;
  margin: 0;
}

@keyframes vsModalFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes vsModalPop {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes vsCheckCircle {
  to { stroke-dashoffset: 0; }
}

@keyframes vsCheckMark {
  to { stroke-dashoffset: 0; }
}

@media (max-width: 520px) {
  .vs-modal__body {
    padding: 34px 22px 26px;
  }

  .vs-modal__row {
    grid-template-columns: 1fr;
  }

  .vs-modal__title {
    font-size: 1.6rem;
  }
}
