.referral-consent {
  position: fixed;
  right: clamp(16px, 3vw, 40px);
  bottom: clamp(16px, 3vw, 40px);
  z-index: 10000;
  width: min(430px, calc(100vw - 32px));
  padding: 24px;
  border: 1px solid var(--card-border, #d7d9dd);
  border-radius: 16px;
  background: var(--card, #fff);
  box-shadow: 0 24px 70px rgba(23, 26, 33, .2), var(--card-shadow, 0 4px 16px rgba(23, 26, 33, .08));
  color: var(--text-strong, #171a21);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  animation: referral-consent-in .28s ease-out both;
}

.referral-consent__description,
.referral-consent__note {
  margin: 0;
  color: var(--text-body, #4f5561);
  font-size: 14px;
  line-height: 1.55;
}

.referral-consent__description {
  color: var(--text-strong, #171a21);
  font-size: 15px;
  font-weight: 400;
}

.referral-consent__note {
  margin-top: 10px;
  font-size: 12px;
}

.referral-consent__privacy {
  color: var(--accent, #425a8b);
  font-weight: 700;
  text-underline-offset: 2px;
}

.referral-consent__privacy:hover {
  color: var(--accent-warm-deep, #5b6475);
}

.referral-consent__privacy:focus-visible {
  border-radius: 2px;
  outline: 2px solid var(--accent-warm-deep, #5b6475);
  outline-offset: 2px;
}

.referral-consent__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}

.referral-consent__error {
  margin: 12px 0 0;
  color: #a12b2b;
  font-size: 12px;
  line-height: 1.45;
}

.referral-consent__button {
  min-width: 82px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.2;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.referral-consent__button:hover {
  transform: translateY(-1px);
}

.referral-consent__button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent-warm-deep, #5b6475) 42%, transparent);
  outline-offset: 2px;
}

.referral-consent__button--accept,
.referral-consent__button--decline {
  border-color: var(--field-border, #c8cbd1);
  background: var(--field, #eceef1);
  color: var(--text-strong, #171a21);
}

.referral-consent__button--accept:hover,
.referral-consent__button--decline:hover {
  background: var(--pillar-action-bg-hover, #dfe2e7);
}

.referral-preferences-row {
  margin-top: 2px;
}

.referral-preferences-button {
  appearance: none;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
}

.referral-preferences-button:focus-visible {
  border-radius: 2px;
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

@keyframes referral-consent-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 520px) {
  .referral-consent {
    padding: 20px;
  }

  .referral-consent__actions {
    align-items: stretch;
    flex-direction: column;
  }

  .referral-consent__button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .referral-consent {
    animation: none;
  }

  .referral-consent__button {
    transition: none;
  }
}
