/* Berkshire DAO — $GREED airdrop checker
   Extends styles.css. Same tokens: --green / --black / --font-pixel. */

.airdrop-page main { display: block; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px var(--pad-page);
  border-bottom: 1px solid var(--green);
}
.topbar__logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.topbar__logo img { width: 48px; height: 48px; }
.topbar__word { width: 160px; height: auto; aspect-ratio: 278 / 67; }
.topbar__back {
  font-family: var(--font-pixel);
  font-size: 11px;
  text-decoration: none;
  transition: opacity 0.15s var(--ease);
}
.topbar__back:hover { opacity: 0.7; }

/* ---------- Section overrides ---------- */
.checker { gap: 40px; padding-top: 72px; }
.checker .section__sub strong { font-weight: 500; color: #7dffb4; }

/* ---------- "Live, not final" pill ---------- */
.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 14px;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid var(--green);
  background: var(--green-dim);
}
.live-pill__dot {
  width: 7px;
  height: 7px;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: addr-pulse 2s ease-in-out infinite;
}

/* Timestamp under the tracked figure — makes "live" verifiable, not just a claim */
.payout__stamp {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.55;
}

/* ---------- Pool facts ---------- */
.pool {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  width: min(760px, 100%);
}
.pool__item {
  flex: 1 1 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 12px;
  text-align: center;
  background: var(--green-dim);
  border: 1px solid var(--green);
}
.pool__label {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.75;
}
.pool__value { white-space: nowrap; }

/* ---------- Panel ---------- */
.panel {
  width: min(760px, 100%);
  padding: 32px;
}
.panel__state {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.panel__state[hidden] { display: none; }
.panel__hint {
  font-size: 14px;
  line-height: 24px;
  opacity: 0.8;
}
.panel__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.panel__actions--end { justify-content: flex-end; }
.panel__actions .btn { flex: 1 1 auto; }
.panel__actions--end .btn { flex: 0 0 auto; }

/* The address field is the whole interaction — give it the weight to match. */
.panel__form { display: flex; gap: 12px; flex-wrap: wrap; }
.input {
  flex: 1 1 300px;
  min-width: 0;
  height: 64px;
  padding: 0 18px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid var(--green);
  color: var(--green);
  font-family: ui-monospace, monospace;
  font-size: 15px;
  outline-offset: 2px;
  transition: box-shadow 0.2s var(--ease), background-color 0.2s var(--ease);
}
.input:hover { background: rgba(0, 0, 0, 0.4); }
.input:focus { box-shadow: 0 0 0 1px var(--green), 0 0 18px rgba(0, 233, 100, 0.3); }
.input::placeholder { color: var(--green); opacity: 0.4; }
.input:focus-visible { outline: 2px solid var(--green); }

.panel__error {
  font-size: 13px;
  line-height: 22px;
  color: #ff8a7a;
}
.panel__error[hidden] { display: none; }

/* ---------- Checked address ---------- */
.panel__addr {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(0, 233, 100, 0.25);
}
.panel__addr-dot {
  width: 8px; height: 8px;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: addr-pulse 2s ease-in-out infinite;
}
@keyframes addr-pulse { 50% { opacity: 0.35; } }
.panel__addr-text {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.linkbtn {
  background: none;
  border: 0;
  padding: 0;
  color: var(--green);
  font: inherit;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  opacity: 0.7;
}
.linkbtn:hover { opacity: 1; }

/* ---------- Per-source breakdown ---------- */
.sources {
  display: flex;
  flex-direction: column;
}
.source {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 12px 16px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(0, 233, 100, 0.18);
}
.source__name {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.source__chain {
  font-family: var(--font-pixel);
  font-size: 11px;
  line-height: 1.5;
}
.source__tag {
  padding: 2px 6px;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--green);
  opacity: 0.75;
  white-space: nowrap;
}
.source__tag--boost {
  background: var(--green);
  color: var(--black);
  opacity: 1;
}
.source__bal {
  font-variant-numeric: tabular-nums;
  font-size: 15px;
  white-space: nowrap;
}
.source__pts {
  font-family: var(--font-pixel);
  font-size: 11px;
  text-align: right;
  min-width: 100px;
  white-space: nowrap;
}
.source--loading .source__bal,
.source--loading .source__pts { opacity: 0.4; }
.source--error .source__bal { color: #ff8a7a; }
.source--zero { opacity: 0.5; }

/* Scanning shimmer while an RPC call is in flight */
.source--loading .source__bal::after {
  content: "";
  display: inline-block;
  width: 8px;
  height: 1em;
  margin-left: 4px;
  background: var(--green);
  vertical-align: text-bottom;
  animation: cursor-blink 0.7s steps(1) infinite;
}

/* ---------- Totals ---------- */
.totals {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 4px;
}
.totals__row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 14px;
}
.totals__row strong {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* ---------- Payout ---------- */
.payout {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 28px 20px;
  text-align: center;
  background: rgba(0, 233, 100, 0.12);
  border: 1px solid var(--green);
  overflow: hidden;
}
.payout::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0 3px,
    rgba(0, 0, 0, 0.14) 3px 4px
  );
}
.payout > * { position: relative; }
.payout__label {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.75;
}
.payout__value {
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 18px rgba(0, 233, 100, 0.5);
  word-break: break-word;
}
.payout__unit { font-size: 0.6em; }
.payout__note {
  font-size: 12px;
  line-height: 20px;
  max-width: 460px;
  opacity: 0.7;
}
.payout--empty .payout__value { opacity: 0.45; }

/* ---------- Demo flag ---------- */
.demo-flag {
  width: min(760px, 100%);
  padding: 12px 16px;
  font-size: 13px;
  line-height: 22px;
  border: 1px dashed var(--green);
  opacity: 0.8;
}
.demo-flag[hidden] { display: none; }
.demo-flag code { font-family: ui-monospace, monospace; }

/* ---------- How it works ---------- */
.how__cards {
  display: flex;
  gap: 24px;
  width: 100%;
  max-width: 1184px;
}
.how__card {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  transition: transform 0.25s var(--ease), background-color 0.25s var(--ease);
}
.how__card:hover {
  transform: translateY(-4px);
  background: rgba(0, 233, 100, 0.16);
}

.formula {
  width: 100%;
  max-width: 1184px;
  padding: 20px;
  text-align: center;
  border: 1px solid var(--green);
  background: rgba(0, 0, 0, 0.6);
  overflow-x: auto;
}
.formula code {
  font-family: ui-monospace, monospace;
  font-size: 14px;
  white-space: nowrap;
}

.fineprint {
  max-width: 800px;
  font-size: 13px;
  line-height: 22px;
  text-align: center;
  opacity: 0.65;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .how__cards { flex-direction: column; }
}

@media (max-width: 640px) {
  .topbar { padding: 12px 16px; }
  .topbar__word { width: 120px; }
  .panel { padding: 20px; }
  .pool { flex-direction: column; }
  .source {
    grid-template-columns: 1fr auto;
    row-gap: 6px;
  }
  .source__name { grid-column: 1 / -1; }
  .source__pts { text-align: right; }
  .panel__actions--end { justify-content: stretch; }
  .panel__actions--end .btn { flex: 1 1 auto; width: auto; }
  .formula code { white-space: normal; }
}
