/* Contact Form Section Styles */
.contact-form-section {
  width: 100%;
  padding: 6rem 2rem; /* py-24 px-8 */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  gap: 4rem; /* gap-16 */
  background: var(--Tertiary-100, #F6E0DF);
}

.contact-form-section-container {
  width: 100%;
  max-width: 1368px; /* 2 * 684px */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  gap: 4rem; /* gap-16 */
}

/* Heading */
.contact-form-heading {
  width: 100%;
  max-width: 684px;
  display: flex;
  justify-content: center;
  align-items: baseline;
  line-height: 1;
  gap: 0.5rem;
  margin: 0 auto;
}

.heading-part-1 {
  color: var(--Primary-100, #680144);
  font-family: "DM Sans", sans-serif;
  font-size: 3rem; /* text-5xl = 48px */
  font-weight: 400;
  line-height: 67.2px;
}

.heading-part-2 {
  color: var(--Primary-100, #680144);
  font-family: "Calluna", "Playfair Display", serif;
  font-size: 3rem; /* text-5xl = 48px */
  font-weight: 400;
  font-style: italic;
  line-height: 57.2px;
}

/* Form Wrapper */
.contact-form-wrapper {
  width: 70%;
  max-width: 1368px;
  height: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  gap: 4rem; /* gap-16 */
  overflow: visible;
  margin: 0 auto;
}

/* Contact Form 7 Custom Styling */
.contact-form-section .wpcf7-form {
  width: 100%;
  height: auto;
  display: flex;
  flex-direction: column;
  gap: 2rem; /* gap-8 */
  margin: 0 auto;
  align-items: stretch;
}

.contact-form-section .wpcf7-form-control-wrap {
  width: 100%;
}

/* Two Column Layout - Using CSS Grid for CF7 forms */
.contact-form-section .wpcf7-form > p {
  margin: 0;
  padding: 0;
}

/* Single column layout - no grid needed */
.contact-form-section .wpcf7-form {
  display: flex;
  flex-direction: column;
  gap: 0;
  align-items: stretch;
  justify-content: flex-start;
  max-width: 100%;
  margin: 0 auto;
}

/* For forms that need full width fields */
.contact-form-section .wpcf7-form > p.form-field-full-width {
  width: 100%;
}

/* Form columns wrapper for manual layout - single column */
.contact-form-section .form-columns-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  gap: 0;
  min-height: auto;
  height: auto;
  margin: 0 auto;
}

.contact-form-section .form-columns-wrapper .form-submit-wrapper {
  margin-top: 1.5rem;
  width: 100%;
  flex-shrink: 0;
}

.contact-form-section .form-column-left,
.contact-form-section .form-column-right {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  gap: 0;
}

/* Form Row - for side-by-side fields */
.contact-form-section .form-row {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem; /* gap-6 */
  width: 100%;
  margin-bottom: 0;
}

.contact-form-section .form-field {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: auto;
  height: auto;
  margin-bottom: 1.5rem;
}

.contact-form-section .form-field.full-width {
  width: 100%;
  flex: none;
}

/* Field Labels */
.contact-form-section .wpcf7-form label,
.contact-form-section .form-label,
.contact-form-section .form-field > label {
  display: block;
  width: 100%;
  color: var(--Primary-100, #680144);
  font-family: "DM Sans", sans-serif;
  font-size: 1.125rem; /* text-lg */
  font-weight: 400;
  line-height: 1.5rem; /* leading-6 */
  margin-bottom: 0.5rem;
  margin-top: 0;
}

.contact-form-section .form-label .required,
.contact-form-section .wpcf7-required {
  color: var(--Primary-100, #680144);
}

/* Field Wrapper */
.contact-form-section .wpcf7-form-control-wrap {
  display: block;
  width: 100%;
  margin-top: 0.5rem;
  margin-bottom: 0;
}

/* Input Fields */
.contact-form-section .wpcf7-form-control {
  width: 100%;
  height: 3rem; /* h-12 */
  padding: 0.75rem; /* p-3 */
  border: none !important;
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
  border-bottom: 1px solid var(--Primary-100, #680144) !important;
  border-radius: 0 !important;
  background: transparent;
  color: var(--Primary-100, #680144);
  font-family: "DM Sans", sans-serif;
  font-size: 1.125rem; /* text-lg */
  font-weight: 400;
  line-height: 1.5rem; /* leading-6 */
  outline: none;
  transition: all 0.2s ease;
}

.contact-form-section .wpcf7-form-control::placeholder {
  color: var(--Primary-40, #BD93AE);
}

.contact-form-section .wpcf7-form-control:hover {
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
  border-bottom: 1px solid var(--Primary-100, #680144) !important;
}

.contact-form-section .wpcf7-form-control:focus {
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
  border-bottom: 1px solid var(--Primary-100, #680144) !important;
  background: transparent;
}

/* Filled input background - Secondary/40 when input has value */
.contact-form-section .wpcf7-form-control.filled:not(select),
.contact-form-section .wpcf7-form-control:not(:placeholder-shown):not([value=""]):not(select),
.contact-form-section .wpcf7-textarea.filled,
.contact-form-section .wpcf7-textarea:not(:placeholder-shown) {
  background: var(--Secondary-40, #F9C5C3) !important;
}

/* Dropdowns only get filled background when user selects an actual option (not default) */
.contact-form-section select.wpcf7-form-control.filled {
  background: var(--Secondary-40, #F9C5C3) !important;
}

/* Textarea */
.contact-form-section .wpcf7-textarea {
  min-height: 8rem; /* h-32 */
  padding: 0.75rem; /* p-3 */
  resize: vertical;
  border: none !important;
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
  border-bottom: 1px solid var(--Primary-100, #680144) !important;
  border-radius: 0 !important;
  background: transparent;
  font-family: "DM Sans", sans-serif;
  font-size: 1.125rem; /* text-lg */
  font-weight: 400;
  line-height: 1.5rem; /* leading-6 */
  color: var(--Primary-100, #680144);
  transition: all 0.2s ease;
}

.contact-form-section .wpcf7-textarea:hover {
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
  border-bottom: 1px solid var(--Primary-100, #680144) !important;
}

.contact-form-section .wpcf7-textarea:focus {
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
  border-bottom: 1px solid var(--Primary-100, #680144) !important;
}

.contact-form-section .wpcf7-textarea::placeholder {
  color: var(--Primary-40, #BD93AE);
}


/* Select/Dropdown */
.contact-form-section .wpcf7-select {
  position: relative;
  cursor: pointer;
}

.contact-form-section .wpcf7-select .wpcf7-form-control,
.contact-form-section select.wpcf7-form-control {
  appearance: none;
  padding-right: 2.5rem;
  position: relative;
  border: none !important;
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
  border-bottom: 1px solid var(--Primary-100, #680144) !important;
  border-radius: 0 !important;
}

.contact-form-section .wpcf7-select .wpcf7-form-control:hover,
.contact-form-section select.wpcf7-form-control:hover {
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
  border-bottom: 1px solid var(--Primary-100, #680144) !important;
}

.contact-form-section .wpcf7-select .wpcf7-form-control:focus,
.contact-form-section select.wpcf7-form-control:focus {
  border-top: none !important;
  border-left: none !important;
  border-right: none !important;
  border-bottom: 1px solid var(--Primary-100, #680144) !important;
}

.contact-form-section .wpcf7-select .wpcf7-form-control::after {
  content: '';
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%) rotate(-90deg);
  width: 0.375rem; /* w-1.5 */
  height: 0.75rem; /* h-3 */
  border-left: 1.23px solid var(--Primary-100, #680144);
  border-bottom: 1.23px solid var(--Primary-100, #680144);
  pointer-events: none;
}

/* Dropdown Arrow Icon */
.contact-form-section .wpcf7-select-wrapper {
  position: relative;
  width: 100%;
}

.contact-form-section .wpcf7-select-wrapper::after {
  content: '';
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%) rotate(-90deg);
  width: 0.375rem; /* w-1.5 */
  height: 0.75rem; /* h-3 */
  border-left: 1.23px solid var(--Primary-100, #680144);
  border-bottom: 1.23px solid var(--Primary-100, #680144);
  pointer-events: none;
  z-index: 1;
}

.contact-form-section .wpcf7-select .wpcf7-form-control {
  background-image: none;
}

/* Checkbox Styling */
.contact-form-section .wpcf7-checkbox,
.contact-form-section .wpcf7-radio {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
}

.contact-form-section .wpcf7-list-item {
  margin: 0;
  padding: 0.75rem; /* p-3 */
  display: inline-flex;
  justify-content: flex-start;
  align-items: center;
  gap: 0.75rem; /* gap-3 */
  height: 3rem; /* h-12 */
  border-bottom: 1px solid transparent;
}

.contact-form-section .wpcf7-list-item:not(:last-child) {
  border-bottom: 1px solid var(--Primary-100, #680144);
}

.contact-form-section .wpcf7-list-item-label {
  flex: 1;
  color: var(--Primary-100, #680144);
  font-family: "DM Sans", sans-serif;
  font-size: 1.125rem; /* text-lg */
  font-weight: 400;
  line-height: 1.5rem; /* leading-6 */
  cursor: pointer;
}

/* Custom Checkbox - Rotated Design */
.contact-form-section .wpcf7-list-item {
  transform: rotate(180deg);
  transform-origin: top left;
}

.contact-form-section .wpcf7-list-item > * {
  transform: rotate(180deg);
  transform-origin: top left;
}

.contact-form-section .wpcf7-list-item input[type="checkbox"],
.contact-form-section .wpcf7-list-item input[type="radio"] {
  width: 0.875rem; /* w-3.5 */
  height: 0.875rem; /* h-3.5 */
  margin: 0;
  appearance: none;
  background: var(--Tertiary-40, #FBF3F2);
  border: 1px solid var(--Primary-40, #BD93AE);
  border-radius: 0; /* rounded-sm */
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transform: rotate(180deg);
  transform-origin: center;
}

.contact-form-section .wpcf7-list-item input[type="checkbox"]:checked,
.contact-form-section .wpcf7-list-item input[type="radio"]:checked {
  background: var(--Tertiary-40, #FBF3F2);
  border-color: var(--Primary-40, #BD93AE);
}

.contact-form-section .wpcf7-list-item input[type="checkbox"]:checked::after,
.contact-form-section .wpcf7-list-item input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  width: 0.875rem; /* w-3.5 */
  height: 0.75rem; /* h-3 */
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(180deg);
  outline: 1.5px solid var(--Primary-100, #680144);
  outline-offset: -0.75px;
  border-radius: 0;
}

/* Submit Button – always look active (primary color), including when disabled by CF7 */
.contact-form-section .wpcf7-submit,
.contact-form-section button[type="submit"],
.contact-form-section .wpcf7-submit button,
.contact-form-section .form-submit-wrapper button,
.contact-form-section .form-submit-wrapper .wpcf7-submit,
.contact-form-section .form-columns-wrapper .form-submit-wrapper button,
.contact-form-section .form-columns-wrapper .form-submit-wrapper .wpcf7-submit,
.contact-form-section .wpcf7-submit:disabled,
.contact-form-section button[type="submit"]:disabled {
  width: 12rem !important; /* w-48 */
  padding: 1rem !important; /* p-4 */
  background: var(--Primary-100, #680144) !important;
  border: none !important;
  border-radius: 0.5rem; /* rounded-lg */
  color: var(--Tertiary-100, #F6E0DF) !important;
  font-family: "DM Sans", sans-serif !important;
  font-size: 1.125rem !important; /* text-lg */
  font-weight: 400 !important;
  line-height: 1.5rem !important; /* leading-6 */
  text-align: center !important;
  cursor: pointer !important;
  transition: all 0.2s ease;
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: relative !important;
  z-index: 10 !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 0.625rem !important; /* gap-2.5 */
  margin: 0 !important;
}

.contact-form-section .wpcf7-submit:hover,
.contact-form-section button[type="submit"]:hover,
.contact-form-section .wpcf7-submit:disabled:hover,
.contact-form-section button[type="submit"]:disabled:hover {
  background: var(--Primary-80, #843267) !important;
}

.contact-form-section .wpcf7-submit:active,
.contact-form-section button[type="submit"]:active {
  transform: scale(0.98);
}

/* When all required fields are filled, keep the same active look (reinforce in case of overrides) */
.contact-form-section .wpcf7-form.form-ready .wpcf7-submit,
.contact-form-section .wpcf7-form.form-ready button[type="submit"] {
  background: var(--Primary-100, #680144) !important;
  color: var(--Tertiary-100, #F6E0DF) !important;
  opacity: 1 !important;
}

/* Submit button wrapper */
.contact-form-section .form-submit-wrapper,
.contact-form-section .form-columns-wrapper .form-submit-wrapper,
.contact-form-section .form-columns-wrapper > .form-submit-wrapper,
.contact-form-section .wpcf7-form > p:has(.wpcf7-submit),
.contact-form-section .wpcf7-form p.form-submit-wrapper,
.contact-form-section .wpcf7-form p:has(button[type="submit"]),
.contact-form-section .wpcf7-form div.form-submit-wrapper {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  justify-content: flex-start;
  align-items: center;
  margin-top: 1.5rem;
  margin-bottom: 0;
  width: 100%;
}

.contact-form-section .form-submit-wrapper .wpcf7-submit,
.contact-form-section .form-submit-wrapper button,
.contact-form-section .form-submit-wrapper button[type="submit"],
.contact-form-section .wpcf7-form p.form-submit-wrapper .wpcf7-submit,
.contact-form-section .form-submit-wrapper button.wpcf7-submit,
.contact-form-section .wpcf7-form div.form-submit-wrapper button,
.contact-form-section .wpcf7-form div.form-submit-wrapper .wpcf7-submit {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: relative !important;
  z-index: 1 !important;
}

/* Error Messages */
.contact-form-section .wpcf7-not-valid-tip {
  color: var(--Secondary-100, #FF7D78);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.contact-form-section .wpcf7-response-output {
  margin: 1rem 0 0 0;
  padding: 1rem;
  border-radius: 0.5rem;
  font-size: 1rem;
}

.contact-form-section .wpcf7-mail-sent-ok {
  background: var(--Tertiary-40, #FBF3F2);
  color: var(--Primary-100, #680144);
  border: 1px solid var(--Primary-100, #680144);
}

.contact-form-section .wpcf7-validation-errors,
.contact-form-section .wpcf7-mail-sent-ng {
  background: var(--Secondary-40, #F9C5C3);
  color: var(--Primary-100, #680144);
  border: 1px solid var(--Secondary-100, #FF7D78);
}

.contact-form-error {
  color: var(--Secondary-100, #FF7D78);
  font-family: "DM Sans", sans-serif;
  font-size: 1rem;
  padding: 1rem;
  background: var(--Secondary-40, #F9C5C3);
  border-radius: 0.5rem;
}

/* Responsive - Large screens (1280px+) */
@media (min-width: 1280px) {
  .contact-form-section {
    min-height: 100vh;
  }

  .contact-form-heading {
    max-width: 684px;
  }

  .contact-form-wrapper {
    max-width: 1368px;
    height: auto;
  }

  .contact-form-section .form-columns-wrapper {
    gap: 0.625rem;
    height: auto;
  }

  .contact-form-section .form-column-left,
  .contact-form-section .form-column-right {
    width: 684px;
  }
}

/* Responsive - Desktop (1024px - 1279px) */
@media (min-width: 1024px) and (max-width: 1279px) {
  .contact-form-section {
    min-height: 100vh;
    padding: 4rem 2rem;
  }

  .contact-form-heading {
    max-width: 100%;
  }

  .heading-part-1,
  .heading-part-2 {
    font-size: 2.5rem;
    line-height: 56px;
  }

  .contact-form-wrapper {
    width: 70%;
    height: auto;
    min-height: auto;
    align-items: center;
  }

  .contact-form-section .form-row {
    flex-direction: row;
  }
}

/* Responsive - Tablet (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  .contact-form-section {
    min-height: auto;
    padding: 4rem 2rem;
  }

  .contact-form-heading {
    max-width: 100%;
  }

  .heading-part-1,
  .heading-part-2 {
    font-size: 2.25rem;
    line-height: 50px;
  }

  .contact-form-wrapper {
    width: 70%;
    height: auto;
    align-items: center;
  }

  .contact-form-section .form-row {
    flex-direction: column;
  }

  .contact-form-section .wpcf7-list-item {
    transform: none;
  }

  .contact-form-section .wpcf7-list-item > * {
    transform: none;
  }

  .contact-form-section .wpcf7-list-item input[type="checkbox"],
  .contact-form-section .wpcf7-list-item input[type="radio"] {
    transform: none;
  }
}

/* Responsive - Mobile (max-width: 767px) */
@media (max-width: 767px) {
  .contact-form-section {
    min-height: auto;
    padding: 3rem 1rem;
    gap: 2rem;
  }

  .contact-form-section-container {
    gap: 2rem;
  }

  .contact-form-heading {
    max-width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }

  .heading-part-1,
  .heading-part-2 {
    font-size: 2rem;
    line-height: 44px;
  }

  .contact-form-wrapper {
    width: 90%;
    gap: 2rem;
    height: auto;
    align-items: center;
  }

  .contact-form-section .form-row {
    flex-direction: column;
  }

  .contact-form-section .form-column-left,
  .contact-form-section .form-column-right {
    width: 100%;
    max-width: 100%;
  }

  .contact-form-section .form-row {
    flex-direction: column;
  }

  .contact-form-section .form-field {
    height: auto;
    min-height: 5rem;
  }

  .contact-form-section .wpcf7-submit {
    width: 100%;
  }

  .contact-form-section .wpcf7-list-item {
    transform: none;
  }

  .contact-form-section .wpcf7-list-item > * {
    transform: none;
  }

  .contact-form-section .wpcf7-list-item input[type="checkbox"],
  .contact-form-section .wpcf7-list-item input[type="radio"] {
    transform: none;
  }
}
