/* ============================================================
   CONTACT FORM 7 — theme-matched styles
   Loaded separately via wp_enqueue_style (no build step needed).
   Mirrors design tokens from _variables.scss inline as values.
============================================================ */

/* ── Form wrapper ────────────────────────────────────────── */
.wpcf7 form {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

/* ── 2-column row for paired short fields ────────────────── */
.wpcf7 .cf7-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 600px) {
  .wpcf7 .cf7-row {
    grid-template-columns: 1fr;
  }
}

/* ── Labels fill their grid cell ─────────────────────────── */
.wpcf7 .cf7-row label {
  display: flex;
  flex-direction: column;
}
.wpcf7 .cf7-row .wpcf7-form-control-wrap,
.wpcf7 .cf7-row input {
  width: 100%;
}

/* ── Text inputs, email, tel, textarea, select ─────────── */
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="url"],
.wpcf7 input[type="number"],
.wpcf7 input[type="date"],
.wpcf7 textarea,
.wpcf7 select {
  display: block;
  width: 100%;
  padding: 0.4rem 0.75rem;
  font-size: 0.9375rem;
  color: rgba(0, 0, 0, .85);
  background: #ffffff;
  border: 1.5px solid #C2CDCB;
  border-radius: 6px;
  transition: border-color .2s ease, box-shadow .2s ease;
  margin-bottom: 0.75rem;
  appearance: none;
  -webkit-appearance: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  box-sizing: border-box;
}

.wpcf7 input[type="text"]:focus,
.wpcf7 input[type="email"]:focus,
.wpcf7 input[type="tel"]:focus,
.wpcf7 input[type="url"]:focus,
.wpcf7 input[type="number"]:focus,
.wpcf7 input[type="date"]:focus,
.wpcf7 textarea:focus,
.wpcf7 select:focus {
  outline: none;
  border-color: #015293;
  box-shadow: 0 0 0 3px rgba(1, 82, 147, .15);
}

.wpcf7 input[type="text"]::placeholder,
.wpcf7 input[type="email"]::placeholder,
.wpcf7 input[type="tel"]::placeholder,
.wpcf7 textarea::placeholder {
  color: #C2CDCB;
  opacity: 1;
}

/* ── Labels ──────────────────────────────────────────────── */
.wpcf7 label {
  display: block;
  font-family: "Host Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(0, 0, 0, .85);
  margin-bottom: 0.25rem;
}

/* ── Textarea ────────────────────────────────────────────── */
.wpcf7 textarea {
  min-height: 80px;
  resize: vertical;
}


/* ── Select ──────────────────────────────────────────────── */
.wpcf7 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='none' stroke='%23015293' stroke-width='2' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 3rem;
  cursor: pointer;
}

/* ── Checkboxes and radio buttons ───────────────────────── */
.wpcf7 .wpcf7-list-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.wpcf7 input[type="checkbox"],
.wpcf7 input[type="radio"] {
  width: 18px;
  height: 18px;
  accent-color: #015293;
  cursor: pointer;
  flex-shrink: 0;
  margin: 0;
}
.wpcf7 .wpcf7-list-item-label {
  font-size: 1rem;
  cursor: pointer;
}

/* ── Submit button ───────────────────────────────────────── */
.wpcf7 input[type="submit"] {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: #015293;
  color: #ffffff;
  border: 2px solid #015293;
  border-radius: 200px;
  font-family: "Host Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all .3s cubic-bezier(.455, .03, .515, .955);
  appearance: none;
  -webkit-appearance: none;
  margin-top: 0.5rem;
}
.wpcf7 input[type="submit"]:hover,
.wpcf7 input[type="submit"]:focus {
  background: #6DAB3C;
  border-color: #6DAB3C;
  color: #ffffff;
  outline: none;
}
.wpcf7 input[type="submit"]:disabled {
  opacity: .6;
  cursor: not-allowed;
}

/* ── Validation errors ───────────────────────────────────── */
.wpcf7 .wpcf7-not-valid {
  border-color: #c0392b !important;
  box-shadow: 0 0 0 3px rgba(192, 57, 43, .15) !important;
}
.wpcf7 .wpcf7-not-valid-tip {
  display: block;
  margin-top: -0.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.8125rem;
  color: #c0392b;
  font-weight: 600;
}

/* ── Response messages ───────────────────────────────────── */
.wpcf7 .wpcf7-response-output {
  margin-top: 1.5rem;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
}
.wpcf7.sent .wpcf7-response-output {
  background: #edf7ed;
  color: #1e4620;
  border-left: 4px solid #6DAB3C;
}
.wpcf7.invalid .wpcf7-response-output,
.wpcf7.unaccepted .wpcf7-response-output {
  background: #fdecea;
  color: #7f1d1d;
  border-left: 4px solid #c0392b;
}
.wpcf7.spam .wpcf7-response-output {
  background: #fff8e1;
  color: #78350f;
  border-left: 4px solid #f59e0b;
}

/* ── AJAX spinner ────────────────────────────────────────── */
.wpcf7 .ajax-loader {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #C2CDCB;
  border-top-color: #015293;
  border-radius: 50%;
  animation: wpcf7-spin .7s linear infinite;
  vertical-align: middle;
  margin-left: 0.5rem;
}
@keyframes wpcf7-spin {
  to { transform: rotate(360deg); }
}
