/* ================================
   Trading Status Indicators
   ================================ */

.eps-status-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 8px 14px;
  margin: 8px auto 10px auto;
  max-width: 1320px;
}

.eps-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .25px;
  line-height: 1;
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 6px 18px rgba(0,0,0,.16);
  white-space: nowrap;
}

.eps-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 3px rgba(255,255,255,.12);
}

/* Green: API Connected / safe OK */
.eps-status-green {
  background: rgba(16, 185, 129, .16);
  color: #34d399;
  border-color: rgba(52, 211, 153, .35);
}
.eps-status-green .eps-status-dot {
  background: #22c55e;
}

/* Orange: Market Closed */
.eps-status-orange {
  background: rgba(245, 158, 11, .16);
  color: #fbbf24;
  border-color: rgba(251, 191, 36, .35);
}
.eps-status-orange .eps-status-dot {
  background: #f59e0b;
}

/* Grey: Live Trading Off / unknown */
.eps-status-grey {
  background: rgba(148, 163, 184, .14);
  color: #cbd5e1;
  border-color: rgba(203, 213, 225, .22);
}
.eps-status-grey .eps-status-dot {
  background: #94a3b8;
}

/* Red: Risk Breach / dangerous state */
.eps-status-red {
  background: rgba(239, 68, 68, .18);
  color: #f87171;
  border-color: rgba(248, 113, 113, .42);
  animation: epsPulseRisk 1.5s ease-in-out infinite;
}
.eps-status-red .eps-status-dot {
  background: #ef4444;
}

/* Blue: Paper Mode */
.eps-status-blue {
  background: rgba(59, 130, 246, .17);
  color: #60a5fa;
  border-color: rgba(96, 165, 250, .38);
}
.eps-status-blue .eps-status-dot {
  background: #3b82f6;
}

@keyframes epsPulseRisk {
  0%, 100% { box-shadow: 0 6px 18px rgba(239,68,68,.12); }
  50% { box-shadow: 0 6px 24px rgba(239,68,68,.38); }
}

/* Light mode friendly */
body.light-mode .eps-status-pill,
html.light-mode .eps-status-pill,
[data-theme="light"] .eps-status-pill {
  box-shadow: 0 5px 14px rgba(15,23,42,.08);
}

body.light-mode .eps-status-green,
html.light-mode .eps-status-green,
[data-theme="light"] .eps-status-green {
  background: #dcfce7;
  color: #047857;
  border-color: #86efac;
}

body.light-mode .eps-status-orange,
html.light-mode .eps-status-orange,
[data-theme="light"] .eps-status-orange {
  background: #fef3c7;
  color: #92400e;
  border-color: #fcd34d;
}

body.light-mode .eps-status-grey,
html.light-mode .eps-status-grey,
[data-theme="light"] .eps-status-grey {
  background: #f1f5f9;
  color: #475569;
  border-color: #cbd5e1;
}

body.light-mode .eps-status-red,
html.light-mode .eps-status-red,
[data-theme="light"] .eps-status-red {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fca5a5;
}

body.light-mode .eps-status-blue,
html.light-mode .eps-status-blue,
[data-theme="light"] .eps-status-blue {
  background: #dbeafe;
  color: #1d4ed8;
  border-color: #93c5fd;
}

@media (max-width: 768px) {
  .eps-status-strip {
    padding: 7px 10px;
    gap: 6px;
  }

  .eps-status-pill {
    font-size: 11px;
    padding: 6px 9px;
  }
}
