/* Scoped wrapper */
.fd-lead-form{
  --fd-bg:#0f2f24;          /* dark green */
  --fd-card:#0b241b;        /* deeper green */
  --fd-ink:#f3fbf7;         /* near-white */
  --fd-muted:rgba(243,251,247,.78);
  --fd-line:rgba(243,251,247,.18);
  --fd-radius:18px;
  --fd-pad:clamp(16px,2.5vw,26px);
  --fd-shadow:0 14px 40px rgba(0,0,0,.25);

  max-width: 760px;
  width: min(760px, 92vw);
  margin: 0 auto;
  background: var(--fd-bg);
  border-radius: var(--fd-radius);
  padding: var(--fd-pad);
  box-shadow: var(--fd-shadow);
  color: var(--fd-ink);
}

/* CF7 response output (don’t let themes hide this) */
.fd-lead-form .wpcf7-response-output{
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--fd-line);
  color: var(--fd-ink);
}

/* Rows/columns */
.fd-lead-form .fd-row{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}
.fd-lead-form .fd-col{ min-width:0; }
.fd-lead-form .fd-col-full{ grid-column: 1 / -1; }

/* Labels */
.fd-lead-form label{
  display:block;
  font-weight: 650;
  margin: 0 0 8px;
  color: var(--fd-ink);
}

/* Inputs */
.fd-lead-form input[type="text"],
.fd-lead-form input[type="email"],
.fd-lead-form input[type="tel"],
.fd-lead-form input[type="file"],
.fd-lead-form select,
.fd-lead-form textarea{
  width:100%;
  box-sizing:border-box;
  background: var(--fd-card);
  color: var(--fd-ink);
  border: 1px solid var(--fd-line);
  border-radius: 14px;
  padding: 12px 12px;
  outline: none;
}

/* Placeholder */
.fd-lead-form input::placeholder,
.fd-lead-form textarea::placeholder{
  color: rgba(243,251,247,.55);
}

/* Select arrow spacing */
.fd-lead-form select{ padding-right: 34px; }

/* Textarea */
.fd-lead-form textarea{ min-height: 140px; resize: vertical; }

/* Help text */
.fd-lead-form .fd-help{
  display:block;
  margin-top: 6px;
  color: var(--fd-muted);
  font-size: 0.92rem;
}

/* Submit button */
.fd-lead-form .fd-actions{ margin-top: 8px; }
.fd-lead-form .fd-submit{
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 14px 16px;
  font-weight: 750;
  cursor: pointer;
  background: #8dc63f; /* foliage green */
  color: #0b241b;
}
.fd-lead-form .fd-submit:hover{ filter: brightness(1.03); }

/* Field errors */
.fd-lead-form .wpcf7-not-valid-tip{
  margin-top: 6px;
  color: #ffd1d1;
  font-size: 0.95rem;
}

/* Honeypot: visually hidden */
.fd-lead-form .fd-hp{
  position:absolute;
  left:-9999px;
  top:auto;
  width:1px;
  height:1px;
  overflow:hidden;
}

/* Mobile */
@media (max-width: 780px){
  .fd-lead-form .fd-row{ grid-template-columns: 1fr; }
}

.cf7-hp-wrap {
  position: absolute !important;
  left: -9999px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.cf7-hp-label {
  display: block;
}

/* ============================================================
   BD Holiday Brochure Form — scoped under .bdhf-form
   All authored classes use the bdhf- prefix to avoid collisions
   with theme / Contact Form 7 global .wpcf7-* rules.

   CF7-generated classes (.wpcf7-checkbox, .wpcf7-list-item,
   .wpcf7-not-valid-tip, .wpcf7-response-output) cannot be
   renamed, so they are scoped under .bdhf-form to isolate them.

   Brand colors:
     #2a2a2a  — charcoal
     #8dc63f  — botanical green
   ============================================================ */


/* ---------- Form wrapper ---------- */

.bdhf-form {
  background-color: #2a2a2a;
  padding: 40px;
  border-radius: 6px;
  color: #ffffff;
}


/* ---------- Row layout ---------- */

.bdhf-form .bdhf-row {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.bdhf-form .bdhf-col {
  flex: 1;
  min-width: 0;
}

.bdhf-form .bdhf-row-hidden {
  display: none;
}


/* ---------- Labels ---------- */

.bdhf-form .bdhf-label {
  display: block;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 8px;
}


/* ---------- Text inputs, email, phone, textarea, select ---------- */

.bdhf-form input[type="text"],
.bdhf-form input[type="email"],
.bdhf-form input[type="tel"],
.bdhf-form textarea,
.bdhf-form select {
  width: 100%;
  background: #ffffff;
  color: #2a2a2a;
  border: 2px solid transparent;
  border-radius: 4px;
  padding: 10px 14px;
  font-size: 15px;
  box-sizing: border-box;
  transition: border-color 0.2s ease;
}

.bdhf-form input[type="text"]:focus,
.bdhf-form input[type="email"]:focus,
.bdhf-form input[type="tel"]:focus,
.bdhf-form textarea:focus,
.bdhf-form select:focus {
  outline: none;
  border-color: #8dc63f;
}

.bdhf-form textarea {
  min-height: 120px;
  resize: vertical;
}


/* ---------- Select dropdowns (branch, current-client) ---------- */

.bdhf-form select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath fill='%232a2a2a' d='M6 7L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
  cursor: pointer;
}


/* ---------- Checkboxes (services) ---------- */
/* This theme HIDES the native checkbox and fakes one with :before (the box)
   and :after (the outline ring). So we override those pseudo-elements directly,
   all scoped under .bdhf-form so no other form on the site is affected. */

.bdhf-form .wpcf7-checkbox {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 8px;
}

/* The single white card */
.bdhf-form .wpcf7-checkbox .wpcf7-list-item {
  background: #ffffff;
  border-radius: 4px;
  padding: 10px 12px;
  margin: 0;
  flex-basis: auto;       /* cancel theme's calc() flex-basis */
  box-sizing: border-box;
}

/* Flatten the theme's inner label box so there's ONE clean card, not two */
.bdhf-form .wpcf7-checkbox .wpcf7-list-item label {
  display: flex;
  align-items: flex-start;
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
  cursor: pointer;
}

/* Kill the thin outline ring (the theme's :after element) */
.bdhf-form .wpcf7-checkbox input[type="checkbox"] + span:after {
  display: none !important;
}

/* Recolor the fake checkbox to BD green when checked (theme used #857a18) */
.bdhf-form .wpcf7-checkbox input[type="checkbox"]:checked + span:before {
  background-color: #8dc63f !important;
  border-color: #8dc63f !important;
}

/* Let long labels wrap cleanly inside the card */
.bdhf-form .wpcf7-checkbox .wpcf7-list-item-label {
  display: inline;
  color: #2a2a2a;
  font-size: 13px;
  line-height: 1.3 !important;     /* theme forces line-height:1, too cramped */
  white-space: normal !important;
  word-break: break-word;
  min-width: 0;
}


/* ---------- Submit button ---------- */

.bdhf-form input[type="submit"] {
  background-color: #8dc63f;
  color: #2a2a2a;
  border: 2px solid #8dc63f;
  border-radius: 4px;
  padding: 13px 16px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.bdhf-form input[type="submit"]:hover {
  background-color: #ffffff;
  color: #2a2a2a;
  border-color: #ffffff;
}


/* ---------- Validation & response messages ---------- */
/* .wpcf7-not-valid-tip / .wpcf7-response-output are CF7-generated. */

.bdhf-form .wpcf7-not-valid-tip {
  color: #ff7070;
  font-size: 12px;
  margin-top: 4px;
  display: block;
}

.bdhf-form .wpcf7-response-output {
  border: 2px solid #8dc63f;
  background-color: rgba(141, 198, 63, 0.12);
  color: #ffffff;
  border-radius: 4px;
  padding: 12px 16px;
  margin-top: 16px;
  font-size: 14px;
}


/* ---------- Mobile ---------- */

@media (max-width: 640px) {
  .bdhf-form {
    padding: 24px 16px;
  }

  .bdhf-form .bdhf-row {
    flex-direction: column;
    gap: 0;
  }

  .bdhf-form .wpcf7-checkbox {
    grid-template-columns: repeat(2, 1fr);
  }
}
