/* PayPal Friends & Family deposits: the list (paypalff/), the rules (rules/), the amount (amount/) and the open
   deposit (active/). Builds on /css/dash.css. */

/* Page head with the PayPal mark */
.pp-title { display: flex; align-items: center; gap: 16px; min-width: 0; }
.pp-logo { flex: none; width: 52px; height: 52px; border-radius: 15px; background: #fff; display: flex; align-items: center; justify-content: center; }

/* ---- The open deposits ---- */
.ycp .pp-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 16px; padding: 15px 20px; min-width: 0; transition: background .15s; }
.ycp .pp-row + .pp-row { border-top: 1px solid var(--line); }
.ycp .pp-row:hover { background: var(--surface-2); }
.pp-row-ic { width: 42px; height: 42px; border-radius: 13px; background: #fff; display: flex; align-items: center; justify-content: center; }
.pp-row-ic img { width: 22px; height: 22px; }
.pp-row-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pp-row-amt { display: flex; align-items: center; flex-wrap: wrap; gap: 0 4px; font-size: 15px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.pp-row-amt .cur { font-size: 12.5px; margin-right: 2px; }
.pp-arrow { color: var(--muted-2); margin: 0 4px; }
.pp-row-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 10px; font-size: 12.5px; color: var(--muted); min-width: 0; }
.pp-row-meta .mono { font-size: 12px; color: var(--text-2); overflow-wrap: anywhere; }
.pp-id::before { content: "·"; margin-right: 10px; color: var(--muted-2); }
.pp-row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.pp-row-when { font-size: 12px; color: var(--muted); white-space: nowrap; }

/* ---- Rules, the tutorial and the tick ---- */
.ycp .pp-loss { margin-bottom: 16px; font-size: 13.5px; }
.pp-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.pp-video { position: relative; overflow: hidden; border-radius: 14px; border: 1px solid var(--line-2); background: #000; aspect-ratio: 1532 / 720; }
.pp-video video { display: block; width: 100%; height: 100%; object-fit: contain; background: #000; }
.pp-video-card .pp-video { margin-top: 2px; }

.pp-rules { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 14px; }
.pp-rules li { display: flex; gap: 12px; align-items: flex-start; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.pp-rules li > span:last-child { min-width: 0; }
.pp-rules li b { display: block; margin-bottom: 1px; font-size: 14px; font-weight: 600; color: var(--text); }
.pp-rules li b.in-line { display: inline; margin: 0; font-size: inherit; }
.pp-rules a { color: var(--link); }
.pp-rules a:hover { text-decoration: underline; }
.pp-rule-ic { flex: none; width: 32px; height: 32px; border-radius: 10px; display: flex; align-items: center; justify-content: center; color: #C9B8FF; background: rgba(155, 123, 255, .14); }
.pp-rules.compact { gap: 11px; }
.pp-rules.compact li { gap: 11px; font-size: 13px; color: var(--text-2); }
.pp-rules.compact .pp-rule-ic { width: 28px; height: 28px; border-radius: 9px; margin-top: -3px; }
.ycp .pp-loss-s { margin-top: 16px; font-size: 12.5px; }

.pp-agree { margin: 18px 0 16px; padding: 14px 15px; border-radius: 13px; border: 1px solid var(--line-2); background: var(--bg); }
.pp-agree .chk { font-size: 13.5px; }
.pp-agree:has(input:checked) { border-color: rgba(155, 123, 255, .45); background: rgba(155, 123, 255, .06); }

/* ---- The amount ---- */
.pp-stack { display: flex; flex-direction: column; }
.ycp .pp-amt { display: flex; align-items: center; gap: 12px; height: 68px; padding: 0 10px 0 18px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--bg); cursor: text; }
.pp-amt:focus-within { border-color: #6B6BFF; box-shadow: 0 0 0 3px rgba(107, 107, 255, .18); }
.pp-amt-l { flex: none; width: 86px; font-size: 13px; color: var(--muted); }
.ycp .pp-amt input { flex: 1; min-width: 0; width: 100%; height: 100%; padding: 0; border: 0; outline: 0; background: none; font-size: 26px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.ycp .pp-amt input:focus-visible { outline: 0; }
.pp-amt input::placeholder { color: var(--muted-2); font-weight: 500; }
.pp-unit { flex: none; display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px 0 9px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--line-2); font-size: 14px; font-weight: 600; color: var(--text); }
.pp-unit img { width: 24px; height: 24px; border-radius: 50%; }
.pp-amt-mid { position: relative; z-index: 1; height: 0; display: flex; justify-content: center; }
.pp-amt-mid .i { box-sizing: content-box; width: 16px; height: 16px; padding: 7px; margin-top: -15px; border-radius: 50%; background: var(--surface-3); border: 3px solid var(--surface); color: var(--text-2); }
.pp-stack .pp-amt + .pp-amt-mid + .pp-amt { margin-top: 8px; }
.pp-limits { display: flex; align-items: center; gap: 8px; margin: 14px 2px 0; font-size: 13px; color: var(--muted); }
.pp-limits b { color: var(--text-2); font-weight: 600; }
.pp-limits .i { flex: none; color: var(--muted-2); }
/* The cashback hint (cashback-hint.js and .css) sits inside the card here. */
.pp-amount .cb-hint { max-width: none; margin: 18px 0 0; }
.pp-confirm .btn.big { margin-top: 0; }

/* ---- The open deposit ---- */
.pa-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.pa-amounts { min-width: 0; }
.pa-amounts .big { margin-top: 6px; }
.pa-receive { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.pa-receive b { color: var(--in); font-weight: 600; }
.pa-receive b .cur { font-size: 12.5px; }

.pa-timer { position: relative; flex: none; width: 118px; height: 118px; }
.pa-timer svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.pa-track { fill: none; stroke: var(--surface-3); stroke-width: 7; }
.pa-ring { fill: none; stroke: #7D7BFF; stroke-width: 7; stroke-linecap: round; stroke-dasharray: 276.46; stroke-dashoffset: 0; transition: stroke-dashoffset .9s linear, stroke .3s; }
.pa-timer-t { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
.pa-timer-t b { font-size: 24px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.pa-timer-t span { font-size: 11.5px; color: var(--muted); }
.pa-timer.low .pa-ring { stroke: var(--hold); }
.pa-timer.low .pa-timer-t b { color: var(--hold); }
.is-up .pa-ring { stroke: #FF7A7A; }
.is-up .pa-timer-t b { color: #FF9A9A; }

.pa-to { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.pa-to .lbl { margin-bottom: 8px; }
.ycp .pa-copy { padding: 8px 8px 8px 12px; }
.pa-copy img { flex: none; padding: 5px; border-radius: 8px; background: #fff; box-sizing: content-box; }
.ycp .pa-copy > span { font-size: 15px; }
.pa-hint { margin: 14px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.pa-act { margin-top: 18px; }
/* Wrong amount, Ban email and Cancel: three buttons right under Mark paid. */
.pa-alt { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.ycp .pa-alt-b { width: 100%; height: 46px; padding: 0 10px; border-radius: 12px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.ycp .pa-alt-b.warn { color: #F6C46E; border-color: rgba(245, 185, 74, .38); background: rgba(245, 185, 74, .06); }
.ycp .pa-alt-b.warn:hover { border-color: rgba(245, 185, 74, .65); background: rgba(245, 185, 74, .1); }
.ycp .pa-alt-b.danger:hover { background: rgba(255, 122, 122, .1); }
.ycp .pa-alt-b:focus-visible { outline: 2px solid #7E7BFF; outline-offset: 2px; }
.pa-id { margin: 14px 0 0; text-align: center; font-size: 12.5px; color: var(--muted); }
.pa-id .mono { margin-left: 4px; color: var(--text-2); }

.pa-outcome { display: flex; gap: 14px; align-items: flex-start; margin-top: 20px; padding: 16px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--bg); }
.pa-outcome-ic { flex: none; width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.pa-outcome b { display: block; font-size: 15px; font-weight: 600; color: var(--text); }
.pa-outcome p { margin: 3px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.pa-outcome.paid { border-color: rgba(61, 214, 140, .3); background: rgba(61, 214, 140, .06); }
.pa-outcome.paid .pa-outcome-ic { color: var(--in); background: rgba(61, 214, 140, .12); }
.pa-outcome.cancelled .pa-outcome-ic, .pa-outcome.closed .pa-outcome-ic { color: var(--muted); background: var(--surface-3); }
.pa-outcome.wrong .pa-outcome-ic { color: var(--hold); background: rgba(245, 185, 74, .12); }
.pa-outcome.expired { border-color: rgba(255, 122, 122, .3); background: rgba(255, 122, 122, .06); }
.pa-outcome.expired .pa-outcome-ic { color: #FF9A9A; background: rgba(255, 122, 122, .12); }
/* Once an action went through (or the deposit closed) the buttons give way to what happened. */
.is-done .pa-act, .is-done .pa-hint { display: none; }
.is-done .pa-timer { opacity: .5; }
/* Closed before its details came: only what happened is shown. */
.pa.is-done:not(.has-deal) .pa-top, .pa.is-done:not(.has-deal) .pa-to, .pa.is-done:not(.has-deal) .pa-id { display: none; }
.pa.is-done:not(.has-deal) .pa-outcome { margin-top: 0; padding: 0; border: 0; background: none; }

.pa-rules-ic { color: #C9B8FF; background: rgba(155, 123, 255, .14); }
.pa-video-ic { color: #FF9A9A; background: rgba(255, 122, 122, .1); }
.pp-next-ic { color: #8FC2FF; background: rgba(110, 168, 255, .13); }
.pp .empty > div { margin-top: 2px; }

/* Yes or No before Cancel, Ban email and Wrong amount */
.pa-modal { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(5, 6, 10, .66); backdrop-filter: blur(2px); }
.pa-dialog { width: 100%; max-width: 420px; padding: 24px; border-radius: 20px; border: 1px solid var(--line-2); background: var(--surface); box-shadow: 0 24px 60px rgba(0, 0, 0, .55); text-align: center; }
.pa-dialog-ic { width: 48px; height: 48px; margin: 0 auto 14px; border-radius: 14px; display: flex; align-items: center; justify-content: center; color: #FF9A9A; background: rgba(255, 122, 122, .12); }
.pa-dialog h2 { margin: 0; font-size: 18px; font-weight: 600; color: var(--text); }
.pa-dialog p { margin: 8px 0 0; font-size: 14px; line-height: 1.55; color: var(--text-2); overflow-wrap: anywhere; }
.pa-dialog-a { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.ycp .pa-dialog-a .btn { height: 46px; font-size: 14.5px; border-radius: 12px; }

/* The list page at the limit: the notice above the list, and a New deposit that cannot be pressed. A link has no
   `disabled`, so it is `aria-disabled`, and the click is refused here. */
.pp-full { margin-bottom: 14px; }
.pp a.btn[aria-disabled="true"] { opacity: .45; pointer-events: none; box-shadow: none; }

@media (max-width: 1100px) {
  .pp-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 750px) {
  .pp-title { flex-direction: column; gap: 12px; }
  .ycp .pp-row { grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px 12px; padding: 14px 16px; }
  .pp-row-ic { width: 38px; height: 38px; border-radius: 12px; align-self: start; }
  .pp-row-side { grid-column: 2 / 4; flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; }
  /* A line longer than a date (Under review's) wraps beside its tag instead of running off the card. */
  .pp-row-when { min-width: 0; white-space: normal; text-align: right; }
  .ycp .pp-view { display: none; }
  .pp-row-meta { flex-direction: column; align-items: flex-start; gap: 1px; }
  .pp-id::before { display: none; }
  .pp-row-amt { font-size: 14.5px; }
  .pp-grid { gap: 14px; }
  /* The label sits above the figure in the box */
  .ycp .pp-amt { position: relative; height: 70px; padding: 18px 8px 0 14px; gap: 8px; }
  .pp-amt-l { position: absolute; top: 10px; left: 15px; width: auto; font-size: 11.5px; }
  .ycp .pp-amt input { font-size: 22px; }
  .pp-unit { margin-top: -18px; }
  .pp-unit { height: 40px; padding: 0 11px 0 8px; font-size: 13.5px; }
  .pp-unit img { width: 22px; height: 22px; }
  .pa-top { flex-direction: column-reverse; align-items: center; text-align: center; gap: 16px; }
  .pa-timer { width: 108px; height: 108px; }
  .pa-to { margin-top: 18px; padding-top: 16px; }
  /* The email gets the whole line; Copy goes under it */
  .ycp .pa-copy { flex-wrap: wrap; padding: 10px; }
  .ycp .pa-copy > span { flex-basis: calc(100% - 52px); font-size: 13.5px; }
  .ycp .pa-copy .btn { width: 100%; height: 38px; }
  .pa-dialog { padding: 20px; }
  .pa-alt { grid-template-columns: minmax(0, 1fr); gap: 8px; }
}
