/* Rewards: balance and earnings, cashback goals for PayPal and for SEPA bank deposits (today, this week, this month,
   all-time milestones), how cashback works, invite friends and the rewards history. Colours and fonts come from /css/txlist.css (.ycp), like the
   history and stats pages. */
body { background-color: #11141A; }


.rw { padding: 30px 32px 70px; max-width: 1240px; }
.rw-head { margin-bottom: 22px; }
.rw-head h1 { margin: 0; font-family: "titles", sans-serif !important; font-weight: 400; font-size: 32px; color: #E4E8EF; }
.rw-head p { margin: 8px 0 0; font-size: 15px; color: #A5ACB9; }
.ycp .in { color: var(--in); }
.ycp .cur { font-weight: 500; opacity: .75; font-size: .62em; letter-spacing: .02em; }
.rw-num { font-variant-numeric: tabular-nums; }
.rw section, .rw article, .rw-milestones { scroll-margin-top: 16px; }

.rw-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px; }
.rw-kicker { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); }

/* A goal paid in the last 24 hours */
.rw-won { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; padding: 14px 18px; border-radius: 16px;
  background: linear-gradient(90deg, rgba(61, 214, 140, .14), rgba(61, 214, 140, .04)); border: 1px solid rgba(61, 214, 140, .32); }
.rw-won p { margin: 0; font-size: 14.5px; color: var(--text-2); }
.rw-won b { color: var(--text); font-weight: 600; }
.rw-won b.in { color: var(--in); }
.won-ic { flex: none; width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: var(--in); background: rgba(61, 214, 140, .16); }

.rw-error { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 18px 20px; margin-bottom: 16px; border-radius: 16px; background: var(--surface); border: 1px solid #4A2A33; font-size: 13.5px; color: var(--text-2); }
.rw-error b { font-size: 15px; font-weight: 600; color: var(--text); }
.rw-error .btn { margin-top: 6px; }

/* Balance and earnings */
.rw-top { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; }
.rw-top.solo { grid-template-columns: minmax(0, 1fr); }
.rw-balance { position: relative; overflow: hidden; }
.rw-balance::after { content: ""; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(closest-side, rgba(155, 123, 255, .22), transparent); pointer-events: none; }
.rw-big { margin: 8px 0 14px; min-height: 48px; font-size: 40px; font-weight: 600; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.rw-bonus { min-height: 32px; }
.rw-bonus p { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.rw-bonus b { color: var(--text-2); font-weight: 600; }
.rw-bonus b.in { color: var(--in); }
.bn-bar { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; max-width: 360px; }
.bn-bar b { display: block; height: 100%; border-radius: inherit; background: var(--grad); }
.rw-bonus .bn-on { display: flex; align-items: flex-start; gap: 6px; color: var(--in); }
.rw-bonus .bn-on .i { margin-top: 2px; }
.rw-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; position: relative; z-index: 1; }
.rw-earned-rows { margin-top: 12px; display: flex; flex-direction: column; }
.er { display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 12px; padding: 10px 0; font-size: 14px; color: var(--text-2); }
.er + .er { border-top: 1px solid var(--line); }
.er b { font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.er-ic { width: 32px; height: 32px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.er.total { color: var(--muted); font-size: 13px; }
.er.total b { color: var(--text-2); font-weight: 500; }

/* Loading: grey bars where the figures go */
.sk { display: none; }
.is-loading .sk { display: block; height: 14px; width: 60%; margin: 12px 0; border-radius: 6px; background: var(--surface-3); animation: rw-pulse 1.2s ease-in-out infinite; }
.is-loading .rw-big .sk { height: 36px; width: 180px; margin: 6px 0 0; }
.is-loading .rw-history .sk { width: auto; height: 42px; margin: 14px 18px; }
@keyframes rw-pulse { 50% { opacity: .45; } }

.rw-section { margin-top: 34px; }
.rw-sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.rw-sec-head h2 { margin: 0; font-family: "titles", sans-serif !important; font-weight: 400; font-size: 22px; color: #E4E8EF; }
.rw-sec-head p { margin: 6px 0 0; font-size: 14px; color: var(--muted); }

/* One card per list that is on: today, this week, this month */
.rw-periods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.rw-periods.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rw-periods.n1 { grid-template-columns: minmax(0, 1fr); }
.pc { display: flex; flex-direction: column; min-width: 0; }
.pc-top { display: flex; align-items: center; gap: 10px; }
.pc-top h3 { margin: 0; font-family: 'YCP UI', sans-serif !important; font-size: 15.5px; font-weight: 600; color: var(--text); }
.pc-ic { flex: none; width: 34px; height: 34px; border-radius: 11px; display: flex; align-items: center; justify-content: center; }
.pc-left { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 11.5px; font-weight: 500; color: var(--muted); background: var(--surface-2); white-space: nowrap; }
.pc-amt { margin: 16px 0 4px; font-size: 28px; font-weight: 600; display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 6px; }
.pc-sub { flex-basis: 100%; font-size: 12.5px; font-weight: 400; color: var(--muted); margin-top: 2px; }
.pc-next { margin: 4px 0 0; font-size: 13.5px; color: var(--muted); }
.pc-next b { color: var(--text); font-weight: 600; }
.pc-next b.in { color: var(--in); }
.pc-next.all { display: flex; align-items: center; gap: 7px; color: var(--in); font-weight: 500; }
.pc-hold { display: flex; align-items: flex-start; gap: 8px; margin: 8px 0 0; font-size: 12.5px; color: var(--muted); }
.pc-hold b { font-weight: 600; }
.pc-hold.passed .i { margin-top: 1px; color: var(--muted-2); }
.sw, .tk-bar s { background: repeating-linear-gradient(135deg, rgba(245, 185, 74, .75) 0 4px, rgba(245, 185, 74, .28) 4px 8px); }
.sw { flex: none; width: 14px; height: 8px; border-radius: 3px; margin-top: 5px; }

/* The track: goals evenly spaced, reward chips above, goal amounts below */
.tk { position: relative; height: 70px; margin: 8px 12px 6px 6px; }
.tk-bar { position: absolute; left: 0; right: 0; top: 30px; height: 10px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.tk-bar b { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: var(--grad); }
.tk-bar s { position: absolute; top: 0; bottom: 0; }
.tk-zero { position: absolute; left: 0; top: 46px; font-size: 11.5px; color: var(--muted-2); }
.tk-mark { position: absolute; top: 0; width: 0; height: 100%; }
.tk-mark i { position: absolute; left: -7px; top: 28px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 2px solid #3A4257; }
.tk-mark.paid i { border: 0; background: var(--in); box-shadow: 0 0 0 3px rgba(61, 214, 140, .2); }
.tk-mark.passed i { border: 0; background: #4A5266; }
.tk-mark.due i { border-color: var(--in); }
.tk-chip { position: absolute; bottom: 46px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 3px; height: 21px; padding: 0 7px; border-radius: 99px;
  font-size: 11px; font-weight: 600; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--line-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tk-mark.paid .tk-chip { color: var(--in); background: rgba(61, 214, 140, .1); border-color: rgba(61, 214, 140, .3); }
.tk-mark.passed .tk-chip { color: var(--muted-2); background: transparent; border-style: dashed; text-decoration: line-through; }
.tk-goal { position: absolute; top: 46px; transform: translateX(-50%); font-size: 11.5px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tk-mark:last-child .tk-chip, .tk-mark:last-child .tk-goal { transform: translateX(-80%); }
/* A long list's track: five goals close together, so a paid chip is green without its tick; it starts at the goal
   before its window, and the bar fades in there as it goes on before */
.tk.long .tk-chip .i { display: none; }
.tk.from .tk-bar { -webkit-mask-image: linear-gradient(90deg, transparent, #000 22px); mask-image: linear-gradient(90deg, transparent, #000 22px); }

/* A list of more than five goals: which ones the track shows, and every goal of the list behind a button */
.gl { margin-top: auto; }
.gl-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--line); }
.gl-range { font-size: 12.5px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.gl-toggle { display: inline-flex; align-items: center; gap: 4px; height: 28px; margin-right: -6px; padding: 0 4px 0 8px; border: 0; border-radius: 8px; background: none; font-size: 12.5px; font-weight: 500; color: var(--link); white-space: nowrap; }
.gl-toggle:hover { background: var(--surface-2); }
.gl-toggle .i { transition: transform .15s; }
.gl-toggle[aria-expanded="true"] .i { transform: rotate(180deg); }
.gl-list { margin: 6px 0 0; padding: 0; list-style: none; column-width: 250px; column-gap: 32px; }
.gl-row { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto 46px; align-items: center; gap: 10px; padding: 6px 0; font-size: 13px; color: var(--text-2); break-inside: avoid; }
.gl-row i { width: 10px; height: 10px; border-radius: 50%; border: 2px solid #3A4257; }
.gl-row.paid i { border: 0; background: var(--in); }
.gl-row.passed i { border: 0; background: #4A5266; }
.gl-row.due i { border-color: var(--in); }
.gl-goal { white-space: nowrap; font-variant-numeric: tabular-nums; }
.gl-row.next .gl-goal { color: var(--text); font-weight: 600; }
.gl-reward { white-space: nowrap; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.gl-row.paid .gl-reward { color: var(--in); }
.gl-row.passed .gl-reward { color: var(--muted-2); font-weight: 500; text-decoration: line-through; }
.gl-state { font-size: 11.5px; color: var(--muted); text-align: right; }
.gl-row.paid .gl-state, .gl-row.due .gl-state { color: var(--in); }
.gl-row.passed .gl-state { color: var(--muted-2); }
/* An open list makes its card taller; the cards beside it keep their own height */
.rw-periods:has(.gl-list:not([hidden])) { align-items: start; }

.rw-milestones { margin-top: 16px; }
.rw-periods[hidden] + .rw-milestones { margin-top: 0; }
.ms-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.ms-head h3 { margin: 0; font-family: 'YCP UI', sans-serif !important; font-size: 15.5px; font-weight: 600; color: var(--text); }
.ms-head p { margin: 3px 0 0; font-size: 13px; color: var(--muted); }
.ms-head p b { color: var(--text-2); font-weight: 600; }
.rw-milestones .tk { margin-left: 8px; margin-right: 22px; }

/* The SEPA bank deposit goals, under the PayPal ones; the Boosted badge is the panel's switch */
.rw-sepa .rw-sec-head h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.rw-boost { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px 0 8px; border-radius: 99px; font-family: 'YCP UI', sans-serif !important;
  font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #fff; background: var(--grad); box-shadow: 0 4px 16px rgba(94, 123, 255, .35); }
.rw-boost .i { width: 13px; height: 13px; }
.rw-sepa .rw-sec-head > .btn { flex: none; }

/* How cashback works */
.rw-how h3 { margin: 0 0 12px; font-family: 'YCP UI', sans-serif !important; font-size: 15px; font-weight: 600; color: var(--text-2); }
.rw-how ul { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.rw-how li { display: flex; gap: 12px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: rgba(21, 25, 34, .55); }
.rw-how li b { display: block; font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 3px; }
.rw-how li span { font-size: 13px; line-height: 1.5; color: var(--muted); }
.rw-how li:last-child:nth-child(odd) { grid-column: 1 / -1; }
.how-ic { flex: none; width: 32px; height: 32px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #A9B8FF; background: rgba(110, 120, 255, .12); }
.ycp .rw-more { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; font-size: 13px; font-weight: 500; color: var(--link); }
.ycp .rw-more:hover { text-decoration: underline; }

/* Invite friends */
.rw-invite { display: flex; align-items: center; gap: 14px; margin-top: 34px; }
.rw-invite-ic { flex: none; width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.rw-invite-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rw-invite-text b { font-size: 14.5px; font-weight: 600; }
.rw-invite-text span { font-size: 13px; color: var(--muted); }
.rw-invite-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

/* Your level (only while Levels are on): the badge, level and tier, what is next, and a link to the level page */
.rw-level { display: flex; align-items: center; gap: 16px; margin-top: 16px; padding-top: 16px; padding-bottom: 16px; }
.rw-level-badge { flex: none; width: 50px; }
.rw-level-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rw-level-text b { font-size: 14.5px; font-weight: 600; }
.rw-level-text b span { margin-left: 8px; font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--tc); }
.rw-level-text > span { font-size: 13px; color: var(--muted); }
.rw-level-text > span .in { font-weight: 600; }
.rw-level-bar .lv-bar { max-width: 420px; height: 10px; margin-top: 5px; }
.rw-level-actions { flex: none; }

/* History: the transaction history's Feed (/css/txlist.css), grouped by day */
.rw-history .f-row:hover { background: none; }
.rw-history .f-ic.badge { background: none; }
.rw-history .f-ic.badge .lv-badge { width: 32px; }
.rw-history-more { display: flex; justify-content: center; }
.rw-history-more .btn { margin-top: 14px; }

@media (max-width: 1180px) {
  .rw-periods, .rw-periods.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rw-periods.n3 > :last-child { grid-column: 1 / -1; }
}
@media (max-width: 960px) {
  .rw-level { flex-wrap: wrap; }
  .rw-level-text { flex-basis: calc(100% - 66px); }
  .rw-level-actions { flex-basis: 100%; padding-left: 66px; }
  .rw-invite { flex-wrap: wrap; }
  .rw-invite-text { flex-basis: calc(100% - 56px); }
  .rw-invite-actions { flex-basis: 100%; justify-content: flex-start; padding-left: 56px; }
}
@media (max-width: 750px) {
  .rw { padding: 22px 14px 120px; }
  .rw-head { margin-bottom: 18px; }
  .rw-head h1 { font-size: 26px; }
  .rw-head p { font-size: 14px; }
  .rw-top, .rw-periods, .rw-periods.n2, .rw-how ul { grid-template-columns: minmax(0, 1fr); }
  .rw-top { gap: 12px; }
  .rw-periods { gap: 12px; }
  .rw-periods.n3 > :last-child { grid-column: auto; }
  .rw-card { padding: 18px; border-radius: 16px; }
  .rw-big { font-size: 34px; min-height: 42px; }
  .rw-actions { flex-direction: column; }
  .rw-actions .btn { width: 100%; height: 42px; }
  .rw-section { margin-top: 28px; }
  .rw-sec-head h2 { font-size: 20px; }
  .rw-sepa .rw-sec-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .rw-won { align-items: flex-start; }
  .rw-milestones { margin-top: 12px; }
  .rw-level { margin-top: 12px; align-items: flex-start; gap: 14px; }
  .rw-level-badge { width: 44px; }
  .rw-level-text { flex-basis: calc(100% - 58px); }
  .rw-level-actions { padding-left: 0; }
  .rw-level-actions .btn { width: 100%; height: 42px; }
  .rw-invite { margin-top: 28px; align-items: flex-start; }
  .rw-invite-actions { padding-left: 0; flex-direction: column; }
  .rw-invite-actions .btn { width: 100%; height: 42px; }
  .rw-history .f-sub { white-space: normal; }
  .rw-milestones .tk-mark:last-child .tk-chip, .rw-milestones .tk-mark:last-child .tk-goal { transform: translateX(-62%); }
}
