/* Referral share sheet and live reward feedback. */
.cid-referral-modal-open { overflow: hidden; }

.cid-referral-dialog {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(5, 19, 48, .46);
  backdrop-filter: blur(7px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .18s ease, visibility .18s ease;
}

.cid-referral-dialog.is-open {
  opacity: 1;
  visibility: visible;
}

.cid-referral-card {
  width: min(100%, 430px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .78);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(5, 19, 48, .25);
  transform: translateY(12px) scale(.98);
  transition: transform .2s ease;
}

.cid-referral-dialog.is-open .cid-referral-card {
  transform: translateY(0) scale(1);
}

.cid-referral-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 24px 24px 17px;
  color: #fff;
  background:
    radial-gradient(circle at 85% 10%, rgba(255, 255, 255, .25), transparent 34%),
    linear-gradient(135deg, #0962D6, #0a3d98);
}

.cid-referral-card__eyebrow {
  margin: 0 0 4px;
  color: rgba(255, 255, 255, .76);
  font: 800 11px/1.2 'Noto Sans', sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.cid-referral-card h2 {
  margin: 0;
  font: 900 24px/1.1 'Noto Sans', sans-serif;
}

.cid-referral-close {
  display: inline-grid;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, .16);
  font-size: 20px;
  cursor: pointer;
}

.cid-referral-card__body {
  padding: 20px 24px 24px;
}

.cid-referral-card__body p {
  margin: 0 0 15px;
  color: #60708a;
  font: 600 13px/1.5 'Noto Sans', sans-serif;
}

.cid-referral-link {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin-bottom: 16px;
  padding: 10px 12px;
  border: 1px solid #e3eaf5;
  border-radius: 12px;
  color: #0a1840;
  background: #f7faff;
  font: 700 12px/1.3 'Noto Sans', sans-serif;
}

.cid-referral-link span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cid-referral-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.cid-referral-option {
  display: grid;
  min-height: 86px;
  place-items: center;
  gap: 6px;
  padding: 12px 6px;
  border: 1px solid #e2e9f4;
  border-radius: 15px;
  color: #0a1840;
  background: #fff;
  font: 800 11px/1.2 'Noto Sans', sans-serif;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}

.cid-referral-option:hover,
.cid-referral-option:focus-visible {
  border-color: #0962D6;
  background: #f2f7ff;
  outline: none;
  transform: translateY(-2px);
}

.cid-referral-option__icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  font-size: 17px;
}

.cid-referral-option[data-share-action="whatsapp"] .cid-referral-option__icon { background: #20bf6b; }
.cid-referral-option[data-share-action="facebook"] .cid-referral-option__icon { background: #1877f2; }
.cid-referral-option[data-share-action="copy"] .cid-referral-option__icon { background: #0962D6; }

.cid-referral-status {
  min-height: 18px;
  margin: 13px 0 0 !important;
  color: #0962D6 !important;
  font-size: 12px !important;
}

.cid-referral-reward {
  position: fixed;
  top: 74px;
  left: 50%;
  z-index: 4100;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 15px;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #0962D6, #0a3d98);
  box-shadow: 0 9px 26px rgba(9, 98, 214, .26);
  font: 900 12px/1 'Noto Sans', sans-serif;
  pointer-events: none;
  transform: translate(-50%, -12px);
  animation: cid-reward-in 1.45s ease both;
}

.cid-referral-reward.is-star {
  background: linear-gradient(135deg, #d98a00, #f3b51b);
}

.cid-referral-reward::before {
  content: '✦';
  color: #ffd76a;
  font-size: 18px;
}

@keyframes cid-reward-in {
  0% { opacity: 0; transform: translate(-50%, -12px) scale(.9); }
  16%, 75% { opacity: 1; transform: translate(-50%, 0) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -5px) scale(.98); }
}

.cid-counter-bump {
  animation: cid-counter-bump .48s ease both;
}

@keyframes cid-counter-bump {
  0% { transform: scale(1); }
  45% { transform: scale(1.35); color: #ffd45a; }
  100% { transform: scale(1); }
}

@media (max-width: 430px) {
  .cid-referral-dialog { padding: 12px; }
  .cid-referral-card__head { padding: 20px 18px 15px; }
  .cid-referral-card__body { padding: 17px 18px 20px; }
  .cid-referral-card h2 { font-size: 21px; }
  .cid-referral-options { gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  .cid-referral-dialog,
  .cid-referral-card,
  .cid-referral-option,
  .cid-counter-bump,
  .cid-referral-reward { transition: none; animation-duration: 1ms; }
}
