/**
 * Forms 29 and 30 — Places finder first; City/Country/Suburb text fields after selection.
 * JS sets style.display on select / Change location. CSS only sets defaults.
 * Targets semantic classes (movingFrom/To*), not field IDs.
 */

/* Hide unused address subfields */
:is([id="gform_wrapper_29"], [id^="gform_wrapper_29_"], [id="gform_wrapper_30"], [id^="gform_wrapper_30_"]) .ginput_container_address .address_line_2,
:is([id="gform_wrapper_29"], [id^="gform_wrapper_29_"], [id="gform_wrapper_30"], [id^="gform_wrapper_30_"]) .ginput_container_address .address_city,
:is([id="gform_wrapper_29"], [id^="gform_wrapper_29_"], [id="gform_wrapper_30"], [id^="gform_wrapper_30_"]) .ginput_container_address .address_state,
:is([id="gform_wrapper_29"], [id^="gform_wrapper_29_"], [id="gform_wrapper_30"], [id^="gform_wrapper_30_"]) .ginput_container_address .address_zip,
:is([id="gform_wrapper_29"], [id^="gform_wrapper_29_"], [id="gform_wrapper_30"], [id^="gform_wrapper_30_"]) .ginput_container_address .address_country,
:is([id="gform_wrapper_29"], [id^="gform_wrapper_29_"], [id="gform_wrapper_30"], [id^="gform_wrapper_30_"]) .ginput_container_address .ginput_address_line_2,
:is([id="gform_wrapper_29"], [id^="gform_wrapper_29_"], [id="gform_wrapper_30"], [id^="gform_wrapper_30_"]) .ginput_container_address .ginput_address_city,
:is([id="gform_wrapper_29"], [id^="gform_wrapper_29_"], [id="gform_wrapper_30"], [id^="gform_wrapper_30_"]) .ginput_container_address .ginput_address_state,
:is([id="gform_wrapper_29"], [id^="gform_wrapper_29_"], [id="gform_wrapper_30"], [id^="gform_wrapper_30_"]) .ginput_container_address .ginput_address_zip,
:is([id="gform_wrapper_29"], [id^="gform_wrapper_29_"], [id="gform_wrapper_30"], [id^="gform_wrapper_30_"]) .ginput_container_address .ginput_address_country {
  display: none !important;
}

:is([id="gform_wrapper_29"], [id^="gform_wrapper_29_"], [id="gform_wrapper_30"], [id^="gform_wrapper_30_"]) .ginput_container_address .address_line_1 > label,
:is([id="gform_wrapper_29"], [id^="gform_wrapper_29_"], [id="gform_wrapper_30"], [id^="gform_wrapper_30_"]) .ginput_container_address .address_line_1 .gform-field-label {
  display: none !important;
}

:is([id="gform_wrapper_29"], [id^="gform_wrapper_29_"], [id="gform_wrapper_30"], [id^="gform_wrapper_30_"]) .ginput_container_address {
  display: block;
  width: 100%;
  position: relative;
}

:is([id="gform_wrapper_29"], [id^="gform_wrapper_29_"], [id="gform_wrapper_30"], [id^="gform_wrapper_30_"]) .ginput_container_address .address_line_1 {
  display: block;
  width: 100% !important;
  max-width: 100%;
  float: none !important;
}

/* Default: hide City/Country/Suburb until JS shows them after Places
   select. Suburb is a plain typed field (not populated by the Places
   widget), but the JS now reveals it alongside City/Country and holds
   off auto-advancing to the next step so it can be filled in. */
:is([id="gform_wrapper_29"], [id^="gform_wrapper_29_"], [id="gform_wrapper_30"], [id^="gform_wrapper_30_"]) .movingFromCountry,
:is([id="gform_wrapper_29"], [id^="gform_wrapper_29_"], [id="gform_wrapper_30"], [id^="gform_wrapper_30_"]) .movingFromCity,
:is([id="gform_wrapper_29"], [id^="gform_wrapper_29_"], [id="gform_wrapper_30"], [id^="gform_wrapper_30_"]) .movingFromSuburb,
:is([id="gform_wrapper_29"], [id^="gform_wrapper_29_"], [id="gform_wrapper_30"], [id^="gform_wrapper_30_"]) .movingToCountry,
:is([id="gform_wrapper_29"], [id^="gform_wrapper_29_"], [id="gform_wrapper_30"], [id^="gform_wrapper_30_"]) .movingToCity,
:is([id="gform_wrapper_29"], [id^="gform_wrapper_29_"], [id="gform_wrapper_30"], [id^="gform_wrapper_30_"]) .movingToSuburb {
  display: none !important;
}

/* Hide native line1 when Places widget is present */
:is([id="gform_wrapper_29"], [id^="gform_wrapper_29_"], [id="gform_wrapper_30"], [id^="gform_wrapper_30_"]) .ginput_container_address:has(gmp-place-autocomplete) .address_line_1 input[type="text"] {
  display: none !important;
}

:is([id="gform_wrapper_29"], [id^="gform_wrapper_29_"], [id="gform_wrapper_30"], [id^="gform_wrapper_30_"]) gmp-place-autocomplete {
  display: block !important;
  width: 100% !important;
  max-width: 100%;
  box-sizing: border-box !important;
  min-height: 45px;
  border-radius: 50px !important;
  border: 1px solid #fff !important;
  background-color: transparent !important;
  color: #fff !important;
  font-size: 16px;
  line-height: 1.4;
  --gmp-mat-color-surface: transparent;
  --gmp-mat-color-on-surface: #fff;
  --gmp-mat-color-primary: #ffec00;
  color-scheme: dark;
}

/* Selected City, Country display — replaces Places widget after pick (no Undefined flash) */
:is([id="gform_wrapper_29"], [id^="gform_wrapper_29_"], [id="gform_wrapper_30"], [id^="gform_wrapper_30_"]) .tmc-selected-location {
  display: none;
  width: 100% !important;
  max-width: 100%;
  box-sizing: border-box !important;
  min-height: 45px;
  padding: 9px 16px !important;
  border-radius: 50px !important;
  border: 1px solid #fff !important;
  background-color: transparent !important;
  color: #fff !important;
  font-size: 16px;
  line-height: 1.4;
  -webkit-appearance: none;
  appearance: none;
  cursor: default;
}

:is([id="gform_wrapper_29"], [id^="gform_wrapper_29_"], [id="gform_wrapper_30"], [id^="gform_wrapper_30_"]) gmp-place-autocomplete[data-tmc-hidden-after-select="1"] {
  display: none !important;
}

:is([id="gform_wrapper_29"], [id^="gform_wrapper_29_"], [id="gform_wrapper_30"], [id^="gform_wrapper_30_"]) .ginput_container_address .address_line_1 input[type="text"],
:is([id="gform_wrapper_29"], [id^="gform_wrapper_29_"], [id="gform_wrapper_30"], [id^="gform_wrapper_30_"]) .movingFromCountry input[type="text"],
:is([id="gform_wrapper_29"], [id^="gform_wrapper_29_"], [id="gform_wrapper_30"], [id^="gform_wrapper_30_"]) .movingFromCity input[type="text"],
:is([id="gform_wrapper_29"], [id^="gform_wrapper_29_"], [id="gform_wrapper_30"], [id^="gform_wrapper_30_"]) .movingToCountry input[type="text"],
:is([id="gform_wrapper_29"], [id^="gform_wrapper_29_"], [id="gform_wrapper_30"], [id^="gform_wrapper_30_"]) .movingToCity input[type="text"],
:is([id="gform_wrapper_29"], [id^="gform_wrapper_29_"], [id="gform_wrapper_30"], [id^="gform_wrapper_30_"]) .movingFromSuburb input[type="text"],
:is([id="gform_wrapper_29"], [id^="gform_wrapper_29_"], [id="gform_wrapper_30"], [id^="gform_wrapper_30_"]) .movingToSuburb input[type="text"] {
  width: 100% !important;
  max-width: 100%;
  box-sizing: border-box !important;
  min-height: 45px;
  padding: 9px 16px !important;
  border-radius: 50px !important;
  border: 1px solid #fff !important;
  background-color: transparent !important;
  color: #fff !important;
  font-size: 16px;
  line-height: 1.4;
  -webkit-appearance: none;
  appearance: none;
}

:is([id="gform_wrapper_29"], [id^="gform_wrapper_29_"], [id="gform_wrapper_30"], [id^="gform_wrapper_30_"]) .ginput_container_address .address_line_1 input[type="text"]::placeholder,
:is([id="gform_wrapper_29"], [id^="gform_wrapper_29_"], [id="gform_wrapper_30"], [id^="gform_wrapper_30_"]) .movingFromCountry input[type="text"]::placeholder,
:is([id="gform_wrapper_29"], [id^="gform_wrapper_29_"], [id="gform_wrapper_30"], [id^="gform_wrapper_30_"]) .movingFromCity input[type="text"]::placeholder,
:is([id="gform_wrapper_29"], [id^="gform_wrapper_29_"], [id="gform_wrapper_30"], [id^="gform_wrapper_30_"]) .movingToCountry input[type="text"]::placeholder,
:is([id="gform_wrapper_29"], [id^="gform_wrapper_29_"], [id="gform_wrapper_30"], [id^="gform_wrapper_30_"]) .movingToCity input[type="text"]::placeholder,
:is([id="gform_wrapper_29"], [id^="gform_wrapper_29_"], [id="gform_wrapper_30"], [id^="gform_wrapper_30_"]) .movingFromSuburb input[type="text"]::placeholder,
:is([id="gform_wrapper_29"], [id^="gform_wrapper_29_"], [id="gform_wrapper_30"], [id^="gform_wrapper_30_"]) .movingToSuburb input[type="text"]::placeholder {
  color: rgba(255, 255, 255, 0.7);
  opacity: 1;
}

:is([id="gform_wrapper_29"], [id^="gform_wrapper_29_"], [id="gform_wrapper_30"], [id^="gform_wrapper_30_"]) fieldset.gfield--type-address > legend.gfield_label,
:is([id="gform_wrapper_29"], [id^="gform_wrapper_29_"], [id="gform_wrapper_30"], [id^="gform_wrapper_30_"]) .movingFromCountry > label,
:is([id="gform_wrapper_29"], [id^="gform_wrapper_29_"], [id="gform_wrapper_30"], [id^="gform_wrapper_30_"]) .movingFromCity > label,
:is([id="gform_wrapper_29"], [id^="gform_wrapper_29_"], [id="gform_wrapper_30"], [id^="gform_wrapper_30_"]) .movingToCountry > label,
:is([id="gform_wrapper_29"], [id^="gform_wrapper_29_"], [id="gform_wrapper_30"], [id^="gform_wrapper_30_"]) .movingToCity > label,
:is([id="gform_wrapper_29"], [id^="gform_wrapper_29_"], [id="gform_wrapper_30"], [id^="gform_wrapper_30_"]) .movingFromSuburb > label,
:is([id="gform_wrapper_29"], [id^="gform_wrapper_29_"], [id="gform_wrapper_30"], [id^="gform_wrapper_30_"]) .movingToSuburb > label {
  color: #fff;
  font-weight: 700;
  margin-bottom: 8px;
}

/* Change location — override .new-form-mz button styles; JS toggles display */
:is([id="gform_wrapper_29"], [id^="gform_wrapper_29_"], [id="gform_wrapper_30"], [id^="gform_wrapper_30_"]) button.tmc-change-location,
.new-form-mz :is([id="gform_wrapper_29"], [id^="gform_wrapper_29_"], [id="gform_wrapper_30"], [id^="gform_wrapper_30_"]) button.tmc-change-location {
  display: none;
  margin: 4px 0 12px !important;
  padding: 0 !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  height: auto !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  color: #ffec00 !important;
  font-family: inherit !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  letter-spacing: normal !important;
  text-align: left !important;
  text-transform: none !important;
  cursor: pointer;
  text-decoration: underline !important;
  white-space: nowrap !important;
}

:is([id="gform_wrapper_29"], [id^="gform_wrapper_29_"], [id="gform_wrapper_30"], [id^="gform_wrapper_30_"]) button.tmc-change-location:hover,
:is([id="gform_wrapper_29"], [id^="gform_wrapper_29_"], [id="gform_wrapper_30"], [id^="gform_wrapper_30_"]) button.tmc-change-location:focus,
.new-form-mz :is([id="gform_wrapper_29"], [id^="gform_wrapper_29_"], [id="gform_wrapper_30"], [id^="gform_wrapper_30_"]) button.tmc-change-location:hover,
.new-form-mz :is([id="gform_wrapper_29"], [id^="gform_wrapper_29_"], [id="gform_wrapper_30"], [id^="gform_wrapper_30_"]) button.tmc-change-location:focus {
  color: #fff !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  outline: none;
}

/* Validation messages on the blue quote form */
:is([id="gform_wrapper_29"], [id^="gform_wrapper_29_"], [id="gform_wrapper_30"], [id^="gform_wrapper_30_"]) .gfield_validation_message,
:is([id="gform_wrapper_29"], [id^="gform_wrapper_29_"], [id="gform_wrapper_30"], [id^="gform_wrapper_30_"]) .validation_message,
:is([id="gform_wrapper_29"], [id^="gform_wrapper_29_"], [id="gform_wrapper_30"], [id^="gform_wrapper_30_"]) .gform_validation_errors,
:is([id="gform_wrapper_29"], [id^="gform_wrapper_29_"], [id="gform_wrapper_30"], [id^="gform_wrapper_30_"]) .gform_submission_error {
  color: #c02b0a !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
}

:is([id="gform_wrapper_29"], [id^="gform_wrapper_29_"], [id="gform_wrapper_30"], [id^="gform_wrapper_30_"]) .gfield_error,
:is([id="gform_wrapper_29"], [id^="gform_wrapper_29_"], [id="gform_wrapper_30"], [id^="gform_wrapper_30_"]) .gfield.gfield_error {
  background: transparent !important;
  border: none !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}

:is([id="gform_wrapper_29"], [id^="gform_wrapper_29_"], [id="gform_wrapper_30"], [id^="gform_wrapper_30_"]) .gfield_error .gfield_label,
:is([id="gform_wrapper_29"], [id^="gform_wrapper_29_"], [id="gform_wrapper_30"], [id^="gform_wrapper_30_"]) .gfield_error legend.gfield_label {
  color: #c02b0a !important;
}

:is([id="gform_wrapper_29"], [id^="gform_wrapper_29_"], [id="gform_wrapper_30"], [id^="gform_wrapper_30_"]) .gfield_error input[type="text"],
:is([id="gform_wrapper_29"], [id^="gform_wrapper_29_"], [id="gform_wrapper_30"], [id^="gform_wrapper_30_"]) .gfield_error gmp-place-autocomplete {
  border-color: #c02b0a !important;
}
