/* =========================================
   MicroFlex Footer HubSpot Form
   This form is designed for a black footer.
========================================= */

.microflex-footer-hubspot-card,
.microflex-footer-hubspot-card * {
  box-sizing: border-box;
}

.microflex-footer-hubspot-card {
  width: min(100%, var(--mff-form-max-width, 450px));
  max-width: var(--mff-form-max-width, 450px);
  margin: 0;
  padding: 0;
  color: #ffffff;
  background: transparent;
  font-family: Inter, Arial, sans-serif;
}

.microflex-footer-hubspot-card[data-align="center"] {
  margin-left: auto;
  margin-right: auto;
}

.microflex-footer-hubspot-card[data-align="right"] {
  margin-left: auto;
  margin-right: 0;
}

.microflex-footer-form-title {
  width: 100%;
  margin: 0 0 16px;
  color: #ffffff;
  font-family: Inter, Arial, sans-serif;
  font-size: 16px;
  font-style: normal;
  font-weight: 700;
  line-height: 19px;
}

/* HubSpot form base reset */
.microflex-footer-hubspot-form,
.microflex-footer-hubspot-form form,
.microflex-footer-hubspot-form .hs-form {
  width: 100% !important;
  max-width: var(--mff-form-max-width, 450px) !important;
  margin: 0 !important;
  padding: 0 !important;
  color: #ffffff !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  font-family: Inter, Arial, sans-serif !important;
}

/* HubSpot newer form variables */
.microflex-footer-hubspot-form {
  --hsf-global__font-family: Inter, Arial, sans-serif;
  --hsf-global__font-size: 12px;
  --hsf-global__color: #ffffff;

  --hsf-background__background-color: transparent;
  --hsf-background__padding: 0;

  --hsf-field-label__color: #ffffff;
  --hsf-field-label__font-size: 12px;
  --hsf-field-label-requiredindicator__color: #ffffff;

  --hsf-field-input__background-color: #ffffff;
  --hsf-field-input__border-color: #242121;
  --hsf-field-input__border-width: 0.5px;
  --hsf-field-input__border-style: solid;
  --hsf-field-input__border-radius: 5px;

  --hsf-button__background-color: #89c540;
  --hsf-button__color: #ffffff;
  --hsf-button__border-radius: 4px;
}

/* Remove default HubSpot spacing */
.microflex-footer-hubspot-form fieldset {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 0 8px !important;
  padding: 0 !important;
  border: 0 !important;
}

.microflex-footer-hubspot-form .hs-form-field {
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

.microflex-footer-hubspot-form .input {
  width: 100% !important;
  margin: 0 !important;
}

/* First name / Last name row */
.microflex-footer-hubspot-form .form-columns-2 {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: 16px !important;
  width: 100% !important;
  margin: 0 0 8px !important;
  padding: 0 !important;
}

.microflex-footer-hubspot-form .form-columns-2 .hs-form-field {
  float: none !important;
  width: 100% !important;
  max-width: 100% !important;
}

/* Single rows */
.microflex-footer-hubspot-form .form-columns-1 {
  display: block !important;
  width: 100% !important;
  margin: 0 0 8px !important;
  padding: 0 !important;
}

.microflex-footer-hubspot-form .form-columns-1 .hs-form-field {
  width: 100% !important;
  max-width: 100% !important;
}

/* Labels */
.microflex-footer-hubspot-form label {
  display: block !important;
  margin: 0 0 7px !important;
  color: #ffffff !important;
  font-family: Inter, Arial, sans-serif !important;
  font-size: 12px !important;
  font-style: normal !important;
  font-weight: 400 !important;
  line-height: 16px !important;
  letter-spacing: 0.02em !important;
}

.microflex-footer-hubspot-form .hs-form-required {
  color: #ffffff !important;
}

/* Inputs / selects / textarea */
.microflex-footer-hubspot-form input.hs-input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
.microflex-footer-hubspot-form select.hs-input,
.microflex-footer-hubspot-form textarea.hs-input,
.microflex-footer-hubspot-form input[type="text"],
.microflex-footer-hubspot-form input[type="email"],
.microflex-footer-hubspot-form input[type="tel"],
.microflex-footer-hubspot-form input[type="number"],
.microflex-footer-hubspot-form select,
.microflex-footer-hubspot-form textarea {
  width: 100% !important;
  min-width: 0 !important;
  background: #ffffff !important;
  color: #242121 !important;
  border: 0.5px solid #242121 !important;
  border-radius: 5px !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
  font-family: Inter, Arial, sans-serif !important;
  font-style: normal !important;
  font-weight: 400 !important;
  outline: none !important;
}

/* Standard text inputs */
.microflex-footer-hubspot-form input.hs-input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
.microflex-footer-hubspot-form input[type="text"],
.microflex-footer-hubspot-form input[type="email"],
.microflex-footer-hubspot-form input[type="tel"],
.microflex-footer-hubspot-form input[type="number"] {
  height: 44px !important;
  padding: 0 17px !important;
  font-size: 16px !important;
  line-height: 24px !important;
}

/* Phone field */
.microflex-footer-hubspot-form .hs_phone input,
.microflex-footer-hubspot-form input[name="phone"],
.microflex-footer-hubspot-form input[name="mobilephone"] {
  height: 50px !important;
}

/* If HubSpot phone field includes country selector markup */
.microflex-footer-hubspot-form .hs-fieldtype-phonenumber .input,
.microflex-footer-hubspot-form .hs-fieldtype-intl-phone .input {
  width: 100% !important;
}

.microflex-footer-hubspot-form .hs-fieldtype-phonenumber input,
.microflex-footer-hubspot-form .hs-fieldtype-intl-phone input {
  height: 50px !important;
}

/* Select field */
.microflex-footer-hubspot-form select.hs-input,
.microflex-footer-hubspot-form select {
  height: 44px !important;
  padding: 0 48px 0 17px !important;
  color: #242121 !important;
  font-size: 14px !important;
  line-height: 18px !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  background-image:
    linear-gradient(45deg, transparent 50%, #242121 50%),
    linear-gradient(135deg, #242121 50%, transparent 50%) !important;
  background-position:
    calc(100% - 34px) 18px,
    calc(100% - 25px) 18px !important;
  background-size: 9px 9px, 9px 9px !important;
  background-repeat: no-repeat !important;
}

/* Placeholder */
.microflex-footer-hubspot-form input::placeholder,
.microflex-footer-hubspot-form textarea::placeholder {
  color: #242121 !important;
  opacity: 0.8 !important;
}

/* Focus */
.microflex-footer-hubspot-form input:focus,
.microflex-footer-hubspot-form select:focus,
.microflex-footer-hubspot-form textarea:focus {
  border-color: #242121 !important;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.05),
    0 0 0 2px rgba(137, 197, 64, 0.28) !important;
}

/* HubSpot rich text / legal text if present */
.microflex-footer-hubspot-form .legal-consent-container,
.microflex-footer-hubspot-form .legal-consent-container p,
.microflex-footer-hubspot-form .hs-richtext,
.microflex-footer-hubspot-form .hs-richtext p {
  color: #ffffff !important;
  font-family: Inter, Arial, sans-serif !important;
  font-size: 12px !important;
  font-style: normal !important;
  font-weight: 400 !important;
  line-height: 16px !important;
}

.microflex-footer-hubspot-form .legal-consent-container a,
.microflex-footer-hubspot-form .hs-richtext a {
  color: #ffffff !important;
  text-decoration: underline !important;
}

/* Checkbox / consent if HubSpot adds it */
.microflex-footer-hubspot-form .inputs-list {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.microflex-footer-hubspot-form .inputs-list li {
  margin: 0 !important;
  padding: 0 !important;
}

.microflex-footer-hubspot-form .hs-form-booleancheckbox-display,
.microflex-footer-hubspot-form .hs-form-checkbox-display {
  display: flex !important;
  align-items: flex-start !important;
  gap: 8px !important;
  color: #ffffff !important;
  font-family: Inter, Arial, sans-serif !important;
  font-size: 12px !important;
  line-height: 16px !important;
}

.microflex-footer-hubspot-form input[type="checkbox"] {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  margin: 0 !important;
  padding: 0 !important;
  accent-color: #89c540 !important;
}

/* reCAPTCHA if enabled */
.microflex-footer-hubspot-form .hs_recaptcha {
  margin: 14px 0 0 !important;
  padding: 0 !important;
}

.microflex-footer-hubspot-form .grecaptcha-badge {
  margin: 14px 0 0 !important;
}

/* Error messages */
.microflex-footer-hubspot-form .hs-error-msgs {
  margin: 5px 0 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

.microflex-footer-hubspot-form .hs-error-msg,
.microflex-footer-hubspot-form .hs-error-msgs label {
  margin: 0 !important;
  color: #ffb4b4 !important;
  font-family: Inter, Arial, sans-serif !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 16px !important;
  letter-spacing: 0 !important;
}

/* Submit wrapper */
.microflex-footer-hubspot-form .hs-submit,
.microflex-footer-hubspot-form .hs-submit .actions {
  width: 100% !important;
  margin: 16px 0 0 !important;
  padding: 0 !important;
}

/* Submit button */
.microflex-footer-hubspot-form input[type="submit"],
.microflex-footer-hubspot-form .hs-button,
.microflex-footer-hubspot-form .hs-button.primary {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 36px !important;
  margin: 0 !important;
  padding: 10px !important;
  color: #ffffff !important;
  background: #89c540 !important;
  border: 0 !important;
  border-radius: 4px !important;
  cursor: pointer !important;
  box-shadow: none !important;
  font-family: Inter, Arial, sans-serif !important;
  font-size: 12px !important;
  font-style: normal !important;
  font-weight: 700 !important;
  line-height: 15px !important;
  text-align: center !important;
  text-shadow: none !important;
  transition: background-color 0.2s ease, transform 0.2s ease !important;
}

.microflex-footer-hubspot-form input[type="submit"]:hover,
.microflex-footer-hubspot-form .hs-button:hover,
.microflex-footer-hubspot-form .hs-button.primary:hover {
  background: #82b83a !important;
  transform: translateY(-1px) !important;
}

.microflex-footer-hubspot-form input[type="submit"]:focus-visible,
.microflex-footer-hubspot-form .hs-button:focus-visible,
.microflex-footer-hubspot-form .hs-button.primary:focus-visible {
  outline: 2px solid #ffffff !important;
  outline-offset: 2px !important;
}

/* Success message */
.microflex-footer-hubspot-form .submitted-message {
  color: #ffffff !important;
  font-family: Inter, Arial, sans-serif !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 20px !important;
}

/* Mobile */
@media (max-width: 480px) {
  .microflex-footer-hubspot-card {
    width: 100%;
    max-width: 100%;
  }

  .microflex-footer-hubspot-form,
  .microflex-footer-hubspot-form form,
  .microflex-footer-hubspot-form .hs-form {
    max-width: 100% !important;
  }

  .microflex-footer-hubspot-form .form-columns-2 {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .microflex-footer-hubspot-form .hs-submit,
  .microflex-footer-hubspot-form .hs-submit .actions {
    margin-top: 16px !important;
  }
}
