@charset "utf-8";

/* RIV88: a slim bar and a wallet around the provider's sportsbook.
   The chrome takes the sportsbook's own navy and page grey so the two read as one app;
   the serif wordmark, the water line and one warm action colour are ours.
   Built for phones first: every size, inset and tap target is set for a thumb. */

:root {
  --deep: #0A2554;      /* chrome: same navy as the sportsbook's header and menu */
  --deeper: #061838;
  --current: #24509B;   /* lighter water, back wave */
  --foam: #F1F3F7;      /* content background: same grey as the sportsbook's page */
  --ink: #0B1730;
  --muted: #55627A;
  --mist: #D5DBE6;      /* hairlines */
  --buoy: #FF6A3D;      /* the one action colour */
  --buoy-press: #E9562B;
  --in: #14724F;
  --out: #B13A2E;

  --bar-h: 52px;
  --display: 'Suez One', Georgia, 'Times New Roman', serif;
  --text: 'Assistant', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;

  --wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 24' preserveAspectRatio='none'%3E%3Cpath d='M0 12Q60 -8 120 12T240 12V24H0Z'/%3E%3C/svg%3E");
  --ripple: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 14' preserveAspectRatio='none'%3E%3Cpath d='M0 7Q12 -3 24 7T48 7' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; margin: 0; }

body {
  font-family: var(--text);
  font-size: 16px;
  line-height: 1.4;
  color: var(--ink);
  background: var(--deep);
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

[hidden] { display: none !important; }

button, input { font-family: inherit; }
button { cursor: pointer; touch-action: manipulation; -webkit-appearance: none; appearance: none; }
:focus-visible { outline: 3px solid var(--buoy); outline-offset: 2px; }

/* ---------- water: two wave layers drifting at different speeds ---------- */

.water {
  --water-h: 26px;
  --water-front: var(--foam);
  --water-back: var(--current);
  position: relative;
  height: var(--water-h);
  overflow: hidden;
  flex: none;
}
.water::before, .water::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0; left: 0;
  -webkit-mask-repeat: repeat-x, no-repeat;
  mask-repeat: repeat-x, no-repeat;
  -webkit-mask-image: var(--wave), linear-gradient(#000, #000);
  mask-image: var(--wave), linear-gradient(#000, #000);
}
.water::before {
  width: calc(100% + 300px);
  background: var(--water-back);
  -webkit-mask-size: 300px 20px, 100% calc(100% - 19px);
  mask-size: 300px 20px, 100% calc(100% - 19px);
  -webkit-mask-position: 0 0, 0 19px;
  mask-position: 0 0, 0 19px;
  animation: drift-back 16s linear infinite;
}
.water::after {
  width: calc(100% + 220px);
  top: 6px;
  background: var(--water-front);
  -webkit-mask-size: 220px 20px, 100% calc(100% - 19px);
  mask-size: 220px 20px, 100% calc(100% - 19px);
  -webkit-mask-position: 0 0, 0 19px;
  mask-position: 0 0, 0 19px;
  animation: drift-front 10s linear infinite;
}
@keyframes drift-back { to { transform: translateX(-300px); } }
@keyframes drift-front { from { transform: translateX(-220px); } to { transform: translateX(0); } }

/* ---------- buttons and form parts ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 12px;
  font-weight: 700; font-size: 18px; line-height: 1;
  user-select: none; -webkit-user-select: none;
}
.btn-primary {
  width: 100%; height: 54px;
  background: var(--buoy); color: var(--ink);
}
.btn-primary:active { background: var(--buoy-press); transform: translateY(1px); }
.btn-primary:disabled { opacity: .5; transform: none; }
.btn-quiet {
  height: 44px; padding: 0 16px;
  border: 1.5px solid var(--mist); border-radius: 10px;
  background: transparent; color: var(--ink);
  font-weight: 600; font-size: 16px;
}
.btn-quiet:active { background: rgba(10, 35, 41, .06); }

.form-error { margin: 12px 0 0; font-weight: 600; font-size: 16px; }

/* ---------- sign in ---------- */

.signin {
  position: fixed; inset: 0;
  display: flex; flex-direction: column;
  overflow-y: auto;
  background: var(--deep); color: var(--foam);
}
.signin-inner {
  flex: 1 0 auto;
  display: flex; flex-direction: column;
  width: 100%; max-width: 440px; margin: 0 auto;
  padding: calc(env(safe-area-inset-top, 0px) + 44px) 24px 20px;
}
.signin-mark {
  margin: 0 0 16px -2px;
  font-family: var(--display); font-weight: 400;
  font-size: clamp(68px, 22vw, 112px); line-height: .95;
  letter-spacing: -.01em;
}
.signin-lede {
  margin: 0 0 34px; max-width: 26ch;
  font-size: 19px; line-height: 1.35;
  color: rgba(243, 248, 247, .84);
}
.field { display: block; margin-bottom: 16px; }
.field-label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 15px; }
.field input {
  display: block; width: 100%; height: 54px; padding: 0 14px;
  border: 1.5px solid rgba(243, 248, 247, .36); border-radius: 10px;
  background: rgba(255, 255, 255, .08); color: var(--foam);
  font-weight: 600; font-size: 19px;
  -webkit-appearance: none; appearance: none;
}
.field input:focus { outline: none; border-color: var(--foam); background: rgba(255, 255, 255, .15); }
.signin .form-error { margin: 0 0 14px; color: #FFCDBD; }
.signin .btn-primary { margin-top: 8px; }
.signin .water {
  --water-h: calc(58px + env(safe-area-inset-bottom, 0px));
  --water-front: var(--deeper);
}

.provider {
  display: flex; align-items: center; gap: 10px;
  margin: 26px 0 0;
  font-size: 14px; color: var(--muted);
}
.provider img { display: block; height: 22px; width: auto; }
.provider-on-deep { margin-top: auto; padding-top: 36px; color: rgba(243, 248, 247, .72); }

/* ---------- app shell ---------- */

.app {
  position: fixed; inset: 0;
  display: grid; grid-template-rows: auto minmax(0, 1fr); grid-template-columns: minmax(0, 1fr);
  /* the strip under the sportsbook's own menu (home indicator area) stays navy */
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--deep);
}

.bar {
  grid-row: 1;
  display: flex; align-items: center; justify-content: space-between;
  height: calc(var(--bar-h) + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) calc(10px + env(safe-area-inset-right, 0px)) 0 calc(16px + env(safe-area-inset-left, 0px));
  color: var(--foam);
  user-select: none; -webkit-user-select: none;
}
.mark {
  font-family: var(--display); font-weight: 400;
  font-size: 27px; line-height: 1;
}
.purse {
  display: inline-flex; align-items: center;
  height: 44px; padding: 4px 0;
  border: 0; border-radius: 22px;
  background: rgba(255, 255, 255, .14) content-box;
  color: var(--foam);
  font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums;
}
.purse:active { background-color: rgba(255, 255, 255, .24); }
.purse-amount { margin-left: 14px; }
.purse-plus { width: 24px; height: 24px; margin: 0 6px 0 9px; }
.purse-plus circle { fill: var(--buoy); }
.purse-plus path { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }

.bar-actions { display: flex; align-items: center; gap: 2px; }
.bar-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 22px; background: none;
  color: rgba(241, 243, 247, .78);
}
.bar-icon:active { background: rgba(255, 255, 255, .14); color: var(--foam); }
.bar-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.bar-icon.spin svg { animation: spin .7s ease-in-out; }
@keyframes spin { to { transform: rotate(360deg); } }
.bar-done {
  position: relative;
  height: 36px; padding: 0 16px;
  border: 0; border-radius: 18px;
  background: rgba(255, 255, 255, .14);
  color: var(--foam);
  font-weight: 700; font-size: 16px;
}
.bar-done::after { content: ''; position: absolute; inset: -4px 0; }   /* 44px tap area */
.bar-done:active { background: rgba(255, 255, 255, .24); }

.pane { grid-row: 2; grid-column: 1; min-height: 0; }
.wallet { z-index: 2; animation: rise .22s cubic-bezier(.2, .7, .3, 1); }
@keyframes rise { from { transform: translateY(28px); opacity: 0; } }

.pane-frame { position: relative; background: #fff; }
.pane-frame iframe { position: absolute; inset: 0; display: block; width: 100%; height: 100%; border: 0; }

.status {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  padding: 24px; text-align: center;
  background: var(--foam);
}
.status-text { margin: 0; max-width: 26ch; font-weight: 600; font-size: 17px; color: var(--ink); }
.status-wave { position: relative; width: 96px; height: 14px; overflow: hidden; }
.status-wave::before {
  content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: calc(100% + 48px);
  background: var(--deep);
  -webkit-mask: var(--ripple) 0 0 / 48px 100% repeat-x;
  mask: var(--ripple) 0 0 / 48px 100% repeat-x;
  animation: ripple 1s linear infinite;
}
@keyframes ripple { to { transform: translateX(-48px); } }
.status[data-state="error"] .status-wave { display: none; }

/* ---------- wallet ---------- */

.pane-scroll {
  overflow-y: auto; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: var(--foam);
}

.balance {
  padding: 22px calc(20px + env(safe-area-inset-right, 0px)) 0 calc(20px + env(safe-area-inset-left, 0px));
  background: var(--deep); color: var(--foam);
}
.balance-label { margin: 0; font-weight: 600; font-size: 15px; color: rgba(243, 248, 247, .8); }
.balance-amount {
  margin: 8px 0 6px;
  /* money is set in the text face: its figures line up and a zero cannot be read as an o */
  font-weight: 800; font-variant-numeric: tabular-nums;
  font-size: clamp(56px, 17vw, 88px); line-height: 1; letter-spacing: -.02em;
  transform-origin: left center;
}
.balance-amount.bump { animation: bump .5s ease-out; }
@keyframes bump { 35% { transform: scale(1.05); } }
.balance-note { margin: 0 0 16px; font-size: 16px; color: rgba(243, 248, 247, .86); }
.balance .water { margin: 0 calc(-20px - env(safe-area-inset-right, 0px)) 0 calc(-20px - env(safe-area-inset-left, 0px)); }

.sheet {
  max-width: 520px; margin: 0 auto;
  padding: 10px calc(20px + env(safe-area-inset-right, 0px)) 32px calc(20px + env(safe-area-inset-left, 0px));
}

.switch {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  padding: 4px; border-radius: 12px;
  background: #E2ECEC;
}
.switch button {
  height: 44px; border: 0; border-radius: 9px;
  background: transparent; color: var(--muted);
  font-weight: 600; font-size: 16px;
}
.switch button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(10, 35, 41, .2); }

.chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 16px; }
.chips button {
  height: 50px; padding: 0;
  border: 1.5px solid var(--mist); border-radius: 10px;
  background: #fff; color: var(--ink);
  font-weight: 700; font-size: 17px; font-variant-numeric: tabular-nums;
}
.chips button[aria-pressed="true"] { border-color: var(--deep); background: var(--deep); color: var(--foam); }

.amount { display: block; margin-top: 14px; }
.amount-label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 15px; color: var(--muted); }
.amount-box {
  display: flex; align-items: center;
  height: 54px; padding: 0 14px;
  border: 1.5px solid var(--mist); border-radius: 10px;
  background: #fff;
}
.amount-box:focus-within { border-color: var(--deep); }
.amount-sign { margin-right: 6px; font-weight: 700; font-size: 20px; color: var(--muted); }
.amount-box input {
  flex: 1; min-width: 0; height: 100%; padding: 0;
  border: 0; outline: 0; background: transparent; color: var(--ink);
  font-weight: 700; font-size: 20px; font-variant-numeric: tabular-nums;
  -webkit-appearance: none; appearance: none;
}
.amount-box input::placeholder { color: #A9BCBF; }

.sheet .form-error { color: var(--out); }
.sheet .btn-primary { margin-top: 16px; }
.fineprint { margin: 10px 0 0; font-size: 14px; color: var(--muted); }

.section-title {
  margin: 36px 0 4px;
  font-family: var(--display); font-weight: 400;
  font-size: 24px; line-height: 1.1;
}
.transfers { list-style: none; margin: 0; padding: 0; }
.transfers li {
  display: grid; grid-template-columns: 1fr auto; column-gap: 12px; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--mist);
}
.transfers li:last-child { border-bottom: 0; }
.t-what { grid-column: 1; font-weight: 600; font-size: 16px; }
.t-when { grid-column: 1; font-size: 14px; color: var(--muted); }
.t-amount { grid-column: 2; grid-row: 1 / span 2; font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; }
.t-in { color: var(--in); }
.t-out { color: var(--out); }
.empty { margin: 0; padding: 12px 0; font-size: 16px; color: var(--muted); }

.account {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--mist);
}
.account-who { margin: 0; min-width: 0; font-size: 16px; overflow-wrap: anywhere; }

/* ---------- toast ---------- */

.toast {
  position: fixed; z-index: 10; left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 22px);
  max-width: calc(100% - 32px); padding: 13px 18px;
  border-radius: 12px; background: var(--ink); color: var(--foam);
  font-weight: 600; font-size: 16px; text-align: center;
  box-shadow: 0 6px 20px rgba(6, 52, 62, .35);
  transform: translateX(-50%);
  animation: toast-in .18s ease-out;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }

/* ---------- phone held sideways: give the height back to the sportsbook ---------- */

@media (max-height: 440px) and (orientation: landscape) {
  :root { --bar-h: 44px; }
  .mark { font-size: 23px; }
}

/* ---------- small phones ---------- */

@media (max-width: 350px) {
  .chips { gap: 6px; }
  .chips button { font-size: 16px; }
  .sheet, .balance { padding-left: 16px; padding-right: 16px; }
  .balance .water { margin-left: -16px; margin-right: -16px; }
}

@media (prefers-reduced-motion: reduce) {
  .water::before, .water::after, .status-wave::before, .toast, .balance-amount.bump, .wallet, .bar-icon.spin svg { animation: none; }
  .btn-primary:active { transform: none; }
}
