/* Shared interaction language for every public-facing form. */
:root{
  --form-accent:var(--satc-gold,#9d7a4d);
  --form-danger:#b42318;
  --form-hover:#b9aa98;
  --form-disabled:#ece8e3;
  --form-ease:180ms ease;
}

.shared-layout form :is(
  input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]),
  select,
  textarea,
  .custom-select-trigger
){
  transition:border-color var(--form-ease),background-color var(--form-ease),box-shadow var(--form-ease),color var(--form-ease)!important;
}

.shared-layout form :is(
  input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]),
  select,
  textarea,
  .custom-select-trigger
):hover:not(:disabled):not([aria-disabled=true]){
  border-color:var(--form-hover)!important;
}

.shared-layout form :is(
  input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]),
  select,
  textarea,
  .custom-select-trigger
):focus,
.shared-layout form :is(
  input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]),
  select,
  textarea,
  .custom-select-trigger
):focus-visible,
.shared-layout form .custom-select.is-open .custom-select-trigger{
  border-color:var(--form-accent)!important;
  outline:0!important;
  box-shadow:inset 0 -2px 0 var(--form-accent)!important;
}

.shared-layout form :is(input,select,textarea)[aria-invalid=true],
.shared-layout form :is(input,select,textarea).is-invalid,
.shared-layout form .custom-select.is-invalid .custom-select-trigger{
  border-color:var(--form-danger)!important;
  box-shadow:inset 0 -2px 0 var(--form-danger)!important;
}

.shared-layout form :is(input,select,textarea):disabled,
.shared-layout form .custom-select-trigger:disabled,
.shared-layout form .custom-select-trigger[aria-disabled=true]{
  cursor:not-allowed!important;
  background:var(--form-disabled)!important;
  color:#8d8580!important;
  opacity:.72;
}

.shared-layout form :is(button[type=submit],input[type=submit]){
  transition:background-color .2s ease,color .2s ease,transform .2s ease,box-shadow .2s ease,opacity .2s ease!important;
}

.shared-layout form :is(button[type=submit],input[type=submit]):hover:not(:disabled){
  transform:translateY(-2px);
  box-shadow:0 10px 24px rgb(35 31 32 / 14%);
}

.shared-layout form :is(button[type=submit],input[type=submit]):active:not(:disabled){
  transform:translateY(0);
  box-shadow:none;
}

.shared-layout form :is(button[type=submit],input[type=submit]):disabled{
  cursor:not-allowed;
  opacity:.58;
}

/* Contact and register-interest forms share the same field surface. */
.shared-layout :is(.contact-form,.interest-form-card form) :is(
  input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]),
  select,
  textarea,
  .custom-select-trigger
){
  margin-top:9px;
  padding-inline:13px;
  border:0!important;
  border-bottom:1px solid #d8d1cb!important;
  border-radius:0!important;
  background:#f7f6f4!important;
  color:var(--satc-charcoal,#231f20)!important;
}

.shared-layout :is(.contact-form,.interest-form-card form) :is(
  input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]),
  select,
  .custom-select-trigger
){
  min-height:56px;
}

.shared-layout :is(.contact-form,.interest-form-card form) textarea{
  min-height:145px;
  padding-block:16px;
}

.shared-layout :is(.contact-form,.interest-form-card form) :is(
  input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]),
  select,
  textarea,
  .custom-select-trigger
):hover:not(:disabled):not([aria-disabled=true]){
  background:#fff!important;
}

.shared-layout :is(.contact-form,.interest-form-card form) .custom-select.is-open .custom-select-trigger{
  background:#fff!important;
}

/* Inputs embedded in burgundy panels retain sufficient contrast while focused. */
.shared-layout .project-inquiry form :is(input,select,textarea),
.shared-layout .project-inquiry form :is(input,select,textarea):hover,
.shared-layout .project-inquiry form :is(input,select,textarea):focus,
.shared-layout .project-inquiry form :is(input,select,textarea):focus-visible{
  background:rgb(255 255 255 / 8%)!important;
  color:#fff!important;
  caret-color:#fff;
}

.shared-layout .project-inquiry form :is(input,textarea)::placeholder{
  color:rgb(255 255 255 / 58%)!important;
}

.shared-layout .project-inquiry form input:-webkit-autofill,
.shared-layout .project-inquiry form input:-webkit-autofill:hover,
.shared-layout .project-inquiry form input:-webkit-autofill:focus{
  -webkit-text-fill-color:#fff!important;
  caret-color:#fff;
  box-shadow:inset 0 0 0 1000px #4b1020,inset 0 -2px 0 var(--form-accent)!important;
}

@media(prefers-reduced-motion:reduce){
  .shared-layout form :is(input,select,textarea,button,.custom-select-trigger){transition:none!important}
}
