/* ==========================================================================
   Contact Form 7 skin  ->  Cacao Boys `cb-` system
   Loaded on the Contact and Wholesale pages. CF7 owns the markup + the lead
   routing (we never touch the plugin); this only restyles its predictable
   output. Everything is scoped under .cb-cf7 (the wrapper we print around the
   [contact-form-7] shortcode) so no other CF7 instance is affected.
   ========================================================================== */

.cb-cf7 { width: 100%; }

/* Layout: stack fields with a comfortable rhythm. CF7's default markup wraps
   each control in a <p>; we neutralise the paragraph spacing and drive gaps
   from the form itself. */
.cb-cf7 .wpcf7-form > p { margin: 0 0 1.1rem; }
.cb-cf7 .wpcf7-form > p:last-of-type { margin-bottom: 0; }

.cb-cf7 label {
  display: block;
  font-size: var(--cb-text-sm);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--cb-text);
  line-height: 1.5;
}

/* Text-like controls. */
.cb-cf7 input[type="text"],
.cb-cf7 input[type="email"],
.cb-cf7 input[type="tel"],
.cb-cf7 input[type="url"],
.cb-cf7 input[type="number"],
.cb-cf7 input[type="date"],
.cb-cf7 select,
.cb-cf7 textarea {
  width: 100%;
  margin-top: 0.4rem;
  padding: 0.7rem 0.9rem;
  font: inherit;
  font-size: var(--cb-text-base);
  color: var(--cb-text);
  background: var(--cb-surface, #fff);
  border: 1px solid var(--cb-border, rgba(60, 40, 30, 0.18));
  border-radius: var(--cb-radius-md, 0.75rem);
  box-shadow: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.cb-cf7 textarea { min-height: 8rem; resize: vertical; }

.cb-cf7 input:focus,
.cb-cf7 select:focus,
.cb-cf7 textarea:focus {
  outline: none;
  border-color: var(--cb-caramel, #a9743f);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--cb-caramel, #a9743f) 22%, transparent);
}

.cb-cf7 input::placeholder,
.cb-cf7 textarea::placeholder { color: var(--cb-text-muted); opacity: 0.7; }

/* Submit -> pill button matching .cb-btn. */
.cb-cf7 input[type="submit"],
.cb-cf7 button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.4rem;
  padding: 0.85rem 1.8rem;
  font: inherit;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--cb-cream, #f7efe3);
  background: var(--cb-cocoa, #2c1c14);
  border: 1px solid var(--cb-cocoa, #2c1c14);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
}
.cb-cf7 input[type="submit"]:hover,
.cb-cf7 button[type="submit"]:hover {
  background: color-mix(in srgb, var(--cb-cocoa, #2c1c14) 88%, #000);
}
.cb-cf7 input[type="submit"]:active,
.cb-cf7 button[type="submit"]:active { transform: translateY(1px); }

/* CF7's AJAX spinner sits inline next to the button. */
.cb-cf7 .wpcf7-spinner { margin: 0 0 0 0.75rem; }

/* Response + validation states. */
.cb-cf7 .wpcf7-response-output {
  margin: 1.25rem 0 0;
  padding: 0.85rem 1.1rem;
  border-radius: var(--cb-radius-md, 0.75rem);
  font-size: var(--cb-text-sm);
  line-height: 1.5;
}
.cb-cf7 form.sent .wpcf7-response-output {
  border: 1px solid color-mix(in srgb, #2e7d5b 45%, transparent);
  background: color-mix(in srgb, #2e7d5b 12%, transparent);
  color: #1f5c42;
}
.cb-cf7 form.invalid .wpcf7-response-output,
.cb-cf7 form.failed .wpcf7-response-output,
.cb-cf7 form.spam .wpcf7-response-output {
  border: 1px solid color-mix(in srgb, #b3402f 45%, transparent);
  background: color-mix(in srgb, #b3402f 10%, transparent);
  color: #8f2f22;
}
.cb-cf7 .wpcf7-not-valid-tip {
  display: block;
  margin-top: 0.35rem;
  font-size: var(--cb-text-xs, 0.8rem);
  color: #8f2f22;
}
.cb-cf7 .wpcf7-not-valid { border-color: #b3402f; }
