/* ==========================================================================
   Referral program (/referral_guide)
   --------------------------------------------------------------------------
   Built on info-page.css (the .pol-* layout and the .ip-* components) and the
   .ph header from page-hero.css. Only what is particular to this page lives
   here: the hero figures, the link row, the share message with its language
   picker and the dashboard status badges.
   ========================================================================== */

/* Hero figures: three short ones, so they stay in one row down to a phone
   instead of page-hero.css's 2 + 1 grid; info-page.css stretches an odd
   last figure across a 2-column row, which a 3-column row must not do */
@media (max-width: 860px) {
    .rf .ph-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .pol.rf .ph-stats > .ph-stat:last-child:nth-child(odd) { grid-column: auto; }
}

/* ---------- the two main copy buttons (the link, the message) ----------
   They are the main action of their box, so they take the primary glass
   instead of info-page.css's small outline .ip-copy; .is-copied still wins. */
.rf button.ip-copy.rf-copy {
    min-height: 44px;
    height: auto;
    padding: 0 18px;
    border-color: rgba(0, 255, 255, 0.55);
    background: linear-gradient(180deg, rgba(0, 255, 255, 0.22) 0%, rgba(0, 255, 255, 0.08) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
    color: #e6feff;
    font-size: .88rem;
    text-shadow: 0 0 9px rgba(0, 255, 255, 0.35);
}
.rf button.ip-copy.rf-copy i { color: #e6feff; }
.rf button.ip-copy.rf-copy:hover {
    border-color: rgba(0, 255, 255, 0.85);
    background: linear-gradient(180deg, rgba(0, 255, 255, 0.36) 0%, rgba(0, 255, 255, 0.15) 100%);
    color: #ffffff;
}
.rf button.ip-copy.rf-copy.is-copied {
    border-color: rgba(46, 230, 160, 0.55);
    background: rgba(46, 230, 160, 0.1);
    color: #2ee6a0;
    text-shadow: none;
}
.rf button.ip-copy.rf-copy.is-copied i { color: #2ee6a0; }

/* ---------- your link: the whole address wraps rather than scrolling, so
   the code at its end is always in view; one click selects all of it ---------- */
.rf .rf-link { border-color: rgba(0, 255, 255, 0.35); }
.rf .rf-link:focus-within { border-color: var(--primary-color, #00ffff); }
.rf .rf-link > code {
    padding: 12px 14px;
    color: #e8fbff;
    font-size: .95rem;
    line-height: 1.45;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-all;
    user-select: all;
}
.rf-tally {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 20px;
}
.pol-sec .rf-tally { color: var(--pol-ink-2); }
.rf-tally strong {
    margin-right: 5px;
    font-family: var(--font-heading, 'Orbitron', sans-serif);
    font-size: 1.05rem;
    color: #ffffff;
}
.pol-sec .rf-tally a { margin-left: auto; text-decoration: none; }
.rf-tally a i { margin-left: 3px; font-size: .8em; }

/* ---------- the tables: one first-column width, so they line up ---------- */
.rf-req th:first-child,
.rf-status th:first-child { width: 12.5rem; }

/* ---------- dashboard statuses, drawn like the dashboard's own badges ---------- */
.rf-badge {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 8px;
    border: 1px solid rgba(154, 160, 170, 0.38);
    background: rgba(154, 160, 170, 0.12);
    color: #9aa0aa;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    white-space: nowrap;
}
.rf-badge--ok { border-color: rgba(46, 230, 160, 0.38); background: rgba(46, 230, 160, 0.12); color: #2ee6a0; }
.rf-badge--paid { border-color: rgba(0, 255, 255, 0.38); background: rgba(0, 255, 255, 0.12); color: #00ffff; }

/* ---------- the message to send, with a language picker ----------
   Radio chips choose the panel through :has(), so it works without script;
   without :has() support only the English message shows and the chips hide. */
.rf-msg {
    margin: 4px 0 14px;
    border: 1px solid rgba(0, 255, 255, 0.18);
    background: rgba(0, 0, 0, 0.28);
}
.rf-msg__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--pol-line);
    background: rgba(0, 255, 255, 0.03);
}
.rf-msg__label {
    font-family: var(--font-heading, 'Orbitron', sans-serif);
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--pol-ink-3);
    white-space: nowrap;
}
.rf-msg__langs { display: flex; flex-wrap: wrap; gap: 6px; }
.rf-msg__langs input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    opacity: 0;
    pointer-events: none;
}
.rf-msg__langs label {
    display: inline-flex;
    align-items: center;
    height: 30px;
    padding: 0 11px;
    border: 1px solid rgba(0, 255, 255, 0.22);
    color: var(--pol-ink-2);
    font-size: .88rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    user-select: none;
    transition: background .15s, border-color .15s, color .15s;
}
.rf-msg__langs label:hover { color: #ffffff; border-color: rgba(0, 255, 255, 0.45); background: rgba(0, 255, 255, 0.06); }
.rf-msg__langs input:checked + label {
    border-color: rgba(0, 255, 255, 0.55);
    background: linear-gradient(180deg, rgba(0, 255, 255, 0.22) 0%, rgba(0, 255, 255, 0.08) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
    color: #ffffff;
}
.rf-msg__langs input:focus-visible + label { outline: 2px solid var(--primary-color, #00ffff); outline-offset: 2px; }
.rf-msg__panel { display: none; padding: 16px 16px 14px; }
.rf-msg__panel[data-lang="en"] { display: block; }
.rf-msg:has(.rf-msg__langs input:checked) .rf-msg__panel { display: none; }
.rf-msg:has(#rf-lang-en:checked) .rf-msg__panel[data-lang="en"],
.rf-msg:has(#rf-lang-es:checked) .rf-msg__panel[data-lang="es"],
.rf-msg:has(#rf-lang-fr:checked) .rf-msg__panel[data-lang="fr"],
.rf-msg:has(#rf-lang-pt:checked) .rf-msg__panel[data-lang="pt"],
.rf-msg:has(#rf-lang-de:checked) .rf-msg__panel[data-lang="de"],
.rf-msg:has(#rf-lang-th:checked) .rf-msg__panel[data-lang="th"],
.rf-msg:has(#rf-lang-ms:checked) .rf-msg__panel[data-lang="ms"],
.rf-msg:has(#rf-lang-tl:checked) .rf-msg__panel[data-lang="tl"],
.rf-msg:has(#rf-lang-zh:checked) .rf-msg__panel[data-lang="zh"] { display: block; }
@supports not selector(:has(a)) {
    .rf-msg__langs { display: none; }
}
/* A <pre>, so the site's HTML minifier keeps its line breaks; set in the
   body face rather than monospace, since it is a message, not code */
.rf-msg__text {
    display: block;
    margin: 0 0 14px;
    padding: 0;
    overflow: visible;
    border: 0;
    background: none;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-family: var(--font-family, 'Rajdhani', sans-serif);
    font-size: 1.02rem;
    line-height: 1.65;
    color: #e2e6ec;
}
.rf-msg__share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    padding: 12px 16px;
    border-top: 1px solid var(--pol-line);
    font-size: .95rem;
    color: var(--pol-ink-3);
}
.rf-msg__share span { margin-right: 4px; }
.pol-sec .rf-msg__note {
    margin: 0;
    padding: 10px 16px;
    border-top: 1px solid var(--pol-line);
    font-size: .95rem;
    color: var(--pol-ink-3);
}

@media (max-width: 560px) {
    .rf .rf-link { flex-direction: column; }
    .rf .rf-link > .ip-copy { border-width: 1px 0 0 0; }
    .rf-req th:first-child,
    .rf-status th:first-child { width: 100%; }
    .rf-status td { padding-bottom: 6px; }
    .pol-sec .rf-tally a { margin-left: 0; }
    .rf-msg__panel .ip-copy { width: 100%; }
    .rf-msg__share span { flex-basis: 100%; }
    .rf-msg__share .ip-btn { flex: 1 1 100%; }
    .ip-actions .ip-btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
    .rf-msg__langs label { transition: none; }
}
