@charset "UTF-8";
/* CSS Document */

/* Global box-sizing for better sizing control */
*,
*::before,
*::after {
  box-sizing: border-box;
}

.referral-container {
  max-width: 960px;
  margin: 80px auto;
  padding: 30px;
  background: var(--white);
  color: var(--black);
  border-radius: 16px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
}

h2 {
  text-align: center;
  color: var(--gold);
  margin-bottom: 30px;
}

.referral-tools,
.referral-content,
.referral-box,
.leaderboard {
  background: #f9f9f9;
  border-left: 6px solid var(--gold);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 30px;
}

.ref-link {
  background: #eee;
  padding: 10px;
  border-radius: 6px;
  font-family: monospace;
  word-break: break-word;
  overflow-wrap: break-word;
}

button.copy-btn {
  margin-top: 10px;
  padding: 6px 12px;
  background: var(--gold);
  border: none;
  font-weight: bold;
  cursor: pointer;
  border-radius: 6px;
}

table.leaderboard {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
  word-break: break-word;
  overflow-wrap: break-word;
}

table.leaderboard th,
table.leaderboard td {
  padding: 10px;
  border-bottom: 1px solid #ddd;
  text-align: center;
  vertical-align: middle;
  word-break: break-word;
  white-space: normal;
}

table.leaderboard th {
  background: var(--gold);
  color: var(--black);
  cursor: pointer;
}

.highlight {
  background: yellow;
  font-weight: bold;
}

.current-user {
  background: #e1f5c4 !important;
}

.filters {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.filters input {
  padding: 8px;
  margin: 5px;
  font-size: 14px;
  flex: 1 1 180px;
  min-width: 0;
}

#totalReferrals,
#totalRewards {
  font-weight: bold;
  color: #d48806;
}

.share-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ccc;
  color: #fff;
  text-decoration: none;
  font-size: 16px;
  transition: background 0.2s;
}

.share-icon:hover {
  background: #888;
}

.banner-container {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.banner-fallback {
  color: #999;
  font-style: italic;
  margin-top: 10px;
}

.banner-fallback.hidden {
  display: none;
}

/* ---------- wallet-form ---------- */
.wallet-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 100%;
  margin-bottom: 25px;
  align-items: flex-start;
}

.wallet-form input {
  flex: 1 1 400px;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 15px;
  min-width: 0;
  box-sizing: border-box;
}

.wallet-form button {
  flex: 0 0 auto;
  white-space: nowrap;
  max-width: 100%;
  padding: 11px 18px;
  background: var(--gold);
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  color: black;
  box-sizing: border-box;
}

/* Make button full width on small screens to prevent overflow */
@media (max-width: 480px) {
  .wallet-form {
    flex-direction: column;
  }
  .wallet-form input,
  .wallet-form button {
    flex-basis: 100%;
    max-width: 100%;
    width: 100%;
  }
  .wallet-form button {
    white-space: normal;
  }
}

.wallet-form button:hover {
  background: #e6b800;
}

.wallet-error {
  color: red;
  font-size: 0.9rem;
  margin-top: 4px;
}

/* ── mobile fixes for leaderboard table */
@media (max-width: 768px) {
  /* Remove horizontal scroll, table adapts */
  .leaderboard {
    overflow-x: visible;
  }

  table.leaderboard {
    table-layout: auto;
    min-width: 0;
  }

  /* Filters input smaller on mobile */
  .filters input {
    flex: 1 1 100%;
  }
}

/* Removed .table-wrap and overflow-x auto as requested */
