/* ============================================================
   VIPSCLUB Portal 2026 — Refer Landing Form Module
   Right column: "Create your free account" registration form
   Figma: Desktop 374:283 | Mobile 380:4314
   ============================================================ */

.refer-landing-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Heading (above card) ── */
.refer-landing-form__heading {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.25;
  color: var(--vips-text-primary);
  margin: 0;
}

/* ── Sticky card on desktop ── */
.refer-landing-form__card {
  background: var(--vips-bg-card);
  border: 1px solid var(--vips-border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card-subtle);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ── Sub-text ── */
.refer-landing-form__subtext {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 14px;
  line-height: 21px;
  color: var(--vips-text-primary);
  margin: 0 0 12px;
}

/* ── Referred-By Block ── */
.refer-landing-form__referred-by {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.refer-landing-form__referrer-avatar {
  width: 33px;
  height: 33px;
  border-radius: 50%;
  background: var(--vips-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 14px;
  color: var(--vips-text-secondary);
  flex-shrink: 0;
}

.refer-landing-form__referrer-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
  letter-spacing: -0.15px;
}

.refer-landing-form__referred-label {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 12px;
  line-height: 18px;
  color: var(--vips-text-secondary);
}

/* Name + tier sit on the same row */
.refer-landing-form__referrer-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.refer-landing-form__referrer-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 16px;
  line-height: 20px;
  color: var(--vips-text-primary);
  text-transform: capitalize;
  white-space: nowrap;
}

.refer-landing-form__referrer-tier {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 12px;
  line-height: 18px;
  color: var(--vips-text-secondary);
  white-space: nowrap;
}

/* ── Disclaimer ── */
.refer-landing-form__disclaimer {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 14px;
  line-height: 21px;
  color: var(--vips-text-light);
  margin: 8px 0 0;
}

/* ── HubSpot form element styles ── */

/* Remove HubSpot's default fieldset/list wrappers */
.refer-landing-form__form-wrap .hs-form fieldset {
  max-width: 100% !important;
  border: none;
  padding: 0;
  margin: 0 0 14px;
}

/* Single-column fields */
.refer-landing-form__form-wrap .hs-form .hs-form-field {
  margin-bottom: 14px;
}

/* Two fields side by side (firstname + lastname) */
.refer-landing-form__form-wrap .hs-form fieldset.form-columns-2 {
  display: flex;
  gap: 14px;
  margin-bottom: 14px;
}

.refer-landing-form__form-wrap .hs-form fieldset.form-columns-2 .hs-form-field {
  flex: 1 0 0;
  min-width: 0;
  margin-bottom: 0;
}

/* Consent block */
.refer-landing-form__form-wrap .hs-form .legal-consent-container {
  margin-bottom: 14px;
}

.refer-landing-form__form-wrap .hs-form .hs-submit {
  margin: 0;
}

/* Labels */
.refer-landing-form__form-wrap .hs-form label {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  line-height: 21px;
  color: #1a1a1a;
  margin-bottom: 8px;
}

.refer-landing-form__form-wrap .hs-form label .hs-form-required {
  display: none;
}

/* All text/email/phone/select inputs */
.refer-landing-form__form-wrap .hs-form input[type="text"],
.refer-landing-form__form-wrap .hs-form input[type="email"],
.refer-landing-form__form-wrap .hs-form input[type="tel"],
.refer-landing-form__form-wrap .hs-form input[type="number"],
.refer-landing-form__form-wrap .hs-form select,
.refer-landing-form__form-wrap .hs-form textarea {
  width: 100%;
  height: 43px;
  padding: 10px 16px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #ffffff;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 14px;
  line-height: 1;
  color: #212121;
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  transition: border-color 0.15s;
}

.refer-landing-form__form-wrap .hs-form input::placeholder,
.refer-landing-form__form-wrap .hs-form textarea::placeholder {
  color: #616161;
}

.refer-landing-form__form-wrap .hs-form input:focus,
.refer-landing-form__form-wrap .hs-form select:focus,
.refer-landing-form__form-wrap .hs-form textarea:focus {
  outline: none;
  border-color: #212121;
}

/* Select dropdown arrow */
.refer-landing-form__form-wrap .hs-form .hs-fieldtype-select {
  position: relative;
}

.refer-landing-form__form-wrap .hs-form .hs-fieldtype-select::after {
  content: '';
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #616161;
  pointer-events: none;
}

.refer-landing-form__form-wrap .hs-form .hs-fieldtype-select select {
  padding-right: 36px;
  cursor: pointer;
  color: #616161;
}

.refer-landing-form__form-wrap .hs-form .hs-fieldtype-select select:not([value=""]):valid {
  color: #212121;
}

/* Consent / legal container: flex row with 8px gap */
.refer-landing-form__form-wrap .hs-form .legal-consent-container .field,
.refer-landing-form__form-wrap .hs-form .hs-fieldtype-booleancheckbox .hs-form-booleancheckbox {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

/* HubSpot wraps checkbox + text in a <label> — make it flex too */
.refer-landing-form__form-wrap .hs-form .legal-consent-container label,
.refer-landing-form__form-wrap .hs-form .hs-fieldtype-booleancheckbox label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 14px;
  line-height: 21px;
  color: #757575;
  margin: 0;
  cursor: pointer;
}

/* Checkbox: 14×14px styled square */
.refer-landing-form__form-wrap .hs-form .legal-consent-container input[type="checkbox"],
.refer-landing-form__form-wrap .hs-form .hs-fieldtype-booleancheckbox input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 14px !important;
  height: 14px !important;
  min-width: 14px;
  flex-shrink: 0;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 2px;
  margin-top: 4px;
  cursor: pointer;
  padding: 0 !important;
  box-sizing: border-box;
  position: relative;
  transition: background 0.12s, border-color 0.12s;
}

.refer-landing-form__form-wrap .hs-form .legal-consent-container input[type="checkbox"]:checked,
.refer-landing-form__form-wrap .hs-form .hs-fieldtype-booleancheckbox input[type="checkbox"]:checked {
  background: #212121;
  border-color: #212121;
}

.refer-landing-form__form-wrap .hs-form .legal-consent-container input[type="checkbox"]:checked::after,
.refer-landing-form__form-wrap .hs-form .hs-fieldtype-booleancheckbox input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 4px;
  width: 5px;
  height: 3px;
  border-left: 1.5px solid #fff;
  border-bottom: 1.5px solid #fff;
  transform: rotate(-45deg);
}

.refer-landing-form__form-wrap .hs-form .legal-consent-container .hs-richtext {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 14px;
  line-height: 21px;
  color: #757575;
}

.refer-landing-form__form-wrap .hs-form .legal-consent-container .hs-richtext p {
  margin: 0;
}

/* Submit button */
.refer-landing-form__form-wrap .hs-form .hs-button.primary,
.refer-landing-form__form-wrap .hs-form input[type="submit"] {
  width: 100%;
  height: 47px;
  background: #212121;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  line-height: 1;
  letter-spacing: 0.14px;
  cursor: pointer;
  transition: background 0.15s;
  padding: 8px 9px;
  box-sizing: border-box;
}

.refer-landing-form__form-wrap .hs-form .hs-button.primary:hover,
.refer-landing-form__form-wrap .hs-form input[type="submit"]:hover {
  background: #333333;
}

/* Error messages */
.refer-landing-form__form-wrap .hs-form .hs-error-msgs {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
}

.refer-landing-form__form-wrap .hs-form .hs-error-msgs label {
  font-size: 12px;
  color: #c0392b;
  font-weight: 400;
  margin: 0;
  line-height: 16px;
}

/* Success message */
.refer-landing-form__form-wrap .submitted-message {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 21px;
  color: var(--vips-text-primary);
  text-align: center;
  padding: 20px 0;
}

/* ── Editor placeholder ── */
.refer-landing-form__placeholder {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 22px;
  color: var(--vips-text-secondary);
  background: var(--vips-bg-input);
  border-radius: var(--radius-sm);
  padding: 24px;
  text-align: center;
}

.refer-landing-form__placeholder p {
  margin: 0;
}

/* ── Mobile (≤768px) ── */
@media (max-width: 768px) {

  .refer-landing-form--hide-mobile {
    display: none;
  }

  .refer-landing-form__heading {
    font-family: var(--font-body);
    font-size: 20px;
    font-weight: 600;
  }

  .refer-landing-form__card {
    border-radius: 10px;
    border-width: 0.698px;
  }

}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {}

/* ── Per-instance style overrides ── */
{% if module.style_overrides.background_color.color %}
.refer-landing-form {
  background-color: ;
}
{% endif %}
