/* Invite friends (js/referrals.js): the window's two tabs, the code card, the share buttons, the ladder of boxes and the
   friends' progress — in the boxes' own purple and gold. Logical properties only: it reads the same in RTL. */
.rfx { display: flex; flex-direction: column; gap: 12px; }
.rfx-tabs { display: flex; gap: 6px; }
.rfx-tab { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 12px; padding: 9px 6px; cursor: pointer;
  background: rgba(122, 47, 214, .12); color: inherit; font-weight: 600; font-size: 14px; white-space: nowrap; min-width: 0; }
.rfx-tab.on { background: linear-gradient(120deg, #6d28d9, #c026d3); color: #fff; }
.rfx-count { font-style: normal; font-size: 11px; min-width: 18px; height: 18px; line-height: 18px; border-radius: 9px; padding: 0 5px; background: #f3c74d; color: #4a1470; }
.rfx-pane { display: flex; flex-direction: column; gap: 12px; }
.rfx-off { margin: 0; padding: 8px 10px; border-radius: 10px; background: #fff4d6; color: #7a4b00; font-size: 13px; }
.rfx-i { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid currentColor; background: transparent; color: inherit; opacity: .75;
  font: italic 700 12px/16px Georgia, serif; cursor: pointer; padding: 0; }

/* the code card */
.rfx-hero { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 18px; color: #fff; position: relative; overflow: hidden;
  background: radial-gradient(circle at 12% 10%, #a855f7 0%, #5b21b6 50%, #2e1065 100%); border: 1.5px solid #f3c74d;
  box-shadow: 0 6px 20px rgba(91, 33, 182, .35); }
.rfx-hero-t { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.rfx-hero-t b { font-size: 15px; color: #ffe08a; }
.rfx-code { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rfx-code small { opacity: .85; font-size: 12px; }
.rfx-code-v { font: 800 26px/1 ui-monospace, 'SFMono-Regular', Consolas, monospace; letter-spacing: 4px; padding: 6px 12px; border-radius: 12px;
  background: rgba(0, 0, 0, .28); border: 1px dashed rgba(255, 224, 138, .7); color: #fff; unicode-bidi: isolate; }
.rfx-copy { border: 0; border-radius: 999px; padding: 8px 14px; font-weight: 700; font-size: 12px; cursor: pointer; white-space: nowrap;
  background: linear-gradient(180deg, #ffe58f, #f2b62a); color: #4a1470; box-shadow: 0 2px 0 #b9821a; }
.rfx-copy:active { transform: translateY(1px); box-shadow: none; }
.rfx-link { display: flex; gap: 6px; }
.rfx-link input { flex: 1; min-width: 0; height: 36px; padding: 0 10px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .95); color: #2e1065; font-size: 12px; }
.rfx-share { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.rfx-sh { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 4px; border-radius: 12px; border: 0; cursor: pointer; text-decoration: none;
  color: #fff; font-size: 11px; font-weight: 700; min-width: 0; }
.rfx-sh i { font-style: normal; font-size: 18px; line-height: 1; }
.rfx-sh span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.rfx-sh.tg { background: #229ed9; }
.rfx-sh.wa { background: #25d366; }
.rfx-sh.fb { background: #1877f2; }
.rfx-sh.fb i { font: 900 18px/1 Arial, sans-serif; }
.rfx-sh.more { background: rgba(255, 255, 255, .2); }

/* the ladder of boxes */
.rfx-ladder { padding: 12px; border-radius: 18px; background: linear-gradient(180deg, #faf5ff, #f3e8ff); border: 1px solid #e9d5ff; }
.rfx-ladder-h { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; color: #3b0764; }
.rfx-ladder-h b { flex: 1; font-size: 14px; }
.rfx-qual { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #fff; color: #6d28d9; border: 1px solid #ddd6fe; }
.rfx-track { height: 8px; border-radius: 4px; background: #e9d5ff; overflow: hidden; margin: 0 0 10px; }
.rfx-fill { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #a855f7, #f59e0b); transition: width .6s ease; }
[dir=rtl] .rfx-fill { background: linear-gradient(270deg, #a855f7, #f59e0b); }
.rfx-boxes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.rfx-step { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; min-width: 0; }
.rfx-chest { position: relative; width: 100%; aspect-ratio: 1; border: 0; padding: 0; background: none; cursor: pointer; border-radius: 16px; }
.rfx-chest-img { width: 100%; height: 100%; object-fit: contain; display: block; transition: transform .25s ease, filter .25s ease; }
.rfx-chest-emo { font-size: 40px; }
.rfx-chest.locked .rfx-chest-img { filter: grayscale(.55) brightness(.85); opacity: .85; }
.rfx-chest.ready .rfx-chest-img { animation: rfx-pulse 1.4s ease-in-out infinite; filter: drop-shadow(0 0 10px var(--bc, #f3c74d)) drop-shadow(0 0 4px #fff7c2); }
@keyframes rfx-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08) rotate(-2deg); } }
.rfx-chest-n { position: absolute; inset-block-start: 2px; inset-inline-start: 2px; width: 20px; height: 20px; border-radius: 50%; font-size: 11px; font-weight: 800; line-height: 20px;
  background: #3b0764; color: #ffe08a; z-index: 1; }
.rfx-chest i { position: absolute; font-style: normal; z-index: 1; }
.rfx-lock { inset-block-end: 4px; inset-inline-end: 4px; font-size: 16px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .4)); }
.rfx-done { inset-block-end: 4px; inset-inline-end: 4px; width: 22px; height: 22px; border-radius: 50%; background: #16a34a; color: #fff; font-weight: 900; font-size: 13px; line-height: 22px; }
.rfx-go { inset-block-end: -4px; inset-inline: 10%; padding: 3px 0; border-radius: 999px; font-size: 11px; font-weight: 800; color: #4a1470;
  background: linear-gradient(180deg, #ffe58f, #f2b62a); box-shadow: 0 2px 0 #b9821a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rfx-step-n { font-size: 12px; color: #3b0764; white-space: nowrap; }
.rfx-step-name { font-size: 11px; color: #6b21a8; line-height: 1.2; }
.rfx-step .rw-chips { justify-content: center; }
.rfx-reveal { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.rfx-reveal-img { width: 160px; height: 160px; object-fit: contain; }

/* what each friend brings */
.rfx-how { display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 16px; background: #fff; border: 1px solid #ede9fe; }
.rfx-how-h { display: flex; align-items: center; gap: 8px; justify-content: space-between; color: #3b0764; }
.rfx-how-r { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: #3f3651; }
.rfx-how-r.note { font-size: 12px; color: #6b6280; }
.rfx-how-ic { width: 22px; text-align: center; flex: none; }
.rfx-how-r .rw-chips { margin-inline-start: auto; }
.rfx-gems { margin-inline-start: auto; display: inline-flex; align-items: center; gap: 4px; }
.rfx-gem { width: 18px; height: 18px; object-fit: contain; vertical-align: -4px; }

/* my friends */
.rfx-totals { display: flex; gap: 8px; }
.rfx-tot { flex: 1; min-width: 0; padding: 10px; border-radius: 14px; color: #fff; background: linear-gradient(135deg, #6d28d9, #a21caf); }
.rfx-tot.wait { background: linear-gradient(135deg, #0e7490, #0891b2); }
.rfx-tot.held { background: linear-gradient(135deg, #b45309, #d97706); }
.rfx-tot small { display: block; font-size: 11px; opacity: .9; margin-bottom: 3px; }
.rfx-tot > div { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 14px; }
.rfx-sum { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.rfx-friends { display: flex; flex-direction: column; gap: 8px; }
.rfx-fr { display: flex; gap: 10px; padding: 10px; border-radius: 14px; background: #fff; border: 1px solid #ede9fe; }
.rfx-fr-ph { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; flex: none; cursor: pointer; }
.rfx-fr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.rfx-fr-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rfx-fr-top b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60%; unicode-bidi: plaintext; }
.rfx-st { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #ede9fe; color: #5b21b6; }
.rfx-st.q { background: #dcfce7; color: #166534; }
.rfx-st.review { background: #fef3c7; color: #92400e; }
.rfx-st.rejected, .rfx-st.banned { background: #fee2e2; color: #991b1b; }
.rfx-st.capped { background: #f1f5f9; color: #475569; }
.rfx-fr-bar { position: relative; height: 18px; border-radius: 9px; background: #f3e8ff; overflow: hidden; }
.rfx-fr-bar i { position: absolute; inset-block: 0; inset-inline-start: 0; background: linear-gradient(90deg, #c084fc, #f472b6); border-radius: 9px; }
.rfx-fr-bar span { position: relative; display: block; font-size: 11px; font-weight: 700; line-height: 18px; padding-inline: 8px; color: #3b0764; }
.rfx-ms { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.rfx-dot { min-width: 22px; height: 22px; padding: 0 5px; border-radius: 11px; font-size: 10px; font-weight: 800; line-height: 22px; text-align: center; cursor: default;
  background: #f1f5f9; color: #64748b; }
.rfx-dot.paid, .rfx-dot.legacy { background: #16a34a; color: #fff; }
.rfx-dot.legacy { opacity: .6; }
.rfx-dot.pending { background: #cffafe; color: #155e75; }
.rfx-dot.held { background: #fef3c7; color: #92400e; }
.rfx-dot.rejected, .rfx-dot.cancelled, .rfx-dot.revoked { background: #fee2e2; color: #991b1b; }
.rfx-buys { margin-inline-start: auto; font-size: 12px; color: #5b21b6; font-weight: 700; }
.rfx-fr-got { display: flex; align-items: center; gap: 4px 8px; flex-wrap: wrap; font-size: 12px; }
.rfx-fr-got small { color: #6b6280; }
.rfx-fr-got small.lost { color: #991b1b; }

/* phones */
@media (max-width: 520px) {
  .rfx-code-v { font-size: 22px; letter-spacing: 3px; }
  .rfx-boxes { gap: 4px; }
  .rfx-step-name { display: none; }
  .rfx-step .rw-chips { transform: scale(.9); }
  .rfx-tab { font-size: 13px; }
}
.rfx .rw-ggems .rw-img { width: 20px; height: 20px; }
