/* Submission form */
.submit-form {
  display: grid;
  gap: 16px;
  max-width: 560px;
  background: rgba(255,255,255,0.96);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--card-shadow);
  margin-top: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field > span {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
}
.field > span em {
  color: #ef4444;
  font-style: normal;
  margin-left: 2px;
}
.field .hint {
  color: var(--muted);
  font-size: 12px;
}

.field input,
.field select {
  width: 100%;
  padding: 14px;
  font: inherit;
  font-size: 16px;             /* >=16px prevents iOS Safari zoom-on-focus */
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
  -webkit-appearance: none;
  appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 12px 8px;
  padding-right: 38px;
}
.field input:focus,
.field select:focus {
  border-color: rgba(59,130,246,0.55);
  box-shadow: 0 0 0 4px rgba(59,130,246,0.12);
}
.field input:invalid:not(:placeholder-shown),
.field select:invalid {
  /* don't shout while typing */
}

.primary-btn {
  background: linear-gradient(135deg, #111827, #374151);
  color: #fff;
  border: none;
  padding: 14px 18px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 14px;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, opacity .2s ease;
  box-shadow: 0 10px 18px rgba(17,24,39,0.14);
}
.primary-btn:hover { transform: translateY(-1px); }
.primary-btn:active { transform: translateY(0); }
.primary-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f3f6fb;
  color: var(--text);
  border: 1px solid var(--line);
  padding: 13px 18px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 14px;
  cursor: pointer;
  text-decoration: none;
}
.ghost-btn:hover { background: #e8edf5; }

.form-status {
  font-size: 14px;
  font-weight: 600;
  min-height: 1.2em;
  white-space: pre-line;
}
.form-status.error   { color: #b91c1c; }
.form-status.success { color: #15803d; }
.form-status.info    { color: #1d4ed8; }

/* Thank you */
.thankyou-card {
  max-width: 560px;
  background: linear-gradient(180deg, #ffffff, #f0fdf4);
  border: 1px solid #bbf7d0;
  border-radius: 20px;
  padding: 32px;
  text-align: center;
  box-shadow: var(--card-shadow);
  margin-top: 12px;
}
.thankyou-card h2 {
  margin: 6px 0 8px;
  font-size: 26px;
  letter-spacing: -0.02em;
}
.thankyou-check {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #16a34a, #4ade80);
  color: #fff;
  font-size: 40px;
  font-weight: 800;
  display: grid;
  place-items: center;
  margin: 0 auto 8px;
  box-shadow: 0 12px 24px rgba(22,163,74,0.30);
}
.thankyou-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 18px;
}

/* Mobile tweaks (on top of the existing breakpoints in styles.css) */
@media (max-width: 640px) {
  .submit-form { padding: 18px; border-radius: 16px; }
  .thankyou-card { padding: 24px; }
  .thankyou-check { width: 60px; height: 60px; font-size: 32px; }
  .field input, .field select { padding: 12px; }
  .topbar .back-link { font-size: 13px; padding: 6px 10px; }
}
