/* Form UX: field-level validation, branded select and file control */
.lead-form .form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.lead-form .field-caption {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.lead-form .object-field > .field-caption {
  margin-bottom: 0;
}

.lead-form .field-hint {
  margin-top: -4px;
  color: #7c8589;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.35;
  text-transform: none;
}

.lead-form .field-error {
  display: block;
  color: #b82d23;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.35;
  text-transform: none;
}

.lead-form .field-error[hidden] {
  display: none;
}

.lead-form input[aria-invalid="true"],
.lead-form textarea[aria-invalid="true"] {
  border-bottom-color: #b82d23;
  box-shadow: inset 0 -2px #b82d23;
  background: #fff7f5;
}

.lead-form .consent.has-error {
  color: #8d241c;
}

.lead-form .consent.has-error input {
  outline: 2px solid #b82d23;
  outline-offset: 2px;
}

.lead-form .consent-error {
  margin: -10px 0 14px 26px;
}

.select-shell {
  position: relative;
}

.object-select {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.select-trigger {
  width: 100%;
  height: 51px;
  border: 0;
  border-bottom: 1px solid #bcc2c2;
  background: #f3f4f2;
  color: var(--ink);
  padding: 15px 46px 15px 14px;
  text-align: left;
  font-family: inherit;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.65;
  cursor: pointer;
  position: relative;
  transition: border-color .18s, box-shadow .18s, background .18s;
}

.select-trigger span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.select-trigger:hover {
  background: #eceeeb;
}

.select-trigger:focus-visible,
.select-trigger[aria-expanded="true"] {
  outline: 0;
  border-color: var(--yellow);
  box-shadow: inset 0 -2px var(--yellow);
}

.select-trigger i {
  position: absolute;
  right: 17px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: translateY(-70%) rotate(45deg);
  transition: transform .18s;
}

.select-trigger[aria-expanded="true"] i {
  transform: translateY(-30%) rotate(225deg);
}

.select-options {
  position: absolute;
  z-index: 20;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  margin: 0;
  padding: 6px;
  background: #fff;
  border: 1px solid #cfd3d0;
  box-shadow: 0 18px 38px rgba(20, 24, 26, .16);
  list-style: none;
}

.select-options[hidden] {
  display: none;
}

.select-options li {
  position: relative;
  padding: 12px 14px 12px 17px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  cursor: pointer;
  outline: 0;
}

.select-options li:hover,
.select-options li:focus {
  background: #eff0ee;
}

.select-options li[aria-selected="true"] {
  background: #fff8cf;
}

.select-options li[aria-selected="true"]::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  bottom: 7px;
  width: 3px;
  background: var(--yellow);
}

.file-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.file-caption {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.file-control {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: stretch;
  border: 1px solid #d5d8d5;
  border-bottom-color: #bcc2c2;
  background: #f3f4f2;
  min-height: 51px;
}

.file-button {
  border: 0;
  background: var(--ink);
  color: #fff;
  padding: 10px 15px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: background .18s, color .18s;
}

.file-button:hover {
  background: var(--yellow);
  color: var(--ink);
}

.file-button:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 2px rgba(255, 212, 0, .28);
  position: relative;
  z-index: 1;
}

.file-summary {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 10px 13px;
  color: #596166;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.35;
  text-transform: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: default;
  user-select: text;
}

.file-input {
  position: absolute;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0 !important;
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 760px) {
  .object-select {
    position: absolute !important;
    z-index: 3;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
    clip: auto !important;
    clip-path: none !important;
    white-space: normal !important;
    border: 0 !important;
    opacity: 0;
    pointer-events: auto;
    cursor: pointer;
  }

  .select-trigger {
    pointer-events: none;
  }

  .select-shell:focus-within .select-trigger {
    border-color: var(--yellow);
    box-shadow: inset 0 -2px var(--yellow);
  }

  .select-options {
    display: none !important;
  }

  .file-control {
    grid-template-columns: 1fr;
  }

  .file-button {
    min-height: 47px;
  }

  .file-summary {
    min-height: 43px;
  }
}
