/* =========================================================
   TAJRIVO - REFERRAL & POINTS
========================================================= */


/* =========================================================
   PAGE
========================================================= */

.referral-page {
  width: 100%;
  max-width: 1450px;
  margin: 0 auto;
  padding-bottom: 50px;
}


/* =========================================================
   PAGE HEADING
========================================================= */

.referral-page-heading {
  margin-bottom: 22px;
}

.referral-page-heading h1 {
  margin: 5px 0 7px;

  color: #0f172a;

  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.1;
  font-weight: 800;

  letter-spacing: -0.04em;
}

.referral-page-heading p {
  max-width: 660px;
  margin: 0;

  color: #64748b;

  font-size: 14px;
  line-height: 1.7;
}


/* =========================================================
   TOPBAR POINTS MINI
========================================================= */

.referral-points-mini {
  min-height: 46px;

  padding: 6px 13px;

  border: 1px solid #e2e8f0;
  border-radius: 14px;

  background: #ffffff;

  display: flex;
  align-items: center;
  gap: 10px;

  box-shadow:
    0 4px 15px rgba(15, 23, 42, 0.035);
}

.referral-points-mini-icon {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;

  border-radius: 10px;

  background: #fff8e8;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 14px;
}

.referral-points-mini > div:last-child {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.referral-points-mini span {
  color: #94a3b8;

  font-size: 10px;
  font-weight: 700;
}

.referral-points-mini strong {
  color: #0f172a;

  font-size: 12px;
  font-weight: 800;
}


/* =========================================================
   HERO
========================================================= */

.referral-hero-card {
  position: relative;

  overflow: hidden;

  padding: 30px;

  border-radius: 26px;

  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    360px;
  gap: 30px;

  align-items: center;

  color: #ffffff;

  background:
    radial-gradient(
      circle at top right,
      rgba(255, 255, 255, 0.18),
      transparent 34%
    ),
    radial-gradient(
      circle at bottom left,
      rgba(255, 255, 255, 0.08),
      transparent 28%
    ),
    linear-gradient(
      135deg,
      #0c5fd5,
      #1677ff 58%,
      #4da3ff
    );

  box-shadow:
    0 24px 48px
    rgba(22, 119, 255, 0.19);
}


/* =========================================================
   HERO CONTENT
========================================================= */

.referral-hero-content {
  position: relative;
  z-index: 2;
}

.referral-hero-badge {
  min-height: 30px;

  padding: 0 11px;

  border-radius: 999px;

  background:
    rgba(255, 255, 255, 0.15);

  display: inline-flex;
  align-items: center;
  gap: 6px;

  color:
    rgba(255, 255, 255, 0.95);

  font-size: 10px;
  font-weight: 800;
}

.referral-hero-content h2 {
  margin: 17px 0 0;

  font-size: clamp(29px, 4vw, 38px);
  line-height: 1.08;
  font-weight: 800;

  letter-spacing: -0.04em;
}

.referral-hero-content > p {
  max-width: 550px;

  margin: 13px 0 0;

  color:
    rgba(255, 255, 255, 0.78);

  font-size: 13px;
  line-height: 1.7;
}


/* =========================================================
   HERO NOTE
========================================================= */

.referral-hero-note {
  max-width: 560px;

  margin-top: 18px;

  padding: 12px 13px;

  border: 1px solid
    rgba(255, 255, 255, 0.15);
  border-radius: 13px;

  background:
    rgba(255, 255, 255, 0.09);

  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.referral-hero-note > span {
  width: 23px;
  height: 23px;
  flex: 0 0 23px;

  border-radius: 50%;

  background:
    rgba(255, 255, 255, 0.18);

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 10px;
  font-weight: 900;
}

.referral-hero-note p {
  margin: 1px 0 0;

  color:
    rgba(255, 255, 255, 0.8);

  font-size: 10px;
  line-height: 1.55;
}


/* =========================================================
   REFERRAL CODE BOX
========================================================= */

.referral-code-box {
  position: relative;
  z-index: 2;

  padding: 21px;

  border: 1px solid
    rgba(255, 255, 255, 0.18);
  border-radius: 20px;

  background:
    rgba(255, 255, 255, 0.12);

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.referral-code-box > span {
  display: block;

  color:
    rgba(255, 255, 255, 0.72);

  font-size: 9px;
  font-weight: 800;

  letter-spacing: 0.1em;
}

.referral-code-box > strong {
  display: block;

  margin-top: 11px;

  overflow-wrap: anywhere;

  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Monaco,
    Consolas,
    monospace;

  font-size: 27px;
  line-height: 1.2;
  font-weight: 800;

  letter-spacing: 0.08em;
}


/* =========================================================
   CODE ACTIONS
========================================================= */

.referral-code-actions {
  margin-top: 17px;

  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.referral-code-actions button {
  min-height: 42px;

  padding: 0 12px;

  border: 0;
  border-radius: 12px;

  background: #ffffff;
  color: var(--primary);

  font-family: inherit;
  font-size: 11px;
  font-weight: 800;

  cursor: pointer;

  transition:
    transform 0.2s ease,
    opacity 0.2s ease,
    box-shadow 0.2s ease;
}

.referral-code-actions button:hover {
  transform: translateY(-1px);

  box-shadow:
    0 8px 18px
    rgba(15, 23, 42, 0.1);
}


/* =========================================================
   STATS
========================================================= */

.referral-stats-grid {
  margin-top: 18px;

  display: grid;
  grid-template-columns:
    repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.referral-stat-card {
  min-width: 0;
  min-height: 112px;

  padding: 18px;

  border: 1px solid #e8edf5;
  border-radius: 20px;

  background: #ffffff;

  display: flex;
  align-items: center;
  gap: 14px;

  box-shadow:
    0 7px 22px rgba(15, 23, 42, 0.045);

  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.referral-stat-card:hover {
  transform: translateY(-2px);

  border-color: #dbe4f0;

  box-shadow:
    0 13px 30px rgba(15, 23, 42, 0.07);
}

.referral-stat-icon {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;

  border-radius: 14px;

  background: #eef5ff;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 19px;
}

.referral-stat-card:nth-child(2)
.referral-stat-icon {
  background: #fff8e8;
}

.referral-stat-card:nth-child(3)
.referral-stat-icon {
  background: #f5f3ff;
}

.referral-stat-card:nth-child(4)
.referral-stat-icon {
  background: #effcf6;
}

.referral-stat-card > div:last-child {
  min-width: 0;

  display: flex;
  flex-direction: column;
  gap: 5px;
}

.referral-stat-card span {
  color: #64748b;

  font-size: 11px;
  font-weight: 700;
}

.referral-stat-card strong {
  overflow: hidden;

  color: #0f172a;

  font-size: 20px;
  line-height: 1;
  font-weight: 800;

  white-space: nowrap;
  text-overflow: ellipsis;
}


/* =========================================================
   COMMON CARDS
========================================================= */

.referral-share-card,
.referral-how-card,
.referral-points-info-card,
.referral-transactions-card {
  margin-top: 18px;

  padding: 22px;

  border: 1px solid #e8edf5;
  border-radius: 22px;

  background: #ffffff;

  box-shadow:
    0 10px 34px rgba(15, 23, 42, 0.05);
}


/* =========================================================
   SECTION HEADERS
========================================================= */

.referral-share-header h2,
.referral-section-header h2 {
  margin: 5px 0 0;

  color: #0f172a;

  font-size: 20px;
  line-height: 1.2;
  font-weight: 800;

  letter-spacing: -0.02em;
}

.referral-share-header p {
  margin: 6px 0 0;

  color: #64748b;

  font-size: 11px;
  line-height: 1.6;
}


/* =========================================================
   SHARE FIELD
========================================================= */

.referral-share-field {
  margin-top: 18px;

  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    auto;
  gap: 9px;
}

.referral-share-field input {
  width: 100%;
  min-width: 0;
  min-height: 48px;

  padding: 0 14px;

  border: 1px solid #e2e8f0;
  border-radius: 13px;
  outline: none;

  background: #f8fafc;
  color: #334155;

  font-family: inherit;
  font-size: 11px;
}

.referral-share-field button {
  min-width: 110px;

  padding: 0 15px;

  border: 0;
  border-radius: 13px;

  background: var(--primary);
  color: #ffffff;

  font-family: inherit;
  font-size: 11px;
  font-weight: 800;

  cursor: pointer;

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.referral-share-field button:hover {
  transform: translateY(-1px);

  box-shadow:
    0 8px 20px
    rgba(37, 99, 235, 0.18);
}


/* =========================================================
   SHARE BUTTONS
========================================================= */

.referral-share-buttons {
  margin-top: 11px;

  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.referral-share-button {
  min-height: 40px;

  padding: 0 13px;

  border: 1px solid #e8edf5;
  border-radius: 11px;

  background: #f8fafc;
  color: #475569;

  font-family: inherit;
  font-size: 11px;
  font-weight: 700;

  cursor: pointer;

  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.referral-share-button:hover {
  border-color: #d7e3f3;

  background: #eef5ff;
  color: var(--primary);

  transform: translateY(-1px);
}


/* =========================================================
   HOW IT WORKS
========================================================= */

.referral-how-grid {
  margin-top: 18px;

  display: grid;
  grid-template-columns:
    repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.referral-how-grid article {
  padding: 18px;

  border: 1px solid #e8edf5;
  border-radius: 17px;

  background: #f8fafc;

  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.referral-how-grid article:hover {
  border-color: #d9e5f3;

  background: #f7faff;

  transform: translateY(-1px);
}

.referral-step-number {
  width: 36px;
  height: 36px;

  margin-bottom: 13px;

  border-radius: 11px;

  background: var(--primary);
  color: #ffffff;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 12px;
  font-weight: 800;
}

.referral-how-grid strong {
  display: block;

  color: #0f172a;

  font-size: 13px;
  font-weight: 800;
}

.referral-how-grid p {
  margin: 6px 0 0;

  color: #64748b;

  font-size: 11px;
  line-height: 1.6;
}


/* =========================================================
   POINTS INFO
========================================================= */

.referral-points-info-grid {
  margin-top: 18px;

  display: grid;
  grid-template-columns:
    repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.referral-points-info-grid article {
  min-width: 0;

  padding: 17px;

  border: 1px solid #e8edf5;
  border-radius: 17px;

  background: #fbfcfe;

  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.referral-points-info-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;

  border-radius: 12px;

  background: #fff8e8;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 16px;
}

.referral-points-info-grid article:nth-child(2)
.referral-points-info-icon {
  background: #eef5ff;
}

.referral-points-info-grid article:nth-child(3)
.referral-points-info-icon {
  background: #f5f3ff;
}

.referral-points-info-grid strong {
  display: block;

  color: #0f172a;

  font-size: 11px;
  font-weight: 800;
}

.referral-points-info-grid p {
  margin: 5px 0 0;

  color: #64748b;

  font-size: 10px;
  line-height: 1.6;
}


/* =========================================================
   REFERRAL TRANSACTIONS HEADER
========================================================= */

.referral-transactions-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.referral-transactions-header > button {
  min-height: 40px;

  padding: 0 13px;

  border: 1px solid #e8edf5;
  border-radius: 11px;

  background: #f8fafc;
  color: #475569;

  font-family: inherit;
  font-size: 11px;
  font-weight: 700;

  cursor: pointer;

  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.referral-transactions-header > button:hover {
  border-color: #d7e3f3;

  background: #eef5ff;
  color: var(--primary);
}

.referral-transactions-header > button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}


/* =========================================================
   STATES
========================================================= */

.referral-state {
  min-height: 240px;

  padding: 28px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  text-align: center;
}

.referral-state[hidden] {
  display: none !important;
}

.referral-state-icon {
  width: 58px;
  height: 58px;

  margin-bottom: 13px;

  border-radius: 18px;

  background: #eef5ff;
  color: var(--primary);

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 22px;
  font-weight: 800;
}

.referral-state strong {
  color: #0f172a;

  font-size: 14px;
  font-weight: 800;
}

.referral-state > span {
  max-width: 400px;

  margin-top: 6px;

  color: #64748b;

  font-size: 11px;
  line-height: 1.6;
}


/* =========================================================
   LOADER
========================================================= */

.referral-loader {
  width: 35px;
  height: 35px;

  margin-bottom: 14px;

  border: 3px solid #e5e7eb;
  border-top-color: var(--primary);
  border-radius: 50%;

  animation:
    referral-spin
    0.8s
    linear
    infinite;
}

@keyframes referral-spin {

  to {
    transform: rotate(360deg);
  }

}


/* =========================================================
   RETRY BUTTON
========================================================= */

.referral-retry-button {
  min-height: 40px;

  margin-top: 15px;
  padding: 0 15px;

  border: 0;
  border-radius: 11px;

  background: var(--primary);
  color: #ffffff;

  font-family: inherit;
  font-size: 11px;
  font-weight: 800;

  cursor: pointer;
}


/* =========================================================
   ACTIVITY LIST
========================================================= */

.referral-transactions-list {
  margin-top: 16px;

  display: flex;
  flex-direction: column;
  gap: 10px;
}

.referral-transactions-list[hidden] {
  display: none !important;
}

.referral-transaction-item {
  min-height: 74px;

  padding: 13px;

  border: 1px solid transparent;
  border-radius: 15px;

  background: #f8fafc;

  display: flex;
  align-items: center;
  gap: 12px;

  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.referral-transaction-item:hover {
  border-color: #dceaff;

  background: #f5f9ff;

  transform: translateY(-1px);
}

.referral-transaction-icon {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;

  border-radius: 13px;

  background: #fff8e8;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 18px;
}

.referral-transaction-main {
  min-width: 0;
  flex: 1;
}

.referral-transaction-main strong {
  display: block;

  overflow: hidden;

  color: #0f172a;

  font-size: 12px;
  font-weight: 800;

  white-space: nowrap;
  text-overflow: ellipsis;
}

.referral-transaction-main span {
  display: block;

  margin-top: 4px;

  overflow: hidden;

  color: #64748b;

  font-size: 10px;

  white-space: nowrap;
  text-overflow: ellipsis;
}

.referral-transaction-right {
  flex-shrink: 0;

  text-align: right;
}

.referral-transaction-points {
  display: block;

  color: #d97706;

  font-size: 12px;
  font-weight: 800;

  white-space: nowrap;
}

.referral-transaction-status {
  min-height: 21px;

  margin-top: 4px;
  padding: 0 7px;

  border-radius: 999px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: #ecfdf5;
  color: #15803d;

  font-size: 9px;
  font-weight: 700;

  text-transform: capitalize;
}

.referral-transaction-status.pending {
  background: #fffbeb;
  color: #d97706;
}

.referral-transaction-status.failed {
  background: #fef2f2;
  color: #dc2626;
}


/* =========================================================
   TOAST
========================================================= */

.referral-toast {
  position: fixed;

  left: 50%;
  bottom: 28px;

  z-index: 3000;

  min-height: 44px;

  padding: 0 15px;

  border: 1px solid #dce4ee;
  border-radius: 13px;

  background: #0f172a;
  color: #ffffff;

  display: flex;
  align-items: center;
  gap: 8px;

  box-shadow:
    0 16px 38px rgba(15, 23, 42, 0.22);

  transform: translateX(-50%);

  animation:
    referral-toast-in
    0.2s ease;
}

.referral-toast[hidden] {
  display: none !important;
}

.referral-toast > span {
  color: #86efac;

  font-size: 12px;
  font-weight: 900;
}

.referral-toast strong {
  font-size: 11px;
  font-weight: 700;
}

@keyframes referral-toast-in {

  from {
    opacity: 0;

    transform:
      translateX(-50%)
      translateY(8px);
  }

  to {
    opacity: 1;

    transform:
      translateX(-50%)
      translateY(0);
  }

}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1050px) {

  .referral-hero-card {
    grid-template-columns: 1fr;
  }

  .referral-stats-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .referral-points-info-grid {
    grid-template-columns: 1fr;
  }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 700px) {

  .referral-page {
    padding-bottom: 30px;
  }


  .referral-page-heading h1 {
    font-size: 27px;
  }

  .referral-page-heading p {
    font-size: 12px;
  }


  .referral-points-mini {
    display: none;
  }


  .referral-hero-card {
    padding: 21px;

    border-radius: 21px;
  }

  .referral-hero-content h2 {
    font-size: 29px;
  }

  .referral-code-box > strong {
    font-size: 23px;
  }


  .referral-stats-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
    gap: 10px;
  }


  .referral-stat-card {
    min-height: 100px;

    padding: 14px;

    border-radius: 17px;
  }

  .referral-stat-icon {
    width: 40px;
    height: 40px;
    flex-basis: 40px;

    border-radius: 12px;

    font-size: 16px;
  }


  .referral-share-card,
  .referral-how-card,
  .referral-points-info-card,
  .referral-transactions-card {
    padding: 17px;

    border-radius: 18px;
  }


  .referral-how-grid {
    grid-template-columns: 1fr;
  }


  .referral-share-field {
    grid-template-columns: 1fr;
  }

  .referral-share-field button {
    min-height: 44px;
  }

}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 480px) {

  .referral-stats-grid {
    grid-template-columns: 1fr;
  }


  .referral-code-actions {
    grid-template-columns: 1fr;
  }


  .referral-share-buttons {
    flex-direction: column;
  }

  .referral-share-button {
    width: 100%;
  }


  .referral-transactions-header {
    align-items: flex-start;
  }


  .referral-transaction-item {
    align-items: flex-start;
  }


  .referral-transaction-right {
    padding-top: 2px;
  }

}


/* =========================================================
   HIDDEN
========================================================= */

[hidden] {
  display: none !important;
}