.referral-copy {
  align-items: center;
}

.referral-code {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 9px 10px 9px 14px;
}

.referral-code b {
  justify-self: end;
}

.referral-copy-icon {
  display: inline-grid;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  border: 1px solid #dce7e1;
  border-radius: 10px;
  background: #fff;
  color: #315f4c;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease, transform .18s ease;
}

.referral-copy .referral-copy-icon,
.referral-code .referral-copy-icon {
  flex: 0 0 38px;
  width: 38px;
  min-width: 38px;
  padding: 0;
}

.referral-copy-icon:hover,
.referral-copy-icon:focus-visible {
  outline: 0;
  background: #e8f2ed;
}

.referral-copy-icon:active { transform: scale(.94); }
.referral-copy-icon.copied { background: #3d725c; color: #fff; }
.referral-copy-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 520px) {
  .referral-copy {
    align-items: stretch;
  }

  .referral-code {
    grid-template-columns: auto 1fr;
  }

  .referral-code .referral-copy-icon { grid-column: auto; width: 38px; }
}

.referral-loading {
  position: relative;
  min-height: 150px;
  overflow: hidden;
  color: transparent;
  font-size: 0;
}

.referral-loading::before {
  content: "";
  position: absolute;
  inset: 28px;
  border-radius: 10px;
  background:
    linear-gradient(#e8eeeb 0 0) 0 0 / 34% 12px no-repeat,
    linear-gradient(#eef2f0 0 0) 0 30px / 68% 9px no-repeat,
    linear-gradient(#eef2f0 0 0) 0 65px / 100% 42px no-repeat;
  animation: referral-skeleton-pulse 1.2s ease-in-out infinite alternate;
}

@keyframes referral-skeleton-pulse {
  to { opacity: .45; }
}
