/* -----------------------------------------------------------------
   staking.css — PentaPool Staking Module Styles
   p49-staking-module (v3: per-plan limits, claim/restake, 250 M cap)
   ----------------------------------------------------------------- */

/* ── Page header / wallet strip ── */
.stk-page-header {
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
}
.stk-wallet-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex-shrink: 0;
}
.stk-connect-btn { white-space: nowrap; }
.stk-wallet-addr {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 10px;
}
.stk-wallet-bal {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 10px;
}

/* ── KPI grid ── */
.stk-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.stk-kpi-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
}
.stk-kpi-icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stk-kpi-label {
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.stk-kpi-value {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 3px;
  line-height: 1.2;
}
.stk-kpi-sub { font-size: 11px; color: var(--text-muted); }

/* ── Plans grid ── */
.stk-plans-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}
.stk-plan-card {
  position: relative;
  background: var(--bg-elevated);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 20px 14px 18px;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
  text-align: center;
  user-select: none;
  outline: none;
}
.stk-plan-card:hover {
  border-color: rgba(96,165,250,0.55);
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 4px 18px rgba(59,130,246,0.12);
}
.stk-plan-card:focus-visible {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.25);
}
.stk-plan-card.stk-plan-selected {
  border-color: var(--blue);
  background: rgba(59,130,246,0.08);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15), 0 4px 20px rgba(59,130,246,0.14);
  transform: translateY(-1px);
}
/* Selected checkmark */
.stk-plan-check {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 20px;
  height: 20px;
  background: var(--blue);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}
/* Badge */
.stk-plan-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(90deg,#1d4ed8,#0891b2);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 10px;
  white-space: nowrap;
}
.stk-plan-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 10px;
}
.stk-plan-card.stk-plan-selected .stk-plan-label { color: var(--text-primary); }
.stk-plan-apy-big {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 2px;
}
.stk-plan-apy-lbl {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.stk-plan-lock-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.stk-plan-maxwallet-row {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.stk-plan-maxwallet-row strong {
  color: var(--text-secondary);
  font-weight: 700;
}
/* Feature bullets */
.stk-plan-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 10px;
}
.stk-plan-features li {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  font-size: 10.5px;
  color: var(--text-muted);
  text-align: left;
}
.stk-plan-card.stk-plan-selected .stk-plan-features li { color: var(--text-secondary); }
.stk-plan-features li svg { flex-shrink: 0; color: #34d399; }

/* ── Stake panel ── */
.stk-stake-panel {}
.stk-stake-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}
.stk-stake-col-left {}
.stk-stake-col-right {}
.stk-summary-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.stk-field-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  margin-bottom: 7px;
}
.stk-amount-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.stk-amount-input {
  flex: 1;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  outline: none;
  min-width: 0;
  transition: border-color 0.12s ease;
}
.stk-amount-input:focus { border-color: var(--blue); }
.stk-amount-input::placeholder { color: var(--text-muted); font-weight: 400; font-size: 13px; }
.stk-amount-input::-webkit-inner-spin-button,
.stk-amount-input::-webkit-outer-spin-button { -webkit-appearance: none; }
.stk-amount-input[type=number] { -moz-appearance: textfield; }
.stk-max-btn { align-self: stretch; padding: 0 14px; }
.stk-field-hint { font-size: 11px; color: var(--text-muted); margin-top: 6px; line-height: 1.5; }

.stk-summary-grid { display: flex; flex-direction: column; }
.stk-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-subtle);
  gap: 10px;
}
.stk-summary-row:last-child { border-bottom: none; }
.stk-summary-lbl { font-size: 11.5px; color: var(--text-muted); flex-shrink: 0; }
.stk-summary-val { font-size: 12px; font-weight: 600; color: var(--text-primary); text-align: right; word-break: break-word; }

.stk-stake-action-btn { min-width: 260px; }
.stk-stake-action-btn:disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }

/* ── My Stakes table ── */
.stk-stakes-table-wrap { overflow-x: auto; }
.stk-stakes-table { min-width: 700px; }
.stk-stakes-table th { font-size: 11px; white-space: nowrap; }
.stk-stakes-table td { font-size: 12px; white-space: nowrap; }
.stk-empty-cell { padding: 0 !important; border: none !important; }
.stk-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px 24px;
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
  line-height: 1.6;
}
/* Status badges */
.stk-status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.stk-status-flexible { background: rgba(52,211,153,0.15); color: #34d399; }
.stk-status-locked   { background: rgba(251,191,36,0.15);  color: #fbbf24; }
.stk-status-unlocked { background: rgba(96,165,250,0.15);  color: #60a5fa; }
.stk-status-paused   { background: rgba(248,113,113,0.15); color: #f87171; }
/* Legend strip below table */
.stk-stakes-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  padding: 10px 16px;
  border-top: 1px solid var(--border-subtle);
  font-size: 11px;
  color: var(--text-muted);
  align-items: center;
}
.stk-stakes-legend span { display: flex; align-items: center; gap: 6px; }
/* Action button groups for stake rows (future use) */
.stk-action-group { display: flex; gap: 5px; flex-wrap: nowrap; }
.stk-action-group .btn { font-size: 11px; padding: 4px 9px; white-space: nowrap; }

/* ── Reward pool heroes (two columns) ── */
.stk-pool-heroes {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
}
.stk-pool-hero-divider {
  width: 1px;
  height: 60px;
  background: var(--border-subtle);
}
.stk-pool-hero-item { text-align: center; }
.stk-pool-hero-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.stk-pool-hero-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}
.stk-pool-hero-sub { font-size: 11px; color: var(--text-muted); line-height: 1.4; }

/* Progress bar */
.stk-pool-progress-wrap { margin-bottom: 20px; }
.stk-pool-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
  flex-wrap: wrap;
  gap: 4px;
}
.stk-pool-progress-bar {
  height: 6px;
  background: var(--bg-elevated);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}
.stk-pool-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #06b6d4);
  border-radius: 6px;
  transition: width 0.4s ease;
}

.stk-pool-grid { display: flex; flex-direction: column; }
.stk-pool-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.stk-pool-row:last-child { border-bottom: none; }
.stk-pool-row-label { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 2px; }
.stk-pool-row-desc { font-size: 11px; color: var(--text-muted); }
.stk-pool-row-val {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
  text-align: right;
}
.stk-na { font-size: 15px; font-weight: 700; color: var(--text-muted); }
.stk-na-lbl { font-size: 10px; color: var(--text-muted); }

/* ── Notes ── */
.stk-notes-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.stk-notes-item { display: flex; align-items: flex-start; gap: 9px; font-size: 12.5px; color: var(--text-secondary); line-height: 1.6; }

/* ── Responsive — tablet ≤ 1100px ── */
@media (max-width: 1100px) {
  .stk-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .stk-plans-grid { grid-template-columns: repeat(3, 1fr); }
  .stk-pool-heroes { grid-template-columns: 1fr; gap: 12px; }
  .stk-pool-hero-divider { display: none; }
}
@media (max-width: 900px) {
  .stk-stake-grid { grid-template-columns: 1fr; }
}

/* ── Responsive — mobile ≤ 768px ── */
@media (max-width: 768px) {
  .stk-wallet-strip { width: 100%; }
  .stk-connect-btn { width: 100%; justify-content: center; }
  .stk-kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stk-plans-grid { grid-template-columns: repeat(2, 1fr); }
  .stk-stake-action-btn { width: 100%; min-width: 0; }
  .stk-stakes-legend { gap: 10px; }
}

/* ── Responsive — narrow ≤ 480px ── */
@media (max-width: 480px) {
  .stk-kpi-grid { grid-template-columns: 1fr; }
  .stk-plans-grid { grid-template-columns: 1fr; }
  .stk-kpi-card { padding: 14px; }
  .stk-pool-hero-value { font-size: 18px; }
  .stk-pool-progress-label { flex-direction: column; }
}

/* ── Light theme ── */
html[data-theme="light"] .stk-amount-input { background: #fff; color: #0f172a; }
html[data-theme="light"] .stk-plan-card { background: #f8fafc; }
html[data-theme="light"] .stk-plan-card.stk-plan-selected { background: rgba(37,99,235,0.06); }
html[data-theme="light"] .stk-pool-progress-bar { background: #e2e8f0; }
