/* ============================================================================
   KingPepe Mining Pool — UI polish. Reuses the Explorer's tokens/classes
   (card, stat, grid stats, section-title, pill, table-wrap, two-col, btn) so it
   inherits the same colors, spacing and cinematic entrance animations. Only the
   mining-specific bits (live badge, skeletons, toasts, bars, charts, value-flash)
   live here. Matches cinematic.css (green glow, reduced-motion aware).
   ============================================================================ */

/* ---- LIVE badge (pulsing dot) ---- */
.live-badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase;
  background: rgba(78,201,90,.15); color: var(--green); border: 1px solid rgba(78,201,90,.4); vertical-align: middle; }
.live-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: mnPulse 1.6s ease-in-out infinite; }
.live-badge.off { background: rgba(255,92,108,.12); color: var(--red); border-color: rgba(255,92,108,.35); }
.live-badge.off .dot { background: var(--red); animation: none; }
.live-badge.wait { background: rgba(245,197,24,.12); color: var(--gold); border-color: rgba(245,197,24,.35); }
.live-badge.wait .dot { background: var(--gold); }
@keyframes mnPulse { 0% { box-shadow: 0 0 0 0 rgba(78,201,90,.55); } 70% { box-shadow: 0 0 0 7px rgba(78,201,90,0); } 100% { box-shadow: 0 0 0 0 rgba(78,201,90,0); } }

/* ---- subtitle / est tag ---- */
.mn-sub { color: var(--muted); margin: -6px 0 18px; }
.mn-est { font-size: 10px; font-weight: 700; color: var(--gold); background: rgba(245,197,24,.12);
  border: 1px solid rgba(245,197,24,.3); border-radius: 5px; padding: 0 5px; margin-left: 6px;
  text-transform: uppercase; letter-spacing: .4px; vertical-align: middle; }

/* ---- skeleton shimmer ---- */
.sk { display: inline-block; min-width: 54px; height: 1em; border-radius: 6px; color: transparent !important;
  background: linear-gradient(90deg, var(--card2) 25%, #26313f 37%, var(--card2) 63%); background-size: 400% 100%;
  animation: mnSk 1.4s ease infinite; }
.sk.wide { min-width: 120px; }
@keyframes mnSk { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* ---- value change flash (matches cinematic kpeNum glow) ---- */
.flash { animation: mnFlash .8s ease; }
@keyframes mnFlash { 0% { color: var(--green); text-shadow: 0 0 14px rgba(34,217,127,.7); } 100% { text-shadow: none; } }

/* ---- bars (round progress + network share) ---- */
.mn-bar { height: 10px; border-radius: 6px; background: var(--bg2); border: 1px solid var(--border); overflow: hidden; }
.mn-bar > i { display: block; height: 100%; width: 0; border-radius: 6px;
  background: linear-gradient(90deg, var(--green-dim), var(--green)); transition: width .8s cubic-bezier(.2,.7,.2,1); }
.mn-bar.gold > i { background: linear-gradient(90deg, #b8890a, var(--gold)); }
.mn-bar.thin { height: 6px; }

/* ---- charts ---- */
.mn-chartbox { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; }
.mn-chartbox canvas { width: 100%; display: block; height: 150px; }
.mn-chart-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.mn-chart-head .v { font-weight: 700; }

/* shares breakdown mini-bars */
.mn-breakdown { display: grid; gap: 8px; }
.mn-brow { display: grid; grid-template-columns: 88px 1fr 60px; align-items: center; gap: 10px; font-size: 13px; }
.mn-brow .lab { color: var(--muted); }
.mn-brow .cnt { text-align: right; font-variant-numeric: tabular-nums; }

/* ---- pool badge on native blocks ---- */
.badge-pool { background: rgba(78,201,90,.16); color: var(--green); border: 1px solid rgba(78,201,90,.4);
  padding: 1px 7px; border-radius: 20px; font-size: 10px; font-weight: 700; }

/* ---- live recent shares ---- */
.mn-shares { max-height: 300px; overflow: auto; }
.mn-share-row { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-bottom: 1px solid var(--border);
  font-size: 13px; animation: mnRowIn .3s ease; }
.mn-share-row:last-child { border-bottom: none; }
.mn-share-row .dotk { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.mn-share-row.acc .dotk { background: var(--green); }
.mn-share-row.rej .dotk { background: var(--red); }
.mn-share-row.stale .dotk { background: var(--gold); }
.mn-share-row .who { color: var(--muted); flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mn-share-row .tm { color: var(--muted); font-size: 12px; }
@keyframes mnRowIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---- notifications (toasts) ---- */
.mn-toasts { position: fixed; right: 16px; bottom: 16px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; max-width: 320px; }
.mn-toast { background: var(--card); border: 1px solid var(--border); border-left: 3px solid var(--green); border-radius: 10px;
  padding: 10px 12px; box-shadow: 0 8px 30px rgba(0,0,0,.45); font-size: 13px; color: var(--text);
  animation: mnToastIn .35s cubic-bezier(.2,.7,.2,1); display: flex; gap: 10px; align-items: flex-start; }
.mn-toast .ic { font-size: 16px; line-height: 1.2; }
.mn-toast .tt { font-weight: 700; }
.mn-toast .ts { color: var(--muted); font-size: 12px; margin-top: 2px; }
.mn-toast.block { border-left-color: var(--gold); }
.mn-toast.payout { border-left-color: var(--blue); }
.mn-toast.miner { border-left-color: var(--green); }
.mn-toast.leaving { animation: mnToastOut .3s ease forwards; }
@keyframes mnToastIn { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: none; } }
@keyframes mnToastOut { to { opacity: 0; transform: translateX(26px); height: 0; padding-top: 0; padding-bottom: 0; margin-top: -8px; } }

/* ---- mobile ---- */
@media (max-width: 760px) {
  .mn-toasts { left: 12px; right: 12px; bottom: 12px; max-width: none; }
  .mn-brow { grid-template-columns: 72px 1fr 52px; }
}

/* ---- reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  .live-badge .dot { animation: none; }
  .sk { animation: none; }
  .flash, .mn-share-row, .mn-toast { animation: none; }
  .mn-bar > i { transition: none; }
}
