/* TwinPegs Contact Form. Uses the TwinPegs theme's colours and type when present, and plain fallbacks otherwise. */

.tpc {
  --tpc-ink: var(--ink, #161514);
  --tpc-line: var(--bone-line, #cfcabd);
  --tpc-white: var(--white, #ffffff);
  --tpc-gold: var(--gold, #d7b46a);
  --tpc-red: var(--red, #c2301c);
  --tpc-muted: var(--muted, #55514a);
  --tpc-display: var(--display, "Arial Narrow", sans-serif);
  --tpc-text: var(--text, Arial, sans-serif);
  display: grid; gap: 18px; max-width: 760px; margin-top: 28px; color: var(--tpc-ink);
}
.tpc p { margin: 0; }
.tpc-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.tpc-field { display: grid; gap: 8px; min-width: 0; }
.tpc-field label { font: 600 0.9375rem/1 var(--tpc-display); letter-spacing: 0.1em; text-transform: uppercase; }

.tpc input[type="text"], .tpc input[type="email"], .tpc textarea {
  width: 100%; box-sizing: border-box;
  font: 500 1.125rem/1.4 var(--tpc-text); color: var(--tpc-ink);
  background: var(--tpc-white); border: 2px solid var(--tpc-ink); border-radius: 2px;
  padding: 0 16px; height: 58px;
}
.tpc textarea { height: auto; min-height: 180px; padding: 14px 16px; resize: vertical; }
.tpc input:focus-visible, .tpc textarea:focus-visible, .tpc-send:focus-visible { outline: 3px solid var(--tpc-ink); outline-offset: 3px; }
.tpc [aria-invalid="true"] { border-color: var(--tpc-red); box-shadow: 0 0 0 2px var(--tpc-red); }

/* The field people never see. */
.tpc-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.tpc .cf-turnstile { min-height: 65px; }

.tpc-send {
  min-height: 58px; padding: 4px 34px 0; cursor: pointer;
  font: 700 1.375rem/1 var(--tpc-display); letter-spacing: 0.05em; text-transform: uppercase;
  background: var(--tpc-gold); color: var(--tpc-ink); border: 2px solid var(--tpc-ink); border-radius: 2px;
  transition: background-color 0.2s, color 0.2s;
}
.tpc-send:hover:not(:disabled) { background: var(--tpc-ink); color: var(--tpc-gold); }
.tpc-send:disabled { opacity: 0.6; cursor: progress; }

.tpc-status:empty { display: none; }
.tpc-error { display: grid; grid-template-columns: 18px 1fr; gap: 10px; color: var(--tpc-red); font-weight: 600; font-size: 1rem; line-height: 1.4; }
.tpc-error::before { content: ""; width: 14px; height: 13px; margin-top: 0.3em; background: var(--tpc-red); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.tpc-done { padding: 14px 16px; background: var(--tpc-ink); color: var(--tpc-white); font-weight: 600; font-size: 1rem; line-height: 1.4; }

@media (max-width: 620px) {
  .tpc-row { grid-template-columns: 1fr; }
  .tpc-send { width: 100%; }
}
