/**
 * Front-end form styling.
 *
 * Inputs mirror apply.cred.ai/phone/enter: .textFieldBorderAndBg (rgba black
 * fill, 1px #333 border, .375rem radius), .boxed-input-container height of
 * 3.438rem, .input-text at 17px / -.01em / Nunito Sans 300, #8c8c8c
 * placeholders and the #ff6fff focus border.
 *
 * Hand-maintained: this file is enqueued straight from assets/ and is not part
 * of the CodeKit build in dist/.
 */

.cred-form-page {
  background: #000;
  color: #fff;
  min-height: 100vh;
  padding: 60px 20px 100px;
  font-family: "nunito-sans", sans-serif;
  font-weight: 300;
}

.cred-form-page__grid {
  width: 1140px;
  max-width: 100%;
  margin: 0 auto;
}

/* Centered cred.ai wordmark above the form */
.cred-form-page__logo {
  display: flex;
  justify-content: center;
  margin: 0 0 72px;
}

.cred-form-page__logo svg {
  width: 85px;
  height: 21px;
  display: block;
}

/* Matches .cred-lead-form__title, the site's heading treatment. */
.cred-form-page__title {
  font-family: "neue-haas-grotesk-display", sans-serif;
  font-weight: 700;
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: -0.035em;
  color: #fff;
  margin: 0 0 16px;
}

.cred-form-page__intro {
  font-size: 17px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: rgba(238, 238, 238, 0.8);
  max-width: 760px;
  margin: 0 0 40px;
}

.cred-form-page__intro a {
  color: #ff34ff;
}

/* Form ------------------------------------------------------------------ */

.cred-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

@media (max-width: 767px) {
  .cred-form__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.cred-form__field--wide {
  grid-column: 1 / -1;
}

.cred-form__label {
  display: block;
  margin: 0 0 8px;
  font-family: neue-haas-grotesk-display, sans-serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  --tw-text-opacity: 1;
  color: rgb(238 238 238 / var(--tw-text-opacity, 1));
}

.cred-form__required {
  color: #ff2a7f;
  margin-left: 2px;
}

/* One control shell for text inputs, selects and the textarea alike. */
.cred-form__control {
  background: rgba(13, 4, 4, 0.5);
  border: 1px solid #232323;
  border-radius: 0.75rem;
  position: relative;
  height: 3.438rem;
  transition: border-color 150ms ease;
}

.cred-form__control--textarea {
  height: auto;
}

.cred-form__input {
  width: 100%;
  height: 100%;
  background: none;
  border: 0;
  border-radius: 0.75rem;
  padding: 0 1rem;
  text-align: left;
  letter-spacing: -0.01em;
  font-family: "Nunito Sans", "nunito-sans", sans-serif;
  font-size: 17px;
  font-weight: 300;
  color: #fff;
  appearance: none;
}

/*
 * Elementor's kit styles bare inputs (1px #666, 3px radius, its own padding)
 * and out-specifies a single class, which left the text fields drawing a
 * second box inside the control shell. This chain wins without !important.
 */
.cred-form__form .cred-form__control > input.cred-form__input,
.cred-form__form .cred-form__control > select.cred-form__input,
.cred-form__form .cred-form__control > textarea.cred-form__input {
  height: 100%;
  /* background-color only: `background` would wipe the select's arrow image. */
  background-color: transparent;
  border: 0;
  border-radius: 0.75rem;
  box-shadow: none;
  padding: 0 1rem;
  font-family: "Nunito Sans", "nunito-sans", sans-serif;
  font-size: 17px;
  font-weight: 300;
  color: #fff;
}

.cred-form__form .cred-form__control > textarea.cred-form__input {
  height: auto;
  padding: 14px 1rem;
}

.cred-form__form .cred-form__control > select.cred-form__input {
  padding-right: 2.5rem;
}

.cred-form__input:focus,
.cred-form__input:focus-visible {
  outline: 0;
  box-shadow: none;
}

.cred-form__control:focus-within {
  border-color: #ff6fff;
}

.cred-form__input::placeholder {
  opacity: 1;
  color: #8c8c8c;
}

.cred-form__textarea {
  height: auto;
  padding: 14px 1rem;
  line-height: 1.45;
  resize: vertical;
}

.cred-form__select {
  cursor: pointer;
  padding-right: 2.5rem;
  background-image: linear-gradient(45deg, transparent 50%, #8c8c8c 50%),
    linear-gradient(135deg, #8c8c8c 50%, transparent 50%);
  background-position: calc(100% - 20px) calc(50% + 2px), calc(100% - 14px) calc(50% + 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.cred-form__select option {
  background: #0d0404;
  color: #fff;
}

/* Consent checkbox ------------------------------------------------------ */

/*
 * Checkbox and its label share a line box: the label's line-height matches the
 * box height, so single-line text sits on the checkbox centre rather than
 * riding above it.
 */
.cred-form__consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 28px 0 0;
  font-size: 15px;
  color: rgba(238, 238, 238, 0.8);
}

.cred-form__consent input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #ff2a7f;
  flex: 0 0 auto;
}

.cred-form__consent input,
.cred-form__consent label {
  line-height: 18px;
}

/* Submit ---------------------------------------------------------------- */

.cred-form__btn {
  display: inline-block;
  margin: 32px 0 0;
  padding: 0 48px;
  height: 3.438rem;
  border: 0;
  border-radius: 0.375rem;
  background: linear-gradient(135deg, #ff2a7f 0%, #ff34ff 100%);
  color: #fff;
  font-family: "neue-haas-grotesk-display", sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  cursor: pointer;
  transition: background 250ms ease;
}

.cred-form__btn:hover,
.cred-form__btn:focus {
  background: linear-gradient(135deg, #ff34ff 0%, #ff2a7f 100%);
}

.cred-form__fine {
  margin: 20px 0 0;
  font-size: 13px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.55);
}

.cred-form__fine a {
  color: #ff34ff;
}

/* Notices --------------------------------------------------------------- */

.cred-form__notice {
  border-radius: 0.375rem;
  padding: 18px 20px;
  margin: 0 0 32px;
  font-size: 16px;
  line-height: 1.45;
}

.cred-form__notice p {
  margin: 0 0 6px;
}

.cred-form__notice p:last-child,
.cred-form__notice ul {
  margin-bottom: 0;
}

.cred-form__notice--success {
  background: rgba(181, 255, 78, 0.12);
  border: 1px solid rgba(181, 255, 78, 0.5);
  color: #b5ff4e;
}

.cred-form__notice--error {
  background: rgba(255, 42, 127, 0.12);
  border: 1px solid rgba(255, 42, 127, 0.6);
  color: #ff9ec4;
}

/* Honeypot: kept out of view without display:none, which some bots detect. */
.cred-form__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* The footer consent links sit on the page's black background here. */
.cred-form-page ~ .cred-consent-footer,
body:has(.cred-form-page) .cred-consent-footer {
  background: #000;
}
