.ecmf-referral-form {
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding: 48px;
  box-sizing: border-box;
  background: #060606;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 28px;
  color: #fff;
}

.ecmf-referral-form * {
  box-sizing: border-box;
}

.ecmf-referral-field {
  margin-bottom: 24px;
}

.ecmf-referral-field label {
  display: block;
  margin-bottom: 12px;
  color: #b8bac5;
  font-size: 14px;
  line-height: 1.3;
  font-weight: 600;
}

.ecmf-referral-field input {
  width: 100%;
  height: 52px;
  padding: 0 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  outline: 0;
  background: #171717;
  color: #fff;
  font: inherit;
  font-size: 15px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.ecmf-referral-field input::placeholder {
  color: #7f8390;
  opacity: 1;
}

.ecmf-referral-field input:focus {
  border-color: rgba(225, 63, 52, 0.7);
  box-shadow: 0 0 0 3px rgba(225, 63, 52, 0.1);
  background: #191919;
}

/* Keep browser autofill from turning the fields light blue/white. */
.ecmf-referral-field input:-webkit-autofill,
.ecmf-referral-field input:-webkit-autofill:hover,
.ecmf-referral-field input:-webkit-autofill:focus,
.ecmf-referral-field input:-webkit-autofill:active {
  -webkit-text-fill-color: #fff !important;
  caret-color: #fff;
  box-shadow: 0 0 0 1000px #171717 inset !important;
  -webkit-box-shadow: 0 0 0 1000px #171717 inset !important;
  transition: background-color 9999s ease-in-out 0s;
}

.ecmf-referral-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 58px;
  margin-top: 42px;
  padding: 16px 24px;
  border: 0;
  border-radius: 999px;
  background: #df3f35;
  color: #fff;
  font: inherit;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 16px 32px rgba(223, 63, 53, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.ecmf-referral-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 38px rgba(223, 63, 53, 0.28);
}

.ecmf-referral-submit:disabled {
  cursor: not-allowed;
  opacity: 0.65;
  transform: none;
}

.ecmf-referral-consent {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  color: #9397a3;
  font-size: 12px;
  line-height: 1.55;
  cursor: pointer;
}

.ecmf-referral-consent input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  min-width: 24px;
  margin: 1px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 7px;
  background: #171717;
  cursor: pointer;
  position: relative;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.ecmf-referral-consent input[type="checkbox"]:checked {
  background: #df3f35;
  border-color: #df3f35;
}

.ecmf-referral-consent input[type="checkbox"]:checked::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -56%);
  color: #fff;
  font-size: 15px;
  line-height: 1;
  font-weight: 800;
}

.ecmf-referral-consent input[type="checkbox"]:focus-visible {
  outline: 2px solid rgba(225, 63, 52, 0.75);
  outline-offset: 3px;
}

.ecmf-referral-consent a {
  color: #e34136;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ecmf-referral-form > .ecmf-message,
.ecmf-referral-form > .ecmf-success {
  margin: 18px 0 0;
  text-align: center;
  font-size: 14px;
  line-height: 1.5;
}

.ecmf-referral-form > .ecmf-message {
  color: #ff766e;
}

.ecmf-referral-form > .ecmf-success {
  color: #fff;
  display: none;
}

.ecmf-referral-form > .ecmf-success.ecmf-is-visible {
  display: block;
}

.ecmf-referral-form > .ecmf-message:empty {
  display: none;
}

@media (max-width: 767px) {
  .ecmf-referral-form {
    padding: 34px 20px;
    border-radius: 22px;
  }

  .ecmf-referral-field {
    margin-bottom: 22px;
  }

  .ecmf-referral-submit {
    margin-top: 30px;
    font-size: 18px;
  }
}
