/* ------------------------------------------------------------- rewards */

/*
 * The old rewards screen, in three bands: the promo code with the three claim
 * cards beside it, the rank ladder on a rail with your standing pinned to the
 * left of it, and the daily box under that on a rail of its own.
 */

.rw-top {
  margin-bottom: 16px;
}

/* ---------------------------------------------------------- promo code */

.rw-promo {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 148px;
  padding: 20px 20px 20px 132px;
  border-radius: 16px;
  background:
    radial-gradient(70% 120% at 12% 50%, rgba(204, 255, 0, 0.5), transparent 62%),
    linear-gradient(120deg, #141b06, var(--bg-deep));
  overflow: hidden;
}

/* A dotted violet corner where the old panel had its figure. */
.rw-promo-art {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 120px;
  background:
    radial-gradient(60% 40% at 50% 26%, rgba(230, 184, 74, 0.35), transparent 70%),
    repeating-linear-gradient(
      45deg,
      rgba(255, 255, 255, 0.07) 0 2px,
      transparent 2px 7px
    ),
    linear-gradient(180deg, #1b2409, #0f1406);
}

.rw-promo-art::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  transform: translate(-50%, -50%);
  border-radius: 14px;
  background: linear-gradient(180deg, var(--gold), var(--gold-dark));
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
}

.rw-promo-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.rw-promo h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 20px;
  text-transform: uppercase;
}

.rw-promo p {
  margin: 0;
  max-width: 44ch;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-dim);
}

.rw-promo-row input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.rw-promo-row {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.rw-promo-row input {
  flex: 1;
  min-width: 0;
  height: 39px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(8, 10, 16, 0.7);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  outline: none;
}

.rw-promo-row input:focus {
  border-color: var(--lime);
}

/* -------------------------------------------------------- claim cards */

.rw-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.rw-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #11141c, var(--bg-deep));
}

.rw-card.is-ready {
  border-color: rgba(204, 255, 0, 0.6);
  background:
    radial-gradient(90% 60% at 50% 0%, rgba(204, 255, 0, 0.35), transparent 62%),
    linear-gradient(180deg, #151c08, var(--bg-deep));
}

.rw-card-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.rw-tag {
  padding: 3px 9px;
  border-radius: 6px;
  background: #161922;
  color: var(--text-faint);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rw-tag.is-live {
  background: rgba(204, 255, 0, 0.25);
  color: #c9aaff;
}

.rw-tag-kind {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

/* The coin, drawn: gold when it is live, grey when it is not. */
.rw-coin {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background:
    radial-gradient(60% 60% at 34% 30%, #fff3cf, transparent 70%),
    conic-gradient(from 210deg, var(--gold-dark), var(--gold), var(--gold-dark));
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.45);
}

.rw-coin.is-locked {
  background:
    radial-gradient(60% 60% at 34% 30%, #e7ecf5, transparent 70%),
    conic-gradient(from 210deg, #5c6476, #aab3c4, #5c6476);
  opacity: 0.5;
}

.rw-card-amount {
  font-size: 15px;
  font-weight: 700;
  color: var(--gold);
}

.rw-claim {
  width: 100%;
  height: 34px;
  border: 0;
  border-radius: 10px;
  background: var(--lime);
  color: var(--on-lime);
  font: inherit;
  font-family: Poppins, Inter, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 200ms ease;
}

.rw-claim:hover:not(:disabled) {
  background: var(--lime-soft);
}

.rw-claim.is-locked,
.rw-claim:disabled {
  background: #161922;
  color: var(--text-faint);
  cursor: not-allowed;
}

.rw-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 30px 0;
  text-align: center;
  font-size: 13px;
  color: var(--text-faint);
}

/* --------------------------------------------------------- the ladder */

.rw-rankrow {
  display: grid;
  grid-template-columns: 218px minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.rw-now {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #11141c, var(--bg-deep));
  text-align: center;
}

.rw-now h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 16px;
  text-transform: uppercase;
}

.rw-now p {
  margin: 0;
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-faint);
}

.rw-now-badge {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  margin: 6px 0 2px;
}

.rw-now-badge svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.5));
}

.rw-now-badge.is-unranked svg {
  filter: grayscale(0.9) brightness(0.6);
}

.rw-now b {
  background: var(--tint-fill, linear-gradient(180deg, #c7d0dd, #c7d0dd));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 17px;
  font-weight: 700;
}

.rw-now-bar {
  display: block;
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: #161922;
  overflow: hidden;
}

.rw-now-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold));
}

.rw-now-points,
.rw-rank-points {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-dim);
}

.rw-now-points em,
.rw-rank-points em {
  padding: 1px 6px;
  border-radius: 5px;
  background: rgba(230, 184, 74, 0.16);
  color: var(--gold);
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
}

.rw-now-next,
.rw-now-rake {
  font-size: 11px;
  color: var(--text-faint);
}

.rw-now-rake em {
  font-style: normal;
}

/* A rail of ranks, scrolled by the two arrows. */
.rw-rail {
  position: relative;
}

.rw-ranks,
.rw-days {
  display: flex;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.rw-ranks::-webkit-scrollbar,
.rw-days::-webkit-scrollbar {
  display: none;
}

.rw-arrow {
  position: absolute;
  left: -6px;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  transform: translateY(-50%);
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel);
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
}

.rw-arrow.is-right {
  left: auto;
  right: -6px;
}

.rw-rank {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 0 0 196px;
  padding: 18px 14px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #040506;
  text-align: center;
  overflow: hidden;
  opacity: 0.62;
}

/* The lit corner behind the medal, in the tier's own colour. */
.rw-rank-glow {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 58%;
  background: radial-gradient(
    70% 90% at 50% 0%,
    color-mix(in srgb, var(--tint) 45%, transparent),
    transparent 72%
  );
  pointer-events: none;
}

.rw-rank.is-reached {
  opacity: 1;
}

.rw-rank.is-now {
  border-color: color-mix(in srgb, var(--tint) 65%, var(--line));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--tint) 30%, transparent);
}

.rw-rank-medal {
  position: relative;
  width: 70px;
  height: 70px;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.5));
}

.rw-rank:not(.is-reached) .rw-rank-medal {
  filter: grayscale(0.8) brightness(0.75);
}

/* The name is painted with the tier, the way the old ladder wrote it. */
.rw-rank-name {
  position: relative;
  background: var(--tint-fill);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 19px;
  font-weight: 700;
}

.rw-rank-bar {
  position: relative;
  display: block;
  width: 100%;
  height: 7px;
  border-radius: 4px;
  background: rgba(115, 121, 140, 0.35);
  overflow: hidden;
}

.rw-rank-bar span {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: var(--tint-fill);
}

.rw-rank-points {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.rw-rank-points em {
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--tint);
  color: #fff;
  font-style: normal;
  font-size: 11px;
  font-weight: 700;
}

.rw-rank-rake {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--text-faint);
}

.rw-rank-rake i {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 7px solid var(--tint);
}

.rw-rank.is-reached .rw-rank-rake {
  color: var(--text-dim);
}

/* ----------------------------------------------------------- daily box */

/*
 * The shape the old screen had: your standing and your box on the left, the
 * nine of them on a rail to the right with the ladder drawn over the top.
 */
.rw-daily {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #11141c, var(--bg-deep));
}

.rw-daily-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px 14px;
  border-radius: 14px;
  background:
    radial-gradient(80% 60% at 50% 0%, rgba(204, 255, 0, 0.12), transparent 70%),
    var(--bg-deep);
  text-align: center;
}

.rw-daily h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 18px;
  text-transform: uppercase;
}

.rw-daily p {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--text-dim);
}

.rw-daily-art {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 150px;
  margin: 4px 0;
}

.rw-daily-art img {
  width: 132px;
  filter: drop-shadow(0 18px 26px rgba(0, 0, 0, 0.55));
}

.rw-daily-note {
  font-size: 11.5px;
  color: var(--text-faint);
}

.rw-daily-side .button {
  width: 100%;
}

.rw-daily-rail {
  align-self: center;
  width: 100%;
}

.rw-day {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 0 0 176px;
  padding: 26px 12px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-deep);
  text-align: center;
  opacity: 0.62;
}

/* The ladder across the top: a dot per box on a line that runs through. */
.rw-day-step {
  position: absolute;
  left: 0;
  right: 0;
  top: -1px;
  display: grid;
  place-items: center;
  height: 22px;
}

.rw-day-step::before {
  content: '';
  position: absolute;
  left: -14px;
  right: -14px;
  top: 50%;
  height: 2px;
  background: var(--line);
}

.rw-day-step i {
  position: relative;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--line);
  background: var(--bg-deep);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  color: var(--text-faint);
}

.rw-day.is-reached {
  opacity: 1;
}

.rw-day.is-reached .rw-day-step i {
  border-color: var(--lime);
  color: var(--lime);
}

.rw-day-pill {
  padding: 3px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: #151a25;
  font-size: 10.5px;
  font-weight: 700;
  font-style: italic;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.rw-day.is-reached .rw-day-pill {
  border-color: color-mix(in srgb, var(--lime) 45%, var(--line));
  color: var(--lime);
}

.rw-day-box {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 132px;
}

.rw-day-box img {
  max-width: 116px;
  max-height: 132px;
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.5));
}

.rw-day:not(.is-reached) .rw-day-box img {
  filter: grayscale(0.85) brightness(0.7);
}

.rw-day-lock {
  position: absolute;
  right: 18px;
  bottom: 10px;
  width: 18px;
  height: 14px;
  border-radius: 3px;
  background: var(--text-faint);
}

.rw-day-lock::before {
  content: '';
  position: absolute;
  left: 3px;
  top: -7px;
  width: 12px;
  height: 10px;
  border: 2px solid var(--text-faint);
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
}

.rw-day-top {
  font-size: 15px;
  font-weight: 700;
  color: var(--lime);
}

.rw-day-foot {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.rw-day-foot b {
  font-size: 12.5px;
  color: var(--text);
}

.rw-day-foot em {
  font-style: normal;
  font-size: 11px;
  color: var(--text-faint);
}

.rw-day.is-now {
  opacity: 1;
  border-color: color-mix(in srgb, var(--lime) 60%, var(--line));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--lime) 25%, transparent);
  cursor: pointer;
}

.rw-day.is-now .rw-day-foot em {
  color: var(--lime);
}

@media (max-width: 1060px) {
  .rw-rankrow,
  .rw-daily {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .rw-cards {
    grid-template-columns: minmax(0, 1fr);
  }

  .rw-promo {
    padding-left: 20px;
  }

  .rw-promo-art {
    display: none;
  }
}
