/* ============================================
   Contact Form 7 - Professional Form Styling
   KEI Dealer Site - Darker Text Color
   ============================================ */

/* Form Container */
.wpcf7 {
  display: block !important;
  width: 100% !important;
}

.wpcf7-form {
  display: flex !important;
  flex-direction: column !important;
  gap: 1.5rem !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Reset CF7 default form layout */
.wpcf7 form,
.wpcf7-form-control,
.wpcf7-response-output {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Form Control Wrappers - Add spacing */
.wpcf7-form-control-wrap {
  display: block !important;
  margin-bottom: 0 !important;
  margin-top: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

/* Text Inputs, Email, Tel, etc */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="date"],
.wpcf7-form-control.wpcf7-text input,
.wpcf7-form-control.wpcf7-email input,
.wpcf7-form-control.wpcf7-tel input,
.wpcf7-form-control.wpcf7-url input,
.wpcf7-form-control.wpcf7-number input,
.wpcf7-form-control input[type="text"],
.wpcf7-form-control input[type="email"],
.wpcf7-form-control input[type="tel"],
.wpcf7-form-control input[type="url"],
.wpcf7-form-control input[type="number"],
.wpcf7-form-control input[type="date"] {
  width: 100% !important;
  padding: 14px 18px !important;
  border-radius: 16px !important;
  border: 2px solid #cbd5e1 !important;
  background-color: #ffffff !important;
  color: #0f172a !important;
  font-size: 16px !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
  transition: all 0.2s ease !important;
  box-sizing: border-box !important;
  display: block !important;
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="tel"]::placeholder,
input[type="url"]::placeholder,
input[type="number"]::placeholder,
input[type="date"]::placeholder,
.wpcf7-form-control input[type="text"]::placeholder,
.wpcf7-form-control input[type="email"]::placeholder,
.wpcf7-form-control input[type="tel"]::placeholder,
.wpcf7-form-control input[type="url"]::placeholder,
.wpcf7-form-control input[type="number"]::placeholder,
.wpcf7-form-control input[type="date"]::placeholder {
  color: #64748b !important;
  opacity: 1 !important;
  font-size: 15px !important;
}

.wpcf7-form-control input:focus,
.wpcf7-form-control input[type="text"]:focus,
.wpcf7-form-control input[type="email"]:focus,
.wpcf7-form-control input[type="tel"]:focus,
.wpcf7-form-control input[type="url"]:focus,
.wpcf7-form-control input[type="number"]:focus,
.wpcf7-form-control input[type="date"]:focus {
  border-color: #FF6B6B !important;
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1) !important;
  outline: none !important;
}

/* Textarea */
textarea,
.wpcf7-form-control.wpcf7-textarea textarea,
.wpcf7-form-control textarea {
  width: 100% !important;
  padding: 24px 22px !important;
  border-radius: 16px !important;
  border: 2px solid #cbd5e1 !important;
  background-color: #ffffff !important;
  color: #0f172a !important;
  font-size: 16px !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
  transition: all 0.2s ease !important;
  min-height: 200px !important;
  resize: vertical !important;
  box-sizing: border-box !important;
  display: block !important;
  line-height: 2.2 !important;
}

.wpcf7-form-control textarea:focus {
  border-color: #FF6B6B !important;
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1) !important;
  outline: none !important;
}

textarea::placeholder,
.wpcf7-form-control textarea::placeholder {
  color: #64748b !important;
  opacity: 1 !important;
  font-size: 15px !important;
  line-height: 2.2 !important;
}

/* Select Dropdowns */
select,
.wpcf7-form-control.wpcf7-select select,
.wpcf7-form-control select {
  width: 100% !important;
  padding: 12px 22px !important;
  border-radius: 16px !important;
  border: 2px solid #cbd5e1 !important;
  background-color: #ffffff !important;
  color: #0f172a !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
  transition: all 0.2s ease !important;
  cursor: pointer !important;
  appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%230f172a' d='M6 9L1 4h10z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 16px center !important;
  padding-right: 48px !important;
  box-sizing: border-box !important;
  display: block !important;
  line-height: 2.4 !important;
  min-height: 56px !important;
}

select option,
.wpcf7-form-control select option {
  color: #0f172a !important;
  background-color: #ffffff !important;
  padding: 8px !important;
}

.wpcf7-form-control select:focus {
  border-color: #FF6B6B !important;
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1) !important;
  outline: none !important;
}

/* Checkboxes and Radio Buttons */
.wpcf7-form-control.wpcf7-checkbox label,
.wpcf7-form-control.wpcf7-radio label {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  cursor: pointer !important;
  margin-bottom: 10px !important;
  color: #0f172a !important;
  font-size: 14px !important;
  font-weight: 500 !important;
}

.wpcf7-form-control.wpcf7-checkbox input[type="checkbox"],
.wpcf7-form-control.wpcf7-radio input[type="radio"],
.wpcf7-form-control input[type="checkbox"],
.wpcf7-form-control input[type="radio"] {
  width: 22px !important;
  height: 22px !important;
  border: 2px solid #475569 !important;
  background-color: #ffffff !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  accent-color: #FF6B6B !important;
  flex-shrink: 0 !important;
}

.wpcf7-form-control input[type="checkbox"]:checked,
.wpcf7-form-control input[type="radio"]:checked {
  background-color: #FF6B6B !important;
  border-color: #FF6B6B !important;
  accent-color: #FF6B6B !important;
}

.wpcf7-form-control input[type="checkbox"]:focus,
.wpcf7-form-control input[type="radio"]:focus {
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1) !important;
  outline: none !important;
}

/* Acceptance (Privacy Policy) Checkbox */
.wpcf7-form-control.wpcf7-acceptance {
  margin-top: 1.5rem !important;
  padding-top: 1.5rem !important;
  border-top: 1px solid #e2e8f0 !important;
}

.wpcf7-form-control.wpcf7-acceptance label {
  display: flex !important;
  gap: 12px !important;
  align-items: flex-start !important;
  margin-bottom: 0 !important;
  color: #1e293b !important;
  font-size: 13px !important;
}

.wpcf7-form-control.wpcf7-acceptance input[type="checkbox"] {
  margin-top: 4px !important;
  width: 22px !important;
  height: 22px !important;
  border: 2px solid #475569 !important;
  background-color: #ffffff !important;
  border-radius: 6px !important;
  accent-color: #FF6B6B !important;
  cursor: pointer !important;
  flex-shrink: 0 !important;
}

/* Submit Button */
input[type="submit"],
.wpcf7-form-control.wpcf7-submit input,
.wpcf7-form-control.wpcf7-submit input[type="submit"] {
  width: 100% !important;
  padding: 14px 24px !important;
  background-color: #FF6B6B !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 16px !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3) !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
  letter-spacing: 0.5px !important;
}

.wpcf7-form-control.wpcf7-submit input:hover,
.wpcf7-form-control.wpcf7-submit input[type="submit"]:hover {
  background-color: #ff5252 !important;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15) !important;
}

.wpcf7-form-control.wpcf7-submit input:active,
.wpcf7-form-control.wpcf7-submit input[type="submit"]:active {
  background-color: #e63946 !important;
}

.wpcf7-form-control.wpcf7-submit input:disabled,
.wpcf7-form-control.wpcf7-submit input[type="submit"]:disabled {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
}

/* Form Messages */
.wpcf7-response-output {
  padding: 16px !important;
  border-radius: 8px !important;
  border: 2px solid !important;
  margin-top: 1.5rem !important;
  font-size: 14px !important;
}

.wpcf7-mail-sent-ok {
  border-color: #10b981 !important;
  background-color: #ecfdf5 !important;
  color: #065f46 !important;
}

.wpcf7-mail-sent-ng {
  border-color: #ef4444 !important;
  background-color: #fef2f2 !important;
  color: #7f1d1d !important;
}

.wpcf7-validation-errors {
  border-color: #f59e0b !important;
  background-color: #fffbeb !important;
  color: #92400e !important;
}

.wpcf7-spinner {
  display: none !important;
}

/* Validation Error Styling */
.wpcf7-form-control.wpcf7-invalid-tip {
  color: #ef4444 !important;
  font-size: 12px !important;
  margin-top: 4px !important;
  display: block !important;
}

/* Label styling */
.wpcf7-form label,
.wpcf7-form-control-wrap label {
  display: block !important;
  margin-bottom: 8px !important;
  font-weight: 600 !important;
  color: #1e293b !important;
  font-size: 14px !important;
  line-height: 1.4 !important;
  text-transform: none !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Ensure label text inside form-control-wrap is visible */
.wpcf7-form-control-wrap>label {
  margin-bottom: 8px !important;
}

/* Remove CF7 default spacing */
.wpcf7 .wpcf7-form-control {
  margin-bottom: 0 !important;
  padding: 10px !important;
  color: rgb(71 85 105 / var(--tw-text-opacity, 1)) !important;
}

.wpcf7-list-item-label,
.wpcf7-response-output {
  color: rgb(71 85 105 / var(--tw-text-opacity, 1)) !important;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .wpcf7-form {
    gap: 1rem !important;
  }

  .wpcf7-form-control input[type="text"],
  .wpcf7-form-control input[type="email"],
  .wpcf7-form-control input[type="tel"],
  .wpcf7-form-control input[type="url"],
  .wpcf7-form-control input[type="number"],
  .wpcf7-form-control textarea,
  .wpcf7-form-control select {
    padding: 10px 12px !important;
    font-size: 16px !important;
  }
}