/* =============================================================
   KingPulse Studio - Multi-DEX Arbitrage & Flash Swap Engine Styles
   ============================================================= */

.arbitrage-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Controls Banner */
.arb-controls-banner {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 16px 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.arb-control-group {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.arb-slider-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.25);
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.arb-slider-box span {
  font-size: 12px;
  color: var(--muted);
}
.arb-slider-box input[type="range"] {
  cursor: pointer;
  accent-color: #7ae7c1;
}

.arb-toggle-box {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  cursor: pointer;
}

/* Summary Banner */
.arb-summary-banner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.arb-summary-stat {
  background: linear-gradient(145deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.01) 100%);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.arb-stat-title {
  font-size: 11px;
  color: var(--muted);
}
.arb-stat-val {
  font-size: 14px;
  font-weight: 700;
}

/* Results Grid */
.arb-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}

.arb-card {
  background: linear-gradient(145deg, rgba(19,23,40,0.85) 0%, rgba(13,16,32,0.85) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.arb-card:hover {
  transform: translateY(-3px);
  border-color: rgba(122, 231, 193, 0.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.arb-card-highlight {
  border-color: rgba(122, 231, 193, 0.45);
  box-shadow: 0 0 25px rgba(122, 231, 193, 0.1);
}

.arb-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.arb-token-info {
  display: flex;
  align-items: center;
  gap: 10px;
}
.arb-token-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}
.arb-token-sym {
  font-size: 15px;
  font-weight: 700;
  font-family: 'DM Mono', monospace;
}
.arb-token-sub {
  font-size: 11px;
  color: var(--muted);
}

.arb-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
}
.arb-badge-profit   { background: rgba(122,231,193,0.15); color: #7ae7c1; border: 1px solid rgba(122,231,193,0.3); }
.arb-badge-marginal { background: rgba(245,176,65,0.15); color: #f5b041; border: 1px solid rgba(245,176,65,0.3); }
.arb-badge-neutral  { background: rgba(255,255,255,0.06); color: var(--muted); border: 1px solid rgba(255,255,255,0.1); }

/* Route Strip */
.arb-route-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 10px 14px;
  gap: 8px;
}

.arb-leg {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}
.arb-leg-action {
  font-size: 10px;
  color: var(--muted);
}
.arb-leg-dex {
  font-size: 12px;
  color: #fff;
  font-weight: 700;
}
.arb-leg-rate {
  font-size: 11px;
  color: #7ae7c1;
}

.arb-arrow {
  color: var(--muted);
  font-size: 16px;
  padding: 0 4px;
}

/* Details Table */
.arb-details-table {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 10px;
  padding: 10px 12px;
}

.arb-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
}
.arb-row span { color: var(--muted); }

.arb-row-highlight {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 6px;
  margin-top: 2px;
}

.color-profit { color: #7ae7c1 !important; font-weight: 700; }
.color-cyan   { color: #62ddea !important; }
.color-danger { color: #e74c3c !important; }

/* Actions */
.arb-actions {
  display: flex;
  gap: 10px;
}
.arb-flash-btn {
  flex: 2;
  background: linear-gradient(135deg, rgba(122,231,193,0.2) 0%, rgba(99,102,241,0.2) 100%) !important;
  border: 1px solid rgba(122,231,193,0.3) !important;
}
.arb-flash-btn:hover {
  background: linear-gradient(135deg, rgba(122,231,193,0.3) 0%, rgba(99,102,241,0.3) 100%) !important;
}
.arb-trade-link {
  flex: 1;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Flash Simulator Steps */
.flash-steps-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 14px 0;
  text-align: right;
}

.flash-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 10px 12px;
}

.flash-step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(122, 231, 193, 0.15);
  color: #7ae7c1;
  font-weight: 800;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.flash-step-body b {
  font-size: 13px;
  display: block;
  margin-bottom: 2px;
}
.flash-step-body p {
  font-size: 11px;
  color: var(--muted);
  margin: 0;
}

/* Empty State */
.arb-empty-card {
  grid-column: 1 / -1;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 40px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.arb-empty-icon {
  font-size: 36px;
}
.arb-empty-card h3 {
  margin: 0;
  font-size: 16px;
}
.arb-empty-card p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  max-width: 480px;
}

.arb-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(122,231,193,0.3);
  border-top-color: #7ae7c1;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}
