/* KICKS — Referral Tiers v1
   Injects a tier card on top of the existing /#/referral page.
   Placed as a SIBLING of .kx-rf inside .teamref3 (not a child) so the SPA's
   kicks-referrals.js innerHTML wipe on .kx-rf does not destroy it.
   Palette: cream #FFF1D6 / #FFD9A3, navy #14213D, orange #FF6B1A. */

/* Override the kicks-referrals.css rule that hides non-.kx-rf children of .kx-ref. */
.kx-ref > .kx-rf-tier-wrap { display: block !important; }

.kx-rf-tier-wrap {
  position: relative;
  z-index: 2;
}

.kx-rf-tier {
  background: #14213D;
  color: #fff;
  border-radius: 20px;
  padding: 18px 16px 16px;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
}

.kx-rf-tier::before {
  content: "";
  position: absolute;
  top: -40px; right: -40px;
  width: 140px; height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 107, 26, 0.22) 0%, rgba(255, 107, 26, 0) 70%);
  pointer-events: none;
}

.kx-rf-tier-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.kx-rf-tier-badge {
  width: 72px; height: 72px;
  object-fit: contain;
  flex: 0 0 auto;
  filter: drop-shadow(0 4px 12px rgba(255, 107, 26, 0.35));
}

.kx-rf-tier-info { flex: 1; min-width: 0; }
.kx-rf-tier-info .kx-rf-kicker {
  color: #FF6B1A;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.kx-rf-tier-info h2 {
  font-family: "Archivo Black", Impact, sans-serif;
  font-size: 22px;
  font-weight: 400;
  margin: 0 0 2px;
  letter-spacing: .02em;
}
.kx-rf-tier-info p {
  margin: 0;
  color: #ffffffb8;
  font-size: 12px;
  line-height: 1.35;
}

.kx-rf-tier-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 107, 26, 0.15);
  border: 1px solid rgba(255, 107, 26, 0.35);
  color: #FF8A3D;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-top: 6px;
}
.kx-rf-tier-pill svg { width: 11px; height: 11px; }

/* Progress bar */
.kx-rf-tier-prog {
  margin: 8px 0 14px;
}
.kx-rf-tier-prog-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #ffffffb8;
  margin-bottom: 5px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.kx-rf-tier-prog-row b { color: #fff; font-weight: 800; }
.kx-rf-tier-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.kx-rf-tier-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #FF8A3D 0%, #FF6B1A 100%);
  border-radius: 999px;
  transition: width .35s ease;
  box-shadow: 0 0 10px rgba(255, 107, 26, 0.6);
}
.kx-rf-tier-bar-fill.is-full {
  background: linear-gradient(90deg, #FFD9A3 0%, #FF6B1A 100%);
}

/* Tier ladder (3-step indicator) */
.kx-rf-tier-ladder {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 6px;
  margin-top: 4px;
}
.kx-rf-tier-ladder > div {
  text-align: center;
  padding: 8px 4px;
  border-radius: 8px;
  font-size: 11px;
  color: #ffffffa8;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  position: relative;
}
.kx-rf-tier-ladder > div.is-current {
  background: linear-gradient(180deg, #FF8A3D 0%, #FF6B1A 100%);
  color: #fff;
  box-shadow: 0 4px 10px rgba(255, 107, 26, 0.4);
}
.kx-rf-tier-ladder > div.is-done {
  background: rgba(255, 209, 163, 0.18);
  color: #FFD9A3;
}
.kx-rf-tier-ladder > div small {
  display: block;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: none;
  margin-top: 2px;
  opacity: .9;
}

/* Earnings card */
.kx-rf-tier-money {
  background: #fff;
  border: 1.5px solid #E5D6B5;
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.kx-rf-tier-money-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #F3E6C8;
}
.kx-rf-tier-money-head span {
  font-size: 10px;
  font-weight: 800;
  color: #8A7A5E;
  text-transform: uppercase;
  letter-spacing: .12em;
}
.kx-rf-tier-money-head b {
  font-family: "Archivo Black", Impact, sans-serif;
  font-size: 22px;
  color: #14213D;
  letter-spacing: .02em;
}
.kx-rf-tier-money-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 14px;
}
.kx-rf-tier-money-grid > div {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  padding: 4px 0;
}
.kx-rf-tier-money-grid > div span { color: #8A7A5E; font-weight: 700; }
.kx-rf-tier-money-grid > div b { color: #14213D; font-weight: 800; }

/* Recent list */
.kx-rf-tier-recent {
  background: #fff;
  border: 1.5px solid #E5D6B5;
  border-radius: 16px;
  padding: 12px 14px;
  margin-bottom: 12px;
}
.kx-rf-tier-recent-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #F3E6C8;
}
.kx-rf-tier-recent-head b {
  font-size: 11px;
  font-weight: 800;
  color: #14213D;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.kx-rf-tier-recent-head span {
  font-size: 11px;
  color: #8A7A5E;
  font-weight: 700;
}
.kx-rf-tier-recent-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px dashed #F3E6C8;
}
.kx-rf-tier-recent-row:last-child { border: 0; }
.kx-rf-tier-recent-ico {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: #FFF1D6;
  color: #FF6B1A;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 11px;
  flex: 0 0 auto;
}
.kx-rf-tier-recent-info { flex: 1; min-width: 0; }
.kx-rf-tier-recent-info b {
  display: block;
  font-size: 12px;
  color: #14213D;
  font-weight: 800;
  text-transform: capitalize;
}
.kx-rf-tier-recent-info span {
  font-size: 10px;
  color: #8A7A5E;
  font-weight: 600;
}
.kx-rf-tier-recent-amt {
  font-family: "Archivo Black", Impact, sans-serif;
  font-size: 14px;
  color: #FF6B1A;
  letter-spacing: .02em;
  flex: 0 0 auto;
}
.kx-rf-tier-recent-empty {
  text-align: center;
  color: #8A7A5E;
  font-size: 12px;
  padding: 10px 0;
  font-weight: 600;
}

/* KYC banner if required */
.kx-rf-tier-kyc {
  background: linear-gradient(135deg, #FF8A3D 0%, #FF6B1A 100%);
  color: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.kx-rf-tier-kyc-ico {
  width: 36px; height: 36px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
}
.kx-rf-tier-kyc-ico svg { width: 20px; height: 20px; }
.kx-rf-tier-kyc-info { flex: 1; }
.kx-rf-tier-kyc-info b {
  display: block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.kx-rf-tier-kyc-info span {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 500;
}

/* Loading state */
.kx-rf-tier-loading {
  text-align: center;
  padding: 20px;
  color: #8A7A5E;
  font-size: 12px;
  font-weight: 600;
}
.kx-rf-tier-loading::after {
  content: "•••";
  display: inline-block;
  margin-left: 6px;
  letter-spacing: 2px;
  animation: kx-rf-tier-pulse 1.4s ease-in-out infinite;
}
@keyframes kx-rf-tier-pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* =========================================================================
   Tier Perks preview — what you get at each tier.
   Shown after the existing 3-tier ladder so users see the next milestone.
   ========================================================================= */

.kx-rf-perks {
  background: #fff;
  border: 1.5px solid #E5D6B5;
  border-radius: 16px;
  padding: 14px 14px 6px;
  margin-bottom: 12px;
}
.kx-rf-perks-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #F3E6C8;
}
.kx-rf-perks-head b {
  font-size: 11px;
  font-weight: 800;
  color: #14213D;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.kx-rf-perks-head span {
  font-size: 10px;
  color: #8A7A5E;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.kx-rf-perk {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px dashed #F3E6C8;
  position: relative;
}
.kx-rf-perk:last-child { border-bottom: 0; }
.kx-rf-perk-badge {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex: 0 0 auto;
  align-self: flex-start;
}
.kx-rf-perk.is-current .kx-rf-perk-badge {
  filter: drop-shadow(0 2px 8px rgba(255, 107, 26, 0.4));
}
.kx-rf-perk.is-locked { opacity: 0.55; }
.kx-rf-perk-body { flex: 1; min-width: 0; }
.kx-rf-perk-head2 {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.kx-rf-perk-name {
  font-family: "Archivo Black", Impact, sans-serif;
  font-size: 13px;
  color: #14213D;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.kx-rf-perk-need {
  font-size: 10px;
  color: #8A7A5E;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.kx-rf-perk-need b {
  color: #FF6B1A;
  font-weight: 800;
}
.kx-rf-perk-pill {
  display: inline-block;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: auto;
  background: #FF6B1A;
  color: #fff;
}
.kx-rf-perk-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.kx-rf-perk-list li {
  position: relative;
  font-size: 12px;
  line-height: 1.45;
  color: #14213D;
  padding: 3px 0 3px 18px;
  font-weight: 500;
}
.kx-rf-perk-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 12px;
  height: 12px;
  background: #FF6B1A;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/></svg>") center / contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/></svg>") center / contain no-repeat;
}
.kx-rf-perk.is-locked .kx-rf-perk-list li::before {
  background: #8A7A5E;
  opacity: 0.7;
}
.kx-rf-perk-list li b {
  color: #FF6B1A;
  font-weight: 800;
}

/* Upsell card — only shown when not yet Premium */
.kx-rf-perks-upsell {
  margin: 0 -14px -6px;
  padding: 12px 14px;
  background: linear-gradient(180deg, #FFF1D6 0%, #FFD9A3 100%);
  border-top: 1px solid #E5D6B5;
  border-radius: 0 0 14px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}
.kx-rf-perks-upsell-ico {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #14213D;
  color: #FF6B1A;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}
.kx-rf-perks-upsell-ico svg {
  width: 18px;
  height: 18px;
}
.kx-rf-perks-upsell-text {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  line-height: 1.35;
  color: #14213D;
}
.kx-rf-perks-upsell-text b {
  display: block;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: 11px;
}
.kx-rf-perks-upsell-text span {
  display: block;
  color: #5A4A30;
  font-weight: 500;
  font-size: 11px;
}
