/* Public lead/account form family. Native markup, copy, ARIA and validation stay
 * with Gravity Forms. The two-ID scope beats the older listing-specific palette
 * without changing unrelated forms, theme buttons or the Turnstile challenge. */
:is(#new-inquiry-form, #new-inquiry-form-modal, .cd-user-modal) {
  --urba-feedback-ink: #262b31;
  --urba-feedback-selected: #29313a;
  --urba-feedback-selected-surface: #f3f4f5;
  --urba-feedback-error: #9c2f21;
  --urba-feedback-error-line: #e3bcb4;
  --urba-feedback-error-surface: #fff7f5;
  --urba-feedback-focus: #246589;
  --urba-feedback-alert: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v6m0 4h.01'/%3E%3C/svg%3E");
}

/* Brand red remains on the primary CTA. Selection and required markers are
 * neutral, while keyboard focus has a separate, visible blue outline. */
:is(#new-inquiry-form #gform_wrapper_32, #new-inquiry-form-modal #gform_wrapper_24, .cd-user-modal #gform_wrapper_3, .cd-user-modal #gform_wrapper_0) :is(.gfield_required, .gfield_required *, .gfield_error .gfield_label, .gfield_error .gform-field-label) {
  color: var(--urba-feedback-ink) !important;
}
:is(#new-inquiry-form #gform_wrapper_32, #new-inquiry-form-modal #gform_wrapper_24, .cd-user-modal #gform_wrapper_3, .cd-user-modal #gform_wrapper_0) :is(input[type="radio"], input[type="checkbox"]) {
  accent-color: var(--urba-feedback-selected) !important;
}
.cd-user-modal .cd-user-modal-container .cd-switcher a.selected {
  color: var(--urba-feedback-ink);
  background: var(--urba-feedback-selected-surface);
  box-shadow: inset 0 -3px 0 var(--urba-feedback-selected);
}
#new-inquiry-form #gform_wrapper_32 :is(.gchoice input:checked + label, .urba-time-choice.is-selected) {
  background: var(--urba-feedback-selected-surface) !important;
  border-color: var(--urba-feedback-selected) !important;
  box-shadow: inset 0 0 0 1px var(--urba-feedback-selected) !important;
  color: var(--urba-feedback-ink) !important;
  font-weight: 700;
}
#new-inquiry-form #gform_wrapper_32 #field_32_26 input:checked + label::before {
  border-color: var(--urba-feedback-selected) !important;
}
#new-inquiry-form.urba-tour-layout .urba-tour-layout-progress .is-complete .urba-tour-layout-progress__number {
  background: var(--urba-feedback-selected);
}
#new-inquiry-form #gform_wrapper_32 .urba-tour-layout-edit {
  color: var(--urba-form-accent, #d20038) !important;
  text-decoration: underline;
  text-underline-offset: 3px;
}
#new-inquiry-form #gform_wrapper_32 .gform_previous_button:hover:not(:disabled):not([aria-disabled="true"]) {
  background-color: var(--urba-feedback-selected-surface) !important;
}

/* One compact summary, with its decorative icon in the text flow. Native
 * Gravity Forms uses an absolute full-height icon; Vue can omit it entirely. */
:is(#new-inquiry-form #gform_wrapper_32, #new-inquiry-form-modal #gform_wrapper_24, .cd-user-modal #gform_wrapper_3, .cd-user-modal #gform_wrapper_0) .gform_validation_errors,
.cd-user-modal :is(#cd-login .gf_login_errors, #cd-signup .urba-turnstile-validation-message) {
  box-sizing: border-box;
  background: var(--urba-feedback-error-surface) !important;
  border: 1px solid var(--urba-feedback-error-line) !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  color: var(--urba-feedback-error) !important;
  margin: 0 0 20px !important;
  padding: 13px 15px !important;
  text-align: left;
  outline: none !important;
}
:is(#new-inquiry-form #gform_wrapper_32, #new-inquiry-form-modal #gform_wrapper_24, .cd-user-modal #gform_wrapper_3, .cd-user-modal #gform_wrapper_0) .gform_validation_errors > h2 {
  display: block !important;
  position: static !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  color: var(--urba-feedback-error) !important;
  font-size: 15px !important;
  font-family: inherit !important;
  font-weight: 600 !important;
  line-height: 1.45 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  text-align: left !important;
}
:is(#new-inquiry-form #gform_wrapper_32, #new-inquiry-form-modal #gform_wrapper_24, .cd-user-modal #gform_wrapper_3, .cd-user-modal #gform_wrapper_0) .gform_validation_errors {
  display: grid !important;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 8px 10px;
  align-items: start;
}
:is(#new-inquiry-form #gform_wrapper_32, #new-inquiry-form-modal #gform_wrapper_24, .cd-user-modal #gform_wrapper_3, .cd-user-modal #gform_wrapper_0) .gform_validation_errors > * {
  grid-column: 2;
}
:is(#new-inquiry-form #gform_wrapper_32, #new-inquiry-form-modal #gform_wrapper_24, .cd-user-modal #gform_wrapper_3, .cd-user-modal #gform_wrapper_0) .gform_validation_errors > h2::before,
:is(#new-inquiry-form #gform_wrapper_32, #new-inquiry-form-modal #gform_wrapper_24, .cd-user-modal #gform_wrapper_3, .cd-user-modal #gform_wrapper_0) .gform_validation_errors > h2 .gform-icon {
  display: none !important;
}
:is(#new-inquiry-form #gform_wrapper_32, #new-inquiry-form-modal #gform_wrapper_24, .cd-user-modal #gform_wrapper_3, .cd-user-modal #gform_wrapper_0) .gform_validation_errors :is(ol, ul) {
  margin: 0 !important;
  padding-inline-start: 18px !important;
  font-size: 14px;
  line-height: 1.45;
}
:is(#new-inquiry-form #gform_wrapper_32, #new-inquiry-form-modal #gform_wrapper_24, .cd-user-modal #gform_wrapper_3, .cd-user-modal #gform_wrapper_0) .gform_validation_errors li {
  margin: 0 0 4px;
}
:is(#new-inquiry-form #gform_wrapper_32, #new-inquiry-form-modal #gform_wrapper_24, .cd-user-modal #gform_wrapper_3, .cd-user-modal #gform_wrapper_0) .gform_validation_errors::before,
.cd-user-modal #cd-login .gf_login_errors::before {
  content: "" !important;
  display: block !important;
  position: static !important;
  grid-column: 1;
  grid-row: 1;
  flex: 0 0 20px;
  width: 20px !important;
  height: 20px !important;
  margin: 1px 0 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: currentColor !important;
  box-shadow: none !important;
  transform: none !important;
  -webkit-mask: var(--urba-feedback-alert) center / contain no-repeat;
  mask: var(--urba-feedback-alert) center / contain no-repeat;
}
.cd-user-modal #cd-login .gf_login_errors {
  display: flex !important;
  align-items: flex-start;
  gap: 10px;
  font-size: 15px !important;
  font-weight: 600 !important;
  line-height: 1.45 !important;
}

/* The field message sits directly under its control, without another box. */
:is(#new-inquiry-form #gform_wrapper_32, #new-inquiry-form-modal #gform_wrapper_24, .cd-user-modal #gform_wrapper_3, .cd-user-modal #gform_wrapper_0) .gfield_error {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
:is(#new-inquiry-form #gform_wrapper_32, #new-inquiry-form-modal #gform_wrapper_24, .cd-user-modal #gform_wrapper_3, .cd-user-modal #gform_wrapper_0) :is(.gfield_validation_message, .gfield .validation_message) {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: var(--urba-feedback-error) !important;
  padding: 0 !important;
  margin: 7px 0 0 !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 1.45 !important;
  letter-spacing: 0 !important;
}
:is(#new-inquiry-form #gform_wrapper_32, #new-inquiry-form-modal #gform_wrapper_24, .cd-user-modal #gform_wrapper_3, .cd-user-modal #gform_wrapper_0) .gfield_error :is(input:not([type="radio"]):not([type="checkbox"]):not([type="hidden"]), textarea, select) {
  border-color: var(--urba-feedback-error) !important;
  background-color: #fff !important;
  box-shadow: none !important;
}
:is(#new-inquiry-form #gform_wrapper_32, #new-inquiry-form-modal #gform_wrapper_24, .cd-user-modal #gform_wrapper_3, .cd-user-modal #gform_wrapper_0) :is(.gform_validation_errors a, .validation_message a) {
  color: var(--urba-feedback-error) !important;
  text-decoration: underline;
  text-underline-offset: 3px;
}
:is(#new-inquiry-form #gform_wrapper_32, #new-inquiry-form-modal #gform_wrapper_24, .cd-user-modal #gform_wrapper_3, .cd-user-modal #gform_wrapper_0) .urba-turnstile-status {
  color: var(--urba-feedback-error) !important;
  font-size: 14px;
  line-height: 1.45;
}

.cd-user-modal .cd-switcher a:focus-visible,
:is(#new-inquiry-form #gform_wrapper_32, #new-inquiry-form-modal #gform_wrapper_24, .cd-user-modal #gform_wrapper_3, .cd-user-modal #gform_wrapper_0) :is(button, input, textarea, select, a, [tabindex]):focus-visible,
:is(#new-inquiry-form #gform_wrapper_32, #new-inquiry-form-modal #gform_wrapper_24, .cd-user-modal #gform_wrapper_3, .cd-user-modal #gform_wrapper_0) .gform_validation_errors:focus-visible {
  outline: 2px solid var(--urba-feedback-focus) !important;
  outline-offset: 3px !important;
}
/* Carousel tracks clip outer rings: put the radio focus ring inside its label. */
#new-inquiry-form #gform_wrapper_32 .gchoice input:focus-visible + label {
  outline: none !important;
  box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 4px var(--urba-feedback-focus) !important;
}
:is(#new-inquiry-form #gform_wrapper_32, #new-inquiry-form-modal #gform_wrapper_24, .cd-user-modal #gform_wrapper_3, .cd-user-modal #gform_wrapper_0) :is(input:not([type="radio"]):not([type="checkbox"]), textarea, select):focus-visible {
  border-color: var(--urba-feedback-focus) !important;
  box-shadow: none !important;
}
/* Invalid-field borders keep their meaning alongside the separate focus ring. */
:is(#new-inquiry-form #gform_wrapper_32, #new-inquiry-form-modal #gform_wrapper_24, .cd-user-modal #gform_wrapper_3, .cd-user-modal #gform_wrapper_0) .gfield_error :is(input, textarea, select):focus-visible {
  border-color: var(--urba-feedback-error) !important;
}
#new-inquiry-form #gform_wrapper_32 .gchoice input:disabled + label,
#new-inquiry-form #gform_wrapper_32 .urba-time-choice:disabled {
  background: #e5e7eb !important;
  border-color: #d1d5db !important;
  box-shadow: none !important;
  color: #6b7280 !important;
}

/* The existing move-in calendar retains its native navigation and date limits. */
#ui-datepicker-div.urba-datepicker .ui-datepicker-header :is(.ui-datepicker-prev, .ui-datepicker-next) {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #262b31;
}
#ui-datepicker-div.urba-datepicker .ui-datepicker-header :is(.ui-datepicker-prev, .ui-datepicker-next)::before {
  content: "";
  display: block;
  width: 24px;
  height: 24px;
  background: currentColor;
  -webkit-mask: url("../ssr-listing/icons/tour-layout-chevron-left.svg") center / contain no-repeat;
  mask: url("../ssr-listing/icons/tour-layout-chevron-left.svg") center / contain no-repeat;
}
#ui-datepicker-div.urba-datepicker .ui-datepicker-header .ui-datepicker-next::before {
  -webkit-mask-image: url("../ssr-listing/icons/tour-layout-chevron-right.svg");
  mask-image: url("../ssr-listing/icons/tour-layout-chevron-right.svg");
}
#ui-datepicker-div.urba-datepicker .ui-datepicker-header :is(.ui-datepicker-prev, .ui-datepicker-next):hover:not(.ui-state-disabled) {
  background: #f3f4f5;
}
#ui-datepicker-div.urba-datepicker .ui-datepicker-header :is(.ui-datepicker-prev, .ui-datepicker-next):focus-visible {
  outline: 2px solid #246589;
  outline-offset: 2px;
}
#ui-datepicker-div.urba-datepicker .ui-datepicker-header :is(.ui-datepicker-prev, .ui-datepicker-next).ui-state-disabled {
  opacity: 0.35;
  cursor: default;
}
