/* Contact Form 7 Checkbox Card Grid */
.cf7-custom-checkboxes .wpcf7-checkbox {
  display: grid !important;
  grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
  gap: 0.625rem !important;
}

@media (min-width: 640px) {
  .cf7-custom-checkboxes .wpcf7-checkbox {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

/* Checkbox item card container */
.cf7-custom-checkboxes .wpcf7-list-item {
  margin: 0 !important;
  display: block !important;
}

.cf7-custom-checkboxes .wpcf7-list-item label {
  display: flex !important;
  align-items: center !important;
  padding: 0.75rem 1rem !important;
  background-color: #FAFAFC !important;
  border: 1px solid #E2E8F0 !important;
  border-radius: 0.75rem !important;
  cursor: pointer !important;
  transition: all 0.2s ease-in-out !important;
  margin: 0 !important;
}

.cf7-custom-checkboxes .wpcf7-list-item label:hover {
  background-color: #F1F5F9 !important;
  border-color: #CBD5E1 !important;
}

/* Highlight card when checked */
.cf7-custom-checkboxes .wpcf7-list-item input[type="checkbox"]:checked + .wpcf7-list-item-label {
  color: #047857 !important;
  font-weight: 700 !important;
}

.cf7-custom-checkboxes .wpcf7-list-item label:has(input[type="checkbox"]:checked) {
  background-color: #ECFDF5 !important;
  border-color: #A7F3D0 !important;
}

/* Checkbox control sizing & brand tint */
.cf7-custom-checkboxes input[type="checkbox"] {
  appearance: auto;
  accent-color: #059669;
  width: 1.1rem !important;
  height: 1.1rem !important;
  margin-right: 0.65rem !important;
  cursor: pointer;
}

.cf7-custom-checkboxes .wpcf7-list-item-label {
  font-size: 0.8125rem !important;
  font-weight: 600 !important;
  color: #334155 !important;
  user-select: none;
}

/* Prevent CF7 spinner from breaking flex layouts */
.wpcf7-spinner {
  position: absolute !important;
  margin: 0 !important;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
}

/* Ensure the submit container or button acts as relative anchor */
.wpcf7-submit {
  position: relative;
}